Azzera filtri
Azzera filtri

find the distance from a point to a plane (known two vectors)

9 visualizzazioni (ultimi 30 giorni)
Hello everyone. I have two vectors, v1 = [29.98,1.02,-0.12]; v2 = [-1.01, 29.97, 0.85]; As we know, two vectors can create a plane. I have a point P1 = [100,100,-18.65]; So how to calculate the distance from P1 to the plane created by vectors v1 and v2? Thank you.

Risposta accettata

Jan
Jan il 5 Gen 2018
Modificato: Jan il 6 Gen 2018
No, we do not know that 2 vectors can create a plane. If these two vectors are used to define the normal vector of the plane, you need an additional point, which is element of the plane. If v1 is the normal and v2 is a point of the plane (or the other way around), the plane is well defined also. But "v1" and "v2" sounds more like two directional vectors, such that the normal is:
v1x2 = cross(v1, v2);
N = v1x2 / norm(v1x2)
However, please clarify this at first. If you have the plane defined by a point P and a normal vector N, the distance of the point Q is very easy to obtain:
% Vector from P to Q:
PQ = Q - P;
% Dot product between line from Q to P1 and normal of the plane:
Dist = dot(PQ, N);
This can be found directly using the Hesse normal form. The same formula allows to determine the distance between two skew lines in 3D: The 2 lines are defined by two points P1 and P2 on them and the directional vectors N1 and N2. Then create a plane E through e.g. P1 and the normal cross(N1, N2) / norm(cross(N1, N2)). Now the distance between the two lines is the distance between P2 and E.

Più risposte (0)

Categorie

Scopri di più su Earth, Ocean, and Atmospheric Sciences in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by