For the purposes of this discussion assume pixels are square, i.e.
the horizontal and vertical pixel spacings are the same. Lengths
will be in terms of pixel widths (which also equal pixel heights)
and areas will be in terms of pixel areas.
Consider circles which are centered on a pixel and have integer
radii. If such a circle with radius r is rendered using either the
midpoint algorithm or Breshenham's circle algorithm, it can be shown
that the number of pixels drawn, N, is given by
N = 8 * floor((sqrt(2)/2)*r) + 4
Depending on the value of r,
8 * ((sqrt(2)/2)*r - 1) + 4 < N <= 8 * ((sqrt(2)/2)*r) + 4
or
4*sqrt(2)*r - 4 < N <= 4*sqrt(2)*r + 4
So a "nominal" value for N would be
4*sqrt(2)*r
Ideally if a circle of radius r were drawn by a width w pen, the
result would be an annulus with outer radius
ro = r + w/2
and inner radius
ri = r - w/2
The area of an annuls is given by
A = pi * (pow(ro,2) - pow(ri,2))
which in this case is
A = pi * (pow(r + w/2, 2) - pow(r - w/2, 2))
or
A = pi * ( pow(r,2) + r*w + pow(w,2)/4 -
(pow(r,2) - r*w + pow(w,2)/4) )
which simplifies to
A = 2*pi*r*w
Solving for w,
w = A / (2*pi*r)
A reasonable definition of the effective line width of a raster
rendering of a circle is the width of an annulus of the same nominal
radius with the same area as the number of pixels drawn by the
raster rendering of the circle. I.e.
w = N / (2*pi*r)
Substituting the nominal value for N given above
w = 4*sqrt(2)*r / (2*pi*r)
or
w = 2*sqrt(2)/pi
(which is approximately 0.9).
-Michael