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

Define octrees, Define Octrees?  Hierarchical tree structures called oc...

Define Octrees?  Hierarchical tree structures called octrees, are used to show solid objects in some graphics systems. Medical imaging and other applications that needs display

Reflection and shear - output primitives, Reflection and Shear There ar...

Reflection and Shear There are a few important transformations which are not primitive in the sense that they can be expressed as compositions of translation, rotation and scal

Relation between 2-d euclidean system and homogeneous system, Relation betw...

Relation between 2-D Euclidean system and Homogeneous coordinate system Suppose that P(x,y) be any point in 2-D Euclidean system. In HCS, we add a third coordinate to the poin

Video conferencing and virtual reality, Video Conferencing and Virtual Real...

Video Conferencing and Virtual Reality Virtual reality is a truly fascinating multimedia application. In such, the computer creates an artificial environment using hardware an

What does refreshing of the screen mean, What does refreshing of the screen...

What does refreshing of the screen mean? Some method is required for maintaining the picture on the screen. Refreshing of screen is completed by keeping the phosphorus glowing

What is the feature of inkjet printers, What is the feature of Inkjet print...

What is the feature of Inkjet printers? Features of inkjet printers: They can print 2 to 4 pages/minutes. Resolution is about 360d.p.i. Thus better print quality is achie

Graphical User interface and interactive input methods, all details of Grap...

all details of Graphical User interface and interactive input methods

Reflection, examples and equation of reflection

examples and equation of reflection

Visible surface detection - modeling and rendering , Visible Surface Detect...

Visible Surface Detection - Modeling and Rendering Provided a set of 3-Dimentional objects and a viewing position for the generation of realistic graphics show, we want to de

Rotation about the origin - 2-d and 3-d transformations, Rotation about the...

Rotation about the origin - 2-d and 3-d transformations Specified a 2-D point P(x,y), which we need to rotate, along with respect to the origin O. The vector OP has a length '

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