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

Advantages of bresenham’s line drawing algorithm, What are the advantages o...

What are the advantages of Bresenham's line drawing algorithm over DDA line drawing algorithm? DDA and Bresenham algorithms both are efficient line drawing algorithm. Breaenham

Phong specular reflection model or specular reflection, Phong Specular Refl...

Phong Specular Reflection Model or Specular Reflection This model of local illumination is frequently termed as the Phong specular reflection model. Here we discuss the matter

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

Other file formats and bmp-dib-rle file formats, Other File Formats BM...

Other File Formats BMP/DIB/RLE File Formats These are termed as device independent bitmap files. They exist in two various type formats: a) OS2 format and b) Windows

Time delay and busy flag method, 1. Using a time Delay Method The delay...

1. Using a time Delay Method The delay required between issuing each character to the LCD is about 5-10ms (it's simply known as DELAY). When programming an LCD, a long delay is

Definitions of hypermedia, Definitions of Hypermedia It is a term ...

Definitions of Hypermedia It is a term created through Ted Nelson in the year 1970. It utilized as a logical extension of the term hypertext, wherein graphics, video, audi

Plane equation - spatial orientation of the surface element, Plane equation...

Plane equation - spatial orientation of the Surface Element For some of Plane equation procedures, we have information regarding the spatial orientation of the individual surf

Objectives-introduction to computer graphics, Objectives After complet...

Objectives After completing this section, you must be familiar with: explain computer graphics, its characteristics and features; Conversations about applicat

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