Exemplify bresenham line generation algorithm by digitizing, Computer Graphics

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

 

Posted Date: 3/22/2013 7:39:52 AM | Location : United States







Related Discussions:- Exemplify bresenham line generation algorithm by digitizing, Assignment Help, Ask Question on Exemplify bresenham line generation algorithm by digitizing, Get Answer, Expert's Help, Exemplify bresenham line generation algorithm by digitizing Discussions

Write discussion on Exemplify bresenham line generation algorithm by digitizing
Your posts are moderated
Related Questions
Lamberts Cosine Law - Diffuse Reflection "LAMBERTS COSINE LAW" specify that the radiant energy from any minute surface area dA in any direction θ relative to the surface usual

Presentation Graphics The instant you are going to represent yourself or your product or company or research paper and so on. Only standing and speaking is fairly ineffective.

Transformation for 3-D Scaling As we already seen that the scaling process is mainly utilized to change the size of an object. The scale factors find out whether the scaling i

As we already seen that the scaling process is mainly utilized to change the size of an object. The scale factors find out whether the scaling is a magnification as s>1 or a red

QUESTION 1: a) Draw a Bezier curve showing the following components i. hull ii. curve CV iii. span iv. start and end point b) Maya provides highly effective tools for all t

normal vector

Macintosh - Hardware for computer animation It was originally designed to be graphic and desktop publishing machines. Macs did not turn into which widely known till recently, a

Space Exploration: now, the farthest point far away from earth which the human was on the moon, although we continually want to learn more. A trip by a human to the other planet w

computer animation Note : This is to be noticed that computer animation can also be produced by changing camera parameters as its position, orientation and focal length, as w

Education - applications for computer animation Currently, studies of subjects as Art, Physics, Maths, Chemistry, Biology, Engineering, Medicine, and Technology are fairly simp