Distance-Time Graph Example

Distance-Time Graph Example
Loading the math board and drawing, please wait…
2014-04-18 10:59
This distance-time graph is suitable for classroom demonstration or self-review. It illustrates the movement of an object over different time intervals, involving linear functions. Using GeoGebra commands such as Segment, Function, If, Sequence, etc., you can dynamically adjust the journey parts, suitable for middle school students.

GeoGebra Commands & Parameters

  1. Segment(A, B) → a
  2. Function(((-(x(a) / y(a))) * x) - z(a) / y(a), x(A), x(B)) → f_{AB}
  3. Segment(B, C) → b
  4. If(npart > 1, If[x(B) ≤ x ≤ x(C), ((-(x(b) / y(b))) * x) - z(b) / y(b)], f_{AB}) → f_{BC}
  5. Segment(C, D) → c
  6. If(npart > 2, If[x(C) ≤ x ≤ x(D), ((-(x(c) / y(c))) * x) - z(c) / y(c)], f_{BC}) → f_{CD}
  7. Segment(D, E) → e
  8. If(npart > 3, If[x(D) ≤ x ≤ x(E), ((-(x(e) / y(e))) * x) - z(e) / y(e)], f_{CD}) → f_{DE}
  9. Segment(E, F) → g
  10. If(npart > 4, If[x(E) ≤ x ≤ x(F), ((-(x(g) / y(g))) * x) - z(g) / y(g)], f_{DE}) → f_{EF}
  11. If(t < x(B), f_{AB}, If[t < x(C), f_{BC}, If[t < x(D), f_{CD}, If[t < x(E), f_{DE}, If[t < x(F), f_{EF}, f_{end}]]]]) → f
  12. If(turningback, ((-viewwidth)) / ((2 * carsizefactor)), viewwidth / ((2 * carsizefactor))) → halfcarwidth
  13. Function(((-viewheight)) / 5, 0, 10000) → f_{distanceline}
  14. Sequence((i / journeylinescale, journeylineseparator), i, 0, 10000, 50) → listxaxisticks
  15. Sequence(Text[i, (i / journeylinescale, journeylineseparator), true, true], i, 0, 10000, 50) → list1
  16. Vector((x(C_2), y(C_2) + (0.05 * viewheight)), C_2) → w
  17. Midpoint(a) → P_{midAB}
  18. Midpoint(b) → P_{midBC}
  19. Midpoint(c) → P_{midCD}
  20. If(t < x(B), abs(y(Q) - y(A)), If[t < x(C), abs(y(B) - y(A)) + abs(y(Q) - y(B)), If[t < x(D), abs(y(B) - y(A)) + abs(y(C) - y(B)) + abs(y(Q) - y(C)), If[t < x(E), abs(y(B) - y(A)) + abs(y(C) - y(B)) + abs(y(D) - y(C)) + abs(y(Q) - y(D)), If[t < x(F), abs(y(B) - y(A)) + abs(y(C) - y(B)) + abs(y(D) - y(C)) + abs(y(E) - y(D)) + abs(y(Q) - y(E)), totaljourneydistance]]]]) → totaldistancetravelled

AI Drawing Prompt Reference

Create a distance-time graph showing an object's movement over different time intervals. Start by drawing a line segment from point A to B, then add segments from B to C, C to D, D to E, and E to F, each representing a movement phase. Use functions to represent each segment's movement and dynamically adjust the phases with conditional statements. Finally, add a distance axis and time ticks to show the total distance traveled.
The prompt above was compiled from the original drawing commands and is for reference only.