View Single Post

  #4 (permalink)  
Old 05-24-2004
Winwaed's Avatar
Winwaed Winwaed is offline
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 916
Blog Entries: 11
I think there was an error in my original reply - the sign of Delta is reversed.


For what you're after a "Method of Similar Triangles" is probably more appropriate but requires a diagram to be clear. Mathematically it is the same though.

Line A-B, what is X for a particular Y?
A=Ax,Ay
B=Bx,By

Like triangles gives:
(Ax-Bx) / (Ay-By) = ( X - Bx) / ( Y - By)

Note: Ay=By will give an error - you need to check for this.
As will Y = By

Re-arranging,

(X-Bx) = (Ax-Bx) * (Y-By) / (Ay-By)

=> X = Bx + (Ax-Bx) * (Y-By) / (Ay-By)


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
See the Geoweb Guru for online mapping
Reply With Quote