Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
from __future__ import division
|
||||
|
||||
size(300, 260)
|
||||
|
||||
background(255) # white
|
||||
|
||||
x = floor(random(width))
|
||||
y = floor(random(height))
|
||||
|
||||
for _ in range(30000):
|
||||
v = floor(random(3))
|
||||
if v == 0:
|
||||
x = x / 2
|
||||
y = y / 2
|
||||
colour = color(0, 255, 0) # green
|
||||
elif v == 1:
|
||||
x = width / 2 + (width / 2 - x) / 2
|
||||
y = height - (height - y) / 2
|
||||
colour = color(255, 0, 0) # red
|
||||
elif v == 2:
|
||||
x = width - (width - x) / 2
|
||||
y = y / 2
|
||||
colour = color(0, 0, 255) # blue
|
||||
|
||||
set(x, height - y, colour)
|
||||
Loading…
Add table
Add a link
Reference in a new issue