# Calculating the norms of a triangle based pyramid

Hi I have the following co-ordinates, which make up my triangle based pyramid. I need to calculate the normals of each face. However Im struggling to find the best simplest way to do this?

-0.5, 0, 0.5,
0, 0, -0.5,
0.5, 0, 0.5,

0, 0, -0.5,
0.5, 0, 0.5,
0, 1, 0,

-0.5, 0, 0.5,
0, 0, -0.5,
0, 1, 0,

0.5, 0, 0.5,
-0.5, 0, 0.5,
0, 1, 0


-
What is the norm of a face? Do you mean its area? –  enzotib Aug 13 '12 at 10:40
No I meant the normal. Ive added a picture to clarify. I believe the technical term is: a line from the origin, which is perpendicular to the face it passes through. –  geminiCoder Aug 13 '12 at 10:50
@geminiCoder If you're making models that you intend to use in a Direct3D engine, using Maya / 3DS Max and then exporting the model to .obj file format can save you time. It automatically calculates the norms (lines that begin with vn. The norm of a plane $ax+by+cz+d=0$ is $(a,b,c)$. You may normalize it. Also, the cross product of two non-parallel vectors in the plane is perpendicular to the plane, like @enzotib 's answer. –  FrenzY DT. Aug 13 '12 at 11:30
Look up Newell's algorithm. –  Guess who it is. Aug 13 '12 at 11:34

Given three non aligned point of a face, say $A, B, C$, build the vectors $$\mathbf{u}=B-A,\\ \mathbf{v}=C-A.$$ The vector $\mathbf{n}=\mathbf{u}\times\mathbf{v}$ is normal to the given face, you should only normalize its length.
Take $$A=(-1/2, 0, 1/2),\\ B=(0, 0, -1/2),\\ C=(1/2, 0, 1/2),$$ then build $$\mathbf{u}=B-A=( 0, 0, -1/2)-(-1/2, 0, 1/2)=(1/2,0,-1),\\ \mathbf{v}=C-A=(1/2, 0, 1/2)-(-1/2, 0, 1/2)=(1,0,0).$$ and $$\mathbf{n}=\mathbf{u}\times\mathbf{v}=\left| \begin{matrix} i &j &k\\ 1/2 &0 &-1\\ 1 &0 &0 \end{matrix} \right|=(0,-1,0)$$ The resulting vector is, in this particular case, already normalized.