gravity.js
A falling ball. F = m · a.
mass (m)
1 kg
gravity (g)
9.80665 m/s²
force (F)
9.807 N
position (y)
0.00 m
velocity (v)
0.00 m/s
time (t)
0.00 s
Drop the ball
The
fall()
function (shown on slide 10 of the lesson) runs every animation frame. Each call advances the ball by
v · dt
meters and speeds it up by
a · dt
m/s.