Log In  


Cart #pohedoruto-0 | 2020-10-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
12

I wasn't going for a 3d effect, but it looks 3d to me. Feel free to copy/ change

12


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

@Valkhiya thank you. I've got no real twitter followers but its really cool work.

https://twitter.com/WesleyIsMe/status/1317815281188732929


Cool! What were you trying to do?


I was going to animate the four sections seperately. However the happy accident part is that when I moved the center point in a circle (just to test my drawing) it made something to my subjective viewpoint that looked 3d.

I.e. I was going to do 2d transforms and ended up with accidental 3d


Nice. I love things like this


Since this has been bumped, note that this shape is (very close to, not sure if it's exactly) a bezier curve.



[Please log in to post a comment]