Remove colour attributes from body and strip most of the font tags out

This commit is contained in:
James Gregory 2013-12-30 13:57:02 +11:00
commit c1f88ddb41
362 changed files with 1632 additions and 1706 deletions

View file

@ -24,7 +24,7 @@
<!--CHAPTER=60//-->
<!--PAGES=1115-1119//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//--></HEAD><BODY LINK=#0000FF ALINK=#000099 VLINK=#0000FF BGCOLOR=#FFFFFF>
<!--UNASSIGNED2//--></HEAD><body>
<CENTER>
<TABLE BORDER>
@ -36,9 +36,8 @@
</TABLE>
</CENTER>
<P><BR></P>
<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Chapter 60<BR>Compiling BSP Trees
</FONT></H2>
<H3><A NAME="Heading2"></A><FONT COLOR="#000077">Taking BSP Trees from Concept to Reality</FONT></H3>
<H2><A NAME="Heading1"></A>Chapter 60<BR>Compiling BSP Trees</H2>
<H3><A NAME="Heading2"></A>Taking BSP Trees from Concept to Reality</H3>
<P>As long-time readers of my columns know, I tend to move my family around the country quite a bit. Change doesn&rsquo;t come out of the blue, so there&rsquo;s some interesting history to every move, but the roots of the latest move go back even farther than usual. To wit:
</P>
<P>In 1986, just after we moved from Pennsylvania to California, I started writing a column for <I>Programmer&rsquo;s Journal</I>. I was paid peanuts for writing it, and I doubt if even 5,000 people saw some of the first issues the columns appeared in, but I had a lot of fun exploring fast graphics for the EGA and VGA.</P>
@ -50,7 +49,7 @@
<P>I think there&rsquo;s a worthwhile lesson to be learned from all this, a lesson that I&rsquo;ve seen hold true for many other people, as well. If you do what you love, and do it as well as you can, good things will eventually come of it. Not necessarily quickly or easily, but if you stick with it, they will come. There are threads that run through our lives, and by the time we&rsquo;ve been adults for a while, practically everything that happens has roots that run far back in time. The implication should be clear: If you want good things to happen in your future, stretch yourself and put in the extra effort now at whatever you care passionately about, so those roots will have plenty to work with down the road.</P>
<P>All this is surprisingly closely related to this chapter&rsquo;s topic, BSP trees, because John is the fellow who brought BSP trees into the spotlight by building DOOM around them. He also got me started with BSP trees by explaining how DOOM worked and getting me interested enough to want to experiment; the BSP compiler in this article is the direct result. Finally, John has been an invaluable help to me as I&rsquo;ve learned about BSP trees, as will become evident when we discuss BSP optimization.</P>
<P>Onward to compiling BSP trees.</P>
<H3><A NAME="Heading3"></A><FONT COLOR="#000077">Compiling BSP Trees</FONT></H3>
<H3><A NAME="Heading3"></A>Compiling BSP Trees</H3>
<P>As you&rsquo;ll recall from the previous chapter, a BSP tree is nothing more than a series of binary subdivisions that partion space into ever-smaller pieces. That&rsquo;s a simple data structure, and a BSP compiler is a correspondingly simple tool. First, it groups all the surfaces (lines in 2-D, or polygons in 3-D) together into a single subspace that encompasses the entire world of the database. Then, it chooses one of the surfaces as the root node, and uses its line or plane to divide the remaining surfaces into two subspaces, splitting surfaces into two parts if they cross the line or plane of the root. Each of the two resultant subspaces is then processed in the same fashion, and so on, recursively, until the point is reached where all surfaces have been assigned to nodes, and each leaf surface subdivides a subspace that is empty except for that surface. Put another way, the root node carves space into two parts, and the root&rsquo;s children carve each of those parts into two more parts, and so on, with each surface carving ever smaller subspaces, until all surfaces have been used. (Actually, there are many other lines or planes that a BSP tree can use to carve up space, but this is the approach we&rsquo;ll use in the current discussion.)
</P><P><BR></P>
<CENTER>
@ -65,7 +64,7 @@
<hr width="90%" size="1" noshade>
<div align="center">
<font face="Verdana,sans-serif" size="1">Graphics Programming Black Book &copy; 2001 Michael Abrash</font>
Graphics Programming Black Book &copy; 2001 Michael Abrash
</div>
<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->