Linear Translation |
Rotation |
Position P vec3, meters |
Angular Orientation R (see last lecture) 3 angles in radians, a quaternion, or a matrix |
Velocity V=dP/dt vec3, m/s |
Angular Velocity W = dR/dt 3 rates in radians/sec, a quaternion derivative, a skew matrix or a vec3, radians/sec |
Acceleration A=dV/dt vec3, m/s^2 |
Angular Acceleration
α = dW/dt 3 rates in radians/sec^2 |
Mass m float, Kg |
Rotational
inertia matrix
I mat3, Kg*m^2 |
Linear Momentum p=mV vec3, N*s |
Angular
Momentum L=I
W vec3, Kg*m^2/s |
Force F=mA=dp/dt vec3, N |
Torque T = R x F =
dL/dt vec3, N*m |
OK! |
huh?! |
[ 0 -W.z W.y ]You do need to first rotate the skew matrix by the current rotation, since angular momentum applies in global coordinates. You also need to orthonormalize, or the object will slowly grow in size.
[ W.z 0 -W.x ]
[ -W.y W.x 0 ]
(See a more complete discussion of applying angular velocity here.)
Er, JavaScript or WebGL doesn't seem to be running, so basically all you're going to see is the bare code...
|