Draw line segment - digital differential analyzer algorithm, Computer Graphics

1. By using Digital Differential Analyzer algorithm draw line segments from point (1,1) to (9,7).

Ans. We see that the usual equation of the line is specified by:

y = mx+c, here m = (y1 - y0/( x1 - x0)

Specified (x0, y0) → (1, 1) ; (x1, y1) → (9, 7)

⇒ m = (7-1)/(9-1) =6/8

C = y1 - mx1 = 7 - (6/8) *9 = 1/4

Consequently, by equation of line (y = mx + c) we contain: 

 y = (6/8)x+(1/4)

  Digital Differential Analyzer Algorithm Two case:

Case 1:   m < 1   

xi + 1 = xi + 1

 yi + 1 = yi + m

Case 2: m > 1   

xi + 1 = xi + (1/m)

yi + 1 = yi + 1

Here m < 1 so as per to Digital Differential Analyzer algorithm case 1

xi + 1 = xi + 1; yi + 1 = yi + m

Specified (x0, y0) = (1, 1)

1) x1 = x0 + 1 = 2

y1 = y0 + m = 1+ (6/8) = 7/4

Place pixel (x0, round y, colour)

That is, put on (2, 2)

Likewise, go on until (9, 7) is arrived at.

Posted Date: 4/3/2013 2:15:18 AM | Location : United States







Related Discussions:- Draw line segment - digital differential analyzer algorithm, Assignment Help, Ask Question on Draw line segment - digital differential analyzer algorithm, Get Answer, Expert's Help, Draw line segment - digital differential analyzer algorithm Discussions

Write discussion on Draw line segment - digital differential analyzer algorithm
Your posts are moderated
Related Questions
OBJECTIVE Since graphics plays a very important role in modern computer application, it is important to know more information about its hardware and software operations. Despite

Painting and Drawing While we talk about graphics, we mean pictures can be either photographs or illustrations. If you want to acquire graphics into a Web page or multimedia r

Role in Education and Training:- A multimedia presentation is an important way to introduce new concepts or described a new technology. Individuals determine it easy to understand

2. Describe how the Bresenham rasterisation algorithm is advantageous when compared to any other existing method.

Authoring Tools Authoring tools generally refers to computer software that assists multimedia developers produce products. Authoring tools are various from computer programmi

Image Editing Tools These are specializing and influential tools for enhancing and re-touching existing bit-mapped images. Such applications also give several of the features a

Scenes - polygon rendering and ray tracing methods In the context of ray tracing, a scene is a set of objects and light sources which will be viewed through a camera. All of

Applications Research in computer graphics has a wide range of application as well as both photorealistic and non-photorealistic image synthesis, image-based rendering and mod

What is Graphics It is a term that refers to any computer device or program which makes a computer able of displaying and manipulating pictures. The name also refers to the im

1.   Do we have need of to generate the full circumference of the circle utilizing the algorithm or  can we can produces it in a quadrant or octant only and after that utilization