Wouldn't plotting those points take... well... forever?

Heh, that was my first thought for a reply also...

i need to check the color of points between two points in a straight line from point to point.

But I'll assume all integer pairs creating a line between say (1;3) and (25;6). Sounds like he has a generated matrix with color values that he needs to check.

If we move from 1 to 25 in x-direction, somewhere the line will "step up" from 3 to 4, 4 to 5 and 5 to 6. I'd suspect that if there was some mathematical function resulting in those dots beeing draw, the exact point for the "steps" can vary depending on roundings. Ie, did the 3 in (1;3) become a three because it was actually just larger than 2.5, or is it 3 because it was just slightly less than 3.5? See pic below for the idea.



Became pretty poor as I scaled it, but the idea should come through. The red points are at the same x and y distance in both cases, but the "route" is slightly different.


/Michael


Attachments
164242-lines.GIF (59 downloads)

_________________________
/Michael