Go Back Home
I built an accurate model of the solar system in Javascript in a few hours

I built an accurate model of the solar system in Javascript in a few hours

Marvin von Rappard
Data Scientist & Software Engineer

Published on Jul 23, 2025

I recently built an interactive 3D model of our solar system using Three.js and JavaScript in just a few hours with XAI’s Grok 4 model. What makes this particularly impressive is that the model includes real gravitational calculations and astronomically accurate planetary positions. The AI implemented actual orbital mechanics calculations that determine where each planet should be positioned based on the selected date. The planets follow their real orbital paths with proper speeds and distances, making this more than just a pretty animation.

You can interact with the model above, use your mouse to navigate around, change the date to see how planetary positions shift over time, and launch a rocket from Earth to Mars to see realistic travel times and distances.

You can also open it in full screen by clicking here: Model of the Solar System.

The source code is available on GitHub if you’re interested.