Line-drawing questions look like formula recall, yet most errors come from choosing the dominant axis, forgetting both DDA endpoints, or taking the wrong Bresenham branch. Select an option and write one line of working before reading each explanation. Begin with UGC NET CS Exam Preparation, then use the Line Drawing Algorithms PYQ Questions hub for extra drills after this set.
Line drawing algorithms: DDA and Bresenham rules
Line drawing sits inside UGC NET Computer Science Syllabus Areas: Paper 2. Both approximate a continuous line on pixels.
Rule | DDA | Bresenham |
|---|---|---|
Main calculation |
| Integer decision parameter |
Movement |
| Choose the nearer candidate pixel incrementally |
Pixel output | Round every generated coordinate | Update with addition, subtraction and comparison |
Endpoint count |
| One pixel at each major-axis position |
For 0 <= m <= 1, use p0 = 2dy - dx. If p < 0, choose E and add 2dy; otherwise choose NE and add 2dy - 2dx. For m > 1, step in y, use p0 = 2dx - dy, and let p decide whether x changes. Dominant-axis choice controls iteration, while the decision term governs whether the other coordinate changes. Sampling can create jaggies, unequal brightness and the picket-fence effect.
Line drawing MCQs 1-3: speed and raster choice
Question 1
In computer graphics, which algorithm is a faster method for calculating pixel positions?
A. DDA line algorithm
B. Parallel line algorithm
C. Mid-point algorithm
D. Bresenham's line algorithm
Correct answer: D. Bresenham's line algorithm.
DDA evaluates fractional coordinates and rounds them to pixels. Bresenham updates an integer decision term with addition and comparison, so option D identifies the faster line-drawing method.
Question 2
Which algorithm uses only integer arithmetic?
A. DDA
B. Beam Penetration
C. Bresenham’s
D. None of these
Correct answer: C. Bresenham’s.
Bresenham updates its decision parameter with integer addition, subtraction and comparison. DDA generally carries fractional increments, while beam penetration is a display-colour technique, so option C is correct.
Question 3
The basic principle of Bresenham's line algorithm is__?
A. to select the optimum raster locations to represent a straight line
B. to select either x or y, whichever is larger, is chosen as one raster unit
C. we find on which side of the line the midpoint lies
D. both a and b
Correct answer: A. to select the optimum raster locations to represent a straight line.
Bresenham chooses the raster pixel that best approximates the ideal straight line at each step. Dominant-axis stepping supports that process, but option B does not state the basic principle, so option A is correct.
DDA MCQs 4-5: point count and rounding
Question 4
UPLT 2026
If a line is drawn from (2, 3) to (6, 15) using DDA algorithm. How many points will be needed to generate such lines?
A. 7
B. 6
C. 8
D. 13
Correct answer: D. 13.
dx = 4, dy = 12, so steps = 12. The start plus 12 increments gives 13 points (solution).
Question 5
UGC NET 2017
Consider a line AB with A = (0, 0) and B = (8, 4). Apply a simple DDA algorithm and compute the first four plots on this line.
A. [(0, 0), (1, 1), (2, 1), (3, 2)]
B. [(0, 0), (1, 1.5), (2, 2), (3, 3)]
C. [(0, 0), (1, 1), (2, 2.5), (3, 3)]
D. [(0, 0), (1, 2), (2, 2), (3, 2)]
Correct answer: A. [(0, 0), (1, 1), (2, 1), (3, 2)].
With dx = 8, dy = 4, steps = 8, increments are 1 and 0.5. (0,0), (1,0.5), (2,1.0), (3,1.5) round to A (solution).
Bresenham MCQs 6-7: raster sequences and steep lines
Question 6
UGC NET 2015
Which raster locations would be chosen by Bresenham's algorithm when scan converting a line from (1,1) to (8,5)?
A. (1, 1), (2, 2), (3, 3), (4, 3), (5, 4), (6, 4), (7, 5), (8, 6)
B. (1, 1), (2, 2), (3, 2), (4, 3), (5, 4), (6, 5), (7, 6), (8, 7)
C. (1, 1), (2, 2), (3, 2), (4, 3), (5, 3), (6, 4), (7, 4), (8, 5)
D. (1, 1), (2, 2), (3, 2), (4, 3), (5, 5), (6, 4), (7, 5), (8, 5)
Correct answer: C.
Here dx = 7, dy = 4 and p0 = 1, with decision updates of +8 and -6. Values 1, -5, 3, -3, 5, -1 and 7 select NE, E, NE, E, NE, E and NE. The resulting pixels are (1,1), (2,2), (3,2), (4,3), (5,3), (6,4), (7,4) and (8,5), which matches option C (solution).
Question 7
UGC NET 2016
Consider the Breshenham’s line generation algorithm for a line with gradient greater than one, current point (xᵢ, yᵢ) and decision parameter, dᵢ. The next point to be plotted (xᵢ₊₁, yᵢ₊₁) and updated decision parameter, dᵢ₊₁, for dᵢ < 0 are given as _______.
A. xᵢ₊₁ = xᵢ + 1, yᵢ₊₁ = yᵢ, dᵢ₊₁ = dᵢ + 2dy
B. xᵢ₊₁ = xᵢ, yᵢ₊₁ = yᵢ + 1, dᵢ₊₁ = dᵢ + 2dx
C. xᵢ₊₁ = xᵢ, yᵢ₊₁ = yᵢ + 1, dᵢ₊₁ = dᵢ + 2(dx − dy)
D. xᵢ₊₁ = xᵢ + 1, yᵢ₊₁ = yᵢ + 1, dᵢ₊₁ = dᵢ + 2(dy − dx)
Correct answer: B.
For m>1, y advances. If d_i < 0, keep x fixed and add 2dx, giving B (solution).
Bresenham versus DDA MCQs 8-9
Question 8
UGC NET 2021
Which of the statements given below are correct?
The midpoint (or Bresenham) algorithm for rasterizing lines is optimized relative to DDA algorithm in that
A. it avoids round‐off operations.
B. it is incremental.
C. it uses only integer arithmetic.
D. all straight lines can be displayed as straight (exact).
Choose the correct answer from the options given below:
A. A and B only
B. A and C only
C. A, B, C, and D
D. A, B, and C only
Correct answer: D. A, B, and C only.
Bresenham avoids round-off, works incrementally and uses integers, so A, B and C hold. Pixels cannot represent every line exactly, making D false (solution).
Question 9
UGC NET 2018
Consider the midpoint (or Bresenham) algorithm for rasterizing lines given below:
(1) Input (x₁, y₁) and (x₂, y₂)
(2) y = y₁
(3) d = f(x₁ + 1, y₁ + 1/2) //f is the implicit form of a line
(4) for x = x₁ to x₂
(5) do
(6) plot(x, y)
(7) if (d < 0)
(8) then
(9) y = y + 1
(10) d = d + (y₁ − y₂) + (x₂ − x₁)
(11) else
(12) d = d + (y₁ − y₂)
(13) end
(14) end
Which statements are true?
P: For a line with slope m > 1, we should change the outer loop in line (4) to be over y
Q: Lines (10) and (12) update the decision variable d through an incremental evaluation of the line equation f
R: The algorithm fails if d is over 0
Choose the correct answer from the code given below:
A. P only
B. P and Q only
C. Q and R only
D. P, Q and R
Correct answer: B. P and Q only.
P follows from y-axis stepping; Q from incrementing f. d selects a branch; R is false and B matches (solution).
Scan conversion MCQs 10-11: artefacts and filtering
Question 10
Kendriya Vidyalaya Sangathan 2017
Anti-aliasing is important to improve the readability of text. It deals with the:
A. elimination of “jaggies”
B. spacing between two individual characters
C. Underlining of letters
D. spacing of a group of characters
Correct answer: A. elimination of “jaggies”.
Jaggies are stair steps from sampling curves or diagonals. Anti-aliasing softens them through edge intensity, unlike spacing or underlining (solution).
Question 11
UGC NET 2025
The major adverse side effects of scan conversion are :-
A. Staircase appearance
B. Unequal brightness of slanted lines
C. Picket fence problem
D. Rasterization
E. Pre-filtering and Post-filtering
Choose the correct answer from the options given below:
A. A & B only
B. A, B & C only
C. B, C & D only
D. C, D & E only
Correct answer: B. A, B & C only.
A, B and C are scan-conversion artefacts. Rasterization is the process, while pre-filtering and post-filtering are remedies, so option B is correct. Review UGC NET Computer Science High-Yield Topics for broader planning and open the solution for the original question page.
Line drawing algorithms MCQs: next practice
Identify algorithms, calculate DDA, trace Bresenham, and classify artefacts. Redo Questions 4, 5 and 6 with one endpoint changed; check axis and branch first.
NTA-UGC-NET Paper - 2 covers Computer Graphics. For more practice on this topic, use the Line Drawing Algorithms PYQ Questions hub.




