---
title: "Midpoint ellipse: x²/64 + y²/36 = 1"
subject: "Computer Graphics"
chapter: 2
key: "semester_5/computer_graphics:ellipse-x2-64-y2-36"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/ellipse-x2-64-y2-36
site: BCT Engineering
---

# Midpoint ellipse: x²/64 + y²/36 = 1

Computer Graphics · Chapter 2: Scan-Conversion

- Asked in: 2076 Asoj, 6 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/ellipse-x2-64-y2-36
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-2

## Question

Determine the pixel positions of the following curve in the first quadrant using the mid-point algorithm: x²/64 + y²/36 = 1.

## Short answer

Using midpoint algorithm with rx=8, ry=6, region 1 from (0,6) to (6,4), region 2 to (8,0). First-quadrant pixels: (0,6), (1,6), (2,6), (3,6), (4,5), (5,5), (6,4), (7,3), (8,2), (8,1), (8,0).

## Answer

The ellipse x²/64 + y²/36 = 1 has rx = 8, ry = 6 and centre at the origin (the curve is given in the first quadrant). Using the midpoint algorithm:

```text
rx² = 64,  ry² = 36,  2rx² = 128,  2ry² = 72
Start (x0, y0) = (0, ry) = (0, 6)
p1_0 = ry² − rx²·ry + rx²/4 = 36 − 384 + 16 = −332
Region 1 while 2ry²x < 2rx²y.   Update (x → x+1):
  p1 < 0 :  p1 = p1 + 2ry²·x + ry²      (y same)
  p1 ≥ 0 :  y → y−1; p1 = p1 + 2ry²·x − 2rx²·y + ry²
```

**Region 1**

| k | (x_k, y_k) | p1_k | 2ry²·x | 2rx²·y |
|---|---|---|---|---|
| 0 | (0,6) | -332 | 0 | 768 |
| 1 | (1,6) | -224 | 72 | 768 |
| 2 | (2,6) | -44 | 144 | 768 |
| 3 | (3,6) | 208 | 216 | 768 |
| 4 | (4,5) | -108 | 288 | 640 |
| 5 | (5,5) | 288 | 360 | 640 |
| 6 | (6,4) | 244 | 432 | 512 |

At (7,3): 2ry²x = 504 ≥ 2rx²y = 384, so region 1 ends; (7,3) is the first point of region 2.

```text
p2_0 = ry²(x+½)² + rx²(y−1)² − rx²ry²
     = 36(7.5)² + 64(2)² − 2304 = 2025 + 256 − 2304 = −23
Region 2 (y → y−1):
  p2 > 0 : x same;  p2 = p2 − 2rx²·y + rx²
  p2 ≤ 0 : x → x+1; p2 = p2 + 2ry²·x − 2rx²·y + rx²
```

**Region 2**

| k | (x_k, y_k) | p2_k |
|---|---|---|
| 0 | (7,3) | -23 |
| 1 | (8,2) | 361 |
| 2 | (8,1) | 297 |
| 3 | (8,0) | 361 |

**Answer: first-quadrant pixels: (0,6), (1,6), (2,6), (3,6), (4,5), (5,5), (6,4), (7,3), (8,2), (8,1), (8,0).** The other quadrants follow by symmetry: (±x, ±y).

## Check yourself

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

1. From x^2/64 + y^2/36 = 1 we get:
   A. rx = 8, ry = 6, starting at (0,6)
   B. rx = 64, ry = 36
   C. rx = 6, ry = 8, starting at (0,8)
   D. rx = 8, ry = 6, starting at (8,0)
   Answer: A. rx^2 = 64 and ry^2 = 36; region 1 starts at (0, ry). (Key point: Semi-axes)

2. p1_0 = ry^2 − rx^2·ry + rx^2/4 =
   A. 332
   B. −332
   C. −368
   D. −348
   Answer: B. 36 − 384 + 16 = −332. (Key point: Initial p1)

3. Why does region 1 end at (7,3)?
   A. Because x = 7 equals rx − 1
   B. Because p1 becomes negative
   C. 2ry^2 x = 504 ≥ 2rx^2 y = 384, so the slope magnitude has reached 1
   D. Because y becomes 3 = ry/2
   Answer: C. The test 2ry^2x < 2rx^2y fails there. (Key point: Region switch)

4. At (7,3), p2_0 = −23 (≤ 0). The next point is:
   A. (7,2): x stays
   B. (8,3)
   C. (6,2)
   D. (8,2): x increases by 1
   Answer: D. p2 ≤ 0 gives x+1 with y−1. (Key point: Region 2 step)

## Related in Computer Graphics

- [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
- [Second region condition, ellipse midpoint](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aellipse-second-region-condition) — Computer Graphics, chapter 2
- [Midpoint circle algorithm and decision parameter](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Amidpoint-circle-derive) — Computer Graphics, chapter 2, asked 8×
- [Ellipse symmetry and drawing algorithm](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aellipse-symmetry-algorithm) — Computer Graphics, chapter 2
- [Midpoint circle: r=8, centre (10,10)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acircle-r8-center-10-10) — Computer Graphics, chapter 2, asked 2×
- [Midpoint circle: r=6, centre (20,10)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acircle-r6-center-20-10) — Computer Graphics, chapter 2, asked 2×

## Related in other subjects

- [Double integral xy over ellipse in first quadrant](https://www.bctengineer.com/question.md?key=semester_2%2Fmathematics%3Adouble-integral-xy-over-ellipse) — Mathematics, chapter 2, asked 3×
- [Curve R=300 m, deflection 36°, with checks](https://www.bctengineer.com/question.md?key=semester_4%2Fsurveying_ii%3Acurve-r300-deflection-36-check) — Surveying II, chapter 6
- [Floating point division algorithm](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Afp-division) — Computer Organization and Architecture, chapter 5, asked 4×
- [150 km line with mid-point shunt capacitor](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3A150km-mid-shunt-capacitor) — Power System Analysis I, chapter 6
