< 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.
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 AccelerationSuppose 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
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 DecelerationSuppose 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
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
|
< Day Day Up > |