2D Physics Engine From Scratch (Jack In the Box)

Brief overview


This project simulates a planer multi-body dynamics of a jack in the box. In the simulation, external forces are applied to the box. While the jack is falling freely, it will then experience some collisions with the box’s walls.

Video demo


System schematic


In the figure shown above, the system is a planar model, which means the two objects can only move in x and y directions. There are 9 frames in total:

Parameter setups


Algorithm descriptions


GitHub