[Edu-sig] Just some stuff

ajsiegel at optonline.net ajsiegel at optonline.net
Tue Jan 25 18:15:15 CET 2005


Hi Kirby -

Attempting this has been a good learning exercise, as I am trying to make it as much like a "real" application as possible.

For example, I don't assume a location (more importantly a particular version) 
of Povray, but get it from the registry using winreg, and add the location derived
from the registry to the path.

My problems (now at least temporarily solved) had to do with timing, performance and catching and reporting errors. 

PyGeo is opened and consuming resources - and as you know Povray rendering is resource intensive. 

Timing wise, PyGeo has to know to wait for povray to finish rendering before trying to retrieve  and display the rendered image. 

And I was getting wildly varying performance - sometimes the PyGeo resource consumption seems to be released before the rendering starts, sometimes not.  

Piping povray errors to Pygeo doesn't seem to be an option on Windows (as far as I can understand), so that I am settling for writing to an error file. 

I'm sure the issues here are knowable - I just don't know them. And working on Windows, I guess I getted a bit psyched-out.  It's a mind set one gets into, more than anything - from the lack of transparency.  

As it turns out there was more stupidity than I like to admit at the bottom of the problems frustrating me in getting this done.

Art


- Original Message -----
From: Kirby Urner <urnerk at qwest.net>
Date: Tuesday, January 25, 2005 10:56 am
Subject: RE: [Edu-sig] Just some stuff

> 
> Hey Arthur, I know you're shooting for more seamless integration 
> of PyGeo
> and POV-Ray, but at least you should be able to get away with a loose
> coupling via an ordinary os.system() call.  I've long used such 
> code from
> IDLE e.g. something like:
> 
> [$%!!*, that post got away from me -- stupid keystroke shortcuts...]
> 
> Something like:
> 
> import os
> 
> def render(filename="default.pov"):
>    if os.name == 'linux2':
>        linuxcomm = "povray +V +W640 +H480 +FN16 +AM2 +Q9 +A0.3 +P
> L/home/urnerk/include"
>        print "Rendering... (this will take some time)"
>        os.system(linuxcomm+" +I"+filename)
>    if os.name == 'nt':
>        wincomm = '"c:\\program files\\POV-Ray for Windows
> v3.5\\bin\\pvengine" -V fpp.ini'
>        print "Rendering... (this will take some time)"
>        os.system(wincomm)
> 
> Certainly if you're able to frame a shot in Pygeo and then feed it 
> to a
> POV-Ray camera for rendering, that'd be a useful feature (maybe 
> you have it
> already).  Users of Springdance certainly appreciate and make good 
> use of
> that feature, and of Struck (which'd export full-fledged 
> animations, using
> POV-Ray's clock-driven looping feature).
> 
> If you've not used Springdance, I recommend adding it to your 
> interactivegeometry toolkit -- but it only runs in Windows (coded 
> in Delphi):
> http://shapeofspace.org/springdance/
> 
> 
> Related blog link:
> http://worldgame.blogspot.com/2004/11/canadian-tech-springdance.html
> 
> 
> Kirby
> 
> 
> 



More information about the Edu-sig mailing list