Skip to content

Instantly share code, notes, and snippets.

@hekras
Created November 29, 2021 18:15
Show Gist options
  • Save hekras/f2b2f8c916cdd3953c94a2fbb6c3956e to your computer and use it in GitHub Desktop.
Save hekras/f2b2f8c916cdd3953c94a2fbb6c3956e to your computer and use it in GitHub Desktop.
A rotating star for CMM2
' draws triangle with polygon
const dots=13
dim xp(dots)
dim yp(dots)
radius=250
start_angle=0
dangle=0.005
page write 1
do
for i=0 to dots
angle=2*pi*i*6/dots
xp(i) = 400+radius*cos(angle+start_angle)
yp(i) = 300+radius*sin(angle+start_angle)
next i
start_angle=start_angle+dangle
cls
polygon dots, xp(), yp(), rgb(white)
page copy 1 to 0, B
loop while not keydown(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment