calculating outward normal of a non-convex polyhedral

孤者浪人 提交于 2019-12-07 16:51:50

问题


If all nodes of a polyhedron (may be non-convex) and their coordinates are known, the points of a face are given in order (anti-clockwise or clockwise around the outward normal), how do I obtain the outward normal vector of each face?

Here is a method for convex polyhedron: Computing face normals and winding

How about a general polyhedron that could be non-convex?


回答1:


Here is one method. Fix the orientation of one face F0 of your polyhedron P. You don't yet know if this is counterclockwise from the outside, so that the right-hand-rule gives an outward pointing normal from the cross product.

Now orient an adjacent face F1 to be compatible with F0's orientation, in that the shared edge is oriented → in F0 and ← in F1. Continue propagating the orientations of faces until every face of P is consistent with F0. So now all normals either point inward or all point outward.

Now compute the volume of P by summing signed tetrahedra volumes. The volume will be positive if all faces are oriented counterclockwise, and negative if all clockwise. If it comes out negative, reverse all face orientations.

Computing the signed volume is all over the web, including here: Computational Geometry in C.



来源:https://stackoverflow.com/questions/48093451/calculating-outward-normal-of-a-non-convex-polyhedral

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!