Skip to content

Instantly share code, notes, and snippets.

@jhorikawa
Created November 13, 2020 15:09
Show Gist options
  • Save jhorikawa/f8218d09fe995383c556c4b8457db8d2 to your computer and use it in GitHub Desktop.
Save jhorikawa/f8218d09fe995383c556c4b8457db8d2 to your computer and use it in GitHub Desktop.
PICO-8 source code to create animated spiral.
r=64
t=0
function _draw()
cls(1)
for n=0,6,1 do
for i=0,100,1 do
ang=3.1415/180.0*2
x1=cos((i+t)*ang)*i+r
y1=sin((i+t)*ang)*i+r
x2=cos((i+1+t)*ang)*(i+1)+r
y2=sin((i+1+t)*ang)*(i+1)+r
col=9
if n<3 then
col=4
end
line(x1+n,y1,x2+n,y2,col)
end
end
t+=1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment