- 🎨 Visual of Simulation
- 🔥 Features in Simulation
- 📝 Physics Concepts in Simulation
- 🛠️ How it Works
- 🎯 Requirements
- 💻 How to Run
- 📹 Video Details for Simulation
Walkthrough.Video.-.Elastic.Collision.Simulation.Project.mp4
- Real time animation using a timer.
- 2D representation of collisions between balls.
- Final velocity is determined from derived momentum equation.
- Includes live velocity tracker from motion.
- Implementation of wall collision detection.
- Usage of rectangle object are enhanced for contact between balls.
- Conversation of Momentum (p): m1i + m2i = m1f + m2f.
- Elastic Collisions.
- Initializes frame, final velocity, horizontal position, ball height properties for simulation modelling.
- Velocities are in same magnitude, but opposite in direction when making contact with the walls.
- Has animation with the use of Java Timer.
- Includes paint method that draws the balls in their updated positions.
- Velocity table of values is being displayed by classic print lines.
- Conditionals are implemented to check if balls are intersecting one another and used to change the value of the velocity using the derived momentum equations.
- Position of the balls are being updated from constant velocity variables declared.
- Java (JDK or higher).
- IDE (e.g., VS Code, Eclipse, or IntelliJ).
- Copy the code into a Java file named "ElasticCollision.java".
- Compile the program: "javac ElasticCollision.java".
- Run the program: "java ElasticCollision".
I plan to make a YouTube video that will showcase the history behind elastic collisions, 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 a Elastic Collision in Java (YouTube) - [Coming Soon!].