Alexandre B A Villares 2018-08-28 23:50:43 -03:00
rodzic 456fb070f0
commit f946c506c9
1 zmienionych plików z 18 dodań i 0 usunięć

18
s242/s242.pyde 100644
Wyświetl plik

@ -0,0 +1,18 @@
def setup():
size(1024, 300)
blendMode(ADD)
background(0)
def draw():
translate(-100, height/2, 0)
scale(3,-1,1)
ang = frameCount / 30.
stroke(255, 0, 0)
line(frameCount, height/2, frameCount, height/2 + sin(ang) * 100)
stroke(0, 255, 0)
line(frameCount, height/2, frameCount, height/2 + cos(ang) * 100)
stroke(0, 0, 255)
line(frameCount, height/2, frameCount, height/2 + abs(sin(ang)) * 100)
if ang > width:
noLoop()