Log In  


Not the most complicated cart, but a satisfying pattern nonetheless. It may or may not also have the side effect of driving you mad...

Is there a decent way to make GIF's actually loop like the original cart?

(244 chars)

t=0
function _draw()
cls()t+=.015c={6,1,2,4,9}
for i=1,5 do
for y=1,20 do
a=cos(t/2)b=i*5d=8-i e=y*8-16
for x=1,17 do		
line(x*8-16+(a*sin(x/10)*b)+d,
e+(sin(t/2)*b)+d,
x*8+(cos(t)*sin(y/10)*b)-d,
e-16+(a*b)-d,c[i])
end
end
end
pal(6,129,1)
end

3


1

Yay, the pasta dance!

Put this code at the end of _draw().
The GIF will be output after a few seconds.

The loop timing is when t/2 has completed one cycle and when t has completed two cycles (when it becomes 1).
However, since t=.015 will not be exactly 1, it will be difficult to loop accurately. (Adding decimals often does not result in a nice round integer.)

if t==.015 then
flip()
extcmd'rec'
elseif t/2>=1 then
extcmd'video'
stop()
end

1

@shiftalow Nice to know for the next pasta dance.



[Please log in to post a comment]