Vector Decomposition Solution for Two-Dimensional Collisions

While one-dimensional collision problems can be solved intuitively using straightforward conservation laws, real-world physical interactions routinely unfold across two or even three dimensions. The core challenge in analyzing two-dimensional impacts lies in managing directional vectors. The most robust strategy for tackling this complexity is vector decomposition—breaking down a multi-dimensional motion into independent, manageable one-dimensional components.

This article explores the mechanics of solving 2D elastic and inelastic collisions using vector decomposition, accompanied by analytical breakdowns and a practical implementation example.
When two bodies with masses $m_1$ and $m_2$ collide in a plane without external interference, the system obeys the law of conservation of momentum.

Denoting their velocity vectors before the impact as $\vec{v}_1$ and $\vec{v}_2$, and after the impact as $\vec{v}_1'$ and $\vec{v}_2'$, the total momentum remains constant:

$$m_1\vec{v}_1 + m_2\vec{v}_2 = m_1\vec{v}_1' + m_2\vec{v}_2'$$

Because vector equations in a Cartesian coordinate system can be evaluated component by component, we can split this master equation into independent scalar equations along the $x$ and $y$ axes:

  • $x$-axis Momentum:
    $$m_1 v_{1x} + m_2 v_{2x} = m_1 v_{1x}' + m_2 v_{2x}'$$
  • $y$-axis Momentum:
    $$m_1 v_{1y} + m_2 v_{2y} = m_1 v_{1y}' + m_2 v_{2y}'$$

For perfectly elastic collisions, mechanical energy is conserved as well:

$$\frac{1}{2}m_1 v_1^2 + \frac{1}{2}m_2 v_2^2 = \frac{1}{2}m_1 (v_1')^2 + \frac{1}{2}m_2 (v_2')^2$$

Strategic Coordinate Selection: Normal and Tangent Frames

Although calculations can be performed in a fixed global $x-y$ coordinate system, doing so often results in tedious trigonometric equations. A far more elegant approach is to align our coordinates with the collision normal and tangent directions.

  • Normal Direction ($n$-axis): Oriented along the line connecting the centers of the two objects at the exact moment of impact. The impulsive force of the collision acts strictly along this axis, meaning momentum transfer and energy exchange happen almost exclusively here.
  • Tangent Direction ($t$-axis): Perpendicular to the normal axis. Assuming frictionless surfaces, no external forces act along this vector, leaving the tangential velocities unchanged post-collision.

Step-by-Step Problem Breakdown:

  1. Define the unit normal vector $\hat{n}$ pointing from the center of mass of object 1 to object 2.
  2. Establish the orthogonal unit tangent vector $\hat{t}$.
  3. Project the initial velocity vectors onto these new axes:
    $$v_{1n} = \vec{v}1 \cdot \hat{n}, \quad v{1t} = \vec{v}1 \cdot \hat{t}$$
    $$v
    {2n} = \vec{v}2 \cdot \hat{n}, \quad v{2t} = \vec{v}_2 \cdot \hat{t}$$
  4. Apply the rule of constant tangential velocity:
    $$v_{1t}' = v_{1t}, \quad v_{2t}' = v_{2t}$$
  5. Solve the standard 1D collision equations along the normal axis to determine $v_{1n}'$ and $v_{2n}'$.
  6. Recombine the resulting scalar components back into vectors within the global coordinate frame.

Calculating Normal Post-Collision Velocities

For an elastic interaction along the normal axis, the resulting velocities can be computed directly using the masses and initial normal components:

$$v_{1n}' = \frac{(m_1 - m_2)v_{1n} + 2m_2 v_{2n}}{m_1 + m_2}$$

$$v_{2n}' = \frac{(m_2 - m_1)v_{2n} + 2m_1 v_{1n}}{m_1 + m_2}$$

Once the new normal and tangential components are locked in, reconstruct the final velocity vectors via:
$$\vec{v}1' = v{1n}'\hat{n} + v_{1t}'\hat{t}$$
$$\vec{v}2' = v{2n}'\hat{n} + v_{2t}'\hat{t}$$

Python Implementation Example

The following script demonstrates how to implement a 2D elastic collision solver using Python and NumPy. By utilizing dot products and vector projections, the code handles coordinate transformations and impulse calculations efficiently.

import numpy as np

def resolve_2d_collision(m1, v1, m2, v2, x1, x2):
    """
    Simulates an elastic collision between two circular bodies in a 2D plane.
    m1, m2: Masses of the objects
    v1, v2: Velocity vectors (numpy arrays of length 2)
    x1, x2: Position vectors (numpy arrays of length 2)
    """
    # 1. Calculate the normal vector pointing from object 1 to object 2
    n = x2 - x1
    dist = np.linalg.norm(n)
    if dist == 0:
        return v1, v2  # Prevent division by zero if positions overlap
    n = n / dist  # Unit normal vector
    
    # 2. Determine the orthogonal tangent vector
    t = np.array([-n[1], n[0]])
    
    # 3. Project velocities onto the normal and tangent axes
    v1n = np.dot(v1, n)
    v1t = np.dot(v1, t)
    v2n = np.dot(v2, n)
    v2t = np.dot(v2, t)
    
    # 4. Compute new normal velocities using 1D elastic collision formulas
    v1n_prime = (v1n * (m1 - m2) + 2 * m2 * v2n) / (m1 + m2)
    v2n_prime = (v2n * (m2 - m1) + 2 * m1 * v1n) / (m1 + m2)
    
    # 5. Tangential velocities remain unaffected by frictionless collision
    v1t_prime = v1t
    v2t_prime = v2t
    
    # 6. Convert scalar components back into global 2D vectors
    v1_prime = v1n_prime * n + v1t_prime * t
    v2_prime = v2n_prime * n + v2t_prime * t
    
    return v1_prime, v2_prime

# Example Usage
m1, m2 = 1.0, 2.0
v1 = np.array([3.0, 1.0])
v2 = np.array([-1.0, 2.0])
x1 = np.array([0.0, 0.0])
x2 = np.array([1.0, 1.0])

v1_p, v2_p = resolve_2d_collision(m1, v1, m2, v2, x1, x2)
print("Post-collision velocity of object 1:", v1_p)
print("Post-collision velocity of object 2:", v2_p)

Conclusion

The vector decomposition approach to 2D collisions embodies the engineering philosophy of "divide and conquer." By intelligently shifting our perspective to a normal-tangent coordinate frame, we decouple a complex multi-axial interaction into a uniform tangential slide and a straightforward 1D impact. This methodology is not only vital for academic physics problem-solving but serves as the foundational algorithm behind rigid-body physics engines, particle simulations, and molecular dynamics modeling.