plane normals n stuff
Well, the search function is down and I can''t find what I''m looking for on the net so I have to ask here. Ok, I have a block, 8 corners and 6 faces (like a dice but with iregular quads). Now I want to find out how to calculate the normal för each face of the block. I know the origin and the corners coordinates. If anyone care to explain or point me to a site where it is explained in plain english (swedish will do as well), that would be nice.
Thanks
Let A,B,C be three points of the plane (e.g. triangle vertices).
The normal to the plane is AB x AC.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
The normal to the plane is AB x AC.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
So if A,B and C are 3D-coordinates that would be something like this: (A.x*B.x, A.y*B.y, A.z*B.z) * (A.x*C.x, A.y*C.y, A.z*C.z), correct?
quote:Original post by Anonymous Poster
No, AB means the vector (b.x-a.x, b.y-a.y, b.z-a.z) and x denotes the vector product.
The cross product actually (If U want the normal).
A x B would be (C):
C.x = A.y*B.z - A.z*B.y
C.y = A.z*B.x - A.x*B.z
C.z = A.x*B.y - A.y*B.x
C is the result vector (the normal); it''s peripendicular to A and B.
I hope I remember it correctly...
p.s. is the normal faces the wrong way swap A and B.
see amir.cfxweb.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement