Reputation: 47
I don't have much knowledge in vectors so I want to know how to calculate the normal vector of point in a trainge.As an example,in triangle ABC, IF A ≡ (0,3,0), B ≡ (0,0,0) and C ≡ (4,0,0) how can I find the normal vector to ABC at point B? Can anyone please explain the method of calculating it?
Upvotes: 0
Views: 1666
Reputation: 1475
The normal vector points in a direction perpendicular to the plane of your triangle. Since this vector is the same wherever you are in the triangle it doesn't sit at a particular point. So the normal at B is the same as at A, C and anywhere on the triangle. You can find a vector in that direction by taking the cross product of two vectors that make up two sides of your triangle. For example say D and E, where D is the vector B - A = (0,-3,0) and E is C - B = (4,0,0). Then the cross product C is defined as D x E (D cross E), calculated as follows:
Cx = Dy * Ez - Dz * Ey
Cy = Dz * Ex - Dx * Ez
Cz = Dx * Ey - Dy * Ex
Where the xyz are the components of the vectors. In your case:
Cx = -3 * 0 - 0 * 0 = 0
Cy = 0 * 4 - 0 * 0 = 0
Cz = 0 * 0 - (-3) * 4 = 12
So the normal vector points in the direction (0,0,12). Usually a normal vector is a unit vector which means it has a length of 1. The unit vector in this case is (0,0,1). You can tell by looking at the coordinates you have given that z is zero at each point, so the triangle is sitting on the XY plane. And the normal then points up the Z axis. As a triangle has two sides to the face, the normal can point in two directions. You can get the opposite normal by taking the cross product E x D instead of D x E. You will then end up with (0,0,-12).
Upvotes: 1