Motion in a straight line and in a plane
Free fall
Section titled “Free fall”Drop a ball and it speeds up. Not gradually faster and faster in a vague way: its speed grows by the same 9.8 m/s every second. Watch the velocity graph in the playground. It is a straight line, and its slope is . The position graph is a parabola because distance grows with the square of time.
With and acceleration downward,
So a ball dropped from height lands after with speed . Doubling the height does not double the time: it multiplies it by .
The engine integrates Newton’s second law with velocity Verlet, which is exact for constant acceleration, so the
landing position is reproduced to round-off at any time step. The ground is a contact with restitution zero, so the
ball stops instead of bouncing. Test: projectile_is_exact_at_any_step in soliton-mechanics.
Ball thrown upward
Section titled “Ball thrown upward”The ball slows down on the way up, stops for an instant at the top, and falls back. The trap is to think the acceleration is zero at the top. It is not. The velocity is zero there, but it is changing at 9.8 m/s² the whole time, which is exactly why the ball does not stay up.
Maximum height when : at . The flight is symmetric, so the total time is and the ball returns at speed .
Same integrator as free fall. The acceleration readout in the playground stays at 9.8 m/s² through the top, which is the point of the lesson.
Projectile
Section titled “Projectile”A projectile is two motions happening at once that do not know about each other. Horizontally nothing pushes or pulls, so the horizontal speed never changes. Vertically it is a ball thrown upward. Put them together and the path is a parabola. Tilt the launch angle in the playground: 45° gives the longest range, and angles equally above and below 45° land in the same place.
With launch speed at angle ,
Time of flight , range , maximum height .
The ground is a half-plane contact. The engine reports the landing as a contact_begin event, visible in the event log.
Impact timing is located to within one time step, so the landing time is accurate to a millisecond at the default step.
Projectile from a cliff
Section titled “Projectile from a cliff”Launched from a height, the projectile has further to fall, so it stays in the air longer and travels further. Try a negative angle: throwing downward from a cliff. And try launching horizontally: a bullet fired horizontally and a bullet dropped from the same height hit the ground at the same moment.
The vertical motion is . Setting gives a quadratic whose positive root is the flight time,
and the range is . Energy conservation gives the landing speed regardless of angle.
The cliff is a static polygon and the ground a half-plane. Both are contacts the engine handles the same way.