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.
q is declared at the start of the loop, and it evolves over time. In previous examples, q was always equal to i*2. Here, in each iteration, q is set to q%i*4 before undergoing further changes....this makes it so that q and i are related but not as tightly coupled.
The green component is q*=1+S(X*.6)*Y/5. In Figures 1 and 2, there was a vertical red line, reflecting the way that the q parameter depended only on X at this point; it got zeroed out around X=5. Here, q is zeroed out around only part of the X=5 line, specifically the part around Y=5 at the bottom.
If you're following along, then you may be looking at that spot in the picture and wondering why there's some green, yellow, orange in that location. That's due to overlap with other rectangles, ones whose upper left-hand corners are elsewhere...
....The overlap is partly due to how I defined the rectangle width parameter, i/t. The "/t" means that rectangle widths shrink over time....but when t is very small, the rectangles are very wide! Part of the green/orange near X=8,Y=5 is due to rectangles that were drawn during the first half-second or so of the animation.
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)