1. News from Marble: Introducing Sun and the Moon

    Happy New Year, folks!

    Here, in Marble we work a lot on new cool features, so you can play around with the Globe and explore the world more and more. Not a secret, that each minor release Marble shows great improvements in performance and features. Today I want to show you our new previously missing feature - enhanced Sun and absolutely cool support of the Moon.

    For lazy people, who don’t really like reading all this news posts here is a quick overview of added stuff:

    • Gerhard Holtkamp’s astrolib is bundled to Marble core
    • Sun texture is scaled according to its real size (thanks, astrolib!)
    • Moon is rendered, moon phases are shown

    Marble provides a nice opportunity to observe eclipses without even standing up from your sofa. You just go for View -> Eclipses and choose the right one (only works in master now, sorry). Here is an example of Tue Apr 29 2014:

    Tue Apr 29 2014 eclipse

    A quick example of moon phases support in the Marble is 23 Jan 2014, when we have the Moon, Spica and Mars around!

    marble view

    You would probably like to compare this to what KStars gives as output:

    kstars view

    Note: distances to Mars are different, because in Marble, the Moon is 4x times bigger than it should be (otherwise it’s too small and makes no sense, however this can be changed in preferences).

    **Few words about moon phases (bonus) **

    Moon rendering becomes not so trivial as soon as you need to reflect moon phases. It should be rotated according to its actual position also, so that’s where comes astrolib (thanks, Gerhard Holtkamp!). Final rendering process looks similar to this:

    • Rotation (Moon is rotated relatively to its current position to the Earth)
    • Scaling (by default, in Marble we use 4x aspect ratio to “real” Moon size, but you possibly would like to turn it off)
    • Moon phases overlay rendering

    Let’s stop on the last step. Astrolib provides API to get information about the Moon phase in the specific moment of time:

    void SolarSystem::getLunarPhase(qreal &phase, qreal &ildisk, qreal &amag)

    Outputs are actual phase, illuminated disk and the apparent magnitude of the Moon reffered to the center of the Earth.

    Moon phases picture

    There are 8 different phases (from 1 to 8 on the picture): New Moon, Waxing Crescent, First Quarter, Waxing Gibbous, Full Moon, Waning Gibbous, Last Quarter, Wanning Crescent and then it’s New Moon again. Actual rendering process is about drawing two arcs, which is not complicated, but still needs to cover all cases and calculate angles neatly. An exported paste is published here. You also can observe it right in the source code (StarsPlugin.cpp:1130; line may be different later).

    Find your way and explore the world!

  1. binaryking likes this
  2. kovalevskyy posted this