Interactive Physics: Simple Harmonic Motion on HTML5 Canvas
A ball attached to a spring shows simple harmonic motion - SHM
作者所寫的更多關於此 Demo 的資訊
The animation is created on HTML5 Canvas without the use of any external images: the ball is made using context.arc() method and context.createRadialGradient() methods.
Math.sin object is used to produce the animation effect.