Deduped images
This commit is contained in:
parent
4eef8b2919
commit
9e52de9586
233 changed files with 128 additions and 128 deletions
|
|
@ -48,7 +48,7 @@
|
|||
</P>
|
||||
<P ALIGN="RIGHT">(eq. 7)</P>
|
||||
<P>(Note that the cross product operation is denoted by an X.) Unlike the dot product, the result of the cross product is a vector. Not just any vector, either; the vector generated by the cross product is perpendicular to both of the original vectors. Thus, the cross product can be used to generate a normal to any surface for which you have two vectors that lie within the surface. This means that we can generate the screenspace normals we need by taking the cross product of two adjacent polygon edges, as shown in Figure 61.4.</P>
|
||||
<TABLE WIDTH="100%"><TD VALIGN="TOP" ALIGN="LEFT" WIDTH="5%"><IMG SRC="images/61-01i.jpg"><TD VALIGN="TOP" ALIGN="LEFT" WIDTH="95%"><SMALL><I>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.</SMALL></I>
|
||||
<TABLE WIDTH="100%"><TD VALIGN="TOP" ALIGN="LEFT" WIDTH="5%"><IMG SRC="images/i.jpg"><TD VALIGN="TOP" ALIGN="LEFT" WIDTH="95%"><SMALL><I>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.</SMALL></I>
|
||||
</TABLE>
|
||||
<P><A NAME="Fig4"><!-- </A><A HREF="javascript:displayWindow('images/61-04.jpg',407,283 )"> --><IMG SRC="images/61-04.jpg"><BR><!-- </A>
|
||||
<BR><A HREF="javascript:displayWindow('images/61-04.jpg',407,283)"> --><FONT COLOR="#000077"><B>Figure 61.4</B></FONT></A> <I>How the cross product of polygon edge vectors generates a polygon normal.</I>
|
||||
|
|
|
|||
Loading…
Reference in a new issue