gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob/vob/demo/multifil randgraph.py


From: Janne V. Kujala
Subject: [Gzz-commits] libvob/vob/demo/multifil randgraph.py
Date: Fri, 13 Jun 2003 08:27:10 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Janne V. Kujala <address@hidden>        03/06/13 08:27:10

Modified files:
        vob/demo/multifil: randgraph.py 

Log message:
        rotate

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/randgraph.py.diff?tr1=1.12&tr2=1.13&r1=text&r2=text

Patches:
Index: libvob/vob/demo/multifil/randgraph.py
diff -u libvob/vob/demo/multifil/randgraph.py:1.12 
libvob/vob/demo/multifil/randgraph.py:1.13
--- libvob/vob/demo/multifil/randgraph.py:1.12  Thu Jun 12 09:29:57 2003
+++ libvob/vob/demo/multifil/randgraph.py       Fri Jun 13 08:27:10 2003
@@ -89,10 +89,13 @@
         N2 = 2*self.N/3
 
         box = 800
-        
-        # XXX: Rotate around y axis
-        
+
         cs = vs.scaleCS(0, "cs", 1, 1, .15)
+        cs = vs.translateCS(cs, "Trans", 0.5 * box, 0.5 * box, 0.5 * box);
+
+        cs = vs.coords.rotateXYZ(cs,  0, 1, 0,  self.ang);
+        vs.matcher.add(cs, "Rot")
+        
 
         thick = vs.coords.rational1D22(0, self.thick, 0, 0,  0, 1, 0);
         angle = vs.coords.rational1D22(0, self.angle, 0, 0,  1, 0, 0);
@@ -102,9 +105,9 @@
 
         nodes = [ {
             "cs" : vs.orthoBoxCS(cs, "node%s" % i,
-                                 rng.random() * box,
-                                 rng.random() * box,
-                                 rng.random() * box, 1, 1, self.size, 
self.size),
+                                 (rng.random() -.5) * box,
+                                 (rng.random() -.5) * box,
+                                 (rng.random() -.5) * box, 1, 1, self.size, 
self.size),
             "conns" : [ ],
             } for i in range(0,self.N) ]
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]