Skip to the content ForoHackers
Log inJoin

Physics simulation: start here

Physics simulation
#2985 · · Quote · Report

Physics simulation makes things move the way the world does: falling, colliding, bending, flowing. In games and animation it must look right and run fast; in engineering it must be accurate. Either way, you turn laws of motion into small time steps and keep the numbers from drifting or blowing up.

Key concepts

  • Integration: advance position and velocity from forces each step; explicit Euler is simple but unstable, and semi-implicit or Verlet methods behave better.
  • Collision detection: a cheap broad phase finds close pairs, then a narrow phase computes exact contacts.
  • Constraint solving: contacts and joints are resolved by iterating impulses or forces until they agree.
  • Rigid, soft and fluid bodies: different models for solids, cloth and flesh, and liquids or smoke.
  • Time step and stability: smaller steps and fixed rates give repeatable, stable results.

Vocabulary

  • Rigid body: an object that never deforms, described by mass, position, orientation and velocities.
  • Impulse: an instant change of momentum, used to resolve collisions.
  • Bounding volume: a simple shape around an object, used to skip impossible collisions.
  • Particle system: many tiny points with simple rules, used for sparks, smoke and cloth.

What to study, in order

  1. Newtonian mechanics: velocity, acceleration, force, momentum, energy.
  2. Simulate a bouncing ball and a pendulum; compare Euler with a better integrator and watch the energy.
  3. Add circle and box collisions with impulses and friction in 2D.
  4. Build a spring-mass cloth with Verlet integration and distance constraints.
  5. Read about a position-based or particle-based fluid method, and implement a small one.

Related tags

#numerical-analysis #game-development #simulation #linear-algebra

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply