Wednesday, August 10, 2016

Simulate all the planets

So I was searching for a better simulation framework for my Solar System orrery project, and somebody pointed me to three.js, a WebGL 3D-Library. It looked promising. Now it would be nice to do that with all the planets, and somebody already thought the same. Even better. Of course, while a nice simulation, the models left a little bit to be desired in terms of accuracy, so I tried upon myself to improve that. Well, see the result below for yourself. Click/tap on the buttons at left to select a model, holding down a mouse button will stop the rotation.

The bodies rotate with the same relative speed as their natural brethren, although a wee bit faster in absolute terms. The tilt agains the ecliptic is also equvalent

See some more examples here, all the planets dancing in a circle, Earth and Moon doing their thing. Check out the documentation or fork/download the threex.planets source in the GitHub repository. It also includes all the credits for the image sources.

No comments :

Post a Comment