Remark for the bresenham line generation algorithm, Computer Graphics

Remark for the Bresenham Line Generation Algorithm

Remark: The algorithm will be properly the same if we suppose | m | < 1

  • Algorithm | m | < 1:

(a) Input two line ending points and store left end point in (x0, y0) (b) Load (x0, y0) on frame buffer that is, plot the first point.

(c)  Determine Δx, Δy, 2Δy, 2Δy - 2Δx and acquire the beginning value of decision parameter as p0 = 2Δy - Δx

(d) At each xk along the line, beginning at k = 0, perform subsequent test:

If pk < 0, the subsequent plot is (xk + 1, yk) and pk + 1   = pk + 2Δy else subsequent plot is (xk + 1 , yk + 1) and pk + 1 = pk + 2(Δy - Δx)

(e) Repeat step (D) Δx times.

Bresenham Line Generation Algorithm    (| m | < 1)

Δ x ← x1 - x0

Δ y ← y1 - y0

p0 ← 2Δy - Δx

while (x0 < = x1) do

{puton (x0, y0)

if (pi > 0) then

{x0 ← x0 + 1;

y0 ← y0 + 1;

pi + 1 ← pi + 2 (Δy - Δx);

}

if (pi < 0) then

{x0 ← x0 + 1

y0y0

pi + 1 ← pi + 2 Δy

}

}

Posted Date: 3/22/2013 7:28:53 AM | Location : United States







Related Discussions:- Remark for the bresenham line generation algorithm, Assignment Help, Ask Question on Remark for the bresenham line generation algorithm, Get Answer, Expert's Help, Remark for the bresenham line generation algorithm Discussions

Write discussion on Remark for the bresenham line generation algorithm
Your posts are moderated
Related Questions
structure of display file

Ray Tracing - polygon rendering and ray tracing methods "Ray tracing" is a technique of following the light by the eye to the light source. While ray casting only relates its

Shearing - 2-D and 3-D transformations Shearing transformations are utilized for altering the shapes of 2 or 3-D objects. The consequence of a shear transformation seems like

Write a program that allows interactive manipulation of the position and orientation of a camera. Draw a teapot at the global origin 0,0,0. You can find a shaded teapot model and

Introduction of Polygon Rendering and Ray Tracing Method Different type of sources of light and the reflections generated by the object in exposure of these sources. As an obje

In this project, the image data set consists of 320 training images and 285 test images. Table 1 shows the image data set in details. In addition to the original images, th

Question: (a) Explain the importance of knowing and understanding your target market before doing a design work. Use example(s) to enhance your answer. (b) Describe the

Image Space Approach -Approaches for visible surface determination The initial approach as image-space, determines that of n objects in the scene is visible at every pixel in

Matrix for Orthographic Projection Orthographic projections are projections into one of the coordinate planes x=0, y=0or z=0. The matrix for orthographic projection on the z=0

what is zooming and panning in computer graph please explan??