Retidy, removing align=left from headings and empty paragraphs
This commit is contained in:
parent
7b08bb15c6
commit
a96a114403
362 changed files with 8472 additions and 5040 deletions
33
54-03.html
33
54-03.html
|
|
@ -1,5 +1,4 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
|
|
@ -19,18 +18,22 @@
|
|||
<center>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td><a href="54-02.html">Previous</a></td>
|
||||
<td>
|
||||
<a href="54-02.html">Previous</a>
|
||||
</td>
|
||||
|
||||
<td><a href="index.html">Table of Contents</a></td>
|
||||
<td>
|
||||
<a href="index.html">Table of Contents</a>
|
||||
</td>
|
||||
|
||||
<td><a href="54-04.html">Next</a></td>
|
||||
<td>
|
||||
<a href="54-04.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<p><br /></p>
|
||||
|
||||
<h4 align="left" id="Heading4">Shading</h4>
|
||||
<h4 id="Heading4">Shading</h4>
|
||||
|
||||
<p>So far, the polygons out of which our animated objects have been built have had colors of fixed intensities. For example, a face of a cube might be blue, or green, or white, but whatever color it is, that color never brightens or dims. Fixed colors are easy to implement, but they don’t make for very realistic animation. In the real world, the intensity of the color of a surface varies depending on how brightly it is illuminated. The ability to simulate the illumination of a surface, or shading, is the next feature we’ll add to X-Sharp.</p>
|
||||
|
||||
|
|
@ -56,16 +59,20 @@
|
|||
|
||||
<p>The overall red shading for each polygon can be calculated by summing the ambient-shading red component with the diffuse-shading component from each light source, as in min((IA<sub><small>red</small></sub>xR<sub><small>red</small></sub>) + (ID<sub><small>red0</small></sub>xR<sub><small>red</small></sub>x(L<sub><small>0</small></sub>' • N)) + (ID<sub><small>red1</small></sub>xR<sub><small>red</small></sub>x(L<sub><small>1</small></sub>' • N)) +..., 1) where ID<sub><small>red0</small></sub> and L<sub><small>0</small></sub>' are the red intensity and the reversed unit-direction vector, respectively, for spotlight 0. Listing 54.2 shows the X-Sharp module DRAWPOBJ.C, which performs ambient and diffuse shading. Toward the end, you will find the code that performs shading exactly as described by the above equation, first calculating the ambient red, green, and blue shadings, then summing that with the diffuse red, green, and blue shadings generated by each directed light source.</p>
|
||||
|
||||
<p><br /></p>
|
||||
|
||||
<center>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td><a href="54-02.html">Previous</a></td>
|
||||
<td>
|
||||
<a href="54-02.html">Previous</a>
|
||||
</td>
|
||||
|
||||
<td><a href="index.html">Table of Contents</a></td>
|
||||
<td>
|
||||
<a href="index.html">Table of Contents</a>
|
||||
</td>
|
||||
|
||||
<td><a href="54-04.html">Next</a></td>
|
||||
<td>
|
||||
<a href="54-04.html">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
|
|
|||
Loading…
Reference in a new issue