About this Simulation

This interactive simulation models the collision dynamics of two balls bouncing within a four-wall container. Learners can observe real-time interactions, adjust ball properties, and explore how momentum and energy transfer during collisions. The JavaScript code was generated using ChatGPT, demonstrating AI application in physics education.

Learning objectives: Understand elastic and inelastic collision mechanics | Analyse momentum conservation in multi-body systems | Observe how initial conditions affect collision outcomes



Title and author:

Using ChatGPT to generate JavaScript function to create a 2 balls Collision with 4 walls simulation
Logo

author image author image author image weelookang@gmail.com; Francisco Esquembre; Felix J. Garcia Clemente