< Zurück | Inhalt | Weiter >

2.2 Projecting from 3D world coordinates to 2D screen coordinates

Performing a simple projection from 3D coordinates to 2D coordinates is relatively uncomplicated, though it does involve some matrix algebra that I shan’t explain in detail. (There are plenty of graphics textbooks that will step you through them in far greater detail than I could here.)

There are also many introductory 3D graphics courses that cover this material online. A list of good links to frequently asked questions (FAQs) and other information is available from 3D Ark at
. If you would like to pick up a free online book that discusses matrix and vector algebra related to 3D graphics, try Sbastien Loisel’s Zed3D, A compact reference for 3D computer graphics programming. It is available as a ZIP archive from http://www.math.mcgill.ca/~loisel/

If you have some money to spend, I would recommend picking up the bible for these sorts of topics: Computer Graphics Principles and Practice, by James Foley, Andries van Dam, Steven Feiner, and John Hughes (Addison−Wesley, 1990).


2.2.1 A simple 3D projection routine
From AwtRenderingEngine.java
2.2.2 Comparing output
2.2.3 Drawing filled triangles
Hidden surface removal
Depth sorting (Painter’s algorithm)
Depth buffer (Z−buffer)