HOME | DD

Published: 2022-04-15 07:27:28 +0000 UTC; Views: 73; Favourites: 1; Downloads: 3
Redirect to original
Description
I'm getting really close to what I was after. Still need to figure out some random() stuff, which should be the easy part. Restricting the set of available colors will most likely prove to be the main bottleneck.Das Kod:
# Squares and circles on different layers with raster
l1 = layer('Squares')
l2 = layer('Circles')
l3 = layer('raster')
for y in range(0, int(height), 100):
for x in range(0, int(width), 100):
r1 = rect((x, y), (x + 100, y + 100), stroke_width=0, fill='#%02x%02x%02x' % (randrange(256), randrange(256), randrange(256)))
l1.add(r1)
c1 = circle((x + 50, y + 50), 25, stroke_width=0, fill='#%02x%02x%02x' % (randrange(256), randrange(256), randrange(256)))
l2.add(c1)
r2 = rect((x, y), (x + 100, y + 100), fill='#000000x ').to_path()
c2 = circle((x + 50, y + 50), 30).to_path()
r.append(c2)
l3.add(r2)