DrawScript
"Flowers"
REM -----------------------------------------
REM Flower : r = K sin(theta)
REM -----------------------------------------
FOR i=1 TO 15
x=RND(15) : y=RND(15)
PROCFlower(x,y)
NEXT
END
DEF PROCFlower(x,y)
LOCAL theta,K,m,r
·Fill(RND) : REM Fill with random colour
·Origin(x,y)
K=3 : m=10
FOR theta=0 TO 2*PI STEP 2*PI/300
r=K*SIN(m*theta)
x=r*COStheta : y=r*SINtheta
IF theta=0 THEN ·Move(x,y) ELSE ·Draw(x,y)
NEXT
ENDPROC
|
|