*p0 | Data of point 1 on plane |
*p1 | Data of point 2 on plane |
*p2 | Data of point 3 on plane |
*v | Normal vector to plane |
The following finds the normal vector to the plane passing through points (1, 2, 3), (1, -1, 2), and (2, 3, 1). NJS_POINT3 p0, p1, p2; NJS_VECTOR v; p0.x = 1.f; p0.y = 2.f; p0.z = 3.f; p1.x = 1.f; p1.y = -1,f; p1.z = 2.f; p2.x = 2.f; p2.y = 3.f; p2.z = 1.f; njGetPlaneNormal(&p0, &p1, &p2, &v); % Result % v (7, -1, 3)