< Day Day Up > |
Visualization ExperienceOn the CD-ROM, you will find a demo named 1D Racer. Here's a brief description from the programmer, Kaveh Kahrizi:
Go ahead and run the demo by double-clicking 1DRacer.exe. The first thing you'll see is four of the five equations listed on the screen. Choose the first one (vf = vi + at). Next the application asks you which variable you want to solve for; choose a. Then you can enter the three variables you know. Enter the following values:
Press Enter to begin the race. The application tracks time, displacement, and current velocity as the race progresses. You can pause the car at any point by pressing the P key. Try repeating this process, and pause halfway through (t = 5) to see how fast the car is going compared to its speed at the very end. To repeat the race, press the Backspace key. When you're done, press Backspace, and try using a different equation. You can repeat the examples to see the actual motion. Let's go back to Example 8.8. After the units were converted, you had the following list:
Start a new race using the last equation (). You want to solve for Dx. Then enter the metric values from the table, and run the race. Did you get a displacement close to Dx = 38.425m? You might want to use this demo to check your answers to the self-assessment questions. Also try making up your own questions, and see what you get. You might want to try pausing the car at different times to track the motion as the race progresses. Next, you can view the source code by double-clicking 1DRacer_code.txt. If you scroll down far enough, you'll see the sections where the actual equations were coded. Notice that each equation had to be rewritten four times—once for each variable the user could ask for. You might want to consider attempting a text-based application that performs similar operations. |
< Day Day Up > |