[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: |
Fri, 15 Aug 2003 05:52:13 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Branch:
Changes by: Janne V. Kujala <address@hidden> 03/08/15 05:52:12
Modified files:
vob/demo/multifil: randgraph.py
vob/fillet : light3d.py
Log message:
try highlighted nodes
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/randgraph.py.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/fillet/light3d.py.diff?tr1=1.35&tr2=1.36&r1=text&r2=text
Patches:
Index: libvob/vob/demo/multifil/randgraph.py
diff -u libvob/vob/demo/multifil/randgraph.py:1.26
libvob/vob/demo/multifil/randgraph.py:1.27
--- libvob/vob/demo/multifil/randgraph.py:1.26 Wed Jul 9 10:05:25 2003
+++ libvob/vob/demo/multifil/randgraph.py Fri Aug 15 05:52:10 2003
@@ -59,6 +59,8 @@
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("seed", 42, 1, "seed number", "A", "a"),
+ SlideLin("seed2", 42, 1, "highlihght seed number", "Z", "z"),
*light3d.commonkeys
)
self.list = None
@@ -122,10 +124,19 @@
a["conns"].append(node["cs"])
b["conns"].append(node["cs"])
-
+ rng = Random(self.seed2 * 77)
+ x = rng.choice(nodes)
+ hl = [x, x]
+ while hl[0] == hl[1]:
+ hl[1] = rng.choice(nodes)
+
def pc(conns, cs):
for node in nodes:
if node["conns"]:
+ if node in hl:
+ vs.put(getDListNocoords("Color 1 0 0"))
+ else:
+ vs.put(getDListNocoords("Color .2 .2 1"))
vs.put(conns, cs + [node["cs"]] + node["conns"])
light3d.drawFillets(self, vs, pc)
Index: libvob/vob/fillet/light3d.py
diff -u libvob/vob/fillet/light3d.py:1.35 libvob/vob/fillet/light3d.py:1.36
--- libvob/vob/fillet/light3d.py:1.35 Thu Aug 14 08:24:41 2003
+++ libvob/vob/fillet/light3d.py Fri Aug 15 05:52:11 2003
@@ -215,10 +215,9 @@
Toggle("ellipses", 1, "Toggle ellipses", "s"),
Toggle("stretched", 1, "Toggle stretched", "v"),
Toggle("curvature", 0, "Show curvature", "c"),
- Toggle("sectors", 1, "Show sectors", "z"),
+ Toggle("sectors", 1, "Show sectors", "w"),
SlideLin("N", 21, 3, "N", "N", "n"),
Toggle("fillets", 1, "Toggle filleting", "f"),
- SlideLin("seed", 42, 1, "seed number", "A", "a"),
SlideLin("size", 100, 10, "Node size", "K", "k"),
SlideLin("dice", 20, 1, "Dice factor", "P", "p"),
Toggle("fillet3d", 1, "3D fillets", "3"),
- [ff-cvs] libvob/vob demo/multifil/randgraph.py fillet/li...,
Janne V. Kujala <=