I was wondering myself how to draw a line depending on three points. It's compulsory that it it passes through three points due its a light ray and a prism...

But I only see an action wich is :Draw Line from X1,Y1 to X2,Y2 ...

You wanted to draw a straight line between 3 points ? How is it possible ? (Unless the points are aligned, but that would be the same as drawing a line between 2 points)

Did you mean 2 points but with only 3 known coordinates ?

I had 2 points known. All are moving al time, like particules in a fluid. The thrird one is a wall. So I know only it's X. The only thing to find out is the Y.

Because of that I must be careful of two moving points to obtain a straight line.

That's pretty much the same formula without using the angle ! <img src="smileys/smiley2.gif" border="0" align="middle" />

Tan(angle) = (y2-y1) / (x2 - x1)

Replacing that in my formula, we obtain the same thing ! Maybe there's something wrong with the angle() function... Nevertheless, you're better off without it !