<< Chapter < Page | Chapter >> Page > |
Estimating variable velocity graphically
Assuming that you are able to create a plot of displacement versus time at closely-spaced points, you can estimate the variable velocity curve byconnecting each pair of points with a straight line and measuring the slope of each such straight line segment. An estimate of the velocity during the intervaldefined by a pair of points is the slope of the line that connects those points. The closer the points are, the better will be the estimate of thevelocity at a point half way between those two points.
In the situation where you are able to collect enough data to draw a smooth curve of displacement versus time, the instantaneous velocity at any point onthat curve is the slope of a line that is tangent to the curve at that point. Note, however, that the construction of such a tangent line is no small feat.
Units of velocity
If you recall your high school geometry course, you may remember that the slope of a line is given by the "rise over run." In other words, the slope ofthe line is the ratio of the height to the base of a right triangle for which the hypotenuse is on or parallel to the line.
Estimate some variable velocity values
At this point, I encourage you to use a straight edge, place it firmly against two pins that define a time interval on your graph board,estimate the slope of the edge, and record that slope as your estimate of the velocity at the center of that time interval.
Explanation of the code
The code in Listing 1 begins by declaring and initializing values to contain the parameters of the problem:
Working variables
Following that, the code in Listing 1 declares and initializes two working variables for time and distance that will change as the program progresses.
Then Listing 1 declares and initializes a variable named sp that is used solely to insert spaces between the columns in the output display.
A while loop
A while loop is used to evaluate the equation given earlier , to compute and display the height of the arrow every 0.25 seconds for as long as the arrow is above theground (height is positive). The loop continues to iterate and display time and height values in two separate columns (see Figure 4 ) until the computation produces one negative height value.
When the test at the top of the while loop determines that the previously-computed value for height was negative,
As you can see, this is not a complicated script in comparison with some of the scripts that were presented in earlier modules.
Notification Switch
Would you like to follow the 'Accessible physics concepts for blind students' conversation and receive update notifications?