calculate the normal of a 3D plane

조회 수: 1 (최근 30일)
Alberto Acri
Alberto Acri 2024년 5월 16일
편집: Torsten 2024년 5월 16일
Hi! I have a circular plane, whose coordinates of the points of the circumference are:
P = importdata("node_plane.mat");
plot3(P(:,1),P(:,2),P(:,3))
I would like to know if it is correct to calculate the normal of this plane in the following way:
N = cross(P(1,:) - P(2,:), P(3,:) - P(2,:));
N = N/norm(N);

채택된 답변

Torsten
Torsten 2024년 5월 16일
이동: Torsten 2024년 5월 16일
I would like to know if it is correct to calculate the normal of this plane in the following way:
N = cross(P(1,:) - P(2,:), P(3,:) - P(2,:));
N = N/norm(N);
If you are sure that all points lie in exactly one plane: yes, you can choose any three points and do as you did above.
If you first need to fit a plane to your data points: no.
  댓글 수: 4
Alberto Acri
Alberto Acri 2024년 5월 16일
Okay, I am not very familiar with it. So the best normal that can be determined with the 'node_plane' points is the one indicated in your code with N? Correct?
Torsten
Torsten 2024년 5월 16일
편집: Torsten 2024년 5월 16일
Yes, N is the normal and C is the centroid of your points, and the best-fit plane is N'*(x-C)' = 0.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Exploration and Visualization에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by