2007. 8. 26. 15:19
Code/NodeBox
막상 해 보지 않아서 찜찜했었는데, 이걸 이제야 해 보네.
from math import sin, radians, pi
size(320,240)
speed(100)
def setup():
global x
global y
global p ##period
global a ##amplitude
global t ##time
p = 100
a = HEIGHT/4
t = 0
def draw():
global x
global y
global p
global a
global t
t += 1
x = t
w = 2*pi*t/p
y = a*sin(w) + HEIGHT/2
if x >= WIDTH:
t = 0
oval(x,y,10,10)
size(320,240)
speed(100)
def setup():
global x
global y
global p ##period
global a ##amplitude
global t ##time
p = 100
a = HEIGHT/4
t = 0
def draw():
global x
global y
global p
global a
global t
t += 1
x = t
w = 2*pi*t/p
y = a*sin(w) + HEIGHT/2
if x >= WIDTH:
t = 0
oval(x,y,10,10)
'Code > NodeBox' 카테고리의 다른 글
David Hirmes - lines15 (0) | 2007.08.01 |
---|---|
David Hirmes - lines14 (0) | 2007.07.31 |
David Hirmes - lines02 (0) | 2007.07.25 |
David Hirmes - blobs01 (0) | 2007.07.18 |
splash_class_multi (0) | 2007.07.13 |