villares 2019-04-14 21:12:12 -03:00
rodzic 0e690b4535
commit 1b73039fa0
5 zmienionych plików z 6 dodań i 6 usunięć

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 35 KiB

Wyświetl plik

@ -20,12 +20,12 @@ class Face:
rotateX(self.o[0] * 0 + rot)
translate(0, -height/2)
translate(0, 0, -t/2)
fill(100, 200, 100)
fill(230)
draw_poly(pts)
translate(0, 0, t)
fill(100, 100, 200)
fill(170)
draw_poly(pts)
fill(200, 100, 100)
fill(250)
for p1, p2 in pairwise(tuple(pts) + (pts[0],)):
# print((p1, p2))
beginShape(QUAD_STRIP)

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 329 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 1.4 MiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 1.4 MiB

Wyświetl plik

@ -25,16 +25,16 @@ def draw():
for f in faces:
f.draw_3D(frameCount / -50.)
translate(200, 0)
fill(100, 100, 200)
fill(170)
f.draw_2D()
translate(200, 0)
fill(100, 200, 100)
fill(230)
f.draw_2D()
x, y = 25, 350
translate(-400, 0)
for p1, p2 in f.edges():
d = dist(p1[0], p1[1], p2[0], p2[1]) * 35
fill(200, 100, 100)
fill(250)
glue_tab((x, y), (x + d, y))
glue_tab((x + d, y + THICK),( x, y + THICK))
rect(x, y , d, THICK)