Alexandre B A Villares 2018-09-03 22:50:03 -03:00
rodzic d5caa572d0
commit 0cf31505a9
7 zmienionych plików z 86 dodań i 0 usunięć

BIN
s247/1516.png 100644

Plik binarny nie jest wyświetlany.

Po

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

BIN
s247/1595.png 100644

Plik binarny nie jest wyświetlany.

Po

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

BIN
s247/1641.png 100644

Plik binarny nie jest wyświetlany.

Po

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

BIN
s247/1846.png 100644

Plik binarny nie jest wyświetlany.

Po

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

BIN
s247/1911.png 100644

Plik binarny nie jest wyświetlany.

Po

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

43
s247/s247.pyde 100644
Wyświetl plik

@ -0,0 +1,43 @@
curvas = []
n = 3
def setup():
size(1024, 300)
noStroke()
blendMode(MULTIPLY)
def keyPressed():
if key == "s":
saveFrame("###.png")
else:
curvas[:] = []
for i in range(n):
curvas.append((random(-height/6,height/6),
random(-height/6, height/6),
random(.33, 3),
random(.33, 3),
random(.33, 3),
))
def draw():
background(200)
translate(0, height/2)
for i, (h, a, f1, f2, f3) in enumerate(curvas):
if i % 3 == 0:
fill(0, 100, 200)
elif i % 3 == 1:
fill(200, 0, 100)
else:
fill(100, 0, 200)
beginShape()
for x in range(width):
ang = x/30.
s = sin(ang * f1) + sin(ang * f2) + sin(ang * f3)
vertex(x, - h +10 + s * a)
for xx in range(width):
x = width-xx
ang = x/30.
s = sin(ang * f1)*1.1 + sin(ang * f2)*1.2 + sin(ang * f3)*1.3
vertex(x, + h +10 + s * a)
endShape(CLOSE)

43
s248/s248.pyde 100644
Wyświetl plik

@ -0,0 +1,43 @@
curvas = []
n = 3
def setup():
size(1024, 300)
noStroke()
blendMode(MULTIPLY)
def keyPressed():
if key == "s":
saveFrame("###.png")
else:
curvas[:] = []
for i in range(n):
curvas.append((random(-height/6,height/6),
random(-height/6, height/6),
random(.33, 3),
random(.33, 3),
random(.33, 3),
))
def draw():
background(200)
translate(0, height/2)
for i, (h, a, f1, f2, f3) in enumerate(curvas):
if i % 3 == 0:
fill(0, 100, 200)
elif i % 3 == 1:
fill(200, 0, 100)
else:
fill(100, 0, 200)
beginShape()
for x in range(width):
ang = x/30.
s = sin(ang * f1) + sin(ang * f2) + sin(ang * f3)
vertex(x, - h +10 + s * a)
for xx in range(width):
x = width-xx
ang = x/30.
s = sin(ang * f1)*1.1 + sin(ang * f2)*1.2 + sin(ang * f3)*1.3
vertex(x, + h +10 + s * a)
endShape(CLOSE)