/[libvob]/libvob/vob/demo/multifil/stretching.py
ViewVC logotype

Diff of /libvob/vob/demo/multifil/stretching.py

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

revision 1.1 by jvk, Wed Jun 25 14:26:46 2003 UTC revision 1.2 by jvk, Fri Jun 27 11:53:15 2003 UTC
# Line 28  from vob.putil import cg Line 28  from vob.putil import cg
28  from vob.putil.misc import *  from vob.putil.misc import *
29  from vob.putil.demokeys import *  from vob.putil.demokeys import *
30  from vob.paper.texcache import getCachedTexture  from vob.paper.texcache import getCachedTexture
31    from vob.fillet import light3d
32    
33    
34    
# Line 38  class Scene: Line 39  class Scene:
39              self,              self,
40              SlideLin("x", 0, 20, "x", "Left", "Right"),              SlideLin("x", 0, 20, "x", "Left", "Right"),
41              SlideLin("angle", .15, .05, "angle scaling constant", "+", "-"),              SlideLin("angle", .15, .05, "angle scaling constant", "+", "-"),
42              SlideLin("thick", 1, .1, "thickness", "T", "t"),              SlideLin("thickc", 1, .1, "thickness", "T", "t"),
43              Toggle("drawEdge", 1, "Draw edge", "e"),              *light3d.commonkeys
             Toggle("drawInside", 1, "Draw inside", "i"),  
             Toggle("depthColor", 0, "Color from depth", "d"),  
             Toggle("lines", 0, "Toggle showing lines", "l"),  
             Toggle("ellipses", 1, "Toggle ellipses", "s"),  
             Toggle("stretched", 1, "Toggle stretched", "v"),  
             Toggle("curvature", 0, "Show curvature", "c"),  
             Toggle("sectors", 1, "Show sectors", "z"),  
             SlideLin("size", 40, 5, "Node size", "K", "k"),  
             SlideLin("dice", 20, 1, "Dice factor", "P", "p"),  
44          )          )
45      def scene(self, vs):      def scene(self, vs):
46          vs.put( background((.5,1,.2)))          vs.put( background((.5,1,.2)))
# Line 69  class Scene: Line 61  class Scene:
61          #thick = vs.orthoCS(0, "Thi", 0, self.thick, 0, 0, 0);          #thick = vs.orthoCS(0, "Thi", 0, self.thick, 0, 0, 0);
62          #thick = vs.orthoCS(0, "Thi", 0, 100*(self.thick / (math.hypot(self.x - 500, self.y - 500)+50)), 0, 0, 0);          #thick = vs.orthoCS(0, "Thi", 0, 100*(self.thick / (math.hypot(self.x - 500, self.y - 500)+50)), 0, 0, 0);
63    
64          thick = vs.coords.rational1D22(0, self.thick, 0, 0,  1, 1, 0);          thick = vs.coords.rational1D22(0, self.thickc, 0, 0,  1, 1, 0);
65          angle = vs.coords.rational1D22(0, self.angle, 0, 0, 1, 0, 0);          angle = vs.coords.rational1D22(0, self.angle, 0, 0, 1, 0, 0);
66          angle = vs.coords.rational1D22(0, 1, 0, self.angle, 0, 1, 0);          angle = vs.coords.rational1D22(0, 1, 0, self.angle, 0, 1, 0);
67          vs.matcher.add(thick, "Thi")          vs.matcher.add(thick, "Thi")

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

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