Digital differential analyzer (graphics algorithm): Difference between revisions

Content deleted Content added
Line 74:
 
==DDAs for line drawing==
The above implementations interpolate only x values and iterate y values. This is a perfect approach when rasterizlng triangles with horizontal linesspanlines (two DDAs interpolate x coordinate, colors etc. for the left and right edge, a third DDA interpolates colors etc on the horizontal line inbetween). But when rasterizing lines, then gaps will occur, when abs(mx) < 1. So a line drawing algorithm using DDAs has to check whether abs(mx) < 1, and interpolate y instead of x if required (since my < 1 if mx > 1).
 
==Performance==