Conner Wallis  
CSCE 489 Fall 2021

2D Dynamic Collision


Description

My project implements dynamic collisions between simple 2D shapes and a teetering seesaw. Each object consists of particles which are connected by springs. The particles are influenced by gravity and the spring force between them which allows the shape to keep its form. When the shapes collide, a force is applied to repel them and simulate a realist collision.


Methodology

1. Collision detection: Using an application of Jordans Curve Theorem I was able to detect whether or not a particle was inside another shape.
2. Edge Penetrated: After a particle entered another shape, whichever perimeter spring was closest to that particle was determined to be the edge penetrated.
3. Determining Collision Normal: By projecting the particle onto the penetrated edge, the closest point on the spring is calculated. That point and the particles point forms a perpendicular angle with the spring and is used as the collision normal.
4. Using the normal, particle, and edge, modifications to the applied forces were computable and dynamic collision could be simulated.