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 is seed fill, What is seed fill?  One way to fill a polygon is to ...

What is seed fill?  One way to fill a polygon is to begin from a given point (seed) known to be inside  the polygon and highlight outward from this point i.e. neighboring pixel

Graphics hardware - computer aided design, Graphics Hardware - Computer aid...

Graphics Hardware - Computer aided Design Despite with which advance graphic software you are working along with, if your output device is not well or hardware handling which

Point clipping - 2-d viewing and clipping, Point clipping - 2-d viewing and...

Point clipping - 2-d viewing and clipping Point clipping is the method related to suitable display of points in the scene, though this type of clipping is utilized less freque

Digital video, Digital Video: Digital video is a form of video record...

Digital Video: Digital video is a form of video recording system which works through using a digital, quite than analog, representation of the video signal. It generic means,

What is multimedia, Question 1 What is Multimedia? Explain sound multimedi...

Question 1 What is Multimedia? Explain sound multimedia element Question 2 Explain any three elements of drawings Question 3 Explain any three types of drawing Quest

Cathode ray tube - graphics hardware, Cathode Ray Tube - Graphics Hardware ...

Cathode Ray Tube - Graphics Hardware Cathode Ray Tube: this is a refreshing display device. The idea of a refreshing display is depicted pictorially is given as: In fact

Introduction to computer graphics, Introduction To Computer Graphics ...

Introduction To Computer Graphics Early man employed drawings to communicate even before he learnt to communicate, write or count. Incidentally, these earliest hierogly

Filled-area primitives - output primitives, Filled-Area Primitives  Fil...

Filled-Area Primitives  Filled-area primitives are one of the most important types of primitives used in Computer Graphics.  Basically filled-area primitives are meant to fill

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