From:
<fre...@gb...> - 2008-01-15 07:04:25
|
On mardi 15 janvier 2008, Bruce Sherwood wrote: > The URL you give is not valid. There is just a missing dot just before 'avi'... Sorry! > Can you please explain the heart of your program, the function > generateMovie? I don't understand what is involved in combining many png > images into a movie. What is the format of the movie? How does one view > such a movie? > > Also, I don't see where/how the povexport facility is invoked (povexport > is a routine available on the home page of vpython.org). Maybe it's > buried inside the module "Scene3D" which you don't include? Ok. The povexport.pov() function is called in the scene.pov() method. It=20 generates the pov file with the given filename of the current scene. But=20 this method is call through __povexport(), which also call povray to=20 generate the png image. The idea is to define some points where we go in straight line. This is=20 done in the move() method. By points I mean 2 things: the spectrometer=20 position, and the camera position (for zooms). All this is given in the=20 mvt dict. Most of keys are send to sub-objects, and are just angles of=20 differents spectro parts. At each step in the move(), we call the draw method, which in turn refresh= =20 all sub-objects and also generate a png image. There is also a wait() method, which just to generate images at the same=20 position, with respect of the timing. Last, there is a neutron object which can move along a pre-defined line,=20 and which also call the __povexport() method (through its newFrameSignal()= =20 object, binded to that method). At the end, we have all png images. The generateMove() method build a movie= =20 from that, using mplayer (Don't ask me for all options; a friend gave them= =20 to me!). Hope this helps. Feel free to ask for more informations. =2D-=20 Fr=E9d=E9ric http://www.gbiloba.org |