Clear[u1, u2, g, f, r]
ρ := 1
k := 1.5
f[x_] := 
      Sin[x] /; 2  π ≤ x ≤ 
          3  π
f[x_] := 
      0 /; (x > 3  π || x < 2  π)
r[t_] := ((ρ ((-(E^(-((k (-3 π + t))/(2 ρ)))) k - k Cos[t] - 2 ρ Sin[t]) UnitStep[-3 π + t] + (-(E^(-((k (-2 π + t))/(2 ρ)))) k + k Cos[t] + 2 ρ Sin[t]) UnitStep[-2 π + t]))/((k^2) + 4 (ρ^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[x + t], 
        0]
g[x_] := u1[x] + u2[x] + u3[x]
\(a[x_] := 
      Plot[g[x], {x, \(-20\), 20}, 
        AspectRatio -> Automatic, 
	
        PlotStyle -> {RGBColor[1, 0.7, 0], 
            Thickness[0.003]}, 
	
        PlotRange -> {{\(-15\), 15}, {\(-2\), 2}}, 
        DisplayFunction -> Identity]\)
L1[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0, r[t]}, {0, -0.1 + r[t]}}]}], 
        DisplayFunction -> Identity]
L2[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0, -0.1 + r[t]}, {0.5, -0.3 + (11/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L3[t_] := 
      Show[
        Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -0.3 + (11/12)*r[t]}, {-0.5, -0.5 + 
                    (9/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L4[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{-0.5, -0.5 + (9/12)*r[t]}, {0.5, -0.7 + 
                    (7/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L5[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -0.7 + (7/12)*r[t]}, {-0.5, -0.9 + 
                    (5/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L6[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{-0.5, -0.9 + (5/12)*r[t]}, {0.5, -1.1 + 
                    (3/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L7[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -1.1 + (3/12)*r[t]}, {-0.5, -1.3 + 
                    (1/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L8[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{-0.5, -1.3 + (1/12)*r[t]}, {0.5, -1.4}}]}], 
        DisplayFunction -> Identity]
L9[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -1.4}, {0, -1.5}}]}], 
        DisplayFunction -> Identity]
L10[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0, -1.5}, {0, -1.7}}]}], 
        DisplayFunction -> Identity]
L11[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -1.7}, {-0.5, -1.7}}]}], 
        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], PlotRange -> {{-3, 3}, {-2, 2}}, 
        DisplayFunction -> Identity]
d[x_] := 
      Show[{a[x], c[x]}, 
        DisplayFunction -> $DisplayFunction]
Table[d[x], {t, 0, 20, 0.2}]

Clear[u1, u2, g, f, r]
ρ := 1
k := 10000
f[x_] := 
      Sin[x] /; 2  π ≤ x ≤ 
          3  π
f[x_] := 
      0 /; (x > 3  π || x < 2  π)
r[t_] := ((ρ ((-(E^(-((k (-3 π + t))/(2 ρ)))) k - k Cos[t] - 2 ρ Sin[t]) UnitStep[-3 π + t] + (-(E^(-((k (-2 π + t))/(2 ρ)))) k + k Cos[t] + 2 ρ Sin[t]) UnitStep[-2 π + t]))/((k^2) + 4 (ρ^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[x + t], 
        0]
g[x_] := u1[x] + u2[x] + u3[x]
\(a[x_] := 
      Plot[g[x], {x, \(-20\), 20}, 
        AspectRatio -> Automatic, 
	
        PlotStyle -> {RGBColor[1, 0.7, 0], 
            Thickness[0.003]}, 
	
        PlotRange -> {{\(-15\), 15}, {\(-2\), 2}}, 
        DisplayFunction -> Identity]\)
L1[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0, r[t]}, {0, -0.1 + r[t]}}]}], 
        DisplayFunction -> Identity]
L2[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0, -0.1 + r[t]}, {0.5, -0.3 + (11/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L3[t_] := 
      Show[
        Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -0.3 + (11/12)*r[t]}, {-0.5, -0.5 + 
                    (9/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L4[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{-0.5, -0.5 + (9/12)*r[t]}, {0.5, -0.7 + 
                    (7/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L5[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -0.7 + (7/12)*r[t]}, {-0.5, -0.9 + 
                    (5/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L6[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{-0.5, -0.9 + (5/12)*r[t]}, {0.5, -1.1 + 
                    (3/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L7[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -1.1 + (3/12)*r[t]}, {-0.5, -1.3 + 
                    (1/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L8[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{-0.5, -1.3 + (1/12)*r[t]}, {0.5, -1.4}}]}], 
        DisplayFunction -> Identity]
L9[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -1.4}, {0, -1.5}}]}], 
        DisplayFunction -> Identity]
L10[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0, -1.5}, {0, -1.7}}]}], 
        DisplayFunction -> Identity]
L11[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -1.7}, {-0.5, -1.7}}]}], 
        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], PlotRange -> {{-3, 3}, {-2, 2}}, 
        DisplayFunction -> Identity]
d[x_] := 
      Show[{a[x], c[x]}, 
        DisplayFunction -> $DisplayFunction]
Table[d[x], {t, 0, 20, 0.2}]

Clear[u1, u2, g, f, r]
ρ := 1
k := 0.0001
f[x_] := 
      Sin[x] /; 2  π ≤ x ≤ 
          3  π
f[x_] := 
      0 /; (x > 3  π || x < 2  π)
r[t_] := ((ρ ((-(E^(-((k (-3 π + t))/(2 ρ)))) k - k Cos[t] - 2 ρ Sin[t]) UnitStep[-3 π + t] + (-(E^(-((k (-2 π + t))/(2 ρ)))) k + k Cos[t] + 2 ρ Sin[t]) UnitStep[-2 π + t]))/((k^2) + 4 (ρ^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[x + t], 
        0]
g[x_] := u1[x] + u2[x] + u3[x]
\(a[x_] := 
      Plot[g[x], {x, \(-20\), 20}, 
        AspectRatio -> Automatic, 
	
        PlotStyle -> {RGBColor[1, 0.7, 0], 
            Thickness[0.003]}, 
	
        PlotRange -> {{\(-15\), 15}, {\(-2\), 2}}, 
        DisplayFunction -> Identity]\)
L1[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0, r[t]}, {0, -0.1 + r[t]}}]}], 
        DisplayFunction -> Identity]
L2[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0, -0.1 + r[t]}, {0.5, -0.3 + (11/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L3[t_] := 
      Show[
        Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -0.3 + (11/12)*r[t]}, {-0.5, -0.5 + 
                    (9/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L4[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{-0.5, -0.5 + (9/12)*r[t]}, {0.5, -0.7 + 
                    (7/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L5[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -0.7 + (7/12)*r[t]}, {-0.5, -0.9 + 
                    (5/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L6[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{-0.5, -0.9 + (5/12)*r[t]}, {0.5, -1.1 + 
                    (3/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L7[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -1.1 + (3/12)*r[t]}, {-0.5, -1.3 + 
                    (1/12)*r[t]}}]}], 
        DisplayFunction -> Identity]
L8[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{-0.5, -1.3 + (1/12)*r[t]}, {0.5, -1.4}}]}], 
        DisplayFunction -> Identity]
L9[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -1.4}, {0, -1.5}}]}], 
        DisplayFunction -> Identity]
L10[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0, -1.5}, {0, -1.7}}]}], 
        DisplayFunction -> Identity]
L11[t_] := 
      Show[Graphics[{RGBColor[0, 0, 1], Thickness[0.003], 
            Line[{{0.5, -1.7}, {-0.5, -1.7}}]}], 
        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], PlotRange -> {{-3, 3}, {-2, 2}}, 
        DisplayFunction -> Identity]
d[x_] := 
      Show[{a[x], c[x]}, 
        DisplayFunction -> $DisplayFunction]
Table[d[x], {t, 0, 20, 0.2}]