Aliasing

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 5

Aliasing & Anti-aliasing

William Ribarsky 1
(modified by Amos Johnson)
Aliasing
Aliasing is cause by the discrete nature of pixels (Sampling Error).

Approximation of lines and circles with discrete points often gives a staircase
appearance or "Jaggies".

Desired line

Aliased rendering of the line

William Ribarsky 2
(modified by Amos Johnson)
Anti-aliasing - Solutions
Aliasing can be smoothed out by using higher addressability.

If addressability is fixed but intensity is variable, use the intensity to control the
address of a "virtual pixel". Two adjacent pixels can be be used to give the
impression of a point part way between them. The perceived location of the
point is dependent upon the ratio of the intensities used at each. The
impression of a pixel located halfway between two addressable points can be
given by having two adjacent pixels at half intensity.

An antialiased line has a series of virtual pixels each located at the proper address.

William Ribarsky 3
(modified by Amos Johnson)
Anti-aliased Line Algorithm
Line drawing algorithms can easily be modified to implement virtual pixels. We use the
distance ( e ) value to determine pixel intensities.
Two possible cases which may occur for simple anti-aliased line algorithm:
0 <= e <=1.5 0 > e >= -1.5
A A

When color is used


B B rather than a grey
e scale, the red, green
e and blue components
C C
are interpolated
separately to
D D determine each one's
A = max(e+0.5,1) - 1 A=0 proper intensity.
B = 1 - abs(e-0.5) B = 1 + max(e-0.5, -1)
C = 1 - min(e+0.5,1) C = 1 - abs(e+0.5)
D=0 D = -min(e-0.5, -1) - 1
William Ribarsky 4
(modified by Amos Johnson)
Anti-aliased Circle Algorithm
Circle drawing algorithms can also be easily modified to implement virtual pixels.
Once again, we use the distance ( e ) value to determine pixel intensities.
Two possible cases which may occur for simple anti-aliased circle algorithm:

0 <= e <= 1/2 0 > e >= -1/2

When color is used


e B
A e B rather than a grey
A scale, the red, green
and blue components
are interpolated
separately to
determine each one's
proper intensity.
B = 1 - abs(e-0.5) A = 1 - abs(e+0.5)
A = 1 - min(e+0.5,1) B = 1 + max(e-0.5, -1)

William Ribarsky 5
(modified by Amos Johnson)

You might also like