Acceleration

 < Day Day Up > 

In the preceding section, we discussed constant velocity as well as changing velocity. Any time an object's velocity changes, it experiences an acceleration ; it speeds up or slows down. Acceleration simply measures the velocity's rate of change. The faster an object speeds up, the higher the acceleration. If the velocity is constant and doesn't change at all, the acceleration must be 0. Let's go back to the car example. The only way to avoid accelerating is to turn on the cruise control. Any time you step on the gas pedal, the car speeds up or accelerates. As soon as you release the gas pedal, the car starts to slow down or decelerate (negative acceleration). If you hit the brakes, you get an even larger deceleration. Let's use the car example to set up a numeric definition.

Take a look at Figure 8.2. At some initial time, t i , the car has an instantaneous velocity, v i . A few seconds later, t f , the car has a new instantaneous velocity, v f . The acceleration is the velocity's rate of change.

Figure 8.2. A car accelerating.

graphics/08fig02.gif

graphics/08equ05.gif



NOTE

Be careful with the units. Make sure the velocity units are consistent with the time units before you divide. For example, it doesn't make sense to divide mi/hr by seconds. Either convert everything to hours or convert everything to seconds.

The units for acceleration should always be some unit of length divided by some unit of time squared.


Example 8.5: Calculating Acceleration

Suppose the car shown in Figure 8.2 starts out going 40mi/hr and 5 seconds later is going 50mi/hr. What is its acceleration in mi/hr 2 ? What is it in m/s 2 ?

Solution
  1. Set up a formula to calculate the acceleration:

    graphics/08equ06.gif


  2. Wait! The units aren't consistent. You need to convert the 5 seconds to hours before you can divide. You might want to flip back to Chapter 7 for a review of the conversion process. After converting, you find that 5s = 0.00139hr, so now you can divide:

    graphics/08equ07.gif


  3. You also need to find the acceleration in m/s 2 , because metrics are easier to work with in the long run. So instead of converting the time, convert the change in velocity from mi/hr to m/s. After converting, you find that 10mi/hr = 4.47m/s, and you are ready to divide:

    graphics/08equ08.gif


Let's take a closer look at the two answers we found in that example. First, you found an acceleration of 3600mi/hr 2 . This means that if the car continues accelerating at the same rate, it will speed up 3600mi/hr every hour. Chances are the car won't be able to sustain that rate of acceleration for an entire hour , so this might be hard to visualize. This is one reason why metric units are nicer to work with. In this example, you found that 3600mi/hr 2 is the same acceleration as 0.894m/s 2 . This means that at this rate the car will speed up almost 1m/s every second. Let's look at one more example.

Example 8.6: Calculating Deceleration

Suppose you're driving along, and you're forced to slam on the brakes. In 3 seconds you go from 50mi/hr to 10mi/hr. What is your deceleration in m/s 2 ?

Solution
  1. Set up a formula to calculate the acceleration:

    graphics/08equ09.gif


  2. The units aren't consistent, so you need to convert the 40mi/hr to m/s. After converting, you find that 40mi/hr = 17.88m/s, and you are ready to divide:

    graphics/08equ10.gif


Notice this time you get a negative acceleration. This means that the object is slowing down rather than speeding up. Be careful. The negative number does not indicate that the object is moving backwards . In the car example, I said that pressing the gas pedal is the same as positive acceleration. Hitting the brakes is the same as negative acceleration. However, hitting the brakes does not mean you suddenly put the car in reverse. It just means you're slowing down. This is a very common misconception .

The code to define acceleration and deceleration is the same. The key comes in the interpretation as mentioned earlier. Here is a function that will calculate acceleration in units/seconds squared:

 //This function will calculate the acceleration in seconds.    float calcAccelerationSeconds(float startVel, float finalVel, float time)      {          return (finalVel-startVel)/time;      } 

This function can easily be modified to work with any unit of time that is needed for other components or calculations.

At this point, we have defined velocity and acceleration, so you're ready to use both quantities in some formulas in the next section. Keep in mind that we'll revisit these two quantities in the next chapter, where we'll examine them graphically and look even closer at the relationships between them. Then we'll extend these concepts to 2D and 3D in Chapter 10.

Self-Assessment

1.

Suppose the car in Figure 8.2 starts out going 80mi/hr and 8 seconds later is going 100mi/hr. What is its acceleration in m/s 2 ?

2.

Suppose you're driving along and you're forced to slam on the brakes. In 5 seconds you go from 40mi/hr to a complete stop. What is your deceleration in m/s 2 ?

3.

A certain car can accelerate at a rate of 0.6m/s 2 . How much time would it take this car to accelerate from 55mi/hr to 60mi/hr?

4.

Another car is initially traveling 7m/s when it starts to accelerate at 0.8m/s 2 . How fast will the car be going after 2 seconds?


 < Day Day Up > 


Beginning Math and Physics for Game Programmers
Beginning Math and Physics for Game Programmers
ISBN: 0735713901
EAN: 2147483647
Year: 2004
Pages: 143
Authors: Wendy Stahler

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net