- 2076 Asoj · 4 marks
Process of drawing an ellipse
Short answer
Shift ellipse to origin, compute first quadrant only. Split at slope = -1 into region 1 (2ry²x<2rx²y, step x, test midpoint with p1) and region 2 (step y, test with p2). Decision parameters select the closest pixel, then apply four-way symmetry and add center coordinates to complete the ellipse.
Explain the process of drawing an ellipse in raster graphics.
An ellipse with centre (xc, yc) and semi-axes rx and ry has the equation (x−xc)²/rx² + (y−yc)²/ry² = 1. In a raster system, it is drawn by scan conversion, using the midpoint ellipse algorithm (the direct equation and polar methods need square roots or trigonometry and are slower).
Steps
- Use symmetry. Shift the ellipse to the origin and compute only the first quadrant; each point (x, y) gives (±x, ±y), then add the centre (xc, yc).
- Split the quadrant into two regions where the tangent slope is −1: region 1 where 2ry²x < 2rx²y, region 2 elsewhere.
- Region 1: start at (0, ry). Step x by 1, and use the decision parameter p1 = ry² − rx²ry + ¼rx² to choose between y and y − 1.
- Region 2: start from the last point of region 1. Step y by −1 and use p2 = ry²(x+½)² + rx²(y−1)² − rx²ry² to choose between x and x + 1, until y = 0.
- Plot the four symmetric points at each step.
y
| region 1 (x steps)
ry --*--*--*
| *
| * <- slope = −1
| *
| region 2 * (y steps)
+-------------*---- x
rx
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Ellipse symmetry and drawing algorithm · Computer Graphics, chapter 2
- Raster versus vector graphics · Computer Graphics, chapter 1 · asked 4×
- Compare DDA/Bresenham; midpoint ellipse · Computer Graphics, chapter 2
- Random scan versus raster scan display · Computer Graphics, chapter 1 · asked 7×
- Raster display and frame buffer load time · Computer Graphics, chapter 1
- Pixel access rate of raster system · Computer Graphics, chapter 1