BigMoosie Posted May 4, 2006 Posted May 4, 2006 Given 3 points in 3D space as cartesian coordiantes (a triangle) I need to calculate the normal for a 3D graphing program I am making. I haven't done any calculus that might help with this and I don't know about linear algebra so Wolfram's solution is of no help: For a polygon (such as a triangle), a surface normal can be calculated as the vector cross product of two edges of the polygon. Can anybody please translate this into an algebraic solution for me? Thankyou.
shmoe Posted May 6, 2006 Posted May 6, 2006 Cross product: http://planetmath.org/encyclopedia/CrossProduct.html If your triangle has vertices given by the vectors u,v,and w, then take a=v-u and b=w-u (not the only choices), these will be vectors in the directions of two of the sides. axb and bxa will both give normals, but in opposite directions, axb=-(bxa)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now