How can I plot a 3D plane knowing its center point coordinates and its Normal

68 ビュー (過去 30 日間)
Abeer Heikal
Abeer Heikal 2016 年 6 月 22 日
回答済み: Nitin Phadkule 2021 年 9 月 18 日
How can I plot a 3D plane knowing its center point coordinates and its Normal ?

採用された回答

Roger Stafford
Roger Stafford 2016 年 6 月 23 日
編集済み: Roger Stafford 2016 年 6 月 23 日
Using Dr. Siva’s notation with the point at (x1,y1,z1) and normal vector v = [a,b,c], (v should be a row vector,) you can plot a surface version of the plane with this:
w = null(v); % Find two orthonormal vectors which are orthogonal to v
[P,Q] = meshgrid(-50:50); % Provide a gridwork (you choose the size)
X = x1+w(1,1)*P+w(1,2)*Q; % Compute the corresponding cartesian coordinates
Y = y1+w(2,1)*P+w(2,2)*Q; % using the two vectors in w
Z = z1+w(3,1)*P+w(3,2)*Q;
surf(X,Y,Z)
  2 件のコメント
Abeer Heikal
Abeer Heikal 2016 年 6 月 26 日
Thanks Roger a lot. I tried it and it works perfectly. I have a small wonder though. For this normal and the center point there can be infinite number of 3D planes. I do have a Dip and Dip Direction info for my planes. Can you kindly advise how can I implement this extra info into your suggested Matlbab script to generate a unique 3D plane?
Roger Stafford
Roger Stafford 2016 年 6 月 27 日
If I understand you correctly Abeer, I have to disagree with your statement that "there can be infinite number of 3D planes". For a 3D plane to have a given normal direction and to contain a given point makes that plane absolutely unique - no other such plane is possible. Remember, we are speaking of mathematically perfectly flat planes, not curved ones.

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

その他の回答 (2 件)

KSSV
KSSV 2016 年 6 月 22 日
You know a point (x1,y1,z1) and normal vector (a,b,c). Then equation of plane should be:
a(x-x1)+b(y-y1)+c(z-z1) = 0 ;
  1 件のコメント
Abeer Heikal
Abeer Heikal 2016 年 6 月 22 日
編集済み: Abeer Heikal 2016 年 6 月 22 日
Thanks Dr. Siva
I know this, but I don't know how to write it in Matlab since I m new to Matlab. I appreciate it if you can help me by any way.

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


Nitin Phadkule
Nitin Phadkule 2021 年 9 月 18 日
% ax+by+cz+d plane
% 3x+2y+6z+2 plane
y =linspace(-4,4,51);
a=3;b=2;c=6;d=2;
x =linspace(-4,4,51);
[y2,x2]=meshgrid(y ,x );
z2=(1/c).*(d+(a.*x2)+(b.*y2));% ax+by+cz+d plane
surf( x2,y2,z2 );

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by