Anti-aliasing
Because pixels are not infinitely small, diagonal lines will tend to be rendered as stairsteps, or jaggies. The following illustration shows a zoomed-in view:
This phenomenon is called aliasing, and a lot of effort goes into working around it in production-quality imagery. One such anti-aliasing technique renders the image at much higher resolution (double, triple, or more), and then requires a separate image editor to resample the picture to a smaller resolution. This essentially averages the values of adjacent pixels, and helps smooth those jagged stairsteps.
You can anti-alias in a single step, though, using a technique called ...
Get The Ray Tracer Challenge now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.