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

Studio-based one-plus-one interview, Question 1: a. List respectively ...

Question 1: a. List respectively ten main technical and human components necessary to ensure a studio-based one-plus-one interview? b. How does each component contribute in

Briefly describe what you understand by smoothing, Question: (a) List a...

Question: (a) List and explain different types of lights that can be used in After Effects. (b) How is the density of dots between the boxes in a motion path related to th

Vecgen algorithm and bresenham line, what is vecgen algorithm and bresenha...

what is vecgen algorithm and bresenham linequestion..

Crt, explain the working procedure of crt digram

explain the working procedure of crt digram

Gif file compression, GIF File Compression The Graphic Interchange Form...

GIF File Compression The Graphic Interchange Format file format utilizes a relatively basic form of file compression which squeezes out inefficiencies within the data storage w

What are the disadvantages with the boundary representation, Disadvantages ...

Disadvantages with the Boundary Representation (i) It requires more storage than the corresponding half-space method. (ii) There is no guarantee that the object created is v

Subdivision algorithm - visible surface detection, Subdivision Algorithm - ...

Subdivision Algorithm - Visible Surface Detection 1) Initialize the area to be the whole screen. 2) Create a PVPL regarding an area, sorted on z min as the smallest z coor

Categories of line segments - 2d clipping algorithms, Categories of Line Se...

Categories of Line Segments It categorizes line segments into three categories (i) trivially rejected (ii) trivially selected (iii) may be partially visible or totally invisibl

Problems at shared vertices - modeling and rendering, Problems at Shared Ve...

Problems at Shared Vertices - Modeling and Rendering Shading discontinuities can arise while two adjacent polygons fail to share a vertex which lies along their common edge.

Importance of multimedia, Importance of Multimedia: Multimedia will help i...

Importance of Multimedia: Multimedia will help in spreading the information age to millions of teachers/learners. Today Multimedia educational computing is fastest raising markets

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