Determine the position in front of a 3D plane (Cartesian mathematics)

I have a flat element in three-dimensional space that I rotated on the x, y and z axes. I position the 3D camera in front of the flat, but I need to find a way to calculate the x, y, z of the camera.

I am trying to figure out how to place the camera at a distance x from the plane. Obviously, several triggers are involved, but for me life cannot understand. G.

Dave

+3
source share
2 answers

The ratio between the distance of a point to a plane is

distance = (Aa + Bb + Cc + D) / sqrt (A ^ 2 + B ^ 2 + C ^ 2)

for the distance to the plane Ax + By + Cz + D = 0 from the point (a, b, c)

Maybe you need to multiply by -1 to get a positive distance.

(a, b, c), ,

x = a + At; y = b + Bt; z = c + Ct

, , , . - .

+2

, N P.
P'=P+x*N, P', x infront P .

+2

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


All Articles