Hi guys,
i need an algorithm that can simulate the motion of an object along an inclined surface. The surface/plane can be rotated along the Z and X axes. How do i calculate the transition of frictional forces from static to kinetic. Right now this is how i do it but it is incomplete.
/////////////// CODE //////////////////////////////////////////
float Fparallel = objectMass * gravity * sin(rotZ) ;
float Fperpendi = objectMass * gravity * cos(rotZ) ;
// calculate net Force acting on the object
float fFnet = ( coefKineFriction * Fperpendi ) + Fparallel ;
// calculate acceleration of the object
float acceleration = fFnet / objectMass ;
// calculate direction of acceleration
Vector3D Vt = new Vector3D() ;
Vector3D Va = new Vector3D() ;
Vector3D Vp = new Vector3D(getSurfaceNormal()) ;
Vt = V_GRAVITY.CrossProduct(Vp) ;
Vt.Normalize() ;
Va = Vt.CrossProduct(Vp) ;
Va.Normalize() ;
vAccelVec.Init(Va.x * acceleration * _time,
Va.y * acceleration * _time,
Va.z * acceleration * _time) ;
vVelVec.Add(m_vAccelVec) ;
vNewPos.x = vPrevPos.x + (vVelVec.x * _time) ;
vNewPos.y = vPrevPos.y + (vVelVec.y * _time) ;
vNewPos.z = vPrevPos.z + (vVelVec.z * _time) ;
/////////////////////////////////////////////////////////////
In the snippet above i'm not checking if the initial force has exceeded the static frictional force. i.e
Fnet > Mu_static * FNormal
only then the object should move and Mu_static changes to Mu_kinetic once the object starts moving. I'm presume thats how i should do it. Also what about rotations along the X axes. Right now i calculate the Perpendicular and Parallel Forces only for Z axes. U can see that in the code snippet.
Do i have to calculate Parallel and Perpendicular forces for each Azes seperately ?
Any suggestion will be of great help
Thanks
Vinny
Edited by - vinny_ys on August 2, 2001 1:27:01 AM