2D outline algorithm for projected 3D mesh

前端 未结 6 1611
执念已碎
执念已碎 2021-01-30 03:21

Given: A 3D mesh defined with a set of vertices and triangles building up the mesh with these points.

Problem: Find the 2d outline of the projected arbitrarily rotated m

6条回答
  •  甜味超标
    2021-01-30 04:13

    I only see answers for convex solutions, so here is mine for non-convex. (It was a little confusing what was the intention.)

    Take all edges from your 2D-triangles and group them. If two edges share both endpoints, they are in the same group. All groups, with only one edge, is then a part of the shell.

    Finally you can combine the shell-edges to one ring, by joining them together.

提交回复
热议问题