MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPUTER GRAPHICS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In Breshenham Line Drawing algorithm, the initial decision parameter P0 is
A
B
C
D
Explanation: 

Detailed explanation-1: -2.1 slope(m) > 1. 2.2 slope(m) = 1. According to slope Decision Parameter is calculated, which is used to make decision for selection of next pixel point in both the phases.

Detailed explanation-2: -In Bresenham’s algorithm at any point (x, y) we have two option either to choose the next pixel in the east i.e. (x+1, y) or in the south east i.e. (x+1, y-1). This can be decided by the decision parameter d. If d <= 0, then N(X+1, Y) is to be chosen as next pixel.

Detailed explanation-3: -Bresenham’s Line algorithm for |(m = y / x)| < 1 :-x = |x2-x1| and y = |y2-y1| 3. [Initialize starting point] x = x1 and y = y1 4. e = 2 * y-x [Initialize value of decision variable or error to compensate for nonzero intercepts] 5.

There is 1 question to complete.