Create sketch_2021_09_06_rects.pyde

main
Alexandre B A Villares 2021-09-07 19:02:20 -03:00
rodzic 32ccf95a1f
commit 6e882f6a28
1 zmienionych plików z 26 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,26 @@
from random import randint
stands = []
letras = 'ABCDEFGHIJKLMNOPQRST'
def setup():
size(800, 800)
background(0, 0, 100)
print(len(letras))
translate(50, 0)
for i, l in enumerate(letras):
h1 = randint(15, 30)
x = 0
for n in range(60):
h2 = randint(0, 5)
h = h1 + h2
w = randint(5, 15)
a = w * h
if i % 2 == 0:
y = 35 + i * 39 -h
else:
y = i * 39 + 2
fill(h * 10 - 100)
rect(x, y, w, h)
x += w