View
93
Download
2
Category
Tags:
Preview:
DESCRIPTION
Rigid Bodies. Definition. A rigid body is big enough, so it has a shape. is rigid. It doesn’t deform. is easier to simulate. Representation. Moved. A rigid body can be represented as a set of particles. Those particles move together. Representation. Moved. c. X(t ). - PowerPoint PPT Presentation
Citation preview
Rigid Bodies
Definition
• A rigid body • is big enough, so it has a shape.• is rigid. It doesn’t deform.• is easier to simulate.
Representation
• A rigid body can be represented as a set of particles. Those particles move together.
Moved
Representation
• Mass center defines the position of a rigid body.
Movedc X(t)
Representation
• A rotation matrix R(t) defines the orientation.• r(t) is the vector from the mass center to each particle.
Moved
r(t)=R(t)r0
r0
Representation
• So each individual particle i moves:
Moved
r(t)=R(t)r0
r0
c x(t)
p0
p(t)
P0=c+r0 p(t) = x(t)+r(t) = x(t)+R(t)r0
MathBefore motion After motion
Position (mass center) c x(t)
Linear velocity(velocity of the center) v(t)=dx(t)/dt
Orientation (vector from center to the particle) r0
r(t)=R(t) r0
Angular velocity A 3D vector: ω(t)=???
Particle Position P0=c+r0 p(t)=x(t)+r(t)
Particle velocity
dp(t)/dt = dx(t)/dt+dr(t)/dt = v(t)+dR(t)/dt r0
= v(t)+ ω(t)×r(t)
Basic Rigid Body Simulation
• Given the status at the current frame, simulate the status for the next frame.
t t+1 t+2 t+3
One Problem
• Numerical error exists. So the simulation may cause matrix R to be more than a rotation matrix. It can introduce deformations, such as scaling or shearing.
t t+1 t+2 t+3
Solution
• Quaternion also defines a rotation:
• Properties:
• Corresponding rotation matrix:
(b, c, d)
θ
Solution• Quaternion product:
• Properties:
• Basically, we use q(t) to represent rotation/orientation, rather than a matrix.
Physics
• Mass:
• Mass center:
• Force:
• Torque:
• Linear momentum:
• Angular momentum:
p0p1
p2
p3
pi
ri(t)
Physics• I(t) is the inertia matrix (1 is a 3-by-3 identity
matrix):
• This computation is expensive. • But it can be simplified:
• Ibody is the inertia without motion. It is constant and can be pre-computed!
p0p1
p2
p3
pi
ri
Equations to Update Status
Linear AngularPosition:
Velocity:
Force:
Quaternion:
AngularVelocity:
Mass:
Torque:
Inertia:
Explicit Method
• Given the status at the current frame, simulate the status for the next frame.
t t+1 t+2 t+3
Recommended