Previous | Next --- Slide 47 of 76
Back to Lecture Thumbnails
pchatrat

Sorry I didnt get this point. What does "work proportional to number of pixels in the drawing of the line" mean?

keenan

Suppose you draw a diagonal line from (1,1) to (n,n). Ideally, as n increases, the amount of computation needed should grow like O(n) rather than O(n^2). The "number of pixels in the drawing of the line" is just the number of pixels that you "light up." For instance, in this case you will light up exactly n pixels: (1,1), (2,2), (3,3), ..., (n,n).