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

Matrix for orthographic projection, Matrix for Orthographic Projection ...

Matrix for Orthographic Projection Orthographic projections are projections into one of the coordinate planes x=0, y=0or z=0. The matrix for orthographic projection on the z=0

What is persistence, What is persistence? The time it takes the emitted...

What is persistence? The time it takes the emitted light from the screen to decompose one tenth of its original intensity is known as persistence.

Real time clock -rtc, Main objectives: To test to micro-controller I...

Main objectives: To test to micro-controller I2C protocol bus functionality Setting and displaying accurate time and date on the LCD GENERAL DESCRIPTION The D

Intensity of specular reflection - modeling and rendering, Intensity of Spe...

Intensity of Specular Reflection - Modeling and Rendering Intensity of specular reflection based upon material properties of surface and the angle of incidence and the value o

Education training process, Education training process falls into three gen...

Education training process falls into three general categories: 1) Instructor Support Products: These are used through teachers additionally to text books, lectures and other

Methods for drawing thick lines, Describe any two methods for drawing thick...

Describe any two methods for drawing thick lines. Two method for drawing thick lines are: (1) Using the line- width command: "setline width scale factor (iw)" Line width param

Algorithm scan-line, Algorithm (scan-line): For each scan line perform ...

Algorithm (scan-line): For each scan line perform from step (1) to (3). 1) For all pixels on a scan-line, arrange depth [x]=1.0 i.e. max value and Intensity [x] = background

Phong model or phong specular reflection model, Phong Model or Phong Specul...

Phong Model or Phong Specular Reflection Model It is an empirical model that is not based on physics, although physical observation. Phong observed here for extremely shiny su

Camera - polygon rendering and ray tracing methods, Camera - polygon render...

Camera - polygon rendering and ray tracing methods Camera presents "viewpoint" or "eye" of observer. In order to explain the fundamental working of camera we can consider this

Midpoint circle generation algorithm - 2d shape primitives, Midpoint Circle...

Midpoint Circle Generation Algorithm   Just as a line drawing algorithm approximates infinite number of points on a line segment by only a finite number of pixels, a circle dra

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