sghuisman
(Sander Huisman)
May 9, 2016, 1:23pm
1
Hi All,
today is a special day as you can see (using a telescope) that Mercury is between the Earth and the Sun. Where is it now you are asking? Well it is right here:
ClearAll[InAUunits, Mercury]
InAUunits[dist_] := QuantityMagnitude[dist, "AstronomicalUnit"]
sd = InAUunits@StarData["Sun", "Diameter"];
md = InAUunits@PlanetData["Mercury", "Diameter"];
Mercury[date_] := Module[{p1, p2},
p1 = InAUunits@PlanetData["Mercury", EntityProperty["Planet", "HelioCoordinates", {"Date" -> date}]];
p2 = InAUunits@PlanetData["Earth", EntityProperty["Planet", "HelioCoordinates", {"Date" -> date}]];
Graphics3D[{Yellow, Sphere[{0, 0, 0}, sd], Black, Sphere[p1, md]}, Boxed -> False, ViewVector -> {p2, -p2}, ViewAngle -> 1.5*Degree, ImageSize -> 400, Lighting -> "Neutral"]
]
Mercury[Now]
The transition can be visualized like this:
dates = DateRange[{2016, 05, 09, 8}, {2016, 05, 09, 23}, "Hour"];
out = Mercury /@ dates;
ListAnimate[out]
Enjoy!
6 Likes
jeffb
(Jeffrey Bryant)
May 9, 2016, 3:11pm
2
Very nice!
One minor improvement would be to use the following LightSource so that the Sun doesn’t look like its being illuminated off to one side. Instead of “Natural”, use:
Lighting -> {{"Directional", White, ImageScaled[{0, 0, 1}]}}
This also gives the “limb darkening” effect seen when observing the Sun through solar filters. The center of the Sun looks brighter than the edges.
2 Likes
sghuisman
(Sander Huisman)
May 9, 2016, 3:18pm
3
Nice! i didn’t think about that part. This image is ‘taken’ from the center of the earth, changing it to another position might be a nice addition as well but will involve some geometry I was too lazy to do…
Vitaliyk
(Vitaliy Kaurov)
May 9, 2016, 3:29pm
4
Nice, @Sander Huisman ! Just added @Jeff Bryant suggestion and stacked the images:
dates = DateRange[{2016, 05, 09, 8}, {2016, 05, 09, 23}, "Hour"];
out = Mercury /@ dates;
Show[out, ImageSize -> 800, Background -> Black]
2 Likes
another post of yours has been selected for the Staff Picks group, congratulations !
We are happy to see you at the tops of the “Featured Contributor” board . Thank you for your wonderful contributions, and please keep them coming!
1 Like