7.2.4 Acceleration and Deceleration

Once you get velocity to work, implement acceleration and deceleration. This requires the ability to parse velocity change input lines (and also the initial acceleration setting). Again, don't worry about displacement by setting it to a huge number.

Be sure to test your logic by setting the target velocity high and low. Your program should respond by increasing and decreasing the velocity to the target velocities using the specified acceleration.



Copyright © 2006-02-15 by Tak Auyeung