DrawScript

home.gif


Star Polygon


star.gif


REM -----------------------------------------
REM Star polygon
REM
REM Choose m so that m<n and such that (m,n)
REM have no factors in common (other than 1)
REM -----------------------------------------

·Fill(RND)
·EvenOddWindingRule

radius=5 : ·Origin(radius,radius)

m=7 : n=16

FOR i=0 TO n
 x=radius*COS(2*m*PI*i/n)
 y=radius*SIN(2*m*PI*i/n)
 IF i=0 THEN ·Move(x,y) ELSE ·Draw(x,y)
  NEXT