I would like to show my first work using babylon.js and almost the first js too.
SolSys View is a Solar System visualization program, as its name says, but it’s also an astronomical calculator for events related to the Solar System, including fairly accurate models of the movements, orientation an rotation of 35 objects, including all planets, The Sun, Pluto and most major moons.
Despite the absence of some data, such as textures, bump maps of some moons and the displacement maps of objects with complex shape, the application is fully functional (with some bugs), I hope to add the rest in the following months.
Near full scale, from ~20 km to 60 Astronomical Units.
Timespan: 1900-2100 (1800-2200 with lower precision in next version).
accuracy: <1 arc minute for planets and ~10 arc seconds for The Moon (views from Earth).
Animation mode.
Framerate: ~30 fps (20 fps in animation mode).
View of or from any object; it’s also possible to select the observation site by entering the longitude, latitude and height with respect to the first meridian, equator plane and zero level of each object.
UTC time & date, with local date view (using the right time zone in the options).
Speed of light correction respect to Earth position.
Interactive mode (only for select the main bodies from the external view).
Earth and Moon eclipses and projection of the shadows of the moons on each planet, approximated using babylon.js lighting system and detailed calculation of umbra and penumbra using other methods.
more…
I’m setting up a website and I’ll add the link in the next message, when I verify that everything works fine.
The GUI is an attempt to extend the use to mobile devices such as tablets, I am still working on it. On the desktop I have included the option to manage the time controls using the mouse wheel.
I would appreciate any comment, opinion or criticism
Although there is a lot of free source information about Solar System, from NASA, other agencies, even fans, I am having a hard time finding the displacement maps for the potato-shaped moons, but I think it’s just a matter of spending more time.
Orbital dynamics calculations have been performed using Keplerian orbits, whose parameters (semimajor axis, eccentricity, inclination, argument of periapsis, longitude of ascending node and mean annomaly ), measurements with respect to a reference plane, such as the Plane of the Ecliptic, vary slightly over time, due to the gravitational perturbations generated by the rest of the bodies.
All parameters, orientation vector and rotation depends on time, specifically on the Julian Ephemeris Date, through a series of equations and this program solve it on every selected date and time.
but I use different data sources, mainly from Jean Meeus Astronomical Algorithm, JPL Horizons, Report of the IAU Working Group on Cartographic Coordinates and Rotational Elements, and many many others.
I have been shamelessly using the NASA textures for the planets too I’m only rendering spherical bodies with them at this time, so have been spared your pain in locating the more oddly shaped textures
Cool! I was wondering about numerical integration of the calculations, but there’s no reason you can’t use a lookup to known values
Folks wondering how to download the FTP link – use powershell or bash:
The numerical integration would be very slow for this project, I have done it for the Solar System in C++ (only for planets and the Moon using newtonian mechanics), maybe one day I will make a port to babylon.js.
Curiously, it’s clearly a coincidence, in this ftp document, which really deals with the numerical resolution of the equations of motion to build the DE404/405 ephemeris models, you have, on page 3, the differential equation of each body using a general relativity aproximation.
Yeah, definitely slow I would imagine with all the n-body calculations involved! I have vague plans someday to look at using Compute Shaders in an n-body simulation but that’s a whole different ballgame!
nice! That at least gives you the correct orbit for Mercury!
I have uploaded a new version with some corrections:
Interactive mode: the focus changed when hovering over the planet sprite instead of changing when the sprite was clicked
Interactive mode: planet sprites disappear and appear again zoom depending
View from the body: mouse wheel zoom control has been added, this zoom is based on camera.fov with changes in camera.minZ and camera.maxZ to avoid Z buffer glitches
Ephemeris model: The complete Chapront-Touzé ELP2000/82 model has been added for The Moon. The program loses 1.5 fps in animation with this change, but I’m sure it can be reduced with some optimizations.
In this new test I check the behavior of The Moon seen from The Earth and the apparent libration, with average synodic month time step, showing every full Moon from the last 30 years to the present. In some frames The Moon looks dark because it’s a Moon eclipse date
I already had some parts done in other languages when I started, i mean, one code for the Jupiter moons, another for the Earth-Moon system, so it is difficult to know, but I started integrating everything in babylon.js, at the same time that I was learning , in the last days of August.