f[t_] := 
      t /; 0 ≤ t ≤ 1
f[t_] := 
      2 - t /; 1 ≤ t ≤ 2
f[t_] := 0 /; t < 0 || t > 2
a = Plot[f[t], {t, -10, 10}]
b[t_] := 
      Show[Graphics[{RGBColor[0.2, 0, 1], PointSize[0.05], 
            Point[{t, f[t]}]}], 
        DisplayFunction -> Identity]
c[t_] := 
      Show[a, b[t], PlotRange -> {{-3, 3}, {-0.5, 1.5}},  
        ImageSize ->  {600, 400}, 
        DisplayFunction -> $DisplayFunction]
track2 = 
      Table[c[t], {t, -3, 3  π, 0.1}]