Advice on geometric calculations

AI Thread Summary
The discussion centers on calculating the shortest distance from a point defined by latitude and longitude to an arbitrary line segment. While the distance to the endpoints can be calculated using great circle formulas, the challenge arises when determining the perpendicular distance to the line segment itself. Participants clarify that a perpendicular may not always exist due to the endpoints of the line segment, leading to the need for alternative methods. The original poster seeks advice on setting up the necessary formulas to account for different orientations of the line segment. The conversation emphasizes the importance of understanding geometric principles and coordinate transformations in this context.
kirk
Messages
3
Reaction score
0
Hi, any advice out there on an interesting challenge (at least a challenge for me :-)?

I am trying to come up with the easiest way to calculate the shortest distance between a single point and an arbitrary line. I want to start with lattitude and longitude coordinates for single point and for the endpoints of line segment.

It is a straightforward calculation to get the distance from the single point to the end points of the line segment using the lat/long.

But sometimes the shortest distance will be a perpendicular path to the line segment. I'm rusty on my geometry and not seeing the simple way of doing the calculations. is the answer just in rotation and translation of coordinates?

Any advice or tips out there?
 
Mathematics news on Phys.org
If the line is Ax + By + C = 0 and the point is (m, n) then the distance is:

d = |\frac{Am + Bn + C}{\sqrt{A^2 + B^2}}|

Or are you talking about a different method?
 
"It is a straightforward calculation to get the distance from the single point to the end points of the line segment using the lat/long."

lat/long? Are you talking about the distance from a point on a sphere to a great circle?

"But sometimes the shortest distance will be a perpendicular path to the line segment."
I would have thought it was always on a perpendicular path!
 
IF the line has end points there may not be a perpendicular that passes through the point off the line.
 
clarifications

good clarification questions.

yes, HallsofIvy, for the distance between two points, I was talking about great circles. I have used some formulas I found to get the distance between the two points using lattitude and longitude measures.

My concern is the shortest distance between the single A point and any point on the line segment BC.

As Matt points out, because of the end points of the line segment, there is not always a perpendicular. However, in that case, I will just use the great circles formula to get the distance to the nearest end point.

My big problem is thinking through how to calculate the distance from A to the randomly specified line segment BC when starting with the lattitude and longitude coordinates. Since the BC can have any orientation, I'm still struggling with a way to set up the formulas.

Thanks folks!
 
My big problem with the situation when there is a perpendicular. How do I calculate the distance from A to the randomly specified line segment BC when starting with the lattitude and longitude coordinates? Since the BC can have any orientation, I'm still struggling with a way to set up the formulas.

I'm trying to think through rotations and translation of coordinates because it seems to just like dropping a perpendicular from above an axis, but I'm too rusty with it. And then doing it starting with lattitude and longitude.


thanks!
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Thread 'Imaginary Pythagoras'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Back
Top