Log In  

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

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)

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)

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

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

P#83071 2020-10-18 13:11

Cool! What were you trying to do?

P#84420 2020-11-18 03:07

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

P#84428 2020-11-18 10:03

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 11:50:20 | 0.028s | Q:21