WARNING
Content Under Development
See release page for latest official PDF version.
**Chapter 6: Antialiasing**
When a real camera takes a picture, there are usually no jaggies along edges because the edge pixels
are a blend of some foreground and some background. We can get the same effect by averaging a bunch
of samples inside each pixel. We will not bother with stratification, which is controversial but is
usual for my programs. For some ray tracers it is critical, but the kind of general one we are
writing doesn’t benefit very much from it and it makes the code uglier. We abstract the camera class
a bit so we can make a cooler camera later.
One thing we need is a random number generator that returns real random numbers. We need a function
that returns a canonical random number which by convention returns random real in the range
$0 ≤ ran < 1$. The “less than” before the 1 is important as we will sometimes take advantage of that.
A simple approach to this is to use the `rand()` function that can be found in `