Convert figure images to markdown

This commit is contained in:
James Gregory 2013-12-31 07:56:10 +11:00
commit 77a95ec319
115 changed files with 218 additions and 403 deletions

View file

@ -22,8 +22,7 @@ its screenspace normal has a positive z, and vice-versa, as shown in
Figure 61.3. So we need screenspace normals, but those can't readily be
generated by transformation from worldspace.
![](images/61-03.jpg)\
**Figure 61.3**  *A problem with determining front/back visibility.*
![**Figure 61.3**  *A problem with determining front/back visibility.*](images/61-03.jpg)
The solution is to use the cross product of two of the polygon's edges
to generate a normal. The formula for the cross product is:
@ -45,9 +44,8 @@ polygon edges, as shown in Figure 61.4.
![](images/i.jpg) *In fact, we can cull with only one-third the work needed to generate a full cross product; because we're interested only in the sign of the z component of the normal, we can skip entirely calculating the x and y components. The only caveat is to be careful that neither edge you choose is zero-length and that the edges aren't collinear, because the dot product can't produce a normal in those cases.*
------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
![](images/61-04.jpg)\
**Figure 61.4**  *How the cross product of polygon edge vectors
generates a polygon normal.*
![**Figure 61.4**  *How the cross product of polygon edge vectors
generates a polygon normal.*](images/61-04.jpg)
Perhaps the most often asked question about cross products is "Which way
do normals generated by cross products go?" In a left-handed coordinate
@ -113,5 +111,4 @@ clipping is needed. And yes, the dot product is also the way to do the
actual clipping; but before we can talk about that, we need to
understand the use of the dot product for projection.
![](images/61-05.jpg)\
**Figure 61.5**  *Backface culling with the dot product.*
![**Figure 61.5**  *Backface culling with the dot product.*](images/61-05.jpg)