1 / 36

Lecture VII

CS274: Computer Animation and Simulation. Lecture VII. Rigid Body Dynamics. Rigid Bodies. Rigid bodies have both a position and orientation. Rigid bodies assume no object deformation. Rigid body motion is represented by 2 parameters. - center of mass. - orientation (rotation matrix).

emele
Download Presentation

Lecture VII

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS274: Computer Animation and Simulation Lecture VII Rigid Body Dynamics

  2. Rigid Bodies Rigid bodies have both a position and orientation Rigid bodies assume no object deformation Rigid body motion is represented by 2 parameters - center of mass - orientation (rotation matrix)

  3. Rigid Bodies Objects are defined in body space and transformed by the position and orientation into world space

  4. Linear Velocity The change of the center of mass over time For a pure translation ( constant), all points move with velocity

  5. Angular Velocity The change in orientation over time • Encodes both the axis and speed of the rotation • direction encodes the axis • magnitude encodes the speed (rad/s) But, how are and related?

  6. Angular Velocity For a given vector The columns of represent the transformed axes

  7. Angular Velocity We can represent the cross product with a matrix Therefore

  8. Velocity of a Point Since a point can be represented at any time by Total velocity can then be expressed as Which can be rewritten as

  9. Force We can apply forces to the object at any point Total force on an object is simply No information about where the forces are applied

  10. Torque Torque describes the “rotational force” Total torque on an object is simply Tells us about the force distribution over the object

  11. density integration over the body Linear Momentum Linear momentum of a particle is Linear momentum of a rigid body is then

  12. Linear Momentum Linear momentum can be simplified as follows Assuming constant mass gives

  13. inertia tensor Angular Momentum Angular momentum of a rigid body Taking the time derivative Angular momentum is conserved for no torque

  14. Inertia Tensor Describes how mass is distributed in the body Analogous to mass in linear velocity Measures the preferred axis of rotation Expensive to compute this at every time step

  15. Inertia Tensor Rewrite the tensor as Integrals can now be precomputed

  16. Rigid Body Equations of Motion Combining the equations Discretize these continuous equations and integrate

  17. Using Quaternions Use quaternions to represent orientation The update rule is then

  18. Rigid Body Equations of Motion Using quaternions gives Discretize these continuous equations and integrate

  19. Collisions and Contact So far, no interaction between rigid bodies Collision detection – determining if, when and where a collision occurs Collision response – calculating the state (velocity, …) after the collision

  20. Collisions and Contact What should we do when there is a collision?

  21. Rolling Back the Simulation Restart the simulation at the time of the collision Collision time can be found by bisection, etc.

  22. Collision Detection Exploit coherency through witnessing Two convex objects are non-penetrating iff there exists a separating plane between them separating plane First find a separating plane and see if it is still valid after the next simulation step Speed up with bounding boxes, grids, hierarchies, etc.

  23. Collision Detection Conditions for collision separating contact colliding

  24. Collision Soft Body Collision Force is applied to prevent interpenetration

  25. Collision Soft Body Collision Apply forces and change the velocity

  26. Collision Harder Collision Higher force over a shorter time

  27. Collision Rigid Body Collision Impulsive force produces a discontinuous velocity

  28. Impulse We need to change velocity instantaneously Infinite force in an infinitesimal time An impulse changes the velocity as or

  29. Impulse An impulse also creates an impulsive torque The impulsive torque changes the angular velocity or

  30. Impulse For a frictionless collision But how do we calculate ?

  31. Impulse For a frictionless collision Given this equation and knowing how affects the linear and angular velocities of the two bodies, we can solve for

  32. Resting Contact Bodies are neither colliding nor separating We want a force strong enough to resist penetration but only enough to maintain contact

  33. Since we should keep it from decreasing Since we should keep it from decreasing Resting Contact We want to prevent interpenetration Describes the objects’ acceleration towards one another

  34. avoid interpenetration • be repulsive • become zero if the bodies begin to separate workless force Resting Contact Contact forces only act in the normal direction Contact forces should

  35. Resting Contact The relative accelerations can be written in terms of all of the contact forces So we can simply solve a Quadratic Program to find the solution to all the constraints

  36. compute new state detect collisions and backtrack compute and apply impulses compute and apply constraint forces Simulation Algorithm Algorithm with collisions and contact current state next state collision state post-collision state

More Related