scan conversion.. lines

Hi

I have to write a program that lets the user specify two end points of a line (with the mouse) and I have to use the parametric incremental line drawing algorithm by simulating scan conversion by drawing GL_POINTS
I need the algorithm to handle ALL slopes, that is from -infinity<=m<=-1 and 1<=m<=infinity

I have this algorithm right now, but it's not working for all slopes.. its actually not even drawing to the screen.

dy = (y1-y0)/(x1-x0);
y=y0
for x=x0 to x1 do
draw(x,round(y))
y= y+dy

What I have right now is that everytime the user clicks on the screen the coordinates are placed into an array POINTS.
An extra thing that i have to do is make each end point a different color then color the intermediary points using linear interpolation..

I've researched the net for more information, but nothing is helping.. maybe if i could get personal help from someone that would be great..

PS: I'm using OPENGL with Visual C++

-Kathy
[1055 byte] By [vtgyrlz619] at [2007-11-18 19:04:52]