For the careful consideration of Professor Lauer I present: Ungraceful Pong!! The purpose behind this project was to answer your challenge call with the hopes of improving my grade. A lot of work was put into this (as you may probably be able to determine from the code) so I hope you like what you see. It took hours of work and frustrations trying to make Python work the way I wanted it to. The first thing to discuss is opening running the program. To access the files, download the attached document, unzip it, and open it. Click on the second folder "Pong" and then open this folder. All the files will now be available to you. To simply run the program and see what happens, click on the testPong1.py file. This will run an instance of the script without bringing up the actual module and displaying the source code. To do this, you need to open the files in the IDLE GUI (at least on my computer.) When you play the simulation, a couple of things should happen: the balls (already in motion) should me zipping and bouncing around; they should collide once; they should continue bouncing around until the simulation ends. What you should notice right off the bat is that one ball is moving much faster than the other, with the velocity measured in pixels/sec. When the balls collide, there is a transferance of energy and the balls have new directions and velocities. This mimics a (near) perfect elastic collision in a vaccum. So you may be wondering, "Does this really follow physical law?" Well, let's examine. Newtons Laws of Motion: 1. An object at rest stays at rest unless an outside force great enough to set it into motion is enacted upon it. In this case, the balls were already in motion and even after the collision they stayed in motion. Why is that? Because in a vaccum, as we've establlished these balls exist in, there are no outside forces acting on the balls. Gravity is not acting on them (save for the gravitational attraction they have to each other, which need not be considered as it would not stop them. There are no large bodies, save the walls which we could assume they are also attracted to but elastically colliding with, to stop them. And there is no drag. With all of these forces essentially absent in a vaccum, the balls are free to move continuously until an outside force is able to stop them. 2. F=ma Acceleration is the derivative of velocity or the change in velocity over time. Notice that when the balls collide, the faster balls slows and the slower ball speeds up. This means that the slower ball accelerated and the faster ball deccelerated (or accelerated negatively). This will become important later in our analysis. 3. For every reaction, there is an equal and opposite reaction. Notice that the balls do change direction and speeds when they collided. One ball didn't just keep all of its speed and momentum and continue going. Impulse Momentum Theory Basics note: Force (F=ma) can also be written as dp/dt=ma where p=mv = linear momentum. Therefore, force is the change in momentum over time. Since acceleration is the derivative of v, velocity, dp/dt=mdv/dt. Therefore, dp=mdv. This shows Newton's 2nd law in a very simplified, general form. There is a quantity known as impulse, which is the integral of force over a period of time. Why do we care about this? Because it determines the transfer of energy from one ball to another during a collision. Due to the conservation of energy (covered next) and the convservation of momentum: m(vA1)+sum(integral(F*dt))=m(vA2) mA(vA1)+mB(vB1)=mA(vA2)+mB(vB2) For an elastic collision Applying these formulae, we will find that during the collision, momentum is transferred from one ball (the faster one) to another, which means that energy is also transferred. And because the balls are in a vaccum, the is no additional energy loss due to non-conservative forces such as drag. Conservation of Energy In a vaccum, or any other perfect/ideal system in which outside forces do not play a factor, energy is conserved. Now the consideration doesn't mean that if the system is non-ideal energy is not conserved; it simply means that some of it is lost as heat, thus it doesn't show up in the final equation: K1+sum(U)=K2 where K is the kinetic energy (K=(1/2)*m*v**2) and U is the potential energy in the system (U=mgh (U is actually dependent on the system)). In our situation, since the balls are fully in motion, the potential energy is equal to zero. Why is this? Because potential energy is the energy a system has by virtue of its location. Kinetic energy is the energy a system has because it is in motion. When a system goes into motion, it's potential energy transfers into kinetic energy and vice versa. Thus, the energy each ball keeps the same amount of energy throughout the simulation until a collision with another moving mass occurs. So what does this all mean? Well, a couple of things really: 1. The balls in the simulation move the way they do because there are no outside forces acting on them (the simulation exists inside of a vaccum). 2. The balls in the simulation change in velocity when they collide because energy was transferred in the impulse when they collided elastically. Given these considerations, one could say that the balls do in fact follow physical principles. P.S. The angles act in the way they do based on whether the collision is oblique or in-plane. In plane means dead on, oblique means at an angle. Mervyn A. Larrier, Jr.