Skip to content

mj-z-ali/collision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

collision-detection

Courtesy

Description

In this program, we use the Pythagorean theorem to determine the distance between particles and to detect if said particles are colliding. Physics plays a major role in bouncing the particles off of one another. We use the Elastic Collision Equation to maintain all energy within the particles. No energy is lost! It also bounces particles in a direction that depends on the angle of collision. Thus, creating a realistic bounce effect.

Particles

Particles