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

Enumerate the use of data goggles- virtual reality, Enumerate the use of Da...

Enumerate the use of Data goggles- Virtual Reality Data goggles/helmets - These use optical systems and display screens which send 3D images to the eyes. Motion sensors mea

Photo editing, Photo Editing Photo-editing programs are paint programs...

Photo Editing Photo-editing programs are paint programs: it just like they comprise several sophisticated functions for altering images and for scheming aspects of the image,

Serial line db9 connector, Main Objectives of this connector is to allow fu...

Main Objectives of this connector is to allow full duplex communication between peripherals that uses such connector such PIC Demo board, ICD2 Debugger etc. The RS32 connector pin

Transformation for 3-d rotation, Transformation for 3-D Rotation Rotat...

Transformation for 3-D Rotation Rotation in 3-dimensions is considerably more complicated then rotation in 2-dimensions. In 2-Dimentional, a rotation is prescribed via an angl

Define refresh rate and refresh buffer, Refresh Rate: refreshing on raster...

Refresh Rate: refreshing on raster - scan displays is carried out at the rate of 60 to 80 frames per second, although some system are designed for higher refresh rates. Sometimes,

Dda and bresenhem line drawing algorithm, when dda algorithm is more effici...

when dda algorithm is more efficient than bresenhem line drawing algorithm

Briefly explain the 12 stages in image processing, QUESTION (a) In Autom...

QUESTION (a) In Automatic Contrast Adjustment briefly explain how to stretch an image to its full intensity (b) Write down a mathematical function of a Modified Automatic Con

Vertices of bezier curve find out 3 points on bezier curve, Specified p 0 ...

Specified p 0 (1, 1): p 1 (2, 3); p 2 (4, 3); p 3 (3, 1) as vertices of Bezier curve find out 3 points on Bezier curve? Solution : We consider Cubic Bezier curve as: P (

Graphic file compression formats, Graphic File Compression Formats Web...

Graphic File Compression Formats Web graphics are by requirement compressed due to the bandwidth issues surrounding networked delivery of information and since image files inc

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