Saltar al contenido ForoHackers

Physics simulation: start here

Simulación física
#2985 · · Citar · Denunciar

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

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder