The document describes the midpoint ellipse algorithm for plotting points along an ellipse. It involves 8 steps: 1) input ellipse parameters and get the first point, 2) calculate a decision parameter for the first region, 3) test the parameter and calculate next points until reaching one radius, 4) calculate the decision parameter for the second region using the last point, 5) similarly test and calculate next points until reaching the other radius, 6) determine symmetric points in other quadrants, 7) shift points to be centered on the input center coordinates, and 8) repeat for the other region until completing the ellipse.
The document describes the midpoint ellipse algorithm for plotting points along an ellipse. It involves 8 steps: 1) input ellipse parameters and get the first point, 2) calculate a decision parameter for the first region, 3) test the parameter and calculate next points until reaching one radius, 4) calculate the decision parameter for the second region using the last point, 5) similarly test and calculate next points until reaching the other radius, 6) determine symmetric points in other quadrants, 7) shift points to be centered on the input center coordinates, and 8) repeat for the other region until completing the ellipse.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online from Scribd
The document describes the midpoint ellipse algorithm for plotting points along an ellipse. It involves 8 steps: 1) input ellipse parameters and get the first point, 2) calculate a decision parameter for the first region, 3) test the parameter and calculate next points until reaching one radius, 4) calculate the decision parameter for the second region using the last point, 5) similarly test and calculate next points until reaching the other radius, 6) determine symmetric points in other quadrants, 7) shift points to be centered on the input center coordinates, and 8) repeat for the other region until completing the ellipse.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online from Scribd
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 (xk, yk .- 1) and Otherwise, the next point along the circle is (.rk + 1, yt - 1) and using the same incremental calculations for .I and y as in region 1. 6. Determine symmetry points in the other three quadrants. 7. Move each calculated pixel position (x, y) onto the elliptical path centered on (x,, y,) and plot the coordinate values: 8. Repeat the steps for region 1 until 2 6 x 2 2rf.y