On 2/20/2024 6:19 PM, Physfitfreak wrote:
> If it's taken as an ellipsoid, then the radial distance to the point on
> the path, itself, becomes a variable.
More than just that comes into the calculations, of course. The shortest
path on an ellipsoid between two points on it, does _not_, generally,
fall on any circle. So the solution path is weird because you're not
strolling down your path on a spherical surface.
The path doesn't even fall on a concentric ellipse, and not even on an
ellipse that's not concentric with the ellipsoid. So one is left to hit
the shit and do a line integral in the most general case.
But how can you find the shortest path's equation so you could integrate
and find its length? You have to find a general equation of any path
between the two points first, then calculate the line integral of that
general path to find the general distance, then minimize that general
distance by taking partial derivatives of that diabolic expression with
respect to the three coordinates, and equate the result to zero.
So you're left with a very nasty PDE to solve. Surprise! You're now in
physics, and are going to taste it too.
So you'd begin reviewing the available numerical methods to deal with
that particular form of PDE. If you're lucky, you will find one, and
will use it to turn the diabolic equation into a difference equation,
then and only then, you begin coding it carefully.
I give it 999999 out of a million chance that you'll find yourself
getting pure trash results if you use the public gcc to run your
program. You will then RUN, with LOVE and DEVOTION, towards Nelson
Beebe, and implore to use his library and especially his methods
explained in his book for handling basic math functions, and use them
for _every_ math function you find in those pages of expressions that
constitute your PDE.
And only then, you get results that will be in most cases good enough to
use. But hopefully not after waiting a week for each run of the
computation to end, but perhaps a few hours. Here, you've taken care of
the accuracy well enough, but the difference between asking for _one_
extra bit of accuracy, and not asking it, can be the difference between
two hours and two weeks of waiting for the run to end. So you became
more confident that you were correct in throwing your gcc away and
replaced them with mathcw codes.
So let's say you spent three months and did all that.
Now. Are you done? Of course not. Hehe :) Now, you only have the
equation of the shortest line between two general points on the
ellipsoid; i.e. a polynomial in three variables and 6 parameters for the
two points' coordinates. You give the coordinates of the two points to
it, and it gives you the equation of the shortest path between those
particular two points.
Now you're ready for the line integral. You'll find the appropriate
numerical method for it, and use it to compute the distance.
Are you done? Of course not. Even if from point 1 you can see the point
2 in your horizon, the shortest path will not be used if you begin
walking straight towards the destination that you see. The correct path
will be different, sometimes going a bit to the right of the line of
sight of the destination, and sometimes going a bit to the left of that
line of sight. But magically always ending up right at the destination
quicker than the guy who took the direct path stretching between him and
the destination he was seeing, assuming both you and him walked with
same speed!...
Even then, you're left with some cases that results aren't good enough.
There will always remain some gremlins in weird cases of the two points.
So after all that, you've tasted a case of "physics". Well, if others
had not done that work before you, you could get a master's degree in
physics with your work too :-)
I know of one "student" (he was a wealthy young guy who already owned
his own company, and his own one-engine airplane, etc) in graduate
school who solved just one nasty PDE resulting from a situation in space
science, and got his masters with it and left. If he'd stay and do two
more of such computational works, he'd get his PhD with them without
even passing the qualifying exams. But he didn't have much time. He was
always fighting fatigue. Sometimes when he was in my office asking a
question, I'd notice his eyes would begin the involuntary motion of a
micro-sleep, as he was listening to my answer. He was quite a guy
though. An enthusiast.