July 2009
Intermediate to advanced
936 pages
21h 41m
English
This appendix describes how to calculate normal vectors for surfaces. You need to define normals to use the OpenGL lighting facility, which is described in Chapter 5. “Normal Vectors” in Chapter 2 introduces normals and the OpenGL command for specifying them. This appendix goes through the details of calculating them. It has the following major sections:
Since normals are perpendicular to a surface, you can find the normal at a particular point on a surface by first finding the flat plane that just touches the surface at that point. The normal is the vector that’s perpendicular to that plane. On a perfect sphere, ...
Read now
Unlock full access