Convert figure images to markdown
This commit is contained in:
parent
307b59584f
commit
77a95ec319
115 changed files with 218 additions and 403 deletions
11
61-03.md
11
61-03.md
|
|
@ -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.
|
||||
|
||||
\
|
||||
**Figure 61.3** *A problem with determining front/back visibility.*
|
||||

|
||||
|
||||
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.
|
|||
 *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.*
|
||||
------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
\
|
||||
**Figure 61.4** *How the cross product of polygon edge vectors
|
||||
generates a polygon normal.*
|
||||

|
||||
|
||||
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.
|
||||
|
||||
\
|
||||
**Figure 61.5** *Backface culling with the dot product.*
|
||||

|
||||
|
|
|
|||
Loading…
Reference in a new issue