Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesGeometry Lessons


December 1997 / Cover Story / Beyond MMX / Geometry Lessons

On the screen, 3-D objects consist of hundreds or even thousands of polygons, usually triangles. The smaller and more numerous the polygons, the more detailed the object.

When an object moves on the screen, rotates to a different viewing angle, or moves forward or backward in virtual space (e.g., scales to a different size), the program must recalculate every vertex (corner) of every polygon. This is a geometry transformation, and it requires heavy-duty matrix multiplication. Typically, the program must multiply a 1x4 matrix of coordinates against a 4x4 transform matrix. It requires up to 16 multiplies and 12 additions for every vertex. (See the figure "The Math Behind 3-D Graphics" .)

A typical 3-D game object might have 1000 polygons. Each time it moves, that's at least 84,000 multiplies and adds. And that's just to recalculate the wire-frame mesh -- it takes even more number-crunching to wrap the skeleton with a surface texture map.

All the numbers that a geometry transformation manipulates are single-precision floating point values, 32 bits long. RISC chips are generally better at this math than x86 chips. Even the Sony PlayStation and Nintendo 64 -- home videogame machines that sell for under $150 -- have special geometry-transform hardware t hat blows most PCs into the weeds.


The Math Behind 3-D Graphics

illustration_link (29 Kbytes)


Up to the Cover Story section contentsGo to previous article: Geometry LessonsGo to next article: Centaur's WinChip Road MapSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network