필터 지우기
필터 지우기

Outward pointing normal vector for 3D plane

조회 수: 4 (최근 30일)
LC
LC 2020년 10월 3일
답변: Rishik Ramena 2020년 10월 8일
I have the following facet of a cuboid given by the vertices: V = [-1,-1,-1; 1, 1, -1; -1,1,-1;1, -1,-1]. This facet is the bottom facet of the cuboid. So the outward pointing normal to the cuboid with respect to this facet should be [0 0 -1]. However, with the following MATLAB code, I get the normal, which is [0 0 1], which is inward pointing. What is missing here?
V=V-mean(V);
[U,S,W]=svd(V,0);
norm_vec = W(:,end)
I see at some places that the vertices should be arranged in the counterclockwise direction to calculate the outward pointing normal.

답변 (1개)

Rishik Ramena
Rishik Ramena 2020년 10월 8일
There is no way for the svd function to know that the vertices you have provided are of a bottom facet of a cuboid. So there’s no inward/outward facing normal that can be ensured. Also the V generated by svd does not ensure a direction to a plane. It can only ensure that the vector will be normal to the best fit plane covering the provided vertices. You might also have noticed that the orientation of the provided vertices(clockwise/counter-clockwise) does not affect the generated normal. You might want to go through the explanation provided here to better understand how and why this method works this way.

카테고리

Help CenterFile Exchange에서 Eigenvalues에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by