Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
57 views

Statement:: Use DDA Algorithm To Generate A Line of Points (2, 3) and (7, 8)

The document describes using the DDA (Digital Differential Analyzer) algorithm to generate points along a line between two given points (2,3) and (7,8). It calculates the initial point as (2.5, 3.5) and increment values of 1 for both X and Y. It then generates the points along the line by incrementing X and Y by 1 and truncating to whole numbers to get the points (2,3), (3,4), (4,5) etc. up to (7,8).

Uploaded by

venky364
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Statement:: Use DDA Algorithm To Generate A Line of Points (2, 3) and (7, 8)

The document describes using the DDA (Digital Differential Analyzer) algorithm to generate points along a line between two given points (2,3) and (7,8). It calculates the initial point as (2.5, 3.5) and increment values of 1 for both X and Y. It then generates the points along the line by incrementing X and Y by 1 and truncating to whole numbers to get the points (2,3), (3,4), (4,5) etc. up to (7,8).

Uploaded by

venky364
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Generation Of Line By Using DDA Algorithm

STATEMENT: Use DDA algorithm to generate a line of points (2, 3) and (7, 8)

Solution: Given That (X1, Y1)= (2, 3) (X2, Y2)= (2, 3) Initial Points: Xi = 0.5+X1 Yi = 0.5+Y1 Xi = 0.5+2=2.5 Yi = 0.5+3=3.5

Increment Value:

X increment =

=1

Y increment =

=1

Generation Of Line By Using DDA Algorithm

X 2.5 3.5 4.5 5.5 6.5 7.5

Y 3.5 4.5 5.5 6.5 7.5 8.5

trunc(X) 2 3 4 5 6 7

trunc(Y) 3 4 5 6 7 8

line
9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8

Generation Of Line By Using DDA Algorithm

line
9 8

7
6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8

You might also like