University of Missouri at Columbia 2D Scan-line Conversion University of Missouri at Columbia
2D Scan-line Conversion DDA algorithm Bresenham’s algorithm DDA algorithm Bresenham’s algorithm
University of Missouri at Columbia DDA algorithm The simplest algorithm. Named after Digital Differential Analyzer. The simplest algorithm. Named after Digital Differential Analyzer. (x 1, y 1 ) (x 0, y 0 ) dydy dxdx
University of Missouri at Columbia DDA Algorithm
University of Missouri at Columbia DDA Algorithm
University of Missouri at Columbia DDA Algorithm
University of Missouri at Columbia DDA Algorithm
University of Missouri at Columbia DDA Algorithm
University of Missouri at Columbia DDA Algorithm
University of Missouri at Columbia 2D Scan-line Conversion DDA algorithm Bresenham’s algorithm DDA algorithm Bresenham’s algorithm
University of Missouri at Columbia Bresenham’s Midpoint Algorithm DDA is simple, efficient, but needs floating points. Bresenham’s use integer addition only. DDA is simple, efficient, but needs floating points. Bresenham’s use integer addition only. (x 1, y 1 ) (x 0, y 0 ) dydy dxdx
University of Missouri at Columbia Bresenham’s Midpoint Algorithm To choose from the two pixels NE or E depending on the relative position of the midpoint M and the line. Choose E if M is above the line, Choose NE if M is below the line. To choose from the two pixels NE or E depending on the relative position of the midpoint M and the line. Choose E if M is above the line, Choose NE if M is below the line. M E NE (x 0, y 0 )
University of Missouri at Columbia Bresenham’s Midpoint Algorithm M E NE (x 0, y 0 ) Choose NE if d is positive, Choose E if d is negative. Choose NE if d is positive, Choose E if d is negative.
University of Missouri at Columbia Bresenham’s Midpoint Algorithm M E NE (x 0, y 0 ) Choose NE if d is positive, Choose E if d is negative. Choose NE if d is positive, Choose E if d is negative.
University of Missouri at Columbia Incremental Calculation of the decision variable d new M E NE (x 0, y 0 )
University of Missouri at Columbia Bresenham’s Midpoint Algorithm M E NE (x 0, y 0 )