2
COMPUTER GI~kPI-IICS AND IMAGE PROCESSING (1074) 3, (260-261) SHORT NOTE "Integer Circles, Etc."--Three Move Extension of Bresenham's Algorithm M. L. V. PITTEWAY AND R, J. BOTTING Department o£ Computer Science, Brunel University, Kingston Lane, Uxbridge, Middlesex, England Communicated by A. Rosenfeld Received December 18, 1973 In the paper "A method for computing points of a circle using only in- tegers," Ernst Denert discusses possible strategies for the even partitioning of three possible plotter steps (pages 86 and 87). This objective can be achieved efficiently by a simple extension of Bresenham's algorithm. Sup- pose we wish, for example, to accomplish a move from 0,0 to u,v, (where for the first oetant 0 < v < u), and take 0<~ w ~ v: . d:=O d<u-2v+ w ~ C x-step diagonal step d:= d+2v d:=d+ 2v-2u I --_L.. FIGURE i. d~u-w y-step d:=d-2u Copyright ~) 1974 by Academic Press, Inc. 260 All rights o£ reproduction in any form reserved.

“Integer Circles, Etc.” - three move extension of Bresenham's algorithm

Embed Size (px)

Citation preview

Page 1: “Integer Circles, Etc.” - three move extension of Bresenham's algorithm

COMPUTER GI~kPI-IICS AND IMAGE PROCESSING (1074) 3, (260-261)

SHORT NOTE

"Integer Circles, Etc."--Three Move Extension of Bresenham's Algorithm

M. L. V. PITTEWAY AND R, J. BOTTING Department o£ Computer Science, Brunel University, Kingston Lane,

Uxbridge , Middlesex, E n g l a n d

Communicated by A. Rosenfeld

Received December 18, 1973

In the paper "A method for computing points of a circle using only in- tegers," Ernst Denert discusses possible strategies for the even partitioning of three possible plotter steps (pages 86 and 87). This objective can be achieved efficiently by a simple extension of Bresenham's algorithm. Sup- pose we wish, for example, to accomplish a move from 0,0 to u , v , (where for the first oetant 0 < v < u), and take 0<~ w ~ v:

. d : = O

d<u -2v + w ~

C x-s t ep diagonal s tep

d: = d+2v d:= d+ 2v-2u

I --_L..

FIGURE i.

d~u-w

y - s t ep

d:=d-2u

Copyright ~) 1974 by Academic Press, Inc. 260 All rights o£ reproduction in any form reserved.

Page 2: “Integer Circles, Etc.” - three move extension of Bresenham's algorithm

INTEGER CIRCLES 2 ~ 1

This reduces to Bresenham's algorithm itself if w = 0, since the condit ion d ~ u is impossible; it similarly reduces to a corresponding form with diagonal steps inhibi ted if w = v. The steps are evenly partitioned so that each point in the range u y = vx +_ ½(u + w) is visited once, and no other. I f u and v are mutual ly prime, w y-steps are involved.

In an implementat ion, constants such as 2v - 2u would be formed outside the loop. In the chart sketched, d is identified with 2vx - - 2uy, but could be set initially to 2v - u - w to simplify the three-way decision.