microsoft / GalaxyExplorer

Galaxy Explorer is the application Microsoft is building as part of the Share Your Idea campaign.
MIT License
947 stars 331 forks source link

Earth vs Moon rotation rate tweak #38

Closed alwinv closed 8 years ago

alwinv commented 8 years ago

This change makes the moon orbit slightly more realistic. It now orbits once (speed=-2.5) for every 4 earth days (speed=-10).

Previously, the moon went around twice (speed=-10) for every earth day (speed=-5), which is the opposite of how it happens in real life (moon orbits once every 27 earth days).

The 4:1 ratio is a compromise. Slower moon orbits would make it less likely users would see the moon and faster earth rotations would make it harder to look carefully at the beautifully rendered earth, and might start impacting the smoothness of the animation.

With the current moon speed, a passive viewer would see the initial animation, which zooms up to the earth with the moon swooping by in front, then as the narration is finishing, they see it enter the field of view again as it passess behind the earth.

PS - If you like the change, you can thank my son Karl, who spotted this "problem" when I first showed it to him.

msftclas commented 8 years ago

Hi @alwinv, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

alwinv commented 8 years ago

Issue #37 would be improved by this change. Feel free to cherry pick the 3rd commit with the actual rotation changes so you don't have to update the project to the 5.4.0b24-HTP Unity editor version.

msftclas commented 8 years ago

@alwinv, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, MSBOT;

ThitherCrane commented 8 years ago

At -10 rotation, the Moon completes 2 orbits around the Earth. But since one orbit takes 29.5 days, hence Rotation Speed in Constant Rotation script should be -10/(29.5*2)= -0.169. I think that figure would result in more realism in the animation.

timGerken commented 8 years ago

Additionally, can you rebase your commit so only EarthView.unity is in the PR?

ThitherCrane commented 8 years ago

Alwin: you suggested the following: "Sped Earth's spin by 2x: EarthView scene's "EarthUpCloseWireframe" & "EarthUpCLose" Constant Rotate Axis script's Speed value from -5 to -10"

I experimented with different Speed values in EarthView scene's "EarthUpCloseWireframe". It seems to me that changing Speed here results in no impact on the animation. So why make the change?

I also experimented with Constant Rotate Axis script's Speed value. Here changes in Speed do affect the animation. But the question stands: why make the change in the first place? My reasoning is that the suggested change would result in increasing the rate of spin of Earth around its axis but that has no impact on the lunar month (29.5 days), which is the object of this discussion in the first place.

ThitherCrane commented 8 years ago

Alwin: You suggested the following: "Slowed Moon's orbit by 1/4: EarthView scene's "SelfRotate" object's Constant Rotate script's Rotate Speed "Y" value from -10 to -2.5"

Above I showed how the change should be from -10 to -0.169. Please show how you arrived at -2.5.

timGerken commented 8 years ago

Here's the math I used: Earth's rotation speed = -10 Moon's rotation around the earth: 27.32 days -10 / 27.32 = -0.366

This makes for a very long experience to watch a complete lunar cycle. I actually went through the entire experience in unity's play mode. I started with the moon centered over Africa. Watched the earth make 27 complete rotations. After 27 rotations, the moon passed centered over the earth again (finally!) somewhere over Central America.

Striking a balance between physical reality and an interesting animation is difficult. A better direction might be to add a "Realistic view" toggle to the EarthView similar to what the SolarSystem has.

Thoughts?

ThitherCrane commented 8 years ago

Hi Tim. You used Sidereal month (27.321 days) while I used Synodic month (~ 29.5 days). It's unclear what units the -10 carries. I made a similar observation of yours (Horn of Africa disappearing then reappearing) as cue. My observation obviously supports the hypothesis that at-10 the Moon orbits Earth twice. Hence my suggestion that the -10 should be adjusted to -10/(29.5*2)= -0.169. I wonder whether Unity has features allowing testing the validity of code. My impression is that the definitive answer to our dilemma lies in developing Unity code that predicts the Moon's phases. Testing that code against reality would settle matters.

timGerken commented 8 years ago

Interesting. I started -10 as the value @alwinv suggested for ConstantRotateAxis.speed. It is basically a constant that controls the speed at which the Earth rotates in the animation (see ConstantRotateAxis.Update()). I couldn't identify any correlation between it and anything the moon actually does IRL.

ThitherCrane commented 8 years ago

I think the 10 is important because it is directly proportional to the rate of spin of Earth in the animation. In other words, choosing 10 in the animation makes the Moon move in one hour the equivalent of 2 hours of Earth's normal time. My conclusion is that the adjustment should be : -10/(29.5 * 2)= -0.169. If I use Sidereal month (27.321 days) then the adjustment would be -10/(27.321*2)= -0.183. Sorry for the confusion.

timGerken commented 8 years ago

@ThitherCrane, If you're going to use hours for Earth's rotation, you'll also need to use them for the moon's orbit.

Realism isn't the goal of this PR, the model is more illustrative (show the moon orbits the earth and isn't phase locked).

@alwinv, please rebase your original commit so only EarthView.unity is being submitted.

ThitherCrane commented 8 years ago

http://astroquizzical.com/astroquizzical/why-do-we-only-see-one-side-of-the-moon “The moon rotates around the Earth at the exact same speed as it rotates around its own axis.”

I agree that the model is illustrative. So the question now is whether an adjustment should be made to the 10 or not. Personally, I would like to see the animation describing the Moon’s movement in context of the Solar System. Better still, I would like to see the Earth’s movement in relation to the Milky Way’s movement. But that would be another topic altogether.

alwinv commented 8 years ago

Ready - rebased so only the rotation changes to EarthView.unity are in the PR now