I wasn't going for a 3d effect, but it looks 3d to me. Feel free to copy/ change
P#83066 2020-10-18 11:43 ( Edited 2020-10-18 11:50)
:: Valkhiya
1
Optimized it down to tweetcart size, even before minification (273 characters)
q=.25 function e(i) return sin(i)*64+64 end ::l:: cls(1) i=t()/4 cx=sin(-i)*32+64 cy=cos(-i)*32+64 x,y=e(i),e(i-q) for j=q,1,q do u,v,x,y=x,y,e(i+j),e(i+j-q) for k=0,1,q/2 do line(u+k*(cx-u),v+k*(cy-v),cx+k*(x-cx),cy+k*(y-cy),6+j*4) end end flip() goto l |
And actually minified down to 236 characters:
q=.25function e(i)return sin(i)*64+64 end::l::cls(1)i=t()/4 a=sin(-i)*32+64 b=cos(-i)*32+64 x,y=e(i),e(i-q)for j=q,1,q do u,v,x,y=x,y,e(i+j),e(i+j-q)for k=0,1,q/2do line(u+k*(a-u),v+k*(b-v),a+k*(x-a),b+k*(y-b),6+j*4)end end flip()goto l |
P#83068 2020-10-18 12:42 ( Edited 2020-10-18 12:49)
[Please log in to post a comment]