|
Hi there,
I'd like to write a game engine and preparing myself for it now.
I am reading Baraff's Siggraph tutorials (Rigid body simulation I -- unconstrained rigid body dynamics) now, here is my question:
when performing numeric integration of the motion equation using 4th order Runge-Kutta method, the calculation of k1, k2, k3 and k4 requires me to evaluate the force and torque, i.e.
k1 = h * f(y0, t0) k2 = h * f(y0 + k1/2, t0 + h/2) k3 = h * f(y0 + k2/2, t0 + h/2) k4 = h * f(y0 + k3, t0 + h)
where, the motion equation is dy/dt = f(y, t) = (v, 0.5wq, force, torque).
My question is how to calculate the forces and torques for the state variables y0+k1/2, y0+k2/2, and yo+k3 ?
many thanks.
|