How to define for which plane lies a given point with coordinates?

8 ビュー (過去 30 日間)
Aknur
Aknur 2023 年 4 月 4 日
コメント済み: Bjorn Gustavsson 2023 年 4 月 6 日
Hello!
Kindly ask about how to find in which plane lies point A(x, y, z), example A(1.5, 1.5, 3.0)
and I have planes
planes(:,:,1) = [0 3 3; 0 0 3; 0 3 0; 0 0 0];
planes(:,:,2) = [0 0 3; 3 0 3; 0 0 0; 3 0 0];
planes(:,:,3) = [3 0 3; 3 3 3; 3 0 0; 3 3 0];
planes(:,:,4) = [3 3 3; 0 3 3; 3 3 0; 0 3 0];
planes(:,:,5) = [0 3 0; 3 3 0; 0 0 0; 3 0 0];
planes(:,:,6) = [0 3 3; 3 3 3; 0 0 3; 3 0 3];
location_plane = 6;

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2023 年 4 月 4 日
This is easiest to do with a vector-algebra approach. Something like this:
1, the plane can be described as all points such that , where is the normal to the plane and l is a scalar.
2, to use this, first use 3 of your 4 points to calculate the surface normal, (create 2 vectors that are not parallel, cross-multiply them and normalize that vector).
3, use the formula above with that normal-vector and all 4 points - to check that you get the same l for all four points.
4, test if also is identical to l
5, start over at point 1 with the next four points.
HTH
  12 件のコメント
Aknur
Aknur 2023 年 4 月 6 日
I got same l for all 4 points (l0, l1, l2, l3 = =27), and l4 = dot(Pi,n) equal 0,
how then I can define on which plane lies my point with
Bjorn Gustavsson
Bjorn Gustavsson 2023 年 4 月 6 日
You have to make the same check with your point A. If you get the same l for as for one plane then A lies on that plane, if you get the same l for multiple planes then A lies in all those planes.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by