Log In  

Colour cycling like it's 1984.

Cart #pohengama-0 | 2020-07-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

P#79461 2020-07-16 22:21

Impressive 3D effect for such a small amount of code.

It looks like you're precomputing the sphere in sprite memory, then using palette cycling to make it appear to rotate.. right?

P#79477 2020-07-17 01:43

Yep, all palette tricks like the original: https://www.youtube.com/watch?v=YlAhRJjOhDg

P#79490 2020-07-17 12:00

And in tweetcart form(but without sound, and plotting directly rather than pallete trickery)

r=24q=576
f=0m=.5n=.87
d=1g=0
::_::
flip()cls(1)for x=-r,r do for y=-r,r do if x*x+y*y<q then
i=n*x+m*y
j=n*y-m*x
w=sqrt(q-j*j)/2
c=i%w*8/w
if(j\6%2==0)c^^=4
c=(c+f)%8\4+7
pset(x+r+f,y+r+70-60*abs(sin(g/70)),c)
end
end
end
f+=d
g+=1if(f%79==0)d=-d
goto _
P#79497 2020-07-17 14:27 ( Edited 2020-07-17 14:32)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 10:20:54 | 0.010s | Q:20