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
What is run length encoding?   Run length encoding is a compression method used to store the intensity values in the frame buffer, which keeps each scan line as a set of intege

How we create virtual reality images for use on a computer system When a virtual tour of, for instance, a house is shown on a website the images need to be first created and th

Parallel Projection - viewing transformation Parallel projection methods are utilized by engineers to make working drawings of an object that preserves its true shape. In t

Question 1: (a)Using your awareness of typography and design, make a new logo manually for one of the following. The logo should compulsorily consist of the name and may or may

As we already seen that the scaling process is mainly utilized to change the size of an object. The scale factors find out whether the scaling is a magnification as s>1 or a red

Question: Suppose we have a video monitor with a display area measuring 12.8 inches across and 9.6 inches high.  If the resolution is 1024 by 768 and the aspect ratio is 1, what is

What are the different types of parallel projections?  The parallel projections are basically divided into two types, depending on the relation among the direction of projectio

Amiga - Hardware for computer animation Originally owned through Commodore, Amiga computers have conduct a position in the computer animation industry for many years. This is

Q. What is the difference between tones and tints? Which one component of YIQ color model does black- and- white television use? How can you convert a ZTSC video signal to an RGB s

Translation - 2-d and 3-d Transformations It is the process of changing the position of an object. Suppose an object point P(x,y)=xI+yJ be moved to P'(x',y') by the specified