This is a really neat visualization! Enjoyed squishing the sines into squares and back :)
Play demo
Fourier series in PICO-8 #Pico1k's itch.io pageCharacters/Bytes used
340 characters, totaling 350 bytes. Tried to fit it in a tweet but couldn't.
Source Code
c=camera l=line b=btnp t=0i=0w={}::_::t-=0.0174533if(b(➡️))i+=1
if(b(⬅️))i-=1
cls()c(0,0)?"< > to change iters:"..i,7
c(-32,-64)x=0y=0for i=0,i do px=x py=y n=i*2+1r=20*(4/(n*3.14))x+=r*cos(n*t)y+=r*sin(n*t)circ(px,py,r,5)l(px,py,x,y,7)end l(x,y,32,y, 6)add(w,y,1) if(#w>63)del(w,w[#w])
c(-64,-64)for i=1,#w do pset(i,w[i],7)end flip()goto _
Link to Commented Source Code
https://hastebin.com/vorofuqumu.lua


Leave a comment
Log in with itch.io to leave a comment.