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

# Motion along an inclined plane that can be rotated along x and z axes

Started by vinny_ys, Aug 01 2001 06:25 PM

2 replies to this topic

Sponsor:

###
#2
Members - Reputation: **347**

Posted 02 August 2001 - 12:57 AM

> In the snippet above i''m not checking if the initial force has

> exceeded the static frictional force. i.e

> Fnet > Mu_static * FNormal

I think your calculation in the code is wrong: I think you need:

fFnet = Fparallel - ( coefKineFriction * Fperpendi );

i.e. this gives the force due to gravity but opposed by friciton.

If you do it this way the answer just drops out: If fFnet is negative the object just doesn''t start moving.

If the object can move freely you need something more complex: the net force is vector, with acceleration due to gravity down the slope and friction opposing the direction of motion.

> Do i have to calculate Parallel and Perpendicular forces for

> each Azes seperately ?

No: you can do all calculations in a coordinate free way, i.e. using just vectors and vector operations. Your code is already most of the way there, with gravity and the plane normal as vector inputs. There are other things you can do, such as use the inner product instead of sin and cos in the first two lines, and using vector scaling in the last eight lines.

As for whether/when to use static/dynamic friction, this is one of the trickiest questions in physics to answer. In theory there''s a simple dividung line between them, between situations where objects are moving and situations where they are not. But in a simulation it''s difficult to draw the line between such situations.

You approach sounds fine for your current simulation, but as you add in rotation and other more complex behaviour you may find it needs to be much more sophisticated.

> exceeded the static frictional force. i.e

> Fnet > Mu_static * FNormal

I think your calculation in the code is wrong: I think you need:

fFnet = Fparallel - ( coefKineFriction * Fperpendi );

i.e. this gives the force due to gravity but opposed by friciton.

If you do it this way the answer just drops out: If fFnet is negative the object just doesn''t start moving.

If the object can move freely you need something more complex: the net force is vector, with acceleration due to gravity down the slope and friction opposing the direction of motion.

> Do i have to calculate Parallel and Perpendicular forces for

> each Azes seperately ?

No: you can do all calculations in a coordinate free way, i.e. using just vectors and vector operations. Your code is already most of the way there, with gravity and the plane normal as vector inputs. There are other things you can do, such as use the inner product instead of sin and cos in the first two lines, and using vector scaling in the last eight lines.

As for whether/when to use static/dynamic friction, this is one of the trickiest questions in physics to answer. In theory there''s a simple dividung line between them, between situations where objects are moving and situations where they are not. But in a simulation it''s difficult to draw the line between such situations.

You approach sounds fine for your current simulation, but as you add in rotation and other more complex behaviour you may find it needs to be much more sophisticated.

###
#3
Members - Reputation: **122**

Posted 02 August 2001 - 04:43 PM

>I think your calculation in the code is wrong:

>I think you need:

>fFnet = Fparallel - ( coefKineFriction * Fperpendi );

>i.e. this gives the force due to gravity but opposed by >friciton.

Hey thanks for the correction. i could'nt figure out why the object moved in the opposite direction of the tilt i.e when i tilted the surface towards me, the object slided away from me.

That was bcos i was summing up the forces. With the formula correction u suggested the object is sliding in the right directions.

>If the object can move freely you need

>something more complex:

>the net force is vector, with acceleration

>due to gravity down the slope and friction

>opposing the direction of motion.

Okay say i were to convert the net force to a vector. How do i go bout doin that. Do i create a unit vector and scale it with the scalar value ( fFnet ) ?

>There are other things you can do, such as use the

>inner product instead of sin and cos in the

>first two lines

i didnt quiet get u. what is the inner product ?

i'm workin on the transition of Frictional force from static to kinetic.

i'll let u know once i get that working.

Thanks for the post

Edited by - vinny_ys on August 2, 2001 11:46:14 PM

>I think you need:

>fFnet = Fparallel - ( coefKineFriction * Fperpendi );

>i.e. this gives the force due to gravity but opposed by >friciton.

Hey thanks for the correction. i could'nt figure out why the object moved in the opposite direction of the tilt i.e when i tilted the surface towards me, the object slided away from me.

That was bcos i was summing up the forces. With the formula correction u suggested the object is sliding in the right directions.

>If the object can move freely you need

>something more complex:

>the net force is vector, with acceleration

>due to gravity down the slope and friction

>opposing the direction of motion.

Okay say i were to convert the net force to a vector. How do i go bout doin that. Do i create a unit vector and scale it with the scalar value ( fFnet ) ?

>There are other things you can do, such as use the

>inner product instead of sin and cos in the

>first two lines

i didnt quiet get u. what is the inner product ?

i'm workin on the transition of Frictional force from static to kinetic.

i'll let u know once i get that working.

Thanks for the post

Edited by - vinny_ys on August 2, 2001 11:46:14 PM