Extra Credit #4

Up to 3 Points

Make a simulation of 1000 particles trapped in a 2D box. Give your particles a Maxwell-Boltzmann velocity distribution with intitial particle directions chosen from a uniform distribution on 2pi. Make the simulation have reflective boundary conditions. This means if a particle hits the wall, it is elastically reflected back like a rubber ball. Choose your timestep and box size wisely. Running your code should generate a display of moving particles for ~ 10 seconds. Indicate the actual (physical) elapsed time using the 'text' function since \animation probably won't be running in real time. Annotate your code well.

Submit your files through the learn system.