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

Is cad only helpful for design drawings, Question: Is CAD only helpful for ...

Question: Is CAD only helpful for design drawings? No. When true-scale, structurally valid drawings are the purpose for CAD's existence; it utilizes is as diverse as imagination

Non-zero accelerations - computer animation, Non-Zero Accelerations - Compu...

Non-Zero Accelerations - Computer Animation This method of simulating the motion is fairly helpful introducing the realistic displays of speed changes, particularly at the sta

File formats that are used for vector data, File Formats that are used for ...

File Formats that are used for Vector Data This data can be saved in a wide variety of file formats are as: •EPS: the most well-accepted file format to exchange vector dra

Phong shading or normal vector interpolation shading, Phong shading OR Norm...

Phong shading OR Normal Vector Interpolation Shading In Gouraud shading we were doing direct interpolation of intensities although a more exact method for rendering a polygon

Briefly explain types of animation, Question 1 Briefly explain types of an...

Question 1 Briefly explain types of animation Question 2 Briefly explain steps involved in animation process Question 3 What is Layout? Explain two types of layout

Distinguish between uniform scaling and differential scaling, Distinguish b...

Distinguish between uniform scaling and differential scaling?  When the scaling factors sx and sy are assigned to the similar value, a uniform scaling is produced that maintain

Modal create, morgen wants to sign up for an account on doggobook, the worl...

morgen wants to sign up for an account on doggobook, the world''s thrid - best social network for dog enthusiasts. she enters her email address and a password into the sign-up form

What are the advantages of the boundary representation, Advantages of the B...

Advantages of the Boundary Representation (i) This format gives efficient picture generation and easy access to other geometric information. (ii) The changes produced by mos

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