TITLE: How to find surface normal of a triangle
QUESTION [29 upvotes]: If I have a triangle with $3$ points $P_1, P_2,$ and $P_3$, each with $x, y,$ and $z$ coordinates, how do I find the surface normal $N$ in $x, y,$ and $z$ such that 
$$(N_x)^2+(N_y)^2+(N_z)^2 = 1$$
I'm looking for a simple formula that uses values like $x_1$, $x_2$, or $y_3$, and doesn't involve complicated equations or cross products.

REPLY [7 votes]: The general question can be written in python like this:
import numpy as np
p1 = np.array([0,0,5])
p2 = np.array([1,0,5])
p3 = np.array([0,1,5])

N = np.cross(p2-p1, p3-p1)

The 'normalized' sum of 1 can be attempted like this:
N = N / N.sum()

For the (0,0,0), (1,1,0), (0,0,1) example mentioned above, where the components add up to 0, the result silently degrades to array([ inf, -inf, nan]).