Question: Write a Python code that simulates this process using an Euler step with a time step dt = 0 . 0 2 to update the

Write a Python code that simulates this process using an Euler step with a time step dt =0.02 to update the position vectors
given by equation (1). Make sure that the interaction between the balls and the walls as well as between each other is correct.
You may want to set up clear simple examples where you check that those are indeed correct (justify your choices). Then, take
a pool table with dimensions [0,1]\times [0,1]. The radius of both billiards balls is r =.05. The initial velocity vector is (.1,.5)
for the red ball and (.11,.2) for the blue one. The original positions are (.75,5r) for the red ball and (.25,5.5r) for the blue
one. Take \alpha =.8 and \beta =.98. Run the simulation from t =0 to tfinal =50 and display the balls motion.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!