rigid bodies

15
Rigid Bodies

Upload: amable

Post on 19-Jan-2016

88 views

Category:

Documents


2 download

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

TRANSCRIPT

Page 1: Rigid Bodies

Rigid Bodies

Page 2: Rigid Bodies

Definition

• A rigid body • is big enough, so it has a shape.• is rigid. It doesn’t deform.• is easier to simulate.

Page 3: Rigid Bodies

Representation

• A rigid body can be represented as a set of particles. Those particles move together.

Moved

Page 4: Rigid Bodies

Representation

• Mass center defines the position of a rigid body.

Movedc X(t)

Page 5: Rigid Bodies

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

Page 6: Rigid Bodies

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

Page 7: Rigid Bodies

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)

Page 8: Rigid Bodies

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

Page 9: Rigid Bodies

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

Page 10: Rigid Bodies

Solution

• Quaternion also defines a rotation:

• Properties:

• Corresponding rotation matrix:

(b, c, d)

θ

Page 11: Rigid Bodies

Solution• Quaternion product:

• Properties:

• Basically, we use q(t) to represent rotation/orientation, rather than a matrix.

Page 12: Rigid Bodies

Physics

• Mass:

• Mass center:

• Force:

• Torque:

• Linear momentum:

• Angular momentum:

p0p1

p2

p3

pi

ri(t)

Page 13: Rigid Bodies

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

Page 14: Rigid Bodies

Equations to Update Status

Linear AngularPosition:

Velocity:

Force:

Quaternion:

AngularVelocity:

Mass:

Torque:

Inertia:

Page 15: Rigid Bodies

Explicit Method

• Given the status at the current frame, simulate the status for the next frame.

t t+1 t+2 t+3