2.1.1 Pixel Coordinates
This is the
section
you should read it.
He points out that pixels are not points.
Mathematically points have no width or height.
Pixels are 1/width and 1/height of the canvas.
Pixels are an approximation of the final picture.
He introduces the idea of antialiasing
Ideally lines are one point thick.
But pixels are not points.
And also on integer boundaries.
Think of the line y=4x+2;
x
y
comment
0
2
$\frac{1}{4}$
3
Where/how are you going to plot this point?
$\frac{1}{2}$
4
Where/how are you going to plot this point?
$\frac{3}{4}$
5
Where/how are you going to plot this point?
1
5
OK, but ...
Idea:
Draw a "virtual" pixel that shades each actual pixel with the percent that is covered.
Note we could get into trouble if we wanted to plot a line that doesn't end on an integer pixel as well.
There is a cool demo in the book that lets you explore this.
PPI
Pixels per inch
DPI : Dots per inch.
Early screens had about 72 PPI
Modern screens have hundreds.
He states that at 100 PPI a one pixel line is probably visible
But at 400 PPI a one pixel line is probably not