---
title: "Bresenham: endpoints (10,18),(15,8)"
subject: "Computer Graphics"
chapter: 2
key: "semester_5/computer_graphics:digitize-point-10-18-15-8"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/digitize-point-10-18-15-8
site: BCT Engineering
---

# Bresenham: endpoints (10,18),(15,8)

Computer Graphics · Chapter 2: Scan-Conversion

- Asked in: 2068 Chaitra, 8 marks
- Video: [Bresenham Line Drawing Algorithm | Easiest Explanation with Numerical Example @GateSmashers](https://www.youtube.com/watch?v=1NoeDbSsscI) — Gate Smashers
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/digitize-point-10-18-15-8
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-2

## Question

Digitize the endpoint (10, 18), (15, 8) using Bresenham's algorithm.

## Short answer

Use Bresenham's algorithm for |m|>1: start p0=0, update p by +10 if negative or -10 if nonnegative. The digitized pixels are (10,18), (11,17), (11,16), (12,15), (12,14), (13,13), (13,12), (14,11), (14,10), (15,9), (15,8).

## Answer

**Given:** end points (10,18) and (15,8). Δx = 5, |Δy| = 10, the slope is m = −2 (|m| > 1, negative). So y decreases by 1 each step, and x either stays or increases by 1.

```text
p0 = 2Δx − |Δy| = 10 − 10 = 0
p < 0: x same,  p = p + 2Δx = p + 10
p ≥ 0: x + 1,   p = p + 2Δx − 2|Δy| = p − 10
```

| k | p_k | (x_k, y_k) |
|---|---|---|
| 0 | 0 | (10,18) |
| 1 | -10 | (11,17) |
| 2 | 0 | (11,16) |
| 3 | -10 | (12,15) |
| 4 | 0 | (12,14) |
| 5 | -10 | (13,13) |
| 6 | 0 | (13,12) |
| 7 | -10 | (14,11) |
| 8 | 0 | (14,10) |
| 9 | -10 | (15,9) |
| 10 | 0 | (15,8) |

**Answer: (10,18), (11,17), (11,16), (12,15), (12,14), (13,13), (13,12), (14,11), (14,10), (15,9), (15,8).**

## Check yourself

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

1. The line (10,18) to (15,8) has Δx = 5, |Δy| = 10. Which case applies?
   A. Positive slope less than 1
   B. Negative slope with |m| < 1: x increases by 1 each step
   C. Negative slope with |m| = 2 > 1: y decreases by 1 each step
   D. Vertical line
   Answer: C. |m| = 2 > 1 so y is the driving axis, moving down. (Key point: Slope category)

2. p0 = 2Δx − |Δy| =
   A. 0
   B. −10
   C. 20
   D. 10
   Answer: A. 10 − 10 = 0. (Key point: Initial parameter)

3. Since p0 = 0 (≥ 0), the next point after (10,18) is:
   A. (10,17), with p = 10
   B. (11,17), with p = 10
   C. (10,17), with p = −10
   D. (11,17), with p = 0 − 10 = −10
   Answer: D. p ≥ 0 gives x+1 and p += 2Δx − 2|Δy| = −10. (Key point: First step)

## Related in Computer Graphics

- [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×
- [Bresenham: line (10,20) to (15,2)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Adigitize-line-10-20-15-2) — Computer Graphics, chapter 2, asked 4×
- [Bresenham: line (25,20) to (15,10)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Adigitize-line-25-20-15-10) — Computer Graphics, chapter 2
- [DDA versus Bresenham line algorithm](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Adda-vs-bresenham-line) — Computer Graphics, chapter 2, asked 6×
- [Write Bresenham's line algorithm](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Abresenham-line-algorithm) — Computer Graphics, chapter 2, asked 3×
- [Bresenham's algorithm for all slopes](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Abresenham-all-slopes) — Computer Graphics, chapter 2

## Related in other subjects

- [Splice of 18 mm flats with M18 10.9 bolts](https://www.bctengineer.com/question.md?key=semester_6%2Fdesign_of_steel_and_timber_structure%3Atension-splice-m18-hsfg-109) — Design of Steel and Timber Structure, chapter 5
- [10 m cut in cohesive soil, bedrock 15 m](https://www.bctengineer.com/question.md?key=semester_4%2Fsoil_mechanics%3Acut-10m-cohesive-phi-zero-bedrock) — Soil Mechanics, chapter 11
- [Laplace: 2x2 grid 10/15/20](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Alaplace-2x2-10-15-20-25) — Numerical Method, chapter 7, asked 6×
- [Initial values with switch open to closed (10 Ω, 15 Ω, 2 F)](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Ainitial-conditions-switch-open-10-15) — Electrical Circuit Theory, chapter 2
