Remark for the bresenham line generation algorithm, Computer Graphics

Assignment Help:

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

}

}


Related Discussions:- Remark for the bresenham line generation algorithm

Text generation and character generation techniques, Write short notes on T...

Write short notes on Text generation.   OR Character Generation Techniques  Character Generation Techniques   Two different representations are used for storing computer fon

digital audio technologies, Digital audio technologies DAB (Digita...

Digital audio technologies DAB (Digital Audio Broadcasting) Digital Audio Tape (DAT) DVD DVD-A Digital audio player Compact disc (CD) Minidisc (obsolete

Vecgen algorithem for line, explain vecgen algorithem for line drawing in c...

explain vecgen algorithem for line drawing in computer graphics

Buffer areas required for z-buffer algorithm, Buffer Areas Required For Z-B...

Buffer Areas Required For Z-Buffer Algorithm For applying z-buffer algorithm, we need two buffer areas or two 2-Dimentional arrays: 1) Depth-buffer [i,j], to sa

Approaches to area filling - output primitives, Approaches to Area Filling ...

Approaches to Area Filling  Some other approaches to area filling are   Scan line polygon fill algorithm Boundary fill algorithm Flood fill algorithm.

Explain vector graphics and raster graphics, Question: (a) In computer...

Question: (a) In computer graphics it is important to distinguish between the two approaches to graphical modeling:vector graphics and raster graphics. Explain in details th

BINARY, WHAT THAT S MEANS 0001

WHAT THAT S MEANS 0001

Important points about the frame buffers - graphics hardware, Important Poi...

Important Points about the Frame Buffers 1) Within a frame buffer, information storage starts from top left corner and goes until the bottom right corner. 2) By using this

Normalization transformation, what is normalization transformation?why is i...

what is normalization transformation?why is it needed and important?give simple example also.

What is the maximum number of objects such can be handled, What is the maxi...

What is the maximum number of objects such can be handled via the depth/z- buffer algorithm? Solution : In z-buffer algorithm, an arbitrary number of objects can be handled sin

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd