Skip to content
CoreSource checked

Rigid Body Dynamics

Simulates objects that translate and rotate while keeping their shape fixed.

Quick Facts

Compact metadata for implementation and discovery.

Category
Simulation
Difficulty
Advanced
Family
Physics Simulation
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
3
Code example
Ready
Visualization
Ready

Overview

Rigid Body Dynamics tracks linear and angular motion, applies forces and torques, and resolves contacts or constraints between bodies.

Core Concepts

linear momentumangular momentumcontact impulseinertia tensor

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(bodies)

Average

O(bodies + contacts)

Worst

O(bodies + contacts^3)

Space

O(bodies + contacts)

When to Use

  • Use when objects should move and collide without deforming.
  • Use when game physics is a central requirement.

When Not to Use

  • Avoid when deformation, fluid flow, or soft-body behavior is the primary effect.
  • Avoid when the timestep, constraints, or stability requirements exceed what the method can handle.

What It Does

  • Computes physics simulation within Physics Simulation workloads (O(bodies + contacts) time, O(bodies + contacts) space).
  • Works by Simulates objects that translate and rotate while keeping their shape fixed.
  • Maintains key invariants across linear momentum, angular momentum, contact impulse.

Use Cases

  • Game physics
  • Robotics simulation
  • Mechanical prototyping

Inputs

  • Rigid bodies
  • Mass and inertia
  • Forces
  • Contacts

Outputs

  • Updated positions
  • Updated velocities
  • Contact impulses

Key Formulas (1)

Linear acceleration

acceleration = force / mass
acceleration = force / mass

Updates translational motion from accumulated forces.

Pseudocode

  1. 1.Accumulate forces and torques
  2. 2.Integrate velocities
  3. 3.Detect collisions
  4. 4.Solve contact constraints
  5. 5.Integrate positions and orientations

Canonical Example

Input
box falls onto floor
Output
box position stops at contact and velocity changes
Explanation
Collision impulses prevent penetration and adjust motion.

Implementation Notes

  • Represent orientation with quaternions or rotation matrices and normalize when needed.
  • Keep units, timestep size, and state variables explicit in tests.
  • Keep a tiny example with expected output beside the implementation.

Common Pitfalls

  • Using center-of-mass forces for contact impulses ignores rotation.
  • Large timesteps can add energy, damp motion, or make constraints explode.
  • Not defining boundary, empty, or degenerate inputs before implementation.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show boxes moving, rotating, and receiving impulses at contact points.

Rigid Body Dynamics mechanism walkthrough step 1 of 5x₀x₁x₂x*
Step 1 of 5: Accumulate forces and torques
simulation-state

Notes

Stable contacts and stacking require careful constraint solving.

Sources (1)

What each reference supports for this entry.

Physically Based Modeling

Documentation

SIGGRAPH course notes covering integration, particles, constraints, and rigid-body simulation.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Rigid-body simulation pipelines use broad phase to find possible contacts.

Often paired withSequential Impulse Solver

Rigid-body engines often use sequential impulses for contacts and joints.

Tags

SimulationPhysicsRigid BodyCollision Detection