The code:
t=0w=240h=136m=math s=m.sin
function TIC()
t=t+1
for y=0,h do
for x=0,w do
u=x/w-0.6 v=(y/h)-0.3
r=m.sqrt(u*u+v*v)/3
col=m.atan(v,u)%4+12
col=col+m.floor(r*14-t/12)
pix(x,y,col)
end
end
tri(50+s(t),100,80+s(t),110,90,90,0)
end
And here is the code!
m=math t=0 dt=1/60*m.pi c=m.cos s=m.sin
function cr(x,y,r,i)
if i>0 then
circ(x,y,r,i%3)
circb(x,y,r-2,0)
g=m.pi*s(t/5)
cr(x+r/2*c(g+t/5),y+r/2*s(g),r/2,i-1)
cr(x-r/2*c(g+t/3),y+r/4*s(g),r/2,i-1)
end
end
function TIC()
cls()
cr(120,68,68, 8)
t=t+dt
end
And here is the code!
m=math t=0 dt=1/60*m.pi c=m.cos s=m.sin
function TIC()cls()
circ(-33,68,45,4)circ(130,68,18,9)circ(131,68,18,6)circ(134,68,18-2,0)circ(190,40,5,13)circ(191,40,5,15)circ(192,42,6,0)
x=c(t)*30
y=s(t)*30
a=m.abs(-m.atan(y,x))
pix(130+x,68+y,a%3+8)
t=t+dt
end
Have a great #EarthDay2021 whether you are on planet Earth or on the ISS spinning around our great planet!
Lets celebrate with an animation made with 255 bytes on the #TIC80! #sizecoding