Message Boards Message Boards

[GiF] Transit of Mercury 2016

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]

enter image description here

The transition can be visualized like this:

dates = DateRange[{2016, 05, 09, 8}, {2016, 05, 09, 23}, "Hour"];
out = Mercury /@ dates;
ListAnimate[out]

enter image description here

Enjoy!

POSTED BY: Sander Huisman
4 Replies

enter image description here - 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!

POSTED BY: EDITORIAL BOARD

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]

enter image description here

POSTED BY: Vitaliy Kaurov

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.

POSTED BY: Jeffrey Bryant

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...

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract