Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyoberenguer committed Jul 9, 2018
1 parent 6e753e0 commit fcb6885
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -13,24 +13,24 @@ In a center of momentum frame at any time the velocities of the two bodies are i
Assuming that the second particle is at rest before the collision, the angles of deflection of the two particles, v1 and v2,
are related to the angle of deflection theta in the system of the center of mass by

![alt text](https://github.com/yoyoberenguer/2DElasticCollision/blob/master/math1.png)
![alt text](https://github.com/yoyoberenguer/2DElasticCollision/blob/master/Assets/Graphics/math1.png)

The magnitudes of the velocities of the particles after the collision are:

![alt text](https://github.com/yoyoberenguer/2DElasticCollision/blob/master/math2.png)
![alt text](https://github.com/yoyoberenguer/2DElasticCollision/blob/master/Assets/Graphics/math2.png)

# Two-dimensional collision with two moving objects

The final x and y velocities components of the first ball can be calculated as

![alt text](https://github.com/yoyoberenguer/2DElasticCollision/blob/master/math3.png)
![alt text](https://github.com/yoyoberenguer/2DElasticCollision/blob/master/Assets/Graphics/math3.png)

where v1 and v2 are the scalar sizes of the two original speeds of the objects, m1 and m2 are their masses, Ɵ1 and Ɵ2
are their movement angles, that is, v1x = v1cosƟ1, v1y = v1sinƟ1 (meaning moving directly down to the right is either a -45° angle, or a 315°angle), and lowercase phi (φ) is the contact angle. (To get the x and y velocities of the second ball, one needs to swap all the '1' subscripts with '2' subscripts.)
This equation is derived from the fact that the interaction between the two bodies is easily calculated along the contact angle, meaning the velocities of the objects can be calculated in one dimension by rotating the x and y axis to be parallel with the contact angle of the objects, and then rotated back to the original orientation to get the true x and y components of the velocities
In an angle-free representation, the changed velocities are computed using the centers x1 and x2 at the time of contact as

![alt text](https://github.com/yoyoberenguer/2DElasticCollision/blob/master/math4.png)
![alt text](https://github.com/yoyoberenguer/2DElasticCollision/blob/master/Assets/Graphics/math4.png)

where the angle brackets indicate the inner product (or dot product) of two vectors.

Expand Down

0 comments on commit fcb6885

Please sign in to comment.