Interactive Physics: Simple Harmonic Motion on HTML5 Canvas
A ball attached to a spring shows simple harmonic motion - SHM
현재 데모에 대한 개발자 댓글
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.