2007. 6. 27. 11:46
Code/NodeBox
size(200,200)
speed(100)
def setup():
global x
global y
def draw():
global x
global y
s=50
x=MOUSEX
y=MOUSEY
for h in range(4):
for w in range(4):
if ((x>=w*s)&(x<=(w+1)*s)) & ((y>=h*s)&(y<=(h+1)*s)):
r=1
g=1
b=1
else:
r=0
g=0
b=1
stroke(1)
fill(r,g,b)
rect(w*s,h*s,s,s)
rotate(135)
arrow(x,y,20)
speed(100)
def setup():
global x
global y
def draw():
global x
global y
s=50
x=MOUSEX
y=MOUSEY
for h in range(4):
for w in range(4):
if ((x>=w*s)&(x<=(w+1)*s)) & ((y>=h*s)&(y<=(h+1)*s)):
r=1
g=1
b=1
else:
r=0
g=0
b=1
stroke(1)
fill(r,g,b)
rect(w*s,h*s,s,s)
rotate(135)
arrow(x,y,20)
so far, a piece of cake~
'Code > NodeBox' 카테고리의 다른 글
matrix_color_chain (0) | 2007.06.27 |
---|---|
matrix-color change (0) | 2007.06.27 |
arrive (0) | 2007.06.25 |
steering (0) | 2007.06.25 |
ping_orbit (0) | 2007.06.20 |