- Video Clip of Simulation
- Visual of Simulation
- Features in Simulation
- Physics & Math Concepts in Simulation
- How it Works
- Requirements
- How to Run
- Video Details for Simulation
- Coming Soon!
- Coming Soon!
- Real time animation using a timer.
- 2D representation of planet orbits in our solar system.
- Motion of planets are broken into horizontal and vertical components.
- Implementation of attraction force between different planets.
- Includes estimated real masses of planets.
- Newton's Law of Universal Gravitation (Fg) = G * m1 * m2 / r_2
- Trigonometric Functions (Sine, Cosine, & Tangent).
- Planet class defines other planets orbiting around the sun.
- Paint method draws the plants onto the frame with their specific positions and colors.
- Velocity of planets are updated from Newton's Law of Universal Gravitation, which then is updating the position variable for each planet.
- Programs initializes variables for each planet and window screen.
- Has animation with the user of Java Timer.
- Sets a PlanetOrbitSimulation panel, which is extended in the JPanel from the public class.
- Java (JDK or higher).
- IDE (e.g., VS Code, Eclipse, or IntelliJ).
- Copy the code into a Java file named "PlanetOrbitSimulation.java".
- Compile the program: "javac PlanetOrbitSimulation.java".
- Run the program: "java PlanetOrbitSimulation".
I plan to make a YouTube video that will showcase the history behind planet orbits, more deep explanation of how I programmed the project, and share general physics knowledge relating to the topic. This video will help give me a reflection on what I learned and for others who are interested in this particular subject and simulation :D.
Video Link of Simulating Planet Orbits in Java (YouTube) - [Coming Soon!].