Downhill: how do I find the downhill direction of a plane from a normal?

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 4K views
kballing
Messages
3
Reaction score
0
I'm dabbling in computer graphics and a game engine (Blender). I want to create a snowboard/ski simulation that is fairly realistic. Starting with a mesh of triangles, I want to know what direction is downhill at any given spot on the mesh. In other words, if I drop a ball on any part of the mesh, which way will it start to roll?

If anyone is familiar with Blender and knows an easy solution to this, please let me know, otherwise, let's delve into the math. In Blender, I pretty sure I can get the normal of each plane of the mesh.
 
Mathematics news on Phys.org
Well, of course, you will have to define "down" for the figure yourself. The simplest way to do that would be to have a constant vector, d, pointing "down".. At each point on the surface then, you will need another vector, v, perpendicular to the surface- perhaps by taking the cross product of two vectors formed by edges of the triangle forming the mesh.

Let u be the projection of v on d. Then w= d- u will be a vector parallel to the surface pointing in the direction closest to "downward".
 
well, that make total sense. Boy am I rusty.

So the cross product of down and the normal vector of the plane in question would return a vector perpendicular to both the down and normal. Perpendicular to down would be in a plane level with the horizon or flat ground. Perpendicular to the normal of the sloped plane would be on that plane. So the cross product of the two would give me a vector that intersects the plane and is level (not pointing downhill).

If I take the cross product of the normal and the resultant vector above, this will give me a vector included in the plane and perpendicular to the horizon pointing downhill (or uphill?). Anyway, I can figure it out now.
 
Last edited: