sector[r1_, r2_, θ_, dθ_, z_] := 
      Polygon[
{{r1 Cos[θ - dθ/2], 
            r1 Sin[θ - dθ/2], 
            z}, {r1 Cos[θ + dθ/2], 
            r1 Sin[θ + dθ/2], 
            z}, {r2 Cos[θ + dθ/2], 
            r2 Sin[θ + dθ/2], 
            z}, {r2 Cos[θ - dθ/2], 
            r2 Sin[θ - dθ/2], z}}]

facet[r_, θ_, dθ_, z1_, z2_] := 
      Polygon[
{{r Cos[θ - dθ/2], 
            r Sin[θ - dθ/2], 
            z1}, {r Cos[θ + dθ/2], 
            r Sin[θ + dθ/2], 
            z1}, {r Cos[θ + dθ/2], 
            r Sin[θ + dθ/2], 
            z2}, {r Cos[θ - dθ/2], 
            r Sin[θ - dθ/2], z2}}]

anulus[r1_, r2_, z_, n_] := 
      Table[sector[r1, r2, θ, 2 π/n, z], {θ, 0, 2 π, 
          2 π/n}]

anulus[r1_, r2_, θ1_, θ2_, z_, n_] := 
      Table[sector[r1, r2, θ, 2 π/n, 
          z], {θ, θ1 + π/n, θ2 - π/n, 
          2 π/n}]

cilinder[r_, z1_, z2_, n_] := 
      Table[facet[r, θ, 2 π/n, z1, z2], {θ, 0, 2 π, 
          2 π/n}]

cilinder[r_, θ1_, θ2_, z1_, z2_, n_] := 
      Table[facet[r, θ, 2 π/n, z1, 
          z2], {θ, θ1 + π/n, θ2 - π/n, 
          2 π/n}]

cap[r1_, r2_, θ_, z1_, z2_] := 
      Polygon[{{r1 Cos[θ], r1 Sin[θ], 
            z1}, {r1 Cos[θ], r1 Sin[θ], 
            z2}, {r2 Cos[θ], r2 Sin[θ], 
            z2}, {r2 Cos[θ], r2 Sin[θ], z1}}]

arc[r_, θ1_, θ2_, z_, n_] := 
      Line[Table[{r Cos[θ], r Sin[θ], 
            z}, {θ, θ1 + π/n, θ2 - π/n, 
            2 π/n}]]

<< Graphics`Shapes`

n = 50;
θ1 = π (-1 + 2/n);
θ2 = π (1 - 2/n);
r1 =  .7;
r2 = 1;
r = (r1 + r2)/2;
z1 = 0;
z2 =  .2;
z = (z1 + z2)/2;
l =  .5;
ϕ =  .2;
\(\(anim = 
        Table[
ring = 
            Show[Graphics3D[
                Join[
{
RGBColor[0, 0, 
                      1], Thickness[ .02], 
                    arc[r, \(- .8\)\ π\ Abs[
                          Sin[θ]],  .8\ π\ Abs[
                          Sin[θ]],  .3, 
                      n], 
EdgeForm[], 
                    SurfaceColor[RGBColor[ .89, \  .67, \  .53], 
                      RGBColor[ .89, \  .67, \  .53], 
                      7], 
cap[r1, r2, θ1, z1, z2], 
                    cap[r1, r2, θ2, z1, 
                      z2]
}, 
anulus[r1, 
                    r2, θ1, θ2, z1, n], 
                  anulus[r1, r2, θ1, θ2, z2, 
                    n], 
cilinder[r1, θ1, θ2, 
                    z1, z2, n], 
                  cilinder[r2, θ1, θ2, z1, z2, 
                    n], 
{SurfaceColor[
                      RGBColor[1, \ 0, \ 
                        0]]}, 
TranslateShape[
                    Cylinder[ .05, 2\ l\ Abs[Sin[θ]]\ , 20], {0, 0, 
                      0}], 
Switch[
                    Sign[Sin[θ]], \(-1\), 
                    TranslateShape[
                      RotateShape[Cone[ .1,  .3, 20], 0\ , π\ , 0], {0, 
                        0, 2\ l\ \ Sin[θ] -  .3\ }], 0, {}, 1, 
                    TranslateShape[
                      Cone[ .1,  .3, 20], {0, 0, 
                        2\ l\ Sin[θ] +  .3\ }]], 
{SurfaceColor[
                      RGBColor[0, \ 0, \ 1]]}, 
Switch[
                    Sign[Sin[θ]], \(-1\), 
                    TranslateShape[
                      RotateShape[
                        TranslateShape[Cone[ .066,  .2, 20], {0, 0,  .1}], 
                        0, π/
                          
                          2, π -  .8\ π\ Sin[θ]], { .85\ Cos[ .8\ π\ Sin[θ]],  .85\ Sin[ .8\ π\ Sin[θ]],  .3}], 
                    0, {}, 1, 
                    TranslateShape[
                      RotateShape[
                        TranslateShape[Cone[ .066,  .2, 20], {0, 0,  .1}], 
                        0, π/
                          2, \(- .8\)\ π\ Sin[θ]], {r\ Cos[ .8\ π\ Sin[θ]], 
                        r\ Sin[ .8\ π\ Sin[θ]],  .3}]], 
{RGBColor[0,  .6, 0], 
                    Text[If[
                        Cos[θ] > 
                          0, "+", "-"], {r\ Cos[θ1 + ϕ], 
                        r\ Sin[θ1 + ϕ], z}, 
                      TextStyle -> {FontSize -> 
                            Round[1 + 100\ Abs[Cos[θ]]], 
                          FontWeight -> "Bold"}], 
Text[
                      If[Cos[θ] > 
                          0, "-", "+"], {r\ Cos[θ2 - ϕ], 
                        r\ Sin[θ2 - ϕ], z}, 
                      TextStyle -> {FontSize -> 
                            Round[1 + 100\ Abs[Cos[θ]]], 
                          FontWeight -> "Bold"}], 
RGBColor[1, 0, 0], 
                    Text["m", {0, \(- .2\), 0}, 
                      TextStyle -> {FontFamily -> Times, 
                          FontWeight -> "Bold", 
                          FontSize -> 20}]}
]], 
              Boxed -> False, 
              LightSources -> {{{1, 1, 1}, RGBColor[1, 1, 1]}}, 
              PlotRange -> {{\(-1\), 1}, {\(-1\), 1}, 1.6 {\(-1\), 1}}, 
              ViewPoint -> {\(-2.649\), \ \(-0.658\), \ 2.000}, 
              DisplayFunction -> Identity]; 
pI = 
            Plot[Sin[θ] Sin[ψ], {ψ, 0, π}, 
              Frame -> True, PlotRange -> 1.05 {\(-1\), 1}, 
              FrameTicks -> None, Ticks -> None, 
              PlotStyle -> {Thickness[ .015], RGBColor[0, 0, 1]}, 
              FrameLabel -> {"", "Current", "", ""}, 
              TextStyle -> {FontFamily -> "Times", 
                  FontSize -> 18}, 
              DisplayFunction -> Identity]; 
pQ = 
            Plot[\(-Cos[θ]\) Cos[ψ], {ψ, 0, π}, 
              Frame -> True, PlotRange -> 1.05 {\(-1\), 1}, 
              FrameTicks -> None, Ticks -> None, 
              PlotStyle -> {Thickness[ .015], RGBColor[0,  .6, 0]}, 
              
              FrameLabel -> {"θ", "Charge", "", ""}, TextStyle -> {FontFamily -> "Times", FontSize -> 18}, 
              DisplayFunction -> Identity]; 
Show[
            Graphics[Rectangle[{0, 0}, {1, 1}, ring]], 
            Graphics[Rectangle[{1,  .55}, {2, 1}, pI]], 
            Graphics[Rectangle[{1, 0}, {2,  .55}, pQ]], 
            ImageSize -> {566, 350}], 
{θ, 0, 
            2\ π \((1 - 1/50)\), 2\ π/50}];\)\)

Export["ring.gif", anim, "GIF", 
        ConversionOptions -> {"AnimationDisplayTime" -> 
              0.1, "Loop" -> True}];

ticks1 = {{0, "0"}, {-π/
              2, "-π/2"}, {-π, "-π"}};
ticks2 = {0, 2, 4, 6, 8, 10};

ω[
        t_] := ω1 + (ω2 - ω1) (t/tmax)

ω0 = 1;
γ =  .1;
A[ω_] := ω((0^2)/(ω(0^2) + I ω γ - (ω^2)));
ω1 = 1/4;
ω2 = 2;
tmax = 10 2 π;
dt = tmax/300;
((2 π)/(ω2 dt)) // N

$TextStyle = {FontFamily -> Times, FontSize -> 16};

ringF[r1_, r2_, θ_, z1_, z2_, n_, gap_, color_] := 
      Block[{θ1 = θ + (π/n) gap, θ2 = θ + 
              2 π - (π/n) 
                gap}, 
Join[
{EdgeForm[], 
            SurfaceColor[color, color, 7], cap[r1, r2, θ1, z1, z2], 
            cap[r1, r2, θ2, z1, z2]}, 
anulus[r1, 
            r2, θ1, θ2, z1, n], 
          anulus[r1, r2, θ1, θ2, z2, 
            n], 
cilinder[r1, θ1, θ2, z1, z2, 
            n], cilinder[r2, θ1, θ2, z1, z2, 
            n]
]]

vector[l_, c_, r_, h_, n_] := 
      Join[{EdgeForm[], SurfaceColor[c]}, 
TranslateShape[
          Cylinder[r/2,  l , n], {0, 0, 0}], 
Switch[
          Sign[l], -1, 
          TranslateShape[
            RotateShape[Cone[r, h, 20], 0 , π , 0], {0, 0,  l - h }], 
          0, {}, 1, 
          TranslateShape[Cone[r, h, n], {0, 0,  l  + h }]]]

\(\(anim = 
        Table[
xf =  .4\ Re[\ E\^\(I\ ω[t]\ t\)]; 
x =  .16\ Re[
                A[ω[
                      t]]\ E\^\(I\ ω[t]\ t\)]; 
g = 
            Show[Graphics3D[
                Join[
ringF[ .7, 1, \(-1.4\), 0,  .2, 20, 
                    1, RGBColor[ .89, \  .67, \  .53]], 
vector[x, RGBColor[1, \ 0, \ 0],  .1,  .3, 
                    10], 
TranslateShape[
                    vector[xf, RGBColor[0, 0, 1],  .1,  .3, 
                      10], {\(-1.5\), \(- .8\), 
                      0}], 
{RGBColor[0, 0, 1], 
                    Text["H",  .85 {\(-1.5\), \(- .8\), 0}, 
                      TextStyle -> {FontFamily -> Times, 
                          FontWeight -> "Bold", 
                          FontSize -> 20}], 
RGBColor[
                      1, 0, 0], 
                    Text["m", \(- .15\) {\(-1.5\), \(- .8\), 0}, 
                      TextStyle -> {FontFamily -> Times, 
                          FontWeight -> "Bold", 
                          FontSize -> 20}]}
]], 
              PlotRange -> {{\(-1.7\), 1}, {\(-1\), 1}, {\(-2\), 2}}, 
              Boxed -> False, 
              LightSources -> {{{1, 1, 1}, RGBColor[1, 1, 1]}}, 
              DisplayFunction -> Identity]; 
p1 = 
            Plot[\ Abs[A[ω]], {ω, 0, ω2}, 
              PlotRange -> {0, 10.5}, 
              PlotStyle -> {Thickness[ .01], RGBColor[1, 0, 0]}, 
              Epilog -> {Disk[{ω[t], 
                      Abs[A[ω[t]]]}, { .045,  .3}]}, 
              FrameLabel -> {"", "amplitude"}, 
              FrameTicks -> {None, ticks2, None, None}, 
              Frame -> True, 
              DisplayFunction -> Identity]; 
p2 = 
            Plot[\ Arg[A[ω]], {ω, 0, ω2}, 
              Epilog -> {Disk[{ω[t], 
                      Arg[A[ω[t]]]}, { .04,  .15}]}, 
              FrameTicks -> {Automatic, ticks1, None, None}, 
              PlotRange -> { .15, \(-π\) -  .15}, 
              PlotStyle -> {Thickness[ .01], RGBColor[1, 0, 0], 
                  Dashing[{ .03,  .02}]}, Frame -> True, 
              FrameLabel -> {"ω", "phase"}, 
              AspectRatio ->  .43, 
              DisplayFunction -> Identity]; 
Show[
            Graphics[Rectangle[{0, 0}, {1, 1}, g]], 
            Graphics[Rectangle[{1,  .5}, {2, 1}, p1]], 
            Graphics[Rectangle[{ .94, 0}, {2,  .5}, p2]], 
            ImageSize -> {566, 350}]
, {t, 0, tmax, 
            dt}];\)\)

Export["ring2.gif", anim, "GIF", 
        ConversionOptions -> {"AnimationDisplayTime" -> 
              0.1, "Loop" -> True}];