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.
Better with transparency, but 148 bytes -- t?0:s=0;for(c.width|=a=1e3;a--;x.beginPath(x.globalAlpha=.5))x.ellipse(960+200*C(a),540+200*S(a),90+30*S(a+s),90+30*C(a),0,0,7),x.stroke(),s+=1e-4
I'm done --- t?0:s=0;for(c.width|=a=1e3;a--;x.stroke(),x.globalAlpha=.5)x.beginPath(),x.ellipse(960+200*C(a),540+200*S(a),90+30*S(a+s),90+30*C(a),0,0,7,x.strokeStyle=R(255*S(a)+255,255*C(a)+255,100+10*C(a))),s+=1e-4 --- 202 bytes, but full with colors and stuff, except for a weird bright area(?)... I dunno, see you all tommorow, I'm off to sleep :P
I golfed it to 134 chars with transparency. for(c.width|=a=1e3;a--;)with(x)ellipse(960+200*C(a),540+200*S(a),90+30*S(a+t*6.2),90+30*C(a),0,0,7),stroke(),beginPath(globalAlpha=.5)
Solved the weird colors --- t?0:s=0;for(c.width|=a=2e3;a--;x.stroke(),x.globalAlpha=.5)x.beginPath(),x.ellipse(960+200*C(a),540+200*S(a),90+30*S(a+s),90+30*C(a),0,0,2*Math.PI,x.strokeStyle=R(255*S(a)+255,255*C(a)+255,100+10*C(a))),s+=1e-4
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)