kopia lustrzana https://github.com/villares/sketch-a-day
190414
rodzic
0e690b4535
commit
1b73039fa0
Plik binarny nie jest wyświetlany.
|
Przed Szerokość: | Wysokość: | Rozmiar: 35 KiB |
|
|
@ -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 |
|
|
@ -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)
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue