NinjaMario
04-24-2006, 07:31 PM
Before you read: This is a very detailed tutorial, so I suggest that you read up to the part where I list the six sections of this tutorial, then look at the links and pictures to get a brief overview. At that point, if you’re still eager to understand the pictures, by all means continue! For those of you who are new to physics, I recommend that you read no more than one section per day. Theres a good two weeks of material covered in this tutorial.
Also, thoughtful comments are greatly appreciated (put plenty of time into this). I've learned what I needed from my tutorials, so I've halted the project. However, out of respect for the community, if enough people request me to continue, I will. At any rate, enjoy!
FPS = Frames Per Second (4FPS would be four frames per second)
PPF = Pixels Per Frame
Force and Gravity
Did you ever wonder why your some of your movements seem choppy and unnatural? This tutorial will show you how to simulate gravity, and apply the concept of force to make better movements. Following this tutorial might add time to your animating process at first, but becoming familiar with this concept can make it a few times faster in the long run.
(Click to see animation)
http://img288.imageshack.us/img288/5950/physicstest29oy.th.gif (http://img288.imageshack.us/my.php?image=physicstest29oy.gif)
In this animation, there are several things to explain, so I’ve divided the tutorial in to several sections:
1) Gravity
2) Breaking force into components
3) The center of gravity
4) How to catch gracefully
5) Collisions, momentum, and friction
6) Test: Where and when does physics fail in this animation?
Section 1: Gravity
(click to see animation)
http://img270.imageshack.us/img270/1438/physicstest19fa.th.gif (http://img270.imageshack.us/my.php?image=physicstest19fa.gif)
Does this look too fast? The thing is, gravity pulls at 9.8 meters per second squared. This means that after one second, the ball will have dropped (9.8 meters) * (1 second) * (1 second) = 9.8 meters. After two seconds, it will be: (9.8) * (2) * (2) = 39.2 meters. This animation shows how fast gravity looks if the stick is the average human size (1.7 meters).
To see a great example (this is my favorite animation on stickpage, created by ZACKHIX and PURECHI) of how gravity should look, try http://www.stickpage.com/ungluedplay.shtml. His physics are very impressive; it’s over 95% accurate.
Simulating gravity:
http://img270.imageshack.us/img270/764/acceleration9jr.gif (http://imageshack.us)
Simple enough pattern, right? This is how you move an object given any constant acceleration X. Starting with acceleration X, you move it down X, then 3X, then 5X, etc. For the animation above, I used a 4PPF (four pixels per frame) acceleration for the ball on the left, and a 2PPF for the one on the right. For the 4PPF, X=4, therefore it moved 4 pixels, then 12, then 20, etc. These were both done at 16 FPS for my animation above.
Eyeballing it: (This is only for either a vertical or horizontal acceleration. Acceleration at an angle is explained later.)
Acceleration is actually very easy to estimate. Without understanding anything I wrote before, you can follow just these two steps to simulate a constant acceleration:
Step 1: Move your stick the same distance as you did the previous frame (as in previously if you moved it one ball length, move it a ball length again).
Step 2: Add twice the unit of acceleration (as in if you want the acceleration to be 2PPF, add 4 pixels). Remember that even a very small movement here can have a huge result. The faster ball was only using a 4PPF acceleration at 16 FPS.
Note: What if I didn’t move my animation the previous frame? Then skip steps one and two, and just move your stick one unit of acceleration.
How do I compensate for a different FPS rate? Simple. A 4PPF acceleration at 16FPS is the same as a 16PPF acceleration at 8FPS, or a 1PPF at 32FPS. Notice the pattern? Take 16 (if you’re judging your acceleration off of my example), divide it by your frame rate, square it, then multiply it by your acceleration rate. I.E. 16/8 (my new frame rate) = 2. 2*2 = 4. 4*4(my acceleration rate) = 16.
Final note on gravity: Gravity does not depend on weight, but it does depend on a weight to surface area ratio. A bowling ball and marble will fall at the same rate, but a bowling ball and a piece of paper obviously will not. However, most objects take several seconds after a free fall to reach their terminal velocity, so you won’t need to worry about its for the most part. If you want to know how it works, think of it as a force that increases with velocity. If it takes 5 seconds to reach your terminal velocity, it means that it will take 5 seconds for air resistance to hit G (G = Gravity = 9.8 meters / second squared). A simple approach would be to make air resistance .2G at the first second, then .4, .6, .8, and finally 1. This mean your object will accelerate at 10 meters per second, then 8, 6, 4 ,2 , and finally 0. I doubt this will come up, but it’s something that plagued me for my entire first year of physics, so I thought some people might want to know how to do it.
Section 2: Breaking force into components
Look at the top middle ball in my first animation, and notice the curved pattern it makes while falling and rising. When something is in midair like that, there is only one force acting on it: gravity. That means vertically, it will follow the pattern as shown above. But what about horizontally? Since there are no horizontal forces acting on the object, it maintains a constant horizontal velocity. (Think about something in space. If you pushed something out into space, it would travel indefinitely at the same speed, unless it collided with space debris or came across some significant gravitational pull.)
http://img255.imageshack.us/img255/800/components6jd.gif (http://imageshack.us)
Remember, the horizontal component remains the same, so each time it moves some distance Y, despite the fact that the vertical movement it changes each time. The point is that you must break down your movement into two components.
Note: Generally in physics, the X component refers to the horizontal component and Y to the vertical. Sorry if this causes any confusion.
Concept question 1: If you fire a bullet horizontally, how long does it take to fall? (Answer: The same amount of time as if you dropped it. Remember, horizontal motion has no impact on vertical!)
Concept question 2: What if you shot an arrow at a 45 degree angle? Then how long does it take? (Answer: This one’s slightly more complicated. Let’s say you shoot it at 30PPF. Initially, it would travel horizontally at the same speed as it does vertically, which is roughly 21PPF vertically and 21PPF horizontally. If gravity was a 4PPF acceleration, it would travel vertically upwards 21,13,5, then downwards 3,11,19,etc. Horizontally it would travel 21,21,21,21,21,etc. until it hit the ground. If it were at an 80 degree angle, it’d be around 27PPF vertically and 13PPF horizontally. If you want to know how to do this, you need a calculator. Take sine of the angle and multiply it by the speed to find the vertical component. Take cosine of the angle and multiply it by the speed to find the horizontal component.)
Section 3: The center of gravity
This is nice and all for balls moving around, but what about making the stickmen move? This is where the center of gravity plays its role. If you shot a person out of a cannon the same way that the arrow was shot in the second concept question, his center of gravity would follow the same path of the arrow no matter what he did in mid air (air resisted neglected). The only thing you need to worry about, then, is how to find the center of gravity.
(click to enlarge)
http://img246.imageshack.us/img246/3509/cog5es.th.gif (http://img246.imageshack.us/my.php?image=cog5es.gif)
Finding the center of gravity:
The first thing that you might have noticed is that the center of gravity doesn’t need to be on the person. Unfortunately, precisely finding the center of gravity would involve a series of complex integrals, which is so incredibly not worth your while that I’m not even going to explain how to do it.
Instead, just notice that the center of gravity is just as you’d think it would be: the point at which all matter above and below that point are equal, and where the matter to the left and to the right equal. Note that matter refers to weight, not size. If you had a balloon attached to a bowling ball, the center of mass would be right next to the center of the bowling ball, but slightly towards the balloon. Continuing on, what I’ve provided are estimates as to where I think it would be given that the body segment should weigh more than the legs and arms. To be honest, you probably don’t need to worry about the weight of the segments as long as you’re consistent.
Concept question 3: If you were in mid air and someone threw a ball that would hit you on your lower stomach, how would you dodge it? (Answer: This is similar to throwing it at the blue circle on the left most stick in the picture above. If he moved his arms and legs to the left as shown in the middle stick, the ball would then completely miss him.)
Concept question 4: If you were going to jump over a bar, could you do it without ever having your center of gravity go over it? (Answer: Yes! Watch the Olympic high jump and you’ll see how it’s done. In the beginning the arms go over the bar, and then the body makes an upside down U shape, kind of like in the stick on the right. To finish off, the arms are pulled out to help rotate the body for the legs to come over without hitting it.)
Section 4: How to catch gracefully
This barely deserves its own section, but notice how in the animation on the top, the entire ground moves to catch the balls? Those balls could’ve been eggs and not have cracked because they followed these steps:
Step 1: The catcher must move at just about the same speed as what it’s catching once contact has been made. When the balls were reaching the ground, they were traveling about 50 pixels per frame.
Step 2: Once contact has been made, it must decelerate slowly enough as to not crush what it’s catching. This is actually very easy to do. Just don’t try anything crazy like a 40PPF, which for that animation would’ve been a 10G (10 times the force of gravity), deceleration.
Concept question 5: On the way up, the ground accelerated upwards at 10PPF, and then traveled at the fastest possible deceleration it could to keep the balls on the ground. How fast was that? (Answer: It had to decelerate at the speed of gravity, which was 4PPF. Doing this made it so that the balls exerted no force on the ground until it stopped decelerating at its resting point.)
Section 5: Collisions, momentum, and friction
This section deserves a tutorial in its own, so I’ll just be briefly over viewing the concepts.
Collisions: There were plenty of collisions in this animation, mostly with the balls against the ground, but also when they collided with each other. The thing the top middle ball did that doesn’t happen in real physics is that it made perfectly elastic collisions with the ground and wall. This means that it lost no energy once it struck the ground, so it bounced back with the same velocity with which it hit the ground. When the stickman fell down, he shook the ground and “physics” were turned on. After that, it lost horizontal velocity each time it hit the wall and vertical velocity each time it hit the ground.
http://img198.imageshack.us/img198/9400/bounce0ki.gif (http://imageshack.us)
Pretend your object sits on top of one of the red balls. If it bounced, the height it would reach would be the red ball to the right. Notice how the lower the ball higher the ball sits, the more distance it loses, but the velocity loss is the same. The amount of velocity it loses is actually up to you, just make sure the amount of velocity it loses is about the same each time.
Momentum: This would take forever to explain mathematically, so I’ll just provide a few concepts:
1) Everything that moves has energy, which is mass times velocity squared. This means if one object was traveling twice as fast as another object, it’d have to be 4 times as small to have the same energy. Let’s say these two objects hit each other and made a perfectly elastic collision. This means no energy was lost; therefore they’d reverse their direction, but maintain their initial speeds. With a perfectly elastic collision, they’d both stick together and completely stop moving.
2) Assume two objects had the same mass, but one was moving upwards twice as fast as the other which was moving to the right. If they made a perfectly elastic collision, they would trade directions and velocities. If they made a perfectly inelastic collision, they would both travel up-right (it would travel faster up than it would right) at a speed that was the average of the two velocities.
http://img198.imageshack.us/img198/453/collisiongif2xt.th.gif (http://img198.imageshack.us/my.php?image=collisiongif2xt.gif)
(This is a picture of two identical energies making a perfectly inelastic collision)
Friction: You might’ve also noticed that when the balls stopped bouncing, they rolled but slowed down despite not hitting anything. This is caused by a type of friction called rolling friction, which like gravity, is a force. Friction doesn’t depend on the speed, the weight, or even how much surface area is touching the ground. Friction only depends on the type of material it is: If you use a 1PPF deceleration on ice, you’d want to use a much higher, maybe 5PPF deceleration on rubber. Very high frictions will create a lot of torque on its object, and if it isn’t compensated for, can easily cause the object to flip over (think about trying to slide on ice versus sliding across your driveway). This torque is caused by the horizontal force, which is exerted below the center of gravity.
Concept question 6: In #2 of the momentum section, why didn’t the velocity slow to below the average of the two velocities? I thought the collision was inelastic, which meant 100% energy loss? (Answer: Components! One was traveling in the X direction, and the other was traveling in the Y direction. Since the X and Y directions are independent, no energy was lost. It is important to consider that the net energy will remain the same after any type of collision. If two equal energies are collide directly with each other, their net energy before the collision is 0. This is because one energy is positive and the other is equal but negative, therefore the energies cancel each other out.)
Concept question 7: What if they traveled straight at each other, one going twice as the other? (Answer: When they collide, both balls lose the energy of the first ball. This means the first ball first ball gets its speed cut in half and the second ball losses all of its speed and becomes stationary. However, the first one must now drive the second ball because they’re stuck together. With twice the mass, the speed becomes cut in half again, making the two masses traveling one fourth the speed of the faster one, in the direction of the faster one. Again, the net energy remains the same.)
Section 6: Test: Where and when does physics fail in this animation?
Well, it’s time to see what you’ve learned. Have fun!
Problems with my animation before the stickman falls:
Leftmost ball:
Most inanimate objects cannot fly. Therefore, its horizontal movement works against physics with every frame because it’s constantly accelerating and decelerating, yet no horizontal force to act upon it. Vertically, the ball accelerates and decelerates with the force of gravity. This means that vertically it is actually ok when it’s slowing down moving upwards, and speeding up moving downwards.
Bottom middle ball:
Same as the leftmost ball.
Top middle ball:
It makes perfectly inelastic collisions with the wall and ground. In fact, sometimes it even gains a little energy from the wall, as you might’ve noticed by its inconsistent landing positions.
Ball on the right:
Nothing! Physics were fine here. (granted a relatively small room for error)
Stickman:
Again, nothing was wrong. Be sure to watch his center of gravity, which follows a curved path downward. It might’ve thrown you off because contrary to what people do in real life, he chose to slightly jump off his planted foot to worsen the fall. (Again, it’s hard to precisely estimate the center of gravity, so it might be off a couple pixels here and there.)
After the stickman falls, “physics” was turned on. Or was it?:
Leftmost ball: This was fine except for one thing: When it made collisions with the ground, it was losing a fixed distance, not a fixed velocity. This is wrong because the harder it hits, the more energy it losses. However, with a fixed distance loss it actually losses more energy with the smaller hits.
Bottom middle ball: Same as the leftmost ball.
Top middle ball and Rightermost ball These were fine.
Extra Credit: A while ago, I mentioned that my favorite stickmovie was over 95% correct with the physics. Can you spot any errors? (http://www.stickpage.com/ungluedplay.shtml)
Most inconsistencies in physics were with gravity, but were done for effect, which worked beautifully. For that reason I’m going to provide two hints:
Hint #1: Who they are
a) The green colored guy who is the last to get hit with the sword.
b) The white colored guy with the charge gun who kills the guy with the sword.
Hint #2: When they did it
a) The last time he used his zip cord
b)The second time he fires the gun
Answers:
1) The last time he used his zip cord, he traveled directly to it. However, that could only happen if the force driving him upwards was the same as the force driving him to the left. There are two forces in play: 1 was gravity, the other was the pulling of the cord. Since the cord was a force at an angle, it had both a vertical and horizontal component, whereas gravity has a vertical component in the opposite direction. Since there was no horizontal component to counter that of the zip line, the only way to move straight to it would be if his zip cord was shot at greater than a 45 degree angle to compensate for gravity. Since it wasn’t, he should’ve been accelerating more to the left, which would’ve caused him to rotate to the left as he moved upwards.
2) Same concept. Firing the gun at an angle gives him two components of force. The only way he could remain suspended in one spot would be to fire straight down. Since it was angled to the left, he would’ve started accelerating to the right.
Conclusion: It doesn’t matter if you missed most of the concepts in this tutorial. Just remember this one rule: Force is the only thing that can change motion. When you walk, run, jump, punch, or kick, remember that your movements must accelerate, so the first movement is always a small one, and should have a steady increase until it reaches its top speed. Also, when you are in mid-air, the only force that’ll be on your character 90% of the time will be gravity, so the horizontal speed of your center of gravity can’t change.
Also, thoughtful comments are greatly appreciated (put plenty of time into this). I've learned what I needed from my tutorials, so I've halted the project. However, out of respect for the community, if enough people request me to continue, I will. At any rate, enjoy!
FPS = Frames Per Second (4FPS would be four frames per second)
PPF = Pixels Per Frame
Force and Gravity
Did you ever wonder why your some of your movements seem choppy and unnatural? This tutorial will show you how to simulate gravity, and apply the concept of force to make better movements. Following this tutorial might add time to your animating process at first, but becoming familiar with this concept can make it a few times faster in the long run.
(Click to see animation)
http://img288.imageshack.us/img288/5950/physicstest29oy.th.gif (http://img288.imageshack.us/my.php?image=physicstest29oy.gif)
In this animation, there are several things to explain, so I’ve divided the tutorial in to several sections:
1) Gravity
2) Breaking force into components
3) The center of gravity
4) How to catch gracefully
5) Collisions, momentum, and friction
6) Test: Where and when does physics fail in this animation?
Section 1: Gravity
(click to see animation)
http://img270.imageshack.us/img270/1438/physicstest19fa.th.gif (http://img270.imageshack.us/my.php?image=physicstest19fa.gif)
Does this look too fast? The thing is, gravity pulls at 9.8 meters per second squared. This means that after one second, the ball will have dropped (9.8 meters) * (1 second) * (1 second) = 9.8 meters. After two seconds, it will be: (9.8) * (2) * (2) = 39.2 meters. This animation shows how fast gravity looks if the stick is the average human size (1.7 meters).
To see a great example (this is my favorite animation on stickpage, created by ZACKHIX and PURECHI) of how gravity should look, try http://www.stickpage.com/ungluedplay.shtml. His physics are very impressive; it’s over 95% accurate.
Simulating gravity:
http://img270.imageshack.us/img270/764/acceleration9jr.gif (http://imageshack.us)
Simple enough pattern, right? This is how you move an object given any constant acceleration X. Starting with acceleration X, you move it down X, then 3X, then 5X, etc. For the animation above, I used a 4PPF (four pixels per frame) acceleration for the ball on the left, and a 2PPF for the one on the right. For the 4PPF, X=4, therefore it moved 4 pixels, then 12, then 20, etc. These were both done at 16 FPS for my animation above.
Eyeballing it: (This is only for either a vertical or horizontal acceleration. Acceleration at an angle is explained later.)
Acceleration is actually very easy to estimate. Without understanding anything I wrote before, you can follow just these two steps to simulate a constant acceleration:
Step 1: Move your stick the same distance as you did the previous frame (as in previously if you moved it one ball length, move it a ball length again).
Step 2: Add twice the unit of acceleration (as in if you want the acceleration to be 2PPF, add 4 pixels). Remember that even a very small movement here can have a huge result. The faster ball was only using a 4PPF acceleration at 16 FPS.
Note: What if I didn’t move my animation the previous frame? Then skip steps one and two, and just move your stick one unit of acceleration.
How do I compensate for a different FPS rate? Simple. A 4PPF acceleration at 16FPS is the same as a 16PPF acceleration at 8FPS, or a 1PPF at 32FPS. Notice the pattern? Take 16 (if you’re judging your acceleration off of my example), divide it by your frame rate, square it, then multiply it by your acceleration rate. I.E. 16/8 (my new frame rate) = 2. 2*2 = 4. 4*4(my acceleration rate) = 16.
Final note on gravity: Gravity does not depend on weight, but it does depend on a weight to surface area ratio. A bowling ball and marble will fall at the same rate, but a bowling ball and a piece of paper obviously will not. However, most objects take several seconds after a free fall to reach their terminal velocity, so you won’t need to worry about its for the most part. If you want to know how it works, think of it as a force that increases with velocity. If it takes 5 seconds to reach your terminal velocity, it means that it will take 5 seconds for air resistance to hit G (G = Gravity = 9.8 meters / second squared). A simple approach would be to make air resistance .2G at the first second, then .4, .6, .8, and finally 1. This mean your object will accelerate at 10 meters per second, then 8, 6, 4 ,2 , and finally 0. I doubt this will come up, but it’s something that plagued me for my entire first year of physics, so I thought some people might want to know how to do it.
Section 2: Breaking force into components
Look at the top middle ball in my first animation, and notice the curved pattern it makes while falling and rising. When something is in midair like that, there is only one force acting on it: gravity. That means vertically, it will follow the pattern as shown above. But what about horizontally? Since there are no horizontal forces acting on the object, it maintains a constant horizontal velocity. (Think about something in space. If you pushed something out into space, it would travel indefinitely at the same speed, unless it collided with space debris or came across some significant gravitational pull.)
http://img255.imageshack.us/img255/800/components6jd.gif (http://imageshack.us)
Remember, the horizontal component remains the same, so each time it moves some distance Y, despite the fact that the vertical movement it changes each time. The point is that you must break down your movement into two components.
Note: Generally in physics, the X component refers to the horizontal component and Y to the vertical. Sorry if this causes any confusion.
Concept question 1: If you fire a bullet horizontally, how long does it take to fall? (Answer: The same amount of time as if you dropped it. Remember, horizontal motion has no impact on vertical!)
Concept question 2: What if you shot an arrow at a 45 degree angle? Then how long does it take? (Answer: This one’s slightly more complicated. Let’s say you shoot it at 30PPF. Initially, it would travel horizontally at the same speed as it does vertically, which is roughly 21PPF vertically and 21PPF horizontally. If gravity was a 4PPF acceleration, it would travel vertically upwards 21,13,5, then downwards 3,11,19,etc. Horizontally it would travel 21,21,21,21,21,etc. until it hit the ground. If it were at an 80 degree angle, it’d be around 27PPF vertically and 13PPF horizontally. If you want to know how to do this, you need a calculator. Take sine of the angle and multiply it by the speed to find the vertical component. Take cosine of the angle and multiply it by the speed to find the horizontal component.)
Section 3: The center of gravity
This is nice and all for balls moving around, but what about making the stickmen move? This is where the center of gravity plays its role. If you shot a person out of a cannon the same way that the arrow was shot in the second concept question, his center of gravity would follow the same path of the arrow no matter what he did in mid air (air resisted neglected). The only thing you need to worry about, then, is how to find the center of gravity.
(click to enlarge)
http://img246.imageshack.us/img246/3509/cog5es.th.gif (http://img246.imageshack.us/my.php?image=cog5es.gif)
Finding the center of gravity:
The first thing that you might have noticed is that the center of gravity doesn’t need to be on the person. Unfortunately, precisely finding the center of gravity would involve a series of complex integrals, which is so incredibly not worth your while that I’m not even going to explain how to do it.
Instead, just notice that the center of gravity is just as you’d think it would be: the point at which all matter above and below that point are equal, and where the matter to the left and to the right equal. Note that matter refers to weight, not size. If you had a balloon attached to a bowling ball, the center of mass would be right next to the center of the bowling ball, but slightly towards the balloon. Continuing on, what I’ve provided are estimates as to where I think it would be given that the body segment should weigh more than the legs and arms. To be honest, you probably don’t need to worry about the weight of the segments as long as you’re consistent.
Concept question 3: If you were in mid air and someone threw a ball that would hit you on your lower stomach, how would you dodge it? (Answer: This is similar to throwing it at the blue circle on the left most stick in the picture above. If he moved his arms and legs to the left as shown in the middle stick, the ball would then completely miss him.)
Concept question 4: If you were going to jump over a bar, could you do it without ever having your center of gravity go over it? (Answer: Yes! Watch the Olympic high jump and you’ll see how it’s done. In the beginning the arms go over the bar, and then the body makes an upside down U shape, kind of like in the stick on the right. To finish off, the arms are pulled out to help rotate the body for the legs to come over without hitting it.)
Section 4: How to catch gracefully
This barely deserves its own section, but notice how in the animation on the top, the entire ground moves to catch the balls? Those balls could’ve been eggs and not have cracked because they followed these steps:
Step 1: The catcher must move at just about the same speed as what it’s catching once contact has been made. When the balls were reaching the ground, they were traveling about 50 pixels per frame.
Step 2: Once contact has been made, it must decelerate slowly enough as to not crush what it’s catching. This is actually very easy to do. Just don’t try anything crazy like a 40PPF, which for that animation would’ve been a 10G (10 times the force of gravity), deceleration.
Concept question 5: On the way up, the ground accelerated upwards at 10PPF, and then traveled at the fastest possible deceleration it could to keep the balls on the ground. How fast was that? (Answer: It had to decelerate at the speed of gravity, which was 4PPF. Doing this made it so that the balls exerted no force on the ground until it stopped decelerating at its resting point.)
Section 5: Collisions, momentum, and friction
This section deserves a tutorial in its own, so I’ll just be briefly over viewing the concepts.
Collisions: There were plenty of collisions in this animation, mostly with the balls against the ground, but also when they collided with each other. The thing the top middle ball did that doesn’t happen in real physics is that it made perfectly elastic collisions with the ground and wall. This means that it lost no energy once it struck the ground, so it bounced back with the same velocity with which it hit the ground. When the stickman fell down, he shook the ground and “physics” were turned on. After that, it lost horizontal velocity each time it hit the wall and vertical velocity each time it hit the ground.
http://img198.imageshack.us/img198/9400/bounce0ki.gif (http://imageshack.us)
Pretend your object sits on top of one of the red balls. If it bounced, the height it would reach would be the red ball to the right. Notice how the lower the ball higher the ball sits, the more distance it loses, but the velocity loss is the same. The amount of velocity it loses is actually up to you, just make sure the amount of velocity it loses is about the same each time.
Momentum: This would take forever to explain mathematically, so I’ll just provide a few concepts:
1) Everything that moves has energy, which is mass times velocity squared. This means if one object was traveling twice as fast as another object, it’d have to be 4 times as small to have the same energy. Let’s say these two objects hit each other and made a perfectly elastic collision. This means no energy was lost; therefore they’d reverse their direction, but maintain their initial speeds. With a perfectly elastic collision, they’d both stick together and completely stop moving.
2) Assume two objects had the same mass, but one was moving upwards twice as fast as the other which was moving to the right. If they made a perfectly elastic collision, they would trade directions and velocities. If they made a perfectly inelastic collision, they would both travel up-right (it would travel faster up than it would right) at a speed that was the average of the two velocities.
http://img198.imageshack.us/img198/453/collisiongif2xt.th.gif (http://img198.imageshack.us/my.php?image=collisiongif2xt.gif)
(This is a picture of two identical energies making a perfectly inelastic collision)
Friction: You might’ve also noticed that when the balls stopped bouncing, they rolled but slowed down despite not hitting anything. This is caused by a type of friction called rolling friction, which like gravity, is a force. Friction doesn’t depend on the speed, the weight, or even how much surface area is touching the ground. Friction only depends on the type of material it is: If you use a 1PPF deceleration on ice, you’d want to use a much higher, maybe 5PPF deceleration on rubber. Very high frictions will create a lot of torque on its object, and if it isn’t compensated for, can easily cause the object to flip over (think about trying to slide on ice versus sliding across your driveway). This torque is caused by the horizontal force, which is exerted below the center of gravity.
Concept question 6: In #2 of the momentum section, why didn’t the velocity slow to below the average of the two velocities? I thought the collision was inelastic, which meant 100% energy loss? (Answer: Components! One was traveling in the X direction, and the other was traveling in the Y direction. Since the X and Y directions are independent, no energy was lost. It is important to consider that the net energy will remain the same after any type of collision. If two equal energies are collide directly with each other, their net energy before the collision is 0. This is because one energy is positive and the other is equal but negative, therefore the energies cancel each other out.)
Concept question 7: What if they traveled straight at each other, one going twice as the other? (Answer: When they collide, both balls lose the energy of the first ball. This means the first ball first ball gets its speed cut in half and the second ball losses all of its speed and becomes stationary. However, the first one must now drive the second ball because they’re stuck together. With twice the mass, the speed becomes cut in half again, making the two masses traveling one fourth the speed of the faster one, in the direction of the faster one. Again, the net energy remains the same.)
Section 6: Test: Where and when does physics fail in this animation?
Well, it’s time to see what you’ve learned. Have fun!
Problems with my animation before the stickman falls:
Leftmost ball:
Most inanimate objects cannot fly. Therefore, its horizontal movement works against physics with every frame because it’s constantly accelerating and decelerating, yet no horizontal force to act upon it. Vertically, the ball accelerates and decelerates with the force of gravity. This means that vertically it is actually ok when it’s slowing down moving upwards, and speeding up moving downwards.
Bottom middle ball:
Same as the leftmost ball.
Top middle ball:
It makes perfectly inelastic collisions with the wall and ground. In fact, sometimes it even gains a little energy from the wall, as you might’ve noticed by its inconsistent landing positions.
Ball on the right:
Nothing! Physics were fine here. (granted a relatively small room for error)
Stickman:
Again, nothing was wrong. Be sure to watch his center of gravity, which follows a curved path downward. It might’ve thrown you off because contrary to what people do in real life, he chose to slightly jump off his planted foot to worsen the fall. (Again, it’s hard to precisely estimate the center of gravity, so it might be off a couple pixels here and there.)
After the stickman falls, “physics” was turned on. Or was it?:
Leftmost ball: This was fine except for one thing: When it made collisions with the ground, it was losing a fixed distance, not a fixed velocity. This is wrong because the harder it hits, the more energy it losses. However, with a fixed distance loss it actually losses more energy with the smaller hits.
Bottom middle ball: Same as the leftmost ball.
Top middle ball and Rightermost ball These were fine.
Extra Credit: A while ago, I mentioned that my favorite stickmovie was over 95% correct with the physics. Can you spot any errors? (http://www.stickpage.com/ungluedplay.shtml)
Most inconsistencies in physics were with gravity, but were done for effect, which worked beautifully. For that reason I’m going to provide two hints:
Hint #1: Who they are
a) The green colored guy who is the last to get hit with the sword.
b) The white colored guy with the charge gun who kills the guy with the sword.
Hint #2: When they did it
a) The last time he used his zip cord
b)The second time he fires the gun
Answers:
1) The last time he used his zip cord, he traveled directly to it. However, that could only happen if the force driving him upwards was the same as the force driving him to the left. There are two forces in play: 1 was gravity, the other was the pulling of the cord. Since the cord was a force at an angle, it had both a vertical and horizontal component, whereas gravity has a vertical component in the opposite direction. Since there was no horizontal component to counter that of the zip line, the only way to move straight to it would be if his zip cord was shot at greater than a 45 degree angle to compensate for gravity. Since it wasn’t, he should’ve been accelerating more to the left, which would’ve caused him to rotate to the left as he moved upwards.
2) Same concept. Firing the gun at an angle gives him two components of force. The only way he could remain suspended in one spot would be to fire straight down. Since it was angled to the left, he would’ve started accelerating to the right.
Conclusion: It doesn’t matter if you missed most of the concepts in this tutorial. Just remember this one rule: Force is the only thing that can change motion. When you walk, run, jump, punch, or kick, remember that your movements must accelerate, so the first movement is always a small one, and should have a steady increase until it reaches its top speed. Also, when you are in mid-air, the only force that’ll be on your character 90% of the time will be gravity, so the horizontal speed of your center of gravity can’t change.