You need the cross product for that. The cross product takes two vectors, and makes a new one at a 90 degree angle to both.
It might make it easier to remember if you imagine that it CROSSES the plane that the two vectors form.
The dot product takes two vectors and returns a single number that tells you how much they point towards eachother.
The dot product is used with normals for lighting vertices, which are dots. :-)
Cross product:
x3 = y1*z2 - z1*y2
y3 = z1*x2 - x1*z2
z3 = x1*y2 - y1*x2
It might make it easier to remember if you imagine that it CROSSES the plane that the two vectors form.
The dot product takes two vectors and returns a single number that tells you how much they point towards eachother.
The dot product is used with normals for lighting vertices, which are dots. :-)
Cross product:
x3 = y1*z2 - z1*y2
y3 = z1*x2 - x1*z2
z3 = x1*y2 - y1*x2