calculate the normal of a 3D plane

8 visualizaciones (últimos 30 días)
Alberto Acri
Alberto Acri el 16 de Mayo de 2024
Editada: Torsten el 16 de Mayo de 2024
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);

Respuesta aceptada

Torsten
Torsten el 16 de Mayo de 2024
Movida: Torsten el 16 de Mayo de 2024
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 comentarios
Alberto Acri
Alberto Acri el 16 de Mayo de 2024
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 el 16 de Mayo de 2024
Editada: Torsten el 16 de Mayo de 2024
Yes, N is the normal and C is the centroid of your points, and the best-fit plane is N'*(x-C)' = 0.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by