Constrained Rigid Body Simulation and Impulse-based Collision Modeling
In this project, the dynamics of a cube projectile are simulated using the equations of motion for rigid bodies. The explicit Euler method is used to perform numerical integration in the discretized system dynamics, where the growth of simulation rate (or the decrease of time step) results in a more precise approximation to the continuous setting. However, the total energy of the system increases when the explicit Euler method is applied, which causes an unstable simulation of spring objects. To this end, the implicit Euler method is applied. Finally, impulse-based collision simulation logic for restitutional contact is implemented to constitute the simulation of rigid bodies when touching a surface.