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

Explain the merits and demerits of penetration techniques, Explain the meri...

Explain the merits and demerits of Penetration techniques. The merits and demerits of the Penetration techniques are as follows:     It is an inexpensive method.     It h

What do you understand by the term branding, Question 1: (a) Explain th...

Question 1: (a) Explain the term ‘Corporate Identity'. (b) Give four examples of what a Corporate Identity comprises of and briefly explain their uses. (c) You are an employe

What is a blobby object, What is a Blobby object?  Some objects do not ...

What is a Blobby object?  Some objects do not handle a fixed shape, but change their surface characteristics in sure motions or when in proximity to other objects. That is call

Engineering-applications for computer animation, Engineering: CAD has alwa...

Engineering: CAD has always been an imperative tool in industry. For illustration in automobile design, CAD could be utilized to model a car. Although with the advent of computer

Write a code to continuously rotate square about pivot point, Write a code ...

Write a code to continuously rotate a square about a pivot point.    #include   static GLfloat rotat=0.0;   void init(void); void display(void); void reshape(int w

Crt, working of crt

working of crt

Sub classes of orthographic projection, Sub Classes of Orthographic Project...

Sub Classes of Orthographic Projection There are three ordinary sub-classes of Orthographic (axonometric) projections as: 1) Isometric: The direction of projection makes

Character generation, Ask question #Minimum how can we use stroke method me...

Ask question #Minimum how can we use stroke method method for character generation? 100 words accepted#

Two-dimensional geometric transformations, Two-Dimensional Geometric Transf...

Two-Dimensional Geometric Transformations  When a real life object is modelled using shape primitives, there are several possible applications.  You may be required to do furth

Bezier surfaces - modeling and rendering, Bezier Surfaces - Modeling and Re...

Bezier Surfaces - Modeling and Rendering Two sets of Bezier curve can be utilized to design an object surface by identifying by an input mesh of control points. The Bézier su

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