Math‐Newtonian‐Collisions - StevenKight/Physics-Engine GitHub Wiki
Newtonian Collision Models
This section presents classical approaches to collision modeling based on Newtonian mechanics. These methods are used to simulate interactions between rigid bodies under the assumptions of instantaneous, pairwise collisions and well-defined mass and velocity properties.
Newtonian formulations serve as the foundation for many real-time and physically-based simulations, particularly in environments where computational simplicity and deterministic behavior are prioritized.
All derivations in this section will be constructed from first principles and, where appropriate, restructured to support matrix-based computation and GPU acceleration. These models will form the initial implementation baseline for the High-Performance Physics Engine.
Types of Collisions
This section will distinguish between several classes of Newtonian collisions:
- Elastic Collisions: Both momentum and kinetic energy are conserved. Common in idealized or high-speed collisions.
- Inelastic Collisions: Momentum is conserved, but some kinetic energy is lost (typically to deformation or heat).
- Perfectly Inelastic Collisions: The colliding objects stick together after impact, resulting in the maximum possible kinetic energy loss consistent with momentum conservation.
Each case will be derived independently and prepared for implementation as part of the simulation engine's modular response system.
Relevant Topics
Newton’s Third Law of Motion
Newton’s Third Law states that for every action, there is an equal and opposite reaction. In the context of collisions, this means that when one body exerts a force on another during impact, the second body exerts an equal force in the opposite direction.
This principle can be expressed simply as:
If object 1 exerts a force on object 2, then object 2 simultaneously exerts an equal and opposite force on object 1.
Relevance to Collision Simulation
In a simulation, this law ensures that the mutual forces between two bodies result in equal and opposite impulses. It guarantees conservation of momentum across the system and prevents artificial asymmetries that would violate physical realism.
It also provides a foundation for deriving pairwise interactions during collision response. Whether forces are computed explicitly (in force-based systems) or implicitly via impulses (in impulse-based systems), this law governs how the bodies influence one another.
Practical Implications
- In a discrete simulation step, Newton’s Third Law ensures that changes in velocity or momentum are symmetrical between colliding pairs.
- It supports the formulation of impulse-based response equations, where a single impulse vector applied to one body must be negated and applied to the other.
- In a matrix-based system, this symmetry will emerge as a structural property of the constraint or force matrices, often resulting in block-symmetric or anti-symmetric patterns.
This law is particularly important for performance and correctness when computing collision responses in parallel (e.g., on the GPU), where force or impulse computations must maintain consistency across interacting body pairs.
Conservation of Momentum
Conservation of momentum is a fundamental law of classical mechanics, stating that in a closed system with no external forces, the total linear momentum remains constant throughout a collision.
In the context of rigid body simulation, this means that the vector sum of all momenta before a collision must equal the vector sum after the collision. It applies universally to all collisions—elastic or inelastic—and forms the basis for computing post-collision velocities.
Definition
The total momentum of a system of objects is conserved if no net external force acts on the system.
Momentum is defined as the product of mass and velocity, and in a multi-body system, this conservation law provides a constraint across all interacting objects during a collision event.
Role in Collision Modeling
In a simulation environment, conservation of momentum:
- Determines the outcome of collisions: It allows the calculation of resulting velocities after a collision, given initial states and interaction types (e.g., elastic vs inelastic).
- Supports closed-form derivations: It enables algebraic solutions for velocity updates under specific constraints (e.g., no external forces, known mass ratios).
- Remains valid across all Newtonian cases: Regardless of the type of collision, momentum must be conserved—even when kinetic energy is not.
Practical Considerations
- In elastic collisions, conservation of momentum works in tandem with conservation of kinetic energy to fully determine the post-collision state.
- In inelastic and perfectly inelastic collisions, momentum remains conserved, but kinetic energy is partially or entirely lost, requiring additional modeling assumptions.
- In matrix formulations, conservation of momentum is often represented as a constraint in a linear system or incorporated as part of an impulse response equation.
Accurately enforcing momentum conservation is essential for physical realism and simulation stability, particularly in multi-body systems and large-scale simulations.
Elastic Collisions
An elastic collision is a collision in which two bodies collide and the total kinetic energy of the two bodies remains the same. In an ideal, perfectly elastic collision, there is no net loss of kinetic energy into other forms such as heat, noise, or potential energy.
For one-dimension, this can be expressed by:
$$ m_A v_{A1} + m_B v_{B1} = m_A v_{A2} + m_B v_{B2} $$
Where:
- $m_x$ is the mass of $x$ object
- $v_{x1}$ is the initial velocity of $x$ object
- $v_{x2}$ is the final velocity of $x$ object
Likewise, the conservation of the total kinetic energy is expressed by:
$$ \frac{1}{2} m_A v^2_{A1} + \frac{1}{2} m_B v^2_{B1} = \frac{1}{2} m_A v^2_{A2} + \frac{1}{2} m_B v^2_{B2} $$
These equations can then be solved for the $v_2$ values to get the new velocity after collision using known $v_1$ values as follows:
$$ v_{A2} = \frac{m_A - m_B}{m_A + m_B} v_{A1} + \frac{2 m_B}{m_A + m_B} v_{B1} $$
$$ v_{B2} = \frac{2 m_A}{m_A + m_B} v_{A1} + \frac{m_B - m_A}{m_A + m_B} v_{B1} $$
Back to Newtonian Overview.