24 |
Toggle("depthColor", 0, "Color from depth", "d"), |
Toggle("depthColor", 0, "Color from depth", "d"), |
25 |
Toggle("lines", 0, "Toggle showing lines", "l"), |
Toggle("lines", 0, "Toggle showing lines", "l"), |
26 |
Toggle("ellipses", 1, "Toggle ellipses", "s"), |
Toggle("ellipses", 1, "Toggle ellipses", "s"), |
27 |
|
SlideLin("size", 50, 5, "Node size", "K", "k"), |
28 |
|
SlideLin("dice", 20, 1, "Dice factor", "P", "p"), |
29 |
) |
) |
30 |
def scene(self, vs): |
def scene(self, vs): |
31 |
putnoc(vs, background((.5,1,.2))) |
putnoc(vs, background((.5,1,.2))) |
48 |
dice = 20 |
dice = 20 |
49 |
border = 2 |
border = 2 |
50 |
conns = GLRen.createSortedConnections( |
conns = GLRen.createSortedConnections( |
51 |
GLRen.createFilletSpan2(border, dice, |
GLRen.createFilletSpan2(border, self.dice, |
52 |
1 + 4*self.depthColor + 16 * self.ellipses), |
1 + 4*self.depthColor + 16 * self.ellipses), |
53 |
2) |
2) |
54 |
conns_l = GLRen.createSortedConnections( |
conns_l = GLRen.createSortedConnections( |
55 |
GLRen.createFilletSpan2(border, dice, |
GLRen.createFilletSpan2(border, self.dice, |
56 |
2 + 4*self.depthColor + 16 * self.ellipses), |
2 + 4*self.depthColor + 16 * self.ellipses), |
57 |
2) |
2) |
58 |
|
|
59 |
size = 50 |
a = vs.orthoBoxCS(0, "A", 0, 100, 100, 1, 1, self.size, self.size); |
60 |
|
b = vs.orthoBoxCS(0, "B", 25, self.x, self.y, 1, 1, self.size, self.size); |
61 |
a = vs.orthoBoxCS(0, "A", 0, 100, 100, 1, 1, size, size); |
c = vs.orthoBoxCS(0, "C", 50, 200, 500, 1, 1, self.size, self.size); |
62 |
b = vs.orthoBoxCS(0, "B", 25, self.x, self.y, 1, 1, size, size); |
d = vs.orthoBoxCS(0, "D", 75, 100, 300, 1, 1, self.size, self.size); |
63 |
c = vs.orthoBoxCS(0, "C", 50, 200, 500, 1, 1, size, size); |
e = vs.orthoBoxCS(0, "E", 100, 500, 500, 1, 1, self.size, self.size); |
|
d = vs.orthoBoxCS(0, "D", 75, 100, 300, 1, 1, size, size); |
|
|
e = vs.orthoBoxCS(0, "E", 100, 500, 500, 1, 1, size, size); |
|
64 |
|
|
65 |
def pc(conns): |
def pc(conns): |
66 |
# vs.put(conns, [a, b, c, d]) |
# vs.put(conns, [a, b, c, d]) |