/[gzz]/gzz/gfx/anim/paper.py
ViewVC logotype

Diff of /gzz/gfx/anim/paper.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jvk, Sun Dec 1 18:13:10 2002 UTC revision 1.3 by jvk, Sun Dec 1 19:11:20 2002 UTC
# Line 2  Line 2 
2  from gfx.libutil import saveanim  from gfx.libutil import saveanim
3  from math import exp  from math import exp
4    
5  dryrun = 1  # number of skipped frames
6    dry = 1000
7    
8  frame = 0  frame = 0
9    
10  def _saveframe(w):  def _saveframe(w):
11      global frame      global frame
12      if not dryrun:      if frame > dry:
13          saveanim.saveframe("tmpfilm/paper%03i.jpg" % frame, w)          saveanim.saveframe("tmpfilm/paper%03i.jpg" % frame, w)
14      print "Frame", frame      print "Frame", frame
15      frame += 1      frame += 1
# Line 31  def makeAnim(): Line 32  def makeAnim():
32    
33      if 1:      if 1:
34          execfile("gfx/demo/papertest.py", globals())          execfile("gfx/demo/papertest.py", globals())
35            setFrame()
36          ps = MultiPaperScene()          ps = MultiPaperScene()
37          ps.seed = 199871850          ps.seed = 199871850
38          ps.initpaper()          ps.initpaper()
# Line 93  def makeAnim(): Line 95  def makeAnim():
95    
96          saveframes(vs1, vs2, 48); vs1 = vs2;          saveframes(vs1, vs2, 48); vs1 = vs2;
97    
98      if not dryrun:      if frame > dry:
99          saveanim.encodefilm("tmpfilm/paper\\*.jpg", "paperfilm.avi")          saveanim.encodefilm("tmpfilm/paper\\*.jpg", "paperfilm.avi")
100    
101  makeAnim()  makeAnim()

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26