Alexandre B A Villares 2019-11-15 23:51:12 -02:00
rodzic 04c63933c1
commit 7743e92163
5 zmienionych plików z 63 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,33 @@
"""
Based on //https://twitter.com/ky0ju_art/status/1188400508341383168?s=09
"""
from random import randint as r
x = y = X = Y = a = 0
p = []
def setup():
size(500, 500)
clear()
def draw():
global x, y, X, Y, a
translate(250, 250)
a += 1
x += X
y += Y
if a % 40 == 0:
while a < 1000:
X, Y = r(-1, 1), r(-1, 1)
xy = x+X*40,y+Y*40
if xy not in p:
p.append(xy)
break
fill(255)
circle(x, y, 5)
stroke(255)
noFill()
point(x, y)
if abs(x) > 200 or abs(y) > 200:
x = y = a = 0
def keyPressed():
saveFrame("####.png")

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 11 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 16 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 20 KiB

Wyświetl plik

@ -0,0 +1,30 @@
"""
Based on //https://twitter.com/ky0ju_art/status/1188400508341383168?s=09
"""
from random import randint as r
x = y = X = Y = a = 0
def setup():
size(500, 500)
clear()
# smooth(8)
strokeWeight(2)
def draw():
global x, y, X, Y, a
translate(250, 250)
a += 1
x += X
y += Y
if a % 40 == 0:
X = r(-2, 2)
Y = r(-2, 2)
# fill(255)
# circle(x, y, 5)
stroke(255)
fill(255, 0, 0)
circle(x, y, 10)
if a>400:
x = y = a = 0
def keyPressed():
saveFrame("####.png")