O'Reilly logo

3D Programming for Windows® by Charles Petzold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Light and Shading

In this chapter:

Lessons in Illumination 150

Vector Mathematics 162

DiffuseMaterial and Its Properties 171

SpotLight and PointLight 176

Several factors contribute to a successful three-dimensional scene. Getting the geometry correct is certainly important, and it's often desirable to use transforms or other means to animate the 3D figures. But a successful 3D scene also depends on lighting, particularly the interaction of the light with the surfaces (or texture) of figures—an effect called shading.

I'll begin this chapter establishing how light illuminates surfaces in WPF 3D. I'll show how vector mathematics contribute to the calculation of lighting, and I'll conclude the chapter with demonstrations of two derivatives of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required