Computer Science, asked by zullarwaraniket, 2 months ago

Which of the following is correct expression to compute length of a line in DDA line generation Algorithm?​

Answers

Answered by ayushi1229
2

Answer:

In any 2-Dimensional plane if we connect two points (x0, y0) and (x1, y1), we get a line segment. But in the case of computer graphics, we can not directly join any two coordinate points, for that we should calculate intermediate points’ coordinates and put a pixel for each intermediate point, of the desired color with help of functions like putpixel(x, y, K) in C, where (x,y) is our co-ordinate and K denotes some color.

Examples:

Input: For line segment between (2, 2) and (6, 6) :

we need (3, 3) (4, 4) and (5, 5) as our intermediate

points.

Input: For line segment between (0, 2) and (0, 6) :

we need (0, 3) (0, 4) and (0, 5) as our intermediate

points.

Similar questions