cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

One Bouncing particle in a 2D box,

ptc-4735478
1-Newbie

One Bouncing particle in a 2D box,

Attached is what I have, I just want to numerically calculate position of a bouncing particle (elastically) in a 2D box at constant speed. Anyone can let me know how to overcome the problem that prime does not allow unit in x and y axis in the 3D plot? And does anyone know how I can make an animation of the trajectory of the particle in the 3D plot?

And would anyone suggest how I can achieve what I have done in the file using different approach? such as a better way to write the program or something with less programing. Please enlighten my mind.

Thanks a lot

31 REPLIES 31

Might be easier just to treat the walls as if they were particles of infinite mass and zero radius - see attached.

Alan

Edited to replace the worksheet with a corrected one.

This is an excellent method. Truely learned something today. How come I did not think of this way..This is such a simple way to look at the problem. And I just love odesolve now. making it so much easier.

But I still do not know what is wrong with my program....really hope someone can identify the error...why does not the particle interact in my program....

attached is the final sheet, just added a trajectory to alan's sheet.

I found it quite interesting to look at the animation with my numerical program without ode and the one alan posted using ode. The two differ from each other due to how we model the wall interaction. But at least the two agree at small frames number

Henry

Top Tags