2D outline algorithm for projected 3D mesh

前端 未结 6 1547
执念已碎
执念已碎 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:12

    The alpha shapes technique mentioned in this question handles a general set of points where the vertex connections are not known:

    Is there an efficient algorithm to generate a 2D concave hull?

    However, since you already know "face" information which can be preserved through the projection, it is probably not the best approach.

    A brute force algorithm might feasible, especially if spatial sorting structures where used. eg for each facet:

    1. Project facet on to the plane
    2. Check if projected facet is completely enclosed by existing geometry, if yes: done (no need to expand projected silhouette)
    3. If points fall outside the existing geometry, do triangle-triangle intersections to determine which portions fall outside, build an arbitrary n-gon (possibly concave) to fill the missing space, then chop the n-gon in to triangles

    Another idea, depending on the fidelity you require, is just shoot a bunch of rays normal from your projection plane to your original geometry. Create a 2d hit/miss and use that to determine your extents.

提交回复
热议问题