Projected surface normal vector on the xy plane

i has a plane whose equation is ax + by-z + d = 0. therefore, its normal vector is (a, b-1). Now I need to project the vector onto the xy plane in order to calculate its direction from the north axis (I think that the Y axis is here. Please help me get the projected vector. Thanks.

+3
source share
1 answer

I think you are looking for dot product . Finding the direction the plane is in is pretty easy.

// generic code, actual code depends on your engine.
// BasePlane.GetNormal() would equal to (0,0,1) for the X/Y plane
float dir = YourPlane.GetNormal().Dot(BasePlane.GetNormal());

1, , , . -1, . 0 , . , .

+1

Source: https://habr.com/ru/post/1790115/


All Articles