What is Bresenhams line drawing algorithm in Visualization?
Submitted by: MuhammadIn Bresenham's approach the pixel position along a line path are
determined by sampling unit X intervals. Starting from the left end point(X0, Y0)of a
given line we step to each successive columns and plot the pixel whose scan line Y-value
is closest to the line path.Assuming the Kth step in process, determined that the pixel at
(Xk, Yk)decide which pixel to plot in column Xk+1.The choices are (Xk+1, Yk) and (Xk+1,
Yk+1)
Algorithm
Step 1: Input the line endpoints and store the left endpoint in (X0, Y0)
Step 2: Load (X0, Y0) in to the frame buffer
Step 3: Calculate constants x, y, 2 y, -2 x, and obtain the decision parameters as
P0 = 2 y - x
Step 4 : At each Xk along the line, starting at k = 0, perform the following test
If Pk < 0, the next point to plot is (Xk+1, Yk) and
Pk+1 = Pk+2 y
Otherwise, the next point to plot is (Xk+1, Yk+1) and
Pk+1 = Pk+2 y - 2 x
Step 5: Repeat step 4 x times
Submitted by: Muhammad
determined by sampling unit X intervals. Starting from the left end point(X0, Y0)of a
given line we step to each successive columns and plot the pixel whose scan line Y-value
is closest to the line path.Assuming the Kth step in process, determined that the pixel at
(Xk, Yk)decide which pixel to plot in column Xk+1.The choices are (Xk+1, Yk) and (Xk+1,
Yk+1)
Algorithm
Step 1: Input the line endpoints and store the left endpoint in (X0, Y0)
Step 2: Load (X0, Y0) in to the frame buffer
Step 3: Calculate constants x, y, 2 y, -2 x, and obtain the decision parameters as
P0 = 2 y - x
Step 4 : At each Xk along the line, starting at k = 0, perform the following test
If Pk < 0, the next point to plot is (Xk+1, Yk) and
Pk+1 = Pk+2 y
Otherwise, the next point to plot is (Xk+1, Yk+1) and
Pk+1 = Pk+2 y - 2 x
Step 5: Repeat step 4 x times
Submitted by: Muhammad
Read Online Visualization Job Interview Questions And Answers
Top Visualization Questions
☺ | Can you please explain the difference between general graphics system designed for a programmer and one designed for a specific application, such as architectural design? |
☺ | Explain some basic features of computer graphics? |
☺ | Explain the steps involved in 3D transformation? |
☺ | Which major components (hardware and software) are needed for computer graphics? |
☺ | What is pixel phasing in Visualization? |
Top Graphics Programmer Categories
☺ | Expert Image Processing Interview Questions. |
☺ | Visualization Interview Questions. |
☺ | Graphic Designer Interview Questions. |
☺ | Pre-Press Graphics Designer Interview Questions. |
☺ | Graphics Designer Freelance Interview Questions. |