Normal quotes
This commit is contained in:
parent
5e10794a24
commit
18011c595a
352 changed files with 6040 additions and 6040 deletions
24
50-07.md
24
50-07.md
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#### Notes on the 3-D Animation Example {#Heading9}
|
||||
|
||||
The sample program transforms the polygon’s vertices from object space
|
||||
The sample program transforms the polygon's vertices from object space
|
||||
to world space to view space to the screen, as described earlier. In
|
||||
this case, world space and view space are congruent—we’re looking right
|
||||
this case, world space and view space are congruent—we're looking right
|
||||
down the negative Z axis of world space—so the transformation matrix
|
||||
from world to view is the identity matrix; you might want to experiment
|
||||
with changing this matrix to change the viewpoint. The sample program
|
||||
|
|
@ -26,23 +26,23 @@ initially appear to be; more in the near future.
|
|||
The maximum translation along the Z axis is limited to -40; this keeps
|
||||
the polygon from extending past the viewpoint to positive Z coordinates.
|
||||
This would wreak havoc with the projection and 2-D clipping, and would
|
||||
require 3-D clipping, which is far more complicated than 2-D. We’ll get
|
||||
to 3-D clipping at some point, but, for now, it’s much simpler just to
|
||||
require 3-D clipping, which is far more complicated than 2-D. We'll get
|
||||
to 3-D clipping at some point, but, for now, it's much simpler just to
|
||||
limit all vertices to negative Z coordinates. The polygon does get
|
||||
mighty close to the viewpoint, though; run the program and use the “T”
|
||||
mighty close to the viewpoint, though; run the program and use the "T"
|
||||
key to move the polygon as close as possible—the near vertex swinging
|
||||
past provides a striking sense of perspective.
|
||||
|
||||
The performance of Listing 50.5 is, perhaps, surprisingly good, clocking
|
||||
in at 16 frames per second on a 20 MHz 386 with a VGA of average speed
|
||||
and no 387, although there is, of course, only one polygon being drawn,
|
||||
rather than the hundreds or thousands we’d ultimately like. What’s far
|
||||
rather than the hundreds or thousands we'd ultimately like. What's far
|
||||
more interesting is where the execution time goes. Even though the
|
||||
program is working with only one polygon, 73 percent of the time goes
|
||||
for transformation and projection. An additional 7 percent is spent
|
||||
waiting to flip the screen. Only 20 percent of the total time is spent
|
||||
in all other activity—and only 2 percent is spent actually drawing
|
||||
polygons. Clearly, we’ll want to tackle transformation and projection
|
||||
polygons. Clearly, we'll want to tackle transformation and projection
|
||||
first when we look to speed things up. (Note, however, that a math
|
||||
coprocessor would considerably decrease the time taken by floating-point
|
||||
calculations.)
|
||||
|
|
@ -55,19 +55,19 @@ putting clipping into the fill code, but, unfortunately, I lack the
|
|||
space to do that here.
|
||||
|
||||
Finally, observe the jaggies crawling along the edges of the polygon as
|
||||
it rotates. This is temporal aliasing at its finest! We won’t address
|
||||
it rotates. This is temporal aliasing at its finest! We won't address
|
||||
antialiasing further, realtime antialiasing being decidedly nontrivial,
|
||||
but this should give you an idea of why antialiasing is so desirable.
|
||||
|
||||
### An Ongoing Journey {#Heading10}
|
||||
|
||||
In the next chapter, we’ll assign fronts and backs to polygons, and
|
||||
In the next chapter, we'll assign fronts and backs to polygons, and
|
||||
start drawing only those that are facing the viewer. That will enable us
|
||||
to handle convex polyhedrons, such as tetrahedrons and cubes. We’ll also
|
||||
to handle convex polyhedrons, such as tetrahedrons and cubes. We'll also
|
||||
look at interactively controllable rotation, and at more complex
|
||||
rotations than the simple rotation around the Y axis that we did this
|
||||
time. In time, we’ll use fixed-point arithmetic to speed things up, and
|
||||
do some shading and texture mapping. The journey has only begun; we’ll
|
||||
time. In time, we'll use fixed-point arithmetic to speed things up, and
|
||||
do some shading and texture mapping. The journey has only begun; we'll
|
||||
get to all that and more soon.
|
||||
|
||||
------------------------ --------------------------------- --------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue