Graphics Reference
In-Depth Information
Figure 12.8. A single triangle in the first octant (level = 0) expanded to approximate section
of a sphere in that octant, with level = 1 at the top right, level = 2 at the botom left, and level
= 3 at the botom right.
3D Object Silhouettes
A clever way to detect an edge in a 3D silhouete is that a silhou-
ete edge is shared by adjacent triangles, with one facing toward
the eye and the other facing away from the eye. You can deter-
mine the way each triangle faces by calculating the dot product
of the triangle surface normal and the eye vector and testing if its
sign is positive or negative. In the triangle with adjacency shown
in Figure 12.9, this test is applied to the central triangle and each
of the triangles adjacent to it. One such pair of triangles is high-
lighted in the figure.
Figure 12.9. The structure
of triangles that gives a line
segment of the silhouete.
Search WWH ::




Custom Search