CPU-GPU Algorithms for Triangular Surface Mesh Simplification
CPU-GPU Algorithms for Triangular Surface Mesh Simplification
CPU-GPU Algorithms for Triangular Surface Mesh Simplification
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>CPU</strong>-<strong>GPU</strong> <strong>Algorithms</strong> <strong>for</strong> <strong>Triangular</strong> <strong>Surface</strong> <strong>Mesh</strong> <strong>Simplification</strong> 52.1 <strong>CPU</strong> Edge-Collapse AlgorithmTo simplify portions of the mesh using the <strong>CPU</strong>, we propose a simple edgecollapsealgorithm. The <strong>CPU</strong> edge-collapse algorithm iterates over all <strong>CPU</strong>assignedelements. Each element is examined to see if it is affected, and ifan element T = (v 1 , v 2 , v 3 ) that is not affected is found, an edge-collapse isper<strong>for</strong>med on (v 1 , v 2 ). When all elements are affected or have taken part inan edge-collapse operation, the algorithm terminates. This ensures that theedge-collapse operation is per<strong>for</strong>med uni<strong>for</strong>mly and exhaustively across theelements assigned to the <strong>CPU</strong>, and that no one area is more or less simplifiedor de<strong>for</strong>med. Pseudocode <strong>for</strong> the <strong>CPU</strong> edge-collapse simplification algorithmis given in Algorithm 1.Algorithm 1 The <strong>CPU</strong> Edge-Collapse <strong>Simplification</strong> Algorithmfunction mark-as-affected(element)<strong>for</strong> all v ∈ element doaffected[v] ← trueend <strong>for</strong>end functionfunction mark-as-collapsed((v 1, v 2))<strong>for</strong> all T ∈ elements ⊃ {v 1, v 2} docollapsed[T ] ← trueend <strong>for</strong>end functionfunction <strong>CPU</strong>-Simplify(elements, vertices)<strong>for</strong> all T = (v 1, v 2, v 3) ∈ elements doif T ∈N(affected elements) thenmark-as-affected(T )elsecollapse((v 1, v 2))mark-as-collapsed((v 1, v 2))end ifend <strong>for</strong>end function2.2 <strong>GPU</strong> Marking AlgorithmWe propose a naïve <strong>GPU</strong> algorithm to simplify portions of the mesh based onthe edge-collapse operation. The naïve <strong>GPU</strong> marking simplification algorithmworks by searching through all elements assigned to the <strong>GPU</strong> one at a time.If an element T = (v 1 , v 2 , v 3 ) that is not affected is found, an edge-collapseis per<strong>for</strong>med on (v 1 , v 2 ), and all T n ∈ N(T ) are concurrently marked as affected.When all elements are affected or have taken part in an edge-collapse