Train Grapher
Motion can be complex - there is position, velocity and acceleration and all are changing all the time. Even if you can only move in one direction (1D motion). A good way to keep track of motion is with a position vs. time graph. In pos v time, the x-axis is the time going forward and the y axis is the position. To learn how this works, download the Train Grapher_start project and complete the following steps.
Steps:
- create scrips for the train to accelerate and decelerate - you can use the special costumes to give an image for the force that causes this.
- create a new sprite "position grapher" - the costume is not important (create a small dot)
- start the grapher at the graph (go to graph)
- create a forever loop
- put the pen down
- move the grapher forward one step in the x direction (time)
- set the y-position of the grapher to: x-position of the train /5 + y-position of graph
- pen up
- if the grapher is at the edge of the graph, have it go back to the beginning (and clear screen)
- try out your graph and see if the pos vs time graph shows the motion.
- EXTRA: create a velocity vs time graph.
Scratch Version 1.4 version below.