Dec 17, 2001 | TRIZ | Slide 16 |
"Do a little less" or "Do a little more"
We want to draw a line on the computer screen, but our current algorithm, which involves multiplication and division, is too slow.Currently our code is (assuming x is the major axis of the line):
1 ylen = (yend - ystart); 2 xlen = (xend - xstart); 3 for (x = xstart; x < xend; x++) { 4 y = x * ylen / xlen; 5 plot (x, y); 6 }
Next | ![]() |
Copyright © 2001, David Turner |