Exemplify bresenham line generation algorithm by digitizing, Computer Graphics

Assignment Help:

Example: Exemplify the Bresenham line generation algorithm through digitizing the line along with end points (20, 10) and (30, 18)

Solution: m =    (y2 - y1)/( x2 - x1)

 =   (Δy) /(Δx)

=   (18 -10)/( 30 - 20)  = 0.8-------------------(1)

=> Δy = 8 and Δx = 10-------------------(2)

value of initial decision parameter (p0) = 2Δy - Δx= 2 * 8 - 10 = 6 -----------------(3) value of increments for calculating successive decision parameters are:

2Δy = 2 * 8 = 16;                                                  -------------------(4)

2Δy - 2Δx = 2 * 8 - 2 * 10 = - 4                          -------------------(5)

So plot first point (x0, y0) = (20, 10) in frame buffer at this time determine successive pixel positions beside line path from decision parameters value (20, 10).

k

0

pk

6

 

(xk + 1, yk + 1) (21, 11)

1

2

(22, 12)

2

- 2

(23, 12)

3

14

(24, 13)

4

10

(25, 14)

5

6

(26, 15)

6

2

(27, 16)

7

- 2

(28, 16)

8

14

(29, 17)

9

10

(30, 18)

 

 

← [use step (d) of algorithm Δ x times]

If pk > 0 then increase both X and Y

and pk  +1= pk + 2Δy - 2Δx

If pk < 0 then increase X and not Y

and pk + 1 = pk + 2Δy

 


Related Discussions:- Exemplify bresenham line generation algorithm by digitizing

What are the important applications of computer graphics, Can you list at l...

Can you list at least three important applications of computer graphics? There are lots of interesting applications of computer graphics. Three common applications are compute

Polygon filling algorithm - raster graphics and clipping, Polygon Filling A...

Polygon Filling Algorithm - Raster Graphics and Clipping In several graphics displays, this becomes essential to differentiate between different regions by filling them along

Deffrent, deffrent between vecgen algorithm and bresenham line algorithm in...

deffrent between vecgen algorithm and bresenham line algorithm in computer graphic

Translation, Translation, Rotation and Scaling -  output primitives 1. ...

Translation, Rotation and Scaling -  output primitives 1. Two basic approaches used in character generation are - Bitmap method and outline method.  2. All 2D geometric tran

Principal vanishing point write respect to z-axis, Principal vanishing poin...

Principal vanishing point write respect to Z-axis Principal vanishing point w.r.t z-axis: By the 3rd row of matrix equation, we declare that the principal vanishing point w

Event driven devices - polling, Event Driven Devices - Polling Pollin...

Event Driven Devices - Polling Polling: The status of all devices is periodically checked in a repetitive manner through a polling loop. While an event happens, the loop is

Shearing - 2-d and 3-d transformations, Shearing - 2-D and 3-D transformati...

Shearing - 2-D and 3-D transformations Shearing transformations are utilized for altering the shapes of 2 or 3-D objects. The consequence of a shear transformation seems like

Image editing tools in multimedia, Image Editing Tools These are specia...

Image Editing Tools These are specializing and influential tools for enhancing and re-touching existing bit-mapped images. Such applications also give several of the features a

DDA, limitationsof dda

limitationsof dda

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

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