Locating point from known point at known distance and slope

griffinmt

New member
Joined
Nov 14, 2009
Messages
3
The subject basically says what is needed. :lol:

On a graph, I have a known single point (x1,y1)
There is a virtual line through that point with a slope of 'm'
I need the determine the two points that are equidistant from (x1,y1) (distance is 'd' units)
on either side of the known point along that virtual line.

This is being used in a server side calculation for a ploting web application.
 
griffinmt said:
The subject basically says what is needed. :lol:

On a graph, I have a known single point (x1,y1)
There is a virtual line through that point with a slope of 'm'
I need the determine the two points that are equidistant from (x1,y1) (distance is 'd' units)
on either side of the known point along that virtual line.

This is being used in a server side calculation for a ploting web application.

Equation of a line with a slope 'm' and passing through (x[sub:3q49yh79]1[/sub:3q49yh79],y[sub:3q49yh79]1[/sub:3q49yh79]) is:

y - y[sub:3q49yh79]1[/sub:3q49yh79] = m * (x - x[sub:3q49yh79]1[/sub:3q49yh79])

Please show us your work, indicating exactly where you are stuck - so that we know where to begin to help you.
 
That formula ( y - y1 = m * (x - x1)) is fine, but how do you 'determine' the correct value for (x,y) given that the point in question is exactly at a distance (d) along that line from point (x1,y1)?
 
griffinmt said:
That formula ( y - y1 = m * (x - x1)) is fine, but how do you 'determine' the correct value for (x,y) given that the point in question is exactly at a distance (d) along that line from point (x1,y1)?

You should have indicated that you knew that fine formula!

Assume the points are (x[sub:23ir0icm]2[/sub:23ir0icm],y[sub:23ir0icm]2[/sub:23ir0icm]) and (x[sub:23ir0icm]3[/sub:23ir0icm],y[sub:23ir0icm]3[/sub:23ir0icm])

Then those must satisfy that fine formula - and the distance formula (another fine formula - I am assuming you know) - and solve those to find your unknowns.
 
I assume the distance formula is:
d = sqrt(((x1-x)^2) + ((y1-y)^2))
coupled with:
m = (y1-y)/(x1-x)

The two unknowns are x and y, how can they be expressed in the form x=.... and y=.... so that they can be evaluated in a computer program?

I am over 60 yrs old and forget all that 'good' stuff I learned in school :wink:

This has two solutions, on either side of the point along the line, but would be happy to just find one for now!!
 
Top