Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’ Animator gives up control Animator gets ‘realistic’ motion automatically. Simulate physics by - programming equations of motions - setting initial conditions
Rick Parent - CIS682 Siimulation Update Cycle Object properties Position, orientation Linear and angular velocity Linear and angular momentum mass Calculate forces Calculate accelerations Using mass, momenta Update object properties
Rick Parent - CIS682 Object under Forces Forces Gravity Wind Springs Collision avoidance Soft constraints Calculate acceleration due to forces Calculate update to object velocity & position
Rick Parent - CIS682 Object under Linear Force Use a(t) to update current state of point mass: x(t), v(t) Given: force, f(t), gives rise to acceleration, a(t), or
Rick Parent - CIS682 Equations of Motion Linear force Linear momentum Resistance to linear force: mass Conserved in a closed system Angular force: torque Angular momentum Resistance to angular force: inertia tensor.
Rick Parent - CIS682 Rotational Movement Represent orientation with rotation matrix: R(t) Represent angular velocity with vector: (t) - direction is axis of rotation - magnitude is speed of rotation Angular velocity insensitive to distance from center or rotation
Rick Parent - CIS682 Rotational Movement b r (t) (t) (t) - angular velocity r(t) - position of a relative to b b - point on axis of rotation - angle r(t) makes with axis of rotation
Rick Parent - CIS682 Rotational Movement R(t) - rotation matrix representing the orientation of a rigid body Change in rotation matrix can be computed by taking cross product of w(t) with each column Columns are vectors to positions a unit length on principle axis
Rick Parent - CIS682 Rotational Movement Define the following for notational convenience to define cross product as a matrix operation:
Rick Parent - CIS682 Velocity of a Point q - original position of point in rigid body x(t) - position of rigid body v(t) - velocity of rigid body q(t) – time-dependent position of point in rigid body
Rick Parent - CIS682 Center of Mass Integration of differential mass times position in object Approximate by summing over representational particles in object Object’s “position” is the position of its center of mass Mass is the object’s resistance to a change in velocity
Rick Parent - CIS682 Force and Torque F F Force on center of mass results in linear acceleration Force off-center of mass is torque and creates angular acceleration - what is angular mass?
Rick Parent - CIS682 But first…Linear Momentum Mass times velocity Sum over all particles of object Use total mass for linear momentum Change in (linear) momentum is equal to force
Rick Parent - CIS682 Angular Momentum - measure of rotating mass weighted by its distance from the axis of rotation Relative position of particle Relative velocity of particle mass Factor out mass
Rick Parent - CIS682 Angular Momentum Define Inertia Tensor, I(t), that captures distribution of mass Similar to the linear case, the change in Angular Momentum is equal to torque
Rick Parent - CIS682 Inertia Tensor - object’s resistance to a change in rotational velocity
Rick Parent - CIS682 Inertia Tensor
Rick Parent - CIS682 Inertia Tensor for a Cuboid 1 12 M (b 2 + c 2 ) M (a 2 + c 2 ) M (a 2 + b 2 )
Rick Parent - CIS682 Finally, the Equations - State vector S (t) = x (t) R (t) P (t) L (t) Update with velocity Update with angular velocity Update with force Update with torque Given: S(t), M, I object
Rick Parent - CIS682 Update State Vector
Rick Parent - CIS682 Update Orientation - options R(t) += (t) * R(t) and re-orthonormalize Extract axis-angle from (t) and rotate columns of R(t) Use quaternions to rotate quaternion version of R(t)
Rick Parent - CIS682
Now, what about collisions?