Solar System Model
Overview
The Solar System Model is a simulation project I developed using Java and Swing during my second year at Lancaster University. While not a precise 1:1 replica, the model provides a visual representation of the solar system, including all 8 planets, their moons, comets, Saturn’s rings and an asteroid belt. Each astronomical body follows its own path around the sun or orbiting planet demonstrating their dynamic orbital movement. The project was created using object oriented programming principles, allowing for easy management and customisation of the behaviour of each astronomical object.
System Mechanics
The Solar System model operates by managing all astronomical objects, including planets, moons, asteroids and comets, using an object oriented approach. Each space object is assigned specific properties such as distance from its centre orbiting point, size, colour and velocity which determine how the objects move throughout the solar system.
The model iterates through a continuous loop to redraw each space object on the solar system model, updating each object’s position based on its set velocity and current angle relative to its orbiting centre point. This allows planets to orbit the sun and moons to orbit their respective planets, while other space objects like asteroids are randomly distributed along the set orbiting path, creating a slightly different appearance on each launch. Additionally, comets follow dynamic paths, with the ability for there to be a change in velocity introducing more variety into the model.
Video Demo
Conclusion
Creating this Solar System Model project strengthened my understanding and knowledge of Java, object-oriented programming, and GUI development. Being able to apply the principles and concepts that I had learned in theory within a practical project setting was a very valuable experience. The process of simulating the movements of planets, moons, asteroids, and comets enhanced my skills in handling continuous updates and visual rendering in an application.