Not actually homework, but just a general query... I'm trying to write a program that will predict the trajectory of a moving point by analysing several positions through which the point has passed. Part of this involves finding the coordiantes of a point B, given the coordinates of another point A, the length of AB and its gradient. Obviously there are two possible points... one to the right A and one to the left, but I'm only interested in the one to the right. I basically need two simple formulae in terms of the x and y coordinates of B, which I can apply in the program itself, although I wouldn't mind knowing how the formula was reached as well I've tried getting my head around it but I'm just getting confused. Any help would be greatly appreciated, thanks!