You are on page 1of 2

# Midpoint Ellipse Algorithm

1. Input r,, r,, and ellipse center (x,, y,), and
obtain the first point on an
ellipse centered on the origin as
2. Calculate the initial value of thedecision
parameter in region 1 as
3. At each x, position in region 1, starting at
k = 3, perform the following
test: If pl, < 0, the next point along the
ellipse centered on (0, 0)
is (x, . I, yI) and
Otherwise, the next point along the circle is
(xk + 1, yr, - 1) and
with
and continue until 2 r i x 2 2rty.
4. Calculate the initial value of the decision
parameter in region 2 using
the last point (xo, yo) calculated in region 1
as
5. At each yk position in region 2, starting at
k = 0, perform the following
test: If pZk> 0, the next point along the
ellipse centered on (0, 0) is

Move each calculated pixel position (x. yk .(xk. Determine symmetry points in the other three quadrants. 6. Repeat the steps for region 1 until 2 6 x 2 2rf.rk + 1. 7... y) onto the elliptical path centered on (x. y.) and plot the coordinate values: 8. the next point along the circle is (. yt .y .1) and Otherwise.I and y as in region 1.1) and using the same incremental calculations for .