• circles draw w/ "zero width" pen

    From maramini009@gmail.com@21:1/5 to Michael Aramini on Mon Jun 18 13:40:43 2018
    On Wednesday, June 13, 2001 at 8:37:04 PM UTC-4, Michael Aramini wrote:
    ...
    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

    The above is slightly incorrect due to an incorrect assumption I had previously made about those circle drawing algorithms. The correct expression for N is
    N = 4 round(sqrt(2) r)

    Depending on the value of r,
    4 (sqrt(2) r - 1/2) < N <= 4 (sqrt(2) r + 1/2)
    or more simply
    4 sqrt(2) r - 2 < N <= 4 sqrt(2) r + 2

    So a "nominal" value for N would be
    4*sqrt(2)*r
    ...

    This part is still valid.

    -Michael

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)