Code: Select all
graphics ! graphics clear .8,.8,.8
d=56 ! option angle degrees
fill color .8,.8,.8 ! draw color 0,0,0
for i=0 to 2 ! for j=0 to 1
box(d+j*(300+d),20+i*320,300,300,.5,.5,15)
draw color 0,0,0 ! draw size 1 ! shadow on
xo=0 ! yo=0
for a=0 to 720 step 2
x=9*sin((1+2*i)*a) ! y=9*cos((1+1.5*j)*a)
draw_it(xo,yo,x,y) ! xo=x ! yo=y
next a ! shadow off ! refresh
next j ! next i
end
def box(xlu,ylu,width,height,xm,ym,scale)
org_x=xlu+xm*width ! org_y=ylu+(1-ym)*height
xrl=xlu+width ! yrl=ylu+height
refresh off
draw size 4
draw rect xlu-4,ylu-4 to xrl+4,yrl+4
draw size 1 ! draw alpha .2
for x=org_x to xrl step scale ! draw line x,ylu to x,yrl ! next x
for x=org_x to xlu step -scale ! draw line x,ylu to x,yrl ! next x
for y=org_y to yrl step scale ! draw line xlu,y to xrl,y ! next y
for y=org_y to ylu step -scale ! draw line xlu,y to xrl,y ! next y
draw color 0,0,1 ! draw size 2 ! draw alpha 1
draw line xlu,org_y to xrl,org_y
draw line org_x,ylu to org_x,yrl
refresh
end def
def draw_it(xs,ys,xe,ye)
x1=box.org_x+box.scale*xs ! y1=box.org_y-box.scale*ys
x2=box.org_x+box.scale*xe ! y2=box.org_y-box.scale*ye
draw line x1,y1 to x2,y2
end def