u(t) is called 60 times per second.
t: Elapsed time in seconds.
S: Shorthand for Math.sin.
C: Shorthand for Math.cos.
T: Shorthand for Math.tan.
R: Function that generates rgba-strings, usage ex.: R(255, 255, 255, 0.5)
c: A 1920x1080 canvas.
x: A 2D context for that canvas.
golf'd slightly harder on general principles: i=frame;for(j=1080;j--;x.fillRect(i,j,1,S(k/9),x.fillStyle=R(k,j,i)))for(a=b=0,k=35;k--&&a*a+b*b<4;a=c)c=a*a-b*b+i/540-2,b=2*a*b+j/540-1
Thanks bakkot! I golfed your version even further down to 134 characters: for(j=1080;j--;x.fillRect(i=frame,j,1,S(k/9),x.fillStyle=R(k,j,i)))for(a=b=0,k=35;k--&&a*a+b*b<4;a=c)c=a*a-b*b+i/540-2,b=2*a*b+j/540-1
I must commend you! Did my research and got a working mandelbrot, but to golf it to 140 and get the speed is very very difficult! Wow. I will study your dweet now :)
u(t) is called 60 times per second.
t: elapsed time in seconds.
c: A 1920x1080 canvas.
x: A 2D context for that canvas.
S: Math.sin
C: Math.cos
T: Math.tan
R: Generates rgba-strings, ex.: R(255, 255, 255, 0.5)