Clear[u1, u2, g, f, r]
ρ := 0.2
m := 1
k := 1
ξ := 0.1
f[x_] := 
      Sin[x] /; 2  π ≤ x ≤ 
          3  π
f[x_] := 
      0 /; (x > 3  π || x < 2  π)
r[x_] := (ρ (2 ((E^((((3 π - x) (ξ + 2 ρ))/(2 m)))) (-k + 
                            m) (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]) Cosh[(((3 π - x) (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]))/(2 m))] - (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]) ((k - m) Cos[x] + (ξ + 2 ρ) Sin[
                                x]) + (E^((((3 π - x) (ξ + 2 ρ))/(2 m)))) (k + m) (ξ + 
                            2 ρ) Sinh[(((3 π - x) (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]))/(2 m))]) UnitStep[-3 π + x] + (E^(-(((-2 π + x) (ξ + 2 ρ + (Sqrt[-4 k m + (((ξ + 2 ρ))^2)])))/(2 m)))) ((k + m) (ξ + 
                            2 ρ) - (E^((((-2 π + x) (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]))/m))) (k + 
                            m) (ξ + 2 ρ) - 
                      k (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]) - (E^((((-2 π + x) (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]))/m))) k (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]) + 
                      m (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]) + (E^((((-2 π + x) (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]))/m))) m (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]) + 
                      2 (E^((((-2 π + x) (ξ + 2 ρ + (Sqrt[-4 k m + (((ξ + 2 ρ))^2)])))/(2 m)))) (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]) ((k - m) Cos[
                                x] + (ξ + 2 ρ) Sin[
                                x])) UnitStep[-2 π + 
                      x]))/(2 ((((k - m))^2) + (((ξ + 2 ρ))^2)) (Sqrt[-4 k m + (((ξ + 2 ρ))^2)]))
u1[x_] := 
      If[(0 ≤ x && 
            x - t ≥ 0), (1/2) (f[x + t] + f[x - t]), 
        0]
u2[x_] := 
      If[(0 ≤ x && 
            x - t ≤ 
              0), (1/2) (f[x + t] - f[-x + t]) + r[t - x], 
        0]
u3[x_] := 
      If[(0 ≥ x && x + t ≥ 0), r[t + x], 
        0]
u4[x_] := 
      If[(0 ≥ x && x + t ≤ 0), 0, 
        0]
g[x_] := u1[x] + u2[x] + u3[x] + u4[x]
\(a[x_] := 
      Plot[g[x], {x, \(-15\), 15}, 
        AspectRatio -> Automatic, 
	
        PlotStyle -> {RGBColor[1, 0.7, 0], 
            Thickness[0.005]}, 
	
        PlotRange -> {{\(-15\), 15}, {\(-4\), 2}}, 
        DisplayFunction -> Identity]\)
b[x_] := 
      Show[Graphics[Disk[{0, r[t]}, 0.2], 
          AspectRatio -> 
            Automatic, 
       PlotRange -> {{-15, 15}, {-4, 2}}], 
        DisplayFunction -> Identity]
L1[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{0, r[t]}, {0, -0.5 + r[t]}}]}], 
        DisplayFunction -> Identity]
L2[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{-0.8, -0.5 + r[t]}, {0.8, -0.5 + r[t]}}]}], 
        DisplayFunction -> Identity]
L3[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{-0.25, -0.5 + r[t]}, {-0.25, -1.0 + 
                    r[t]}}]}], 
        DisplayFunction -> Identity]
L4[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{-0.35, -1.0 + r[t]}, {0, -1.2 + 
                    (11/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L5[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{0, -1.2 + (11/12)*r[t]}, {-0.5, -1.4 + 
                    (9/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L6[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{-0.5, -1.4 + (9/12)*r[t]}, {0, -1.6 + 
                    (7/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L7[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{0, -1.6 + (7/12)*r[t]}, {-0.5, -1.8 + 
                    (5/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L8[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{-0.5, -1.8 + (5/12)*r[t]}, {0, -2.0 + 
                    (3/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L9[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{0, -2.0 + (3/12)*r[t]}, {-0.5, -2.2 + 
                    (1/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L10[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{-0.5, -2.2 + 
                    (1/12)*r[t]}, {-0.15, -2.4}}]}], 
        DisplayFunction -> Identity]
L11[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{-0.25, -2.4}, {-0.25, -2.6}}]}], 
        DisplayFunction -> Identity]
L12[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{-0.25, -2.6}, {-0.25, -2.9}}]}], 
        DisplayFunction -> Identity]
L13[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{0.8, -2.9}, {-0.8, -2.9}}]}], 
        DisplayFunction -> Identity]
c[x_] := 
      Show[L1[t], L2[t], L3[t], L4[t], L5[t], L6[t], L7[t], L8[t], L9[t], 
        L10[t], L11[t], L12[t], L13[t], 
        PlotRange -> {{-3, 3}, {-3, 2}}, 
        DisplayFunction -> Identity]
D1[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{0.5, -2.9}, {0.5, -0.5 + r[t]}}]}], 
        DisplayFunction -> Identity]
D2[t_] := 
      Show[Graphics[{RGBColor[0, 1, 1], 
            Polygon[{{0.25, -1.5 + r[t]}, {0.75, -1.5 + 
                    r[t]}, {0.75, -2.9}, {0.2, -2.9}}]}], 
        DisplayFunction -> Identity]
D3[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{0.25, -1.5 + r[t]}, {0.75, -1.5 + r[t]}}]}], 
        DisplayFunction -> Identity]
D4[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{0.25, -1.0}, {0.25, -2.9}}]}], 
        DisplayFunction -> Identity]
D5[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{0.25, -2.9}, {0.75, -2.9}}]}], 
        DisplayFunction -> Identity]
D6[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.005], 
            Line[{{0.75, -2.9}, {0.75, -1.0}}]}], 
        DisplayFunction -> Identity]
d[x_] := 
      Show[D1[t], D2[t], D3[t], D4[t], D5[t], D6[t], 
        PlotRange -> {{-3, 3}, {-4, 2}}, 
        DisplayFunction -> Identity]
e[x_] := 
      Show[{a[x], c[x], b[x], d[x]}, 
        DisplayFunction -> $DisplayFunction]
Table[e[x], {t, 0, 30, 0.2}]