Start pixel and End pixel determine the smallest place you can reference | | | | | | | | | | | | | |.| |.| | | | Pixel 1 (0,0) Pixel 2 (3,1) y = mx+b Slope-intercept m = slope b = y-intercept y = deltaY / deltaX Let's look at: - |delatX| > |deltaY| Right now 0 <= m <= 1 />NE / --->E Problem 1: (0,0) (3,1) deltaY / deltaX = 1-0 / 3-0 = 1/3 Now we have: y = 1/3x current pixel - right side of the line draw(0,0) DDA algorithm - Digital Differential Analyzer x++; y = y + m; draw(x,y)---> 1,1/3 => (1,0) | | | | | | | | | | x++; | | |#|#| # = filled in pixels y = y + m; |#|#| | | draw(x,y)---> 2,2/3 => (2,1) "Jaggies" or Aliasing MSAA = opposite of Aliasing, performance is hit but presentation is up Temporal Artifact -1 <= m <= 0 x++ --> E y = mx + b \ \>SE IF (-10, -20) y = mx + b ^N x = y - b / m | />NW x1 = y1 - b / m |/ y2 = y1 + 1 x2 in terms of x1 x2 = y1+1-b / m = (y1-b / m) + (1 / m) = x1 + 1/m y++; x = x + 1/m; = x + deltaX/deltaY NaN - Not a Number ex. 1/0 1.000000 * 10^0 + .0000009 ------------ Accumulation Errors m is slobe--slope!