...
Bresenham’s-Algorithm
December 26, 2024
Aliasing
December 26, 2024
Bresenham’s-Algorithm
December 26, 2024
Aliasing
December 26, 2024

Bresenham’s-Algorithm

Question 2
Consider the Breshenham’s circle generation algorithm for plotting a circle with centre (0, 0) and radius ‘r’ units in first quadrant. If the current point is (xi , yi ) and decision parameter is pi then what will be the next point (xi + 1, yi + 1 + 1) and updated decision parameter pi + 1 for pi ≥ 0?
A
xi + 1 = xi+ 1

yi + 1 = yi

pi + 1 = pi + 4xi + 6

B
xi + 1 = xi + 1

yi + 1 = yi – 1

pi + 1 = pi + 4(xi – yi) + 10

C
xi + 1 = xi

yi + 1 = yi – 1

pi + 1 = pi + 4(xi – yi) + 6

D
xi + 1 = xi – 1

yi + 1 = yi

pi + 1 = pi + 4(xi – yi) + 10

Question 2 Explanation: 
Write the steps required to scan – convert a circle using Bresenham’s algorithm.
Set the initial values of the variables: (h, k) = coordinates of circle center; x=0; y=circle radius r and d = 3 – 2r.
Test to determine whether the entire circle has been scan-converted. If x>y, stop.
Plot the eight points, found by symmetry with respect to the center (h, k), at the current (x, y) coordinates:
Plot(x+h, y+k) Plot(-x+h, -y+k)
Plot(y+h, x+k) Plot(-y+h, -x+k)
Plot(-y+h, x+k) Plot(y+h, -x+k)
Plot(-x+h, y+k) Plot(x+h, -y+k)
Compute the location of the next pixel. If d<0, then d=d+4x+6 and x=x+1. If d≥0, then d=d+4(x-y)+10, x=x+1 and y=y-1.
Go to step 2.
Correct Answer: B
Question 2 Explanation: 
Write the steps required to scan – convert a circle using Bresenham’s algorithm.
Set the initial values of the variables: (h, k) = coordinates of circle center; x=0; y=circle radius r and d = 3 – 2r.
Test to determine whether the entire circle has been scan-converted. If x>y, stop.
Plot the eight points, found by symmetry with respect to the center (h, k), at the current (x, y) coordinates:
Plot(x+h, y+k) Plot(-x+h, -y+k)
Plot(y+h, x+k) Plot(-y+h, -x+k)
Plot(-y+h, x+k) Plot(y+h, -x+k)
Plot(-x+h, y+k) Plot(x+h, -y+k)
Compute the location of the next pixel. If d<0, then d=d+4x+6 and x=x+1. If d≥0, then d=d+4(x-y)+10, x=x+1 and y=y-1.
Go to step 2.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!