Download presentation
Presentation is loading. Please wait.
Published byJames Horn Modified over 8 years ago
1
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
2
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
3
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
4
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
5
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.
6
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
7
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
8
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
9
Rick Parent - CIS682 Rotational Movement Define the following for notational convenience to define cross product as a matrix operation:
10
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
11
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
12
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?
13
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
14
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
15
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
16
Rick Parent - CIS682 Inertia Tensor - object’s resistance to a change in rotational velocity
17
Rick Parent - CIS682 Inertia Tensor
18
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 ) 0 0 0 0 0 0
19
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
20
Rick Parent - CIS682 Update State Vector
21
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)
22
Rick Parent - CIS682
23
Now, what about collisions?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.