[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ff-cvs] libvob/vob demo/multifil/randgraph.py fillet/li...
From: |
Janne V. Kujala |
Subject: |
[ff-cvs] libvob/vob demo/multifil/randgraph.py fillet/li... |
Date: |
Tue, 19 Aug 2003 11:14:36 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Branch:
Changes by: Janne V. Kujala <address@hidden> 03/08/19 11:14:36
Modified files:
vob/demo/multifil: randgraph.py
vob/fillet : light3d.py
Added files:
vob/usertest : fillet1.py
Log message:
start first fillet usertest program
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/randgraph.py.diff?tr1=1.28&tr2=1.29&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/fillet/light3d.py.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/usertest/fillet1.py?rev=1.1
Patches:
Index: libvob/vob/demo/multifil/randgraph.py
diff -u libvob/vob/demo/multifil/randgraph.py:1.28
libvob/vob/demo/multifil/randgraph.py:1.29
--- libvob/vob/demo/multifil/randgraph.py:1.28 Tue Aug 19 06:20:50 2003
+++ libvob/vob/demo/multifil/randgraph.py Tue Aug 19 11:14:35 2003
@@ -59,6 +59,7 @@
Action("Rotate Up", "Up", lambda *x: rotY(-10)),
Action("Rotate Down", "Down", lambda *x: rotY(10)),
Action("Use display list", "D", self.compile, noAnimation=1),
+ SlideLin("N", 21, 3, "N", "N", "n"),
SlideLin("seed", 42, 1, "seed number", "A", "a"),
SlideLin("seed2", 42, 1, "highlihght seed number", "Z", "z"),
Toggle("path2", 0, "length-2 path", "2"),
@@ -66,6 +67,8 @@
)
self.list = None
+ self.box = 800
+
class Listener(RelativeAxisListener):
def __init__(self, changed):
self.changed = changed
@@ -125,7 +128,7 @@
a["conns"].append(node["cs"])
b["conns"].append(node["cs"])
- rng = Random(self.seed2 * 77)
+ rng = Random(self.seed2)
nodes0 = nodes
while nodes0:
x = rng.choice(nodes0)
@@ -166,14 +169,12 @@
def scene(self, vs):
vs.put( background((.5,1,.2)))
- box = 800
-
cs = vs.scaleCS(0, "cs", 1, 1, 1)
size = vs.getSize()
cs = vs.translateCS(cs, "Trans",
0.5 * size.width,
0.5 * size.height,
- 0.5 * box);
+ 0.5 * self.box);
cs = vs.coords.rotateQuaternion(cs, *self.rot)
vs.matcher.add(cs, "Rot")
@@ -181,4 +182,4 @@
if self.list:
vs.put(self.list, cs)
else:
- self.putGraph(vs, cs, box)
+ self.putGraph(vs, cs, self.box)
Index: libvob/vob/fillet/light3d.py
diff -u libvob/vob/fillet/light3d.py:1.37 libvob/vob/fillet/light3d.py:1.38
--- libvob/vob/fillet/light3d.py:1.37 Tue Aug 19 04:36:46 2003
+++ libvob/vob/fillet/light3d.py Tue Aug 19 11:14:36 2003
@@ -236,7 +236,6 @@
Toggle("stretched", 1, "Toggle stretched", "v"),
Toggle("curvature", 0, "Show curvature", "c"),
Toggle("sectors", 1, "Show sectors", "w"),
- SlideLin("N", 21, 3, "N", "N", "n"),
Toggle("fillets", 1, "Toggle filleting", "f"),
SlideLin("size", 100, 10, "Node size", "K", "k"),
SlideLin("dice", 20, 1, "Dice factor", "P", "p"),