Shape/ line plotter thing...

Soldato
Joined
18 Jan 2006
Posts
3,178
Location
Norwich
I'm sure this is out there, but I just can't think of the right search term :)
I'm looking for a program that will allow me to plot a line from two points in basic X,Y cordinates. If I then say I want to go another 1m further along the line, it then gives me the new cordinate at the end of the line.

Doing my head in, & I'm no good at maths but someone must have thought of it.

-Leezer-
 
Two points A and B with coordinates (AX, AY) and (BX, BY)

With starting point A:

Gradient = (BY - AY) / (BX - AX)
and angle of line = inverse tan( Gradient)

Increase in X when going beyond B a distance d = d x cos angle
Increase in Y when going beyond B a distance d = d x sin angle
 
Back
Top Bottom