DDA vs. Bresenham Algorithm

Difference Between DDA and Bresenham Algorithm DDA and Bresenham algorithm are terms that you would come across while…

Difference Between DDA and Bresenham Algorithm

DDA and Bresenham algorithm are terms that you would come across while studying computer graphics. Before we see the difference between the two terms, let’s see what is DDA and what is Algorithm Bresenham. The invention of computer has made things simple and one of them is the solving differential equations. Earlier it was made by the mechanical differential analyzer was slow and full of mistakes, but DDA or digital differential analyzers is the application of the digital analyzer is accurate and fast. The differential analyzer is used to make lines between two points in a straight line or a polygon with n the number of sides can be seen on the screen. The distance between two points or a pixel is described by a differential equation where the coordinates of the starting point and ending point are specified in the software. This can be done by the DDA and Bresenham algorithm.

What is DDA?

DDA is used in the design of the straight line to form a line, a triangle or a polygon in computer graphics. DDA makes analysis of samples along the line at regular intervals of one coordinate as an integer and other coordinate is round of as an integer that is closest to the line. So as the line progresses it scans the first coordinate of integer and round the second to the nearest whole number. So a line using the DDA for x coordinate it will be x0 to x1, but for y coordinate it will be  y=ax+ b and to draw function it will be Fn(x, y rounded off).

What is the Bresenham algorithm?

The Bresenham algorithm was developed by JEBresenham in 1962 and it is much accurate and far more effective than DDA. It scans the coordinates but instead of rounding them it takes the incremental value in the account by adding or subtracting and can be used to draw circles and curves. So if a line is to be drawn between two points x and y then next coordinates will be( xa+1, ya) and (xa+1, ya+1) where a is the incremental value of the next set and difference between these two will be calculated by subtracting or adding the equations formed by them.

 

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts