Presentation is loading. Please wait.

Presentation is loading. Please wait.

University of Missouri at Columbia 2D Scan-line Conversion University of Missouri at Columbia.

Similar presentations


Presentation on theme: "University of Missouri at Columbia 2D Scan-line Conversion University of Missouri at Columbia."— Presentation transcript:

1 University of Missouri at Columbia 2D Scan-line Conversion University of Missouri at Columbia

2 2D Scan-line Conversion DDA algorithm Bresenham’s algorithm DDA algorithm Bresenham’s algorithm

3 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

4 University of Missouri at Columbia DDA Algorithm

5 University of Missouri at Columbia DDA Algorithm

6 University of Missouri at Columbia DDA Algorithm

7 University of Missouri at Columbia DDA Algorithm

8 University of Missouri at Columbia DDA Algorithm

9 University of Missouri at Columbia DDA Algorithm

10 University of Missouri at Columbia 2D Scan-line Conversion DDA algorithm Bresenham’s algorithm DDA algorithm Bresenham’s algorithm

11 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

12 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 )

13 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.

14 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.

15 University of Missouri at Columbia Incremental Calculation of the decision variable d new M E NE (x 0, y 0 )

16 University of Missouri at Columbia Bresenham’s Midpoint Algorithm M E NE (x 0, y 0 )


Download ppt "University of Missouri at Columbia 2D Scan-line Conversion University of Missouri at Columbia."

Similar presentations


Ads by Google