---
title: "Digitize ellipse Rx=12, Ry=7"
subject: "Computer Graphics"
chapter: 2
key: "semester_5/computer_graphics:ellipse-rx12-ry7-center-19-10"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/ellipse-rx12-ry7-center-19-10
site: BCT Engineering
---

# Digitize ellipse Rx=12, Ry=7

Computer Graphics · Chapter 2: Scan-Conversion

- Asked in: 2076 Chaitra, 8 marks
- Video: [Computer Graphics: Lecture #9: Example for Mid-point ellipse](https://www.youtube.com/watch?v=ycQu0bsjewk) — Jyothi Mandala
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/ellipse-rx12-ry7-center-19-10
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-2

## Question

Digitize the ellipse with radius Rx = 12 and Ry = 7 and center (19, 10).

## Short answer

With rx=12, ry=7, center (19,10), using midpoint algorithm: region 1 from (0,7) to (10,4), region 2 to (12,0). Shifted points: (19,17), (20,17), (21,17), (22,17), (23,17), (24,16), (25,16), (26,16), (27,15), (28,15), (29,14), (30,13), (30,12), (31,11), (31,10).

## Answer

**Given:** rx = 12, ry = 7, centre (19,10). Compute the first quadrant about the origin, then use 4-way symmetry and shift by the centre.

```text
rx² = 144, ry² = 49, 2rx² = 288, 2ry² = 98
Start (0, 7)
p1_0 = ry² − rx²·ry + rx²/4 = 49 − 1008 + 36 = −923
Region 1 (while 2ry²x < 2rx²y):
  p1 < 0 : p1 += 2ry²·x_new + ry²                     (y same)
  p1 ≥ 0 : y−−; p1 += 2ry²·x_new − 2rx²·y_new + ry²
```

**Region 1**

| k | (x_k, y_k) | p1_k | 2ry²·x | 2rx²·y |
|---|---|---|---|---|
| 0 | (0,7) | -923 | 0 | 2016 |
| 1 | (1,7) | -776 | 98 | 2016 |
| 2 | (2,7) | -531 | 196 | 2016 |
| 3 | (3,7) | -188 | 294 | 2016 |
| 4 | (4,7) | 253 | 392 | 2016 |
| 5 | (5,6) | -936 | 490 | 1728 |
| 6 | (6,6) | -299 | 588 | 1728 |
| 7 | (7,6) | 436 | 686 | 1728 |
| 8 | (8,5) | -171 | 784 | 1440 |
| 9 | (9,5) | 760 | 882 | 1440 |
| 10 | (10,4) | 637 | 980 | 1152 |

At (11,3): 2ry²x = 1078 ≥ 2rx²y = 864, so region 2 starts at (11,3).

```text
p2_0 = 49(11.5)² + 144(2)² − 144·49 = 6480.25 + 576 − 7056 = 0.25
Region 2:  p2 > 0 : x same, p2 += rx² − 2rx²·y_new
           p2 ≤ 0 : x++,    p2 += 2ry²·x_new − 2rx²·y_new + rx²
```

**Region 2**

| k | (x_k, y_k) | p2_k |
|---|---|---|
| 0 | (11,3) | 0.25 |
| 1 | (11,2) | -431.75 |
| 2 | (12,1) | 600.25 |
| 3 | (12,0) | 744.25 |

First-quadrant points about the origin: (0,7), (1,7), (2,7), (3,7), (4,7), (5,6), (6,6), (7,6), (8,5), (9,5), (10,4), (11,3), (11,2), (12,1), (12,0).

Adding the centre (19,10) to (x, y) gives the first quadrant pixels:

**(19,17), (20,17), (21,17), (22,17), (23,17), (24,16), (25,16), (26,16), (27,15), (28,15), (29,14), (30,13), (30,12), (31,11), (31,10)**

The other three quadrants are (19−x, 10+y), (19+x, 10−y), (19−x, 10−y) for each point above.

## Check yourself

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

1. For rx = 12, ry = 7, p1_0 = ry^2 − rx^2·ry + rx^2/4 =
   A. 923
   B. −923
   C. −1008
   D. −959
   Answer: B. 49 − 1008 + 36 = −923. (Key point: Initial p1)

2. Region 2 starts at (11,3) because:
   A. 2ry^2x = 1078 ≥ 2rx^2y = 864
   B. y reached ry/2
   C. p1 turned positive
   D. x reached rx − 1
   Answer: A. The region 1 condition fails at that point. (Key point: Region 2 start)

3. At (11,3), p2_0 = 0.25 (> 0). The next point is:
   A. (12,2): x increases
   B. (12,3)
   C. (11,2): x stays
   D. (10,2)
   Answer: C. p2 > 0 keeps x and decrements y. (Key point: Region 2 decision)

4. Adding the centre (19,10), the points (0,7) and (12,0) become:
   A. (19,7) and (12,10)
   B. (7,19) and (10,31)
   C. (19,17) and (12,10)
   D. (19,17) and (31,10)
   Answer: D. Add 19 to x and 10 to y. (Key point: Shifting)

## Related in Computer Graphics

- [Midpoint circle: r=5, centre (10,5)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acircle-r5-center-10-5) — Computer Graphics, chapter 2, asked 2×
- [Midpoint circle: r=8, centre (-5,10)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acircle-r8-center-neg5-10) — Computer Graphics, chapter 2, asked 2×
- [Midpoint circle: r=10, centre (50,50)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acircle-r10-center-50-50-octant) — Computer Graphics, chapter 2, asked 2×
- [Midpoint circle: r=30, centre (10,20)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acircle-r30-center-10-20-octant) — Computer Graphics, chapter 2, asked 2×
- [Midpoint circle: r=10, centre (20,30)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acircle-r10-center-20-30) — Computer Graphics, chapter 2
- [Bresenham: line (20,10) to (30,18)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Adigitize-line-20-10-30-18) — Computer Graphics, chapter 2, asked 4×

## Related in other subjects

- [Standard error; population 12,19,13,16](https://www.bctengineer.com/question.md?key=semester_5%2Fprobability_and_statistics%3Astandard-error-population-12-19-13) — Probability and Statistics, chapter 4
- [Q and center frequency; realize −2000/(s²+500s+10⁶)](https://www.bctengineer.com/question.md?key=semester_5%2Ffilter_design%3Atow-thomas-q-center-frequency-realize) — Filter Design, chapter 6
- [K-map Σ(1,2,3,8,9,10,11,14)+d(0,4,12), NAND](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Akmap-nand-1238-dc-0412) — Digital Logic, chapter 3, asked 5×
- [K-map Σ(0,1,4,8,10,11,12)+d, NOR](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Akmap-nor-gates-01248) — Digital Logic, chapter 3, asked 5×
