MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPUTER GRAPHICS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In Bresenham’s line algorithm, if the distances d1 < d2 then decision parameter Pk is ____
A
Positive
B
Equal
C
Negative
D
A and C
Explanation: 

Detailed explanation-1: -Of the distances d1 < d2 then decision parameter Pk is which of the following? Explanation: If d1 < d2 then the decision variable is always negative.ie. Pk is always negative.

Detailed explanation-2: -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-3: -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). And this can be decided by using the decision parameter d as: If d > 0, then (x+1, y-1) is to be chosen as the next pixel as it will be closer to the arc.

Detailed explanation-4: -DDA’s figure out which axis by evaluating the slope. Positive slopes between 0 and 1 will increment the x value by 1. Positive slopes greater than one will increment the y value by 1. Negative slopes between-1 and 0 will increment the x value by-1, and negative slopes less than-1 will increment the y value by-1.

Detailed explanation-5: -Bresenham’s Algorithm. We use dx and dy values to calculate the initial decision variable (d). value of the decision variable is changed on each step.

There is 1 question to complete.