Well at least safra's program is working correctly now.

Still a long way to go though, but taking things step by step

]]>I'm glad your computer program is working!!!! I love to program too.

See image below:

]]>

The second problem I hadn't thought about at all. There is no slope in such a situation. This would also seem a good place for an "if" statement. Then you can just pick a location like half of delta y or whatever you feel is a good place for that instance.

Anyway, I hope your project is coming along now. Good luck.

]]>Although I had to deal with two issues (this is a directx 3d project) when the x value of B is higher then x of A then the point is flipped to the wrong side of B. When both x's are the same it also choses the wrong side by default.

]]>x = 15 + 5 sin arctan (14/5) = 19.708

y = 5 - 5 cos arctan (14/5) = 3.318

Thanks for catching the mistake though. (blush)

]]>I will play with this and see if I can translate this to delphi pascal code. One thought (maybe I am misunderstanding your words), the 90 degree angle is at point B (AB and BC) not at point A (AB and AC). Anyway if this means your formula should look a bit different then I should be able to change this myself. I did think of the fact that I didn't mention to which side the 90 degree angle point, thanks for letting me know how to deal with that John.

Raoul

]]>slope is negative reciprocal of other slope.

And then you have to mentally know the... Uh oh,

there is one mistake, though, minor typo.

x is y and y is x for the final answer.

So it is (10.29,6.68) for C.

So anyway I was going to say you mentally have to see which way

the 90 degrees points the vector up and left, hence the subtract sign

for the cosine for x value, and the plus for sine, and they have to

be different signs because slope is negative now.]]>

So x = 5 + 5 sin arctan (5/14) ≈ 6.68

y = 15 - 5 cos arctan (5/14) ≈ 10.29

I got a new problem based on this thread:

http://www.mathsisfun.com/forum/viewtopic.php?id=2094

Imagine for example a triangle with points A (20,19) and B(15,5) and point C(?,?). The angle at point B is 90 degrees and the distance between B and C is 5. What would be the fastest way to calculate point C?

]]>