How to determine the direction of the normal of the plane

$\begingroup$

I have a triangle represented with three points in $3D$ space and a normal vector of that triangle. How can I determine if the normal vector (starting at $(0,0,0)$ ) is pointing towards or away from that triangle (or at least the plane that this triangle is laying on) ?

$\endgroup$

2 Answers

$\begingroup$

Let $\mathbf n$ be your normal vector and $\mathbf p_0$ be one of the triangle’s vertices. For any point $\mathbf p$ on the triangle’s plane, we have $\mathbf n\cdot\mathbf p=\mathbf n\cdot\mathbf p_0$ (this is just a rearrangement of the point-normal form of the plane’s equation). We can use this to find the multiple of $\mathbf n$ that lies on the plane: setting $\mathbf p=\lambda\mathbf n$ and solving for $\lambda$ gives $\lambda = {\mathbf n\cdot\mathbf p_0\over\mathbf n\cdot\mathbf n}$. If this is positive, then we have to move in the direction of $\mathbf n$ to reach the plane from the origin, that is, $\mathbf n$ points “toward” the plane. Now, $\mathbf n\cdot\mathbf n$ is always positive, so the sign of $\lambda$ is entirely determined by $\mathbf n\cdot\mathbf p_0$.

So, compute the dot product of your normal with any of the triangle’s vertices and check the sign: if positive, the normal points towards the triangle’s plane, if negative, away from it, and if zero, the triangle’s plane passes through the origin and it’s neither. I write “the triangle’s plane” instead of “the triangle” because it’s quite possible that the line through the origin in the direction of the normal doesn’t intersect the triangle at all, in which case it only points “toward” the triangle in a loose sense.

$\endgroup$ 2 $\begingroup$

Once you find the normal vector by the cross product

$$v_1=(x_1,x_2,x_3)\;,\;\;\;v_2=(y_1,y_2,y_3)$$

$$n=v_1\times v_2:=\begin{vmatrix}e_1&e_2&e_3\\x_1&x_2&x_3\\y_1&y_2&y_3\end{vmatrix}=(x_2y_3-x_3y_2\,,\,x_3y_1-x_1y_3\,,\,x_1y_2-x_2y_1)$$

the direction of n is given by the right hand rule.enter image description here

$\endgroup$ 4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like