Although hardware accelerated, the projected tetrahedra algorithm requires a substantial amount of CPU usage. Ideally, we would like our graphics hardware to project polyhedra (or at least tetrahedra) in the same manner as it projects points, lines, and polygons. King, Wittenbrink, and Wolters [45] propose an architecture to do just this, but neither they nor anyone else, have implemented their architecture.
Once programmable graphics hardware became available, Wylie and colleagues [110] devised a means of performing tetrahedra projection completely on the graphics card. They called their method the GPU Accelerated Tetrahedra Renderer (GATOR).
The limitations of vertex programs were Wylie's biggest challenge. At the time, vertex programs had neither the ability to branch nor the ability to add or subtract vertices.2 Therefore, Wylie had to know the number of triangles to use a-priori.
To get around this problem, Wylie builds a
basis graph, shown in
Figure 1.4. If we treat each
projected tetrahedra projection class (shown in
Figure 1.3 on
page
) as a graph, we notice that they
are all isomorphic with the basis graph (assuming we allow nodes of the
basis graph to be located at a single point). Wylie draws the basis graph
as a triangle fan, so the problem reduces to finding a mapping from a
projection to the basis graph.
|
To find this mapping, Wylie enumerates all the permutations of the projections, shown in Figure 1.5. There are fourteen permutations in all, which GATOR uniquely identifies with four tests. Three of the tests involve checking the direction of the cross product of various vectors along edges. The fourth test involves checking whether two particular segments intersect. Once GATOR properly identifies the permutation, GATOR retrieves the appropriate mapping of the basis graph via a lookup table.