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:

  1. 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.
  2. create a new sprite "position grapher" - the costume is not important (create a small dot)
    1. start the grapher at the graph (go to graph)
    2. create a forever loop
    3. put the pen down
    4. move the grapher forward one step in the x direction (time)
    5. set the y-position of the grapher to: x-position of the train /5 + y-position of graph
    6. pen up
    7. if the grapher is at the edge of the graph, have it go back to the beginning (and clear screen)
  3. try out your graph and see if the pos vs time graph shows the motion.
  4. EXTRA: create a velocity vs time graph.

Scratch Version 1.4 version below.