---
title: "Process of drawing an ellipse"
subject: "Computer Graphics"
chapter: 2
key: "semester_5/computer_graphics:ellipse-drawing-process"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/ellipse-drawing-process
site: BCT Engineering
---

# Process of drawing an ellipse

Computer Graphics · Chapter 2: Scan-Conversion

- Asked in: 2076 Asoj, 4 marks
- Video: [Midpoint Ellipse Drawing Algorithm Derivation | Computer Graphics Explained | Region 1 | ](https://www.youtube.com/watch?v=cUNC59LtimQ) — Nahi hu Sinchan 
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/ellipse-drawing-process
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-2

## Question

Explain the process of drawing an ellipse in raster graphics.

## 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.

## Answer

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**
1. **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).
2. **Split the quadrant into two regions** where the tangent slope is −1: region 1 where 2ry²x < 2rx²y, region 2 elsewhere.
3. **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.
4. **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.
5. Plot the four symmetric points at each step.

```text
        y
        |   region 1  (x steps)
   ry --*--*--*
        |       *
        |         *   <- slope = −1
        |           *
        |  region 2  *  (y steps)
        +-------------*---- x
                      rx
```

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which method is used to scan-convert an ellipse in raster graphics?
   A. Midpoint ellipse algorithm
   B. Boundary fill algorithm
   C. Cohen-Sutherland
   D. Direct equation with square roots, as it is fastest
   Answer: A. The direct and polar methods need roots or trig and are slower. (Key point: Method)

2. The first quadrant is split into two regions at the point where:
   A. x = y
   B. the tangent slope is −1
   C. the slope is 0
   D. the decision parameter is 0
   Answer: B. Region 1 is slope magnitude < 1 (x steps), region 2 is where it is ≥ 1 (y steps). (Key point: Region split)

3. In region 1, the algorithm starts at (0, ry) and:
   A. steps y by −1, using p1 to choose between x and x+1
   B. steps both by 1
   C. steps x by 1, using p1 to choose between y and y−1
   D. stops after one pixel
   Answer: C. Region 2 reverses roles: y steps, x is chosen. (Key point: Region 1)

## Related in Computer Graphics

- [Ellipse symmetry and drawing algorithm](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aellipse-symmetry-algorithm) — Computer Graphics, chapter 2
- [Raster versus vector graphics](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Araster-vs-vector-graphics) — Computer Graphics, chapter 1, asked 4×
- [Compare DDA/Bresenham; midpoint ellipse](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acompare-dda-bresenham-midpoint-ellipse) — Computer Graphics, chapter 2
- [Random scan versus raster scan display](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Arandom-vs-raster-display) — Computer Graphics, chapter 1, asked 7×
- [Raster display and frame buffer load time](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Araster-system-load-time) — Computer Graphics, chapter 1
- [Pixel access rate of raster system](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Apixels-per-second-access-time) — Computer Graphics, chapter 1
