OpenSCAD, Programming

Animating the Solar System with OpenSCAD

OpenSCAD is my language of choice for designing objects that will be 3D-printed, but I just recently learned that it also supports 3D animation.

To familiarize myself with this feature, I decided to animate the movement of the planets in our solar system. Here’s a GIF excerpt of the animation generated by OpenSCAD; it covers about 2.5 Earth years:

solar-system

Neat, right? The axial tilts and orbital periods, speeds, and inclinations of the planets and moons are all accurate, but for visibility purposes, I scaled the size of the planets up 20x relative to the size of the sun and reduced the distance between them by 98%. The relative positions of the planets are also reasonably accurate for March 2016.

The script is available on GitHub; let me know in the comments if you’ve ever used OpenSCAD’s animation feature and what you made with it!

Standard

2 comments on “Animating the Solar System with OpenSCAD

  1. T. Kimbre Lee says:

    Dude, your blog is interesting and rad… Thank you for sharing these practical [function & form-related] projects (which you appear to actually be creating for the betterment and functionality of your home environment) despite the fact that your current location happens to be in the Siberia of North America [a/k/a: Minnesnowta- Land of 10,000 Lakes, Endless Winter, The MoA, Home of the SPAM Museum and my pride of cute, badly behaved black cats…]. Be well, stay warm, and keep up with the awesome blog entries! XD

Leave a Reply

Your email address will not be published. Required fields are marked *