Update sketch_2020_09_03flat.py

main
Alexandre B A Villares 2020-09-04 00:02:02 -03:00
rodzic a9334b7991
commit a756b3f350
1 zmienionych plików z 12 dodań i 9 usunięć

Wyświetl plik

@ -6,11 +6,11 @@ def ensamble(ex, ey, eo):
noStroke()
for i in range(eo):
if i % 2:
fill(0, 0, 200, 100)
fill(0, 0, 150, 150)
else:
fill(200, 0, 0, 100)
fill(50, 150, 0, 150)
order, spacing, side = randint(3, 6), 14, 7
x, y = randint(-5, 4) * side, randint(-5, 4) * side
x, y = (1 + randint(-5, 4)) * side, (1 + randint(-5, 4)) * side
grid(ex+x, ey+y, order, spacing, choice(gliphs), side)
@ -37,17 +37,20 @@ gliphs = [lambda x, y, s: rect(x, y, s, s),
# @app.route('/')
def draw():
size(1500, 800)
background(200)
size(1400, 700)
background(240)
grid(width / 2, height / 2, (7, 5), 150, ensamble, 5) # ensamble of 5 , on grid also order=5
# return page.svg()
page.svg("test.svg")
grid(width / 2, height / 2, (8, 4), 150, ensamble, 5)
return page.svg()
draw()
page.svg(__file__[-24:-3]+'.svg')
if __name__ == '__main__':
# app.run()
draw()
page.svg(__file__[-24:-3]+'.svg')