Mae Horak Final Project Coding 1 "Model of The Solar System"
https://github.com/mkh7878/creativecoding1finalproject/upload/main
https://mimicproject.com/code/9b7d58aa-caa0-db8c-fd24-b43cc46ca6cf
https://www.youtube.com/watch?v=sSzD9KBq4MM&feature=youtu.be
My final project is a model of the solar system created in THREE.js. I began this project as a homework assignment where I created a box with stars in the background, a sun in the centre and the earth orbiting the sun. The sun sits directly in the centre at (0,0,0) and this point is used as the point around which all the other planets orbit. The box in which the solar system exists is 100x100 units (leaving some space to expand the project in the future!
The size of the sun and each planet is not to scale because I wanted the project to easily fit on screen and for the user to be able to interact with each planet. For example, in reality it would take 1.3 million earths to fill up the volume of the sun. The immensely variable proportions in astronomy did not lend themselves to creating an easy scale model of the solar system, so I scaled them to make them easier to interact with. For example, when I tried to make Mercury the correct scale to the sun, it was nearly impossible to see. I would like to work more on this project in the future and create a to-scale model. I would also like to add moons orbiting each planet, and perhaps some asteroids.
The rotation of each planet was also calculated in relation to earth. For example, a day on Jupiter is only 9.95 hours, and so the rotation is more than double the speed of the rotation of the earth. The same goes for the speed of the orbits, or the length of years on each planet.
The planets start out in a straight line and as time goes on they spread out.
The texture of each planet was made using maps of each planet. I photoshopped each map so that it would lay seamlessly on each sphere by downloading a map of each planet, then shifting them and using the blur, clone stamp and/or the spot healing brush tool. I did try using an mp4 video of the sun's surface to animate the sun, but it looked a lot less realistic than the photo so I decided against it.
In the future I would like to do more with this project by making the planets and each sun to scale. I spent quite a long time trying to make a moon that orbited the earth, but struggled to find a way to have something orbit around a moving point. I also would like to add rings to Saturn and Uranus. The actual planets also have slightly elliptical orbits, so I thought that might be interesting to experiment with as well. I did read that unfortunately THREE.js is not able to calculate shadows in a way that would create eclipses (the light radiating from the sun casting shadows of planets on the other planets), but that would be something to look into more in the future as well.
This was my first time using THREE.js and I look forward to doing more in the future.