in Computer Graphics recategorized by
3,008 views
1 vote
1 vote

Consider the Breshenham’s line generation algorithm for a line with gradient greater than one, current point $(x_{ i} , y_{i} )$ and decision parameter, $d_{i}$. The next point to be plotted $(x _{i+1}, y_{i+1})$ and updated decision parameter, $d_{i+1}$, for $d_{i} < 0$ are given as _______.

  1. $x_{ i+1} = x _{i +1} y_{i+1} = y_{i} d_{i+1} = d_{i} + 2 dy$
  2. $x _{i+1} = x _{i} y_{i+1} = y_{i + 1} d_{i+1} = d_{i} + 2 dx$
  3. $x _{i+1} = x_{ i}  y_{i+1} = y_{i + 1}  d_{i+1} = d_{i} + 2 (dx – dy)$
  4. $x_{ i+1} = x_{ i + 1}  y_{i+1} = y_{i + 1} d_{i+1} = d_{i} + 2 (dy – dx)$
in Computer Graphics recategorized by
3.0k views

1 Answer

0 votes
0 votes

Correct option is A.

When di < 0 we choose east pixel and for next points increment X and no change in Y then add east pixel value to old di for new di.

When di > 0 we choose north east pixel and increment both X and Y and add value of North pixel to di.

When di = 0 we can choose any one of them to find next points to be plotted.

Hence, di < 0  is satisfied by option A. 

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true