[VA] SRC #012f - Then and Now: Angle
|
05-04-2023, 06:31 PM
(This post was last modified: 05-04-2023 07:36 PM by J-F Garnier.)
Post: #4
|
|||
|
|||
RE: [VA] SRC #012f - Then and Now: Angle
I'm impressed by the performance and quality of the solution from Fernando.
He found all the 6 shortest paths, as far as I can verify them, and some were not easy to catch. There are probably many more, but much more complex and longer. At first, I was not sure that integrating the motion equations would work well, because the trajectories are likely to be chaotic. Small changes in the initial angle may produce radically different trajectories, also going too close to a star may produce large acceleration, so integration may not be accurate enough. So my analysis was looking at other aspects. One aspect was to consider that the particle (the planet) was free, so the sum of its kinetic energy v²/2 and potential energy (sum of the -1/di quantities for each star at distance di) must be constant. This gives the value of the final speed: Initial energy (vi=1 speed) = 1/2 - ( 2/sqr(5) + 1/2 + 2/sqr(10) + 1/3 ) = -1.860 Final energy (vf speed) = 1/2*vf^2 - ( 1/1 + 1/2 + 1/sqr(2) + 2/sqr(5) + 1/sqr(8) ) we get final speed vf = 1.786 Also, since the energy is negative, the planet is bound to the star system and can't escape and may, soon or later, cross the position (4,1) possibly many times. However, I didn't come to anything really useful for a full solution. So I was wrong, motion integration was the way to go, and my (small) contribution here will be a few optimizations of Fernando's program. I noticed that some time consuming fine searches were useless. I added these 2 tests to avoid them: - a consistency check of the final speed against the value I calculated above, this protects against some cases where the trajectory goes too close to a star and the integration becomes completely wrong:
J-F |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)