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

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

Why Video Game Characters Look Better Today, what is the control for Why Vi...

what is the control for Why Video Game Characters Look Better Today

Polygon surfaces - curves and surfaces, Polygon Surfaces - Curves and Surfa...

Polygon Surfaces - Curves and Surfaces   By Figure 1 and Figure 2 it is clear that it is possible to store description of objects as a set of surface polygons and similar i

Sequence of steps to generate a full animation, Sequence of Steps to Genera...

Sequence of Steps to Generate a Full Animation The sequence of steps to generate a full animation would be as given below: 1)  Improve a script or story for the animation.

Briefly describe what you understand by smoothing, Question: (a) List a...

Question: (a) List and explain different types of lights that can be used in After Effects. (b) How is the density of dots between the boxes in a motion path related to th

Ray tracing - polygon rendering & ray tracing methods, Ray Tracing - Polygo...

Ray Tracing - Polygon Rendering & Ray Tracing Methods Ray tracing obeys all rays from the eye of the viewer back to the light sources. The method Ray tracing is very good at

Operation reseach, #question. Steps involved in the solution of operation r...

#question. Steps involved in the solution of operation research problem

Bezier curves - 2d shape primitives, Bezier curves: Theses are special...

Bezier curves: Theses are special polynomial curves expressed using Bernstein polynomials. Spline curves are simple extensions of Bézier curves composed of two or more polynom

Bresenham line generation algorithm, Bresenham Line Generation Algorithm ...

Bresenham Line Generation Algorithm This algorithm is exact and efficient raster line generation algorithm. Such algorithm scan converts lines utilizing only incremental integ

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