
So I decided to program a Solar System simulator in WebGL and Javascript - martimoose
http://lab.la-grange.ca/en/so-i-decided-to-program-a-solar-system-simulator
======
forktheif
Huh, looking at that Orrery, I realise my mental map of the solar system was a
little off.

I always though comets like Haley's went much further out on their trip away
from the sun, but that shows it doesn't even reach past Pluto.

And the orbits of Mercury and Mars are a lot less circular than I thought.

~~~
Pxtl
The Oort cloud/Kuiper-belt area goes _way_ further than Pluto, but the comets
that have orbits from out there into the solar system are too long-period to
get fancey names like Halley's. Think about it - Halley's comet comes by every
76 years. That's insanely short for a Kuiperoid.

------
hazz
Here's the article describing how the simulator was built: [http://lab.la-
grange.ca/en/building-jsorrery-a-javascript-we...](http://lab.la-
grange.ca/en/building-jsorrery-a-javascript-webgl-solar-system)

------
typpo
I really like how you've documented the challenges you encountered. The
"Building jsOrrery" article is probably one of the best sources on the
internet describing the process of building a full solar system viz. Your code
is also very logical and easy to follow.

I made a similar simulation that shows the inner planets and asteroids, called
Asterank ([http://asterank.com/3d](http://asterank.com/3d)). Your code is open
source, but does it have a license? I'm interested in adapting your accurate
star background for my simulation.

~~~
martimoose
MIT license. Glad to know you like it. Your project is nice as well, I like
the addition of the asteroid belt!

------
Joe-Z
for the people who came here wanting to see a solar system simulation, here's
the direct link:

[http://mgvez.github.io/jsorrery/](http://mgvez.github.io/jsorrery/)

~~~
martimoose
You're right, I should probably have posted the link to the live project
instead of the blog post. I figured that the story of why I did it is
interesting as well though.

~~~
garethadams
I was more expecting to see the link of _how_ you did it on HN. I mean I got
there from the link you posted but as this is a technical crowd I'd have
thought that was the more interesting thing.

As an aside, I'm very impressed that the Sun appears to dim during a solar
eclipse
([http://mgvez.github.io/jsorrery/?scenario=EarthMoon&planetSc...](http://mgvez.github.io/jsorrery/?scenario=EarthMoon&planetScale=1&lookFrom=earth&lookAt=moon&date=2017-08-21T18:26:40.000Z&cx=0&cy=0&cz=0&fov=45))
but I'm surprised it isn't hidden completely - have I just got the timestamp
wrong for the specific viewpoint you're using?

~~~
martimoose
I hesitated when posting the article. Maybe I should have posted the technical
one. I wrote them all in one piece, but split them afterwards for different
crowds. The one I posted is the least technical one of all, but it's the entry
point. My bad. The best scenario to see eclipses is the Inner Solar System,
and put the scale to 1. Eclipses are very difficult to simulate, as the
distances are so huge, you need to have incredibly precise positions to
observe one. But it is still possible to see them, for example at
[http://mgvez.github.io/jsorrery/?scenario=InnerSolarSystem&d...](http://mgvez.github.io/jsorrery/?scenario=InnerSolarSystem&date=2009-07-22T02:35:00.000Z&planetScale=1&lookFrom=earth&lookAt=moon&cx=0&cy=0&cz=0&fov=3.03)

~~~
garethadams
Having read the help text about the moon position I understand the problems.
It's still so damn impressive though, I didn't mean to sound critical above :)

------
jeena
That is more then awesome, I will show it to my daughter, it is funny how
different the reality is to the map of our solar system we get through
traditional media like TV.

~~~
martimoose
I'm very happy to know that this project has educational value!

------
damon_c
Looking at this, it's hard to believe that we have subsisted for so long on
the standard top down flat version of this that we have seen in books since...
Pluto was discovered. The children of the future will not have to remember
those dark days.

Solar System visualization industry: Disrupted.

------
Pxtl
For fans of this, the biggest project on this subject is traditionally
Celestia, but that's pretty long in the tooth now.

[http://sourceforge.net/projects/celestia/](http://sourceforge.net/projects/celestia/)

------
damon_c
This pretty much settles the "Is Pluto a planet?" debate for me.

------
Pxtl
I'd let the "scale planets" go to more than 100x. Even at 100x they're crazy
small when looking at a full map.

------
dodo53
Appropriate to do an orbital mechanics thing for a company called La Grange
(=> Lagrange) :oP

------
lettergram
What the author forgets is, these projects can help you gain a good
reputation.

------
The_Double
It would be really cool if this supported multitouch pan/zoom.

~~~
xixixao
It supports scroll to zoom.

------
fastaguy88
Doesn't seem to work with Safari.

~~~
martimoose
Yeah, it seems that WebGL is not enabled by default on Safari.
[https://discussions.apple.com/thread/3300585?start=0&tstart=...](https://discussions.apple.com/thread/3300585?start=0&tstart=0)

------
systematical
Awesome stuff.

------
benihana
The Apollo 8 flyby scenario is amazing. It's awesome how much this changes my
mental model.

~~~
martimoose
Thanks, this is for me the best part. To be honest, I really don't know how
realistic it is. All I can say is that I plugged in the numbers and that's the
output.

You can read about it, if you haven't already, on [http://lab.la-
grange.ca/en/showing-an-apollo-mission-free-re...](http://lab.la-
grange.ca/en/showing-an-apollo-mission-free-return-trajectory-in-jsorrery)

