aUCBLogo Demos and Tests / testspiral
			
				
			
			to testspiral
   setsc [222 222 222]
   n=25
   m=10
   r1=40
   rd=20
   r=r1
   ;b1=b r (ang.deg cf r)/n
   b1=((2*Pi*r)/n)
   a1=alpha b1 r
   mm=1
   drawc r a1
   
   repeat m-1 
   [   mm=repcount
      r=r+rd
      a2=alpha b1 r
      drawc r a2
   ]
   pr p1
   stop
   ;drawcc
   repeat 10 [drawcc repcount]
   pr "fin
end
to alpha b r
   op 180*:b/Pi/r
end
to ang.deg ang.rad
   op 180*ang.rad/Pi
end
to b r alpha
   op Pi*r*alpha/180
end
to cf r
   op 2*Pi*r
end
to drawc r a
   circle r
   repeat n 
   [   make (word "p repcount) []
   ]
   repeat n 
   [   rr_=repcount
      pu fd r pd circle 3 pu
      make (word "p mm) lput pos thing (word "p mm)
      ; make "ppp pos
      ; make "p0 lput ppp p0
      bk r lt a
   ]
   pd
   seth 0
   pr thing (word "p mm)
end
to drawcc j
   repeat n 
   [   rr_=repcount
      ; ifelse rr_=1 [pu][pd]
      setpos item rr_ thing (word "p j)
   ]
   seth 0
end