Klein Bottle Tweet
A Klein bottle non-orientable surface that is related to the Möbius strip.
This can be rendered so compactly thanks in part to the Euler spiral
Remix it on pico-8-edu.com
This cart is (almost) tweetable at just 401 characters.
d=.0024415
x=-.3626
y=0
r=.05
q={}
i=0
c=cos
s=sin
for j=0,4427do
a=(j\9*d-.7789)^2-.1068
if(j\9%41<1)b=j%9/8o=s(b)i+=1q[i]={x=x-r*o*s(a),y=y+r*o*c(a),z=r*c(b)}k=r-y q[i+108]={x=-x,y=k*o,z=k*c(b)}
x+=c(a)*d/9
y+=s(a)*d/9
end
::_::
cls()
for i=0,441do
p=q[i%25*9+i\25+1]or q[9-i\25]
if(i>225)p=q[i-225]
a=t()/9
m=c(a)
n=s(a)
line((p.z*n+m*m*p.x-m*n*p.y)*100+64,(n*p.x+m*p.y)*100+64,7)
end
flip()
goto _
About
See the explainer on GitHub
Status | Released |
Category | Other |
Platforms | HTML5 |
Author | Mini Mech Media |
Made with | PICO-8 |
Leave a comment
Log in with itch.io to leave a comment.