Thursday, February 27, 2020

Contact

Back to the circling planet anim. Decided to pare down on reporting
by adding a condition: System.out will only run if Earth has crossed
to the left side of the Sun (thanks to cos(x) becoming negative).  It will
report in if the x-coordinate is between 256 and 252.



So now I know that it takes 3.9... seconds for a complete orbit around the Sun.

About to add Mars to the picture, and would like to contact them on every turn.
Problem is 3.9 seconds is an approximation, and I risk getting out of synch over time.
I need to make contact during the System.out window!!!

                                                   *     *     *

The mythological Mars is a powerful symbol: he was the god of War.
He also stood for youth, and fertility. The current symbol of the masculine
is actually the spear and shield of Mars.


War was actually a season in ancient Rome, and it coincided with
warmer weather, between the months of Mars and October. It is
the 'business' of war that kept Rome prosperous.


source: Wikipedia

                                                                *     *     *

So now I have Mars making a short appearance in the on every turn of the orbital.
It's a lie, Mars takes close to twice as long as Earth to orbit the Sun: 687 days as opposed
to 365. From a coding perspective, there is nothing to multiply by two to make skip a
turn...Arg! The alternative would be to make it go across space on its own timetable...
Anyway, enjoy:



*     *     *
My little two-planet syste. In point of fact, Earth travels at 67,000 maph around
the Sun while Mars travels at 53,979...




                                    *     *     *

Half the battle: I know what the problem is. Because the program draws
from the top left corner parameters, for both images and shapes, putting
that x, y on rotation is always distorted as the far side gets in the way.

Below, a bull's eye pink circle where I have compensated by half the width
and height values!!




No comments: