190 likes | 622 Views
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 ).
E N D
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) • Mass center defines the position of a rigid body.
Representation r(t)=R(t)r0 r0 Moved • A rotation matrix R(t) defines the orientation. • r(t) is the vector from the mass center to each particle.
Representation p(t) p0 r(t)=R(t)r0 r0 Moved c x(t) • So each individual particle i moves: P0=c+r0 p(t) = x(t)+r(t) = x(t)+R(t)r0
Basic Rigid Body Simulation • Given the status at the current frame, simulate the status for the next frame. t+2 t+3 t t+1
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+2 t+3 t t+1
Solution (b, c, d) • Quaternion also defines a rotation: • Properties: • Corresponding rotation matrix: θ
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: p2 p3 p1 p0 ri(t) pi
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! p2 p3 p1 p0 ri pi
Equations to Update Status Linear Angular Position: Quaternion: Angular Velocity: Velocity: Force: Torque: Mass: Inertia:
Explicit Method • Given the status at the current frame, simulate the status for the next frame. t+2 t+3 t t+1