Antialiasing is a process that is used in order to smooth an group of pixels ( ie : a line ) that seems to be underdefined.

Antialiasing Before/After

During my work on ray-tracing, I had to develop a basic antialiasing system.
This basically consist in taking each pixel of the image we want to smooth, and making an average color of all the surrounding pixels.

We will use as a guinea pig and mesh of a hat
The time to generate the image, using the antialiasing system, will appear in red at the left bottom

This is the base image :




Regular Method : We make an average between pixels taken around the target. All of them. With no filters

The result is good. But the time to do the process is quite long ( only for a hat ! )

Random Method : We take a certain ammount of pixel around the target, randomly, but with a given range.

Semi-random method : We combine the two previous methods.

We notice that, the more rays we use, the darker the hat will become. This is due to the color of the background, of course. If it was white, the hat would have become lighter and lighter.