HTML5 Canvas Oscillation Animation Tutorial
Description
To create an oscillation animation using HTML5 Canvas, we can use the equation for a simple harmonic oscillator to set the shape's position for each frame:
x(t) = amplitude * sin(t * 2PI / period) + x0