acceleration on inclined plane

Started by
10 comments, last by mede 20 years, 4 months ago
this is how I project the movement onto the plane. Start with the vector:
(0,-1,0), assuming the Y axis is the up vector. Then, you subtract the projection of the vector above onto the plane normal from the vector above. say the vector above is 'A', then it is:

A - (Projection of A onto Normal)

The projection of A onto the Normal is the DotProduct between the two vectors multiplied by the normal. So it becomes:

A - (DotProduct(A,Normal) * Normal)

Then just to make sure you should normalize it, and that gives you the direction down the plane.


EDIT:
also, an easy way to get the angle of incline, if the normal vector is already a unit vector, then the angle of incline is simply the arccosine of the Y component of the normal.

float angle = acosf(Normal.y).
This is because the dotproduct is the cosine between two normalize vectors. In this case you want to know the angle of deviation from the UP axis, which in my case is the y axis (0,1,0). You disregard X and Z because the UP axis doesn't have X and Z components, so it percolates down to what I said above.



[edited by - Shadow12345 on November 29, 2003 5:01:32 PM]
Why don't alcoholics make good calculus teachers?Because they don't know their limits!Oh come on, Newton wasn't THAT smart...
Advertisement
thx
this is the way i searched ... had this idea a few days ago ... but now i can be sure that this is the way

This topic is closed to new replies.

Advertisement