Re: Happy Pi day!!!

Josh Litherland
 

Commodore Vic 20 + Super Expander cartridge version.  Can't for the life of me figure out why it divides by zero on the first run every time, but other than that I'm happy with it  :)

10 input "radius (0-512)"; rad
20 input "num points"; dots
30 graphic 2
40 pi=3.14159
50 xctr=512:yctr=512
60 aspect=0.667
70 for theta=0 to 2*pi step 2*pi/dots
80 x=xctr+rad*cos(theta)*aspect
90 y=yctr+rad*sin(theta)
100 point 1,x,y
110 next theta


Join main@ahcs.groups.io to automatically receive all group messages.