Simple Pendulum Simulation on HTML5 Canvas

A fully interactive, animated, simple pendulum made on HTML5 canvas.

建立方法 JavaScript, HTML5, Canvas, CSS3

  • 130 次观看

有关此演示作者的更多信息

The simple pendulum is created on HTML5 canvas with the aid of JavaScript. It is fully interactive: a user can choose the speed from three choices.

The pendulum bob is made with a filled circle and radial gradient which gives the spherical appearance.

In order to make it oscillate, sine and cosine function of Math object is used.

The start and stop button use window.setInterval() and window.clearInterval() respectively.

The animation works on all major browsers: FireFox, Chrome, IE, Safari.

It works on tablets too such as iPad.

关于此演示

下载源代码 10.39 KB · ZIP 格式

Browse the Source

此演示发布于 MPL/GPL/LGPL 授权之下。

Vivax-Solutions 的更多作品