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
Object Space - approaches for visible surface determination The second approach as object-space that compares all objects directly along with each other inside the scene defin


Persistence (of phosphor) - Display devices Time it takes the emitted light from screen to decay to one-tenth of its original intensity. The point where an electron gun strikes

Describe any two methods for drawing thick lines. Two method for drawing thick lines are: (1) Using the line- width command: "setline width scale factor (iw)" Line width param

Anti- aliasing: Most aliasing artifacts, when appear in a static image at a moderate resolution, are often tolerable, and in many cases, negligible. However, they can have a signi

Negative Accelerations - computer animation In order to incorporate decreasing speed in an animation the time spacing between the frames must decrease, thus there exists lesser

Categories of Orthographic Projection Orthographic projection is additionally divided into Multi-view projection and axonometric projection, depending upon where the direction

Two-Dimensional Geometric Transformations  When a real life object is modelled using shape primitives, there are several possible applications.  You may be required to do furth

Given two triangles P along with vertices as P1(100,100,50), P2(50,50,50), P3(150,50,50) and q along with vertices as Q1(40,80,60), q2(70,70,50), Q3( 10,75,70), determine that tria

Important points about Types of light resources - illumination model Note: While we see an opaque non-luminous object, we notice reflected light by one surface of the object