Skip to content
ExtendedSource checked

Position Based Dynamics

Simulates motion by directly adjusting positions to satisfy constraints.

Quick Facts

Compact metadata for implementation and discovery.

Category
Simulation
Difficulty
Advanced
Family
Constraint Simulation
Tier
Extended
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
5
Code example
Not ready
Visualization
Ready
Aliases
PBD

Overview

Position Based Dynamics predicts positions, solves constraints by moving points, and then updates velocities from the corrected positions.

Core Concepts

simulated statephysical stateconstraint propagationconstraint simulationstate updatetime stepnumerical stability

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(pc)

Average

O(i c)

Worst

O(i c)

Space

O(p + c)

When to Use

  • Use Position Based Dynamics when you need to predict particle positions.
  • Use it for cloth simulation with inputs like particles.
  • Use it when approximate behavior over time is more useful than a closed-form answer.
  • Use it when the Constraint Simulation tradeoff is acceptable for the problem size.

When Not to Use

  • Avoid it when the time step, grid size, or sample count cannot support stable results.
  • Avoid it when the required output is not corrected positions.

What It Does

  • Predicts particle positions
  • Projects positions to satisfy constraints

Use Cases

  • Cloth simulation
  • Soft bodies
  • Interactive physics

Inputs

  • Particles
  • Constraints
  • Time step

Outputs

  • Corrected positions
  • Updated velocities

Key Formulas (1)

Constraint correction

δp i = −stiffness · C(p) · wi · gradi / ∑(wj · |gradj|2)
delta_p_i = -stiffness * C(p) * w_i * grad_i / sum(w_j * |grad_j|^2)

Moves particles to reduce a position constraint violation.

Pseudocode

  1. 1.Predict positions from velocity
  2. 2.Apply external forces
  3. 3.Iteratively solve constraints by moving positions
  4. 4.Update velocity from position changes
  5. 5.Commit corrected positions

Canonical Example

Input
position = 0, velocity = 2, time step = 0.5
Output
next simulated state
Explanation
Position Based Dynamics: The algorithm advances the system by applying its update rule over a small step.

Implementation Notes

  • Keep the input contract explicit: Particles; Constraints; Time step.
  • Use this step as the implementation spine: Predict positions from velocity.
  • Then preserve the next state change: Apply external forces.
  • Record why candidates are rejected so contradictions are debuggable.
  • Track units and invariants such as mass, energy, or count where they matter.

Common Pitfalls

  • PBD favors stable, controllable behavior over strict physical accuracy.
  • Using a time step that is convenient for rendering but unstable for the simulated system.
  • Returning corrected positions without handling empty, invalid, or boundary inputs.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show particles being pulled back into valid constrained positions.

Position Based Dynamics mechanism walkthrough step 1 of 5x₀x₁x₂x*
Step 1 of 5: Predict positions from velocity
constraint-particles

Notes

Position Based Dynamics operates in O(i c) time and O(p + c) space within the Constraint Simulation family. Key governing relation: delta_p_i = -stiffness * C(p) * w_i * grad_i / sum(w_j * |grad_j|^2). Often compared with Verlet Integration and Smoothed Particle Hydrodynamics.

Sources (1)

What each reference supports for this entry.

Position Based Dynamics paper

Paper

Original paper describing position-based simulation through direct constraint projection.

Open source

Explore Next

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

Position Based Dynamics enforces constraints by projecting positions.

Position Based Fluids applies PBD ideas to fluid constraints.

Tags

SimulationPhysicsConstraint Solving