xyp[xy_] := xy  f[Norm[xy]]/Norm[xy]

f[r_] := If[r ≤ b, ((b - a)/b) r + a, r]

matProps[r_, a_, b_] := 
      Which[r < a, {1, 1, 1}, 
        r ≤ b, (b/(b - a)) {((((r - a))^2)/(r^2)), 1, 1}, 
        True, {1, 1, 1}]

cF[ξ_, ξmax_] := 
      If[ξ ≤ 1, Max[0, (1/2) ξ], 
        Min[(1/2) ((ξ - 1)/(ξmax - 1)) + (1/2), 1]]

color[r_, a_, b_, ξmax_] := 
      Apply[RGBColor, Map[cF[#, ξmax] &, matProps[r, a, b]]]

\(formString[
        x_] := \(StringJoin[
            StringTake[#\_\(\([[\)\(1\)\(]]\)\), \(-1\)], ".", 
            StringTake[#\_\(\([[\)\(2\)\(]]\)\), 
              2]] &\)[\(StringSplit["  " <> 
                If[StringCount[#, "."] == 
                    0, # <> ".", #] <> "00", "."] &\)[
          ToString[N[x]]]]\)

l = 2.375; dl =  .25;
b = 2;
δ =  .012; amax = 1.5;
ξmax = 4;
rayStyle = {RGBColor[1,  .5, 0], 
          Thickness[ .01]};
\(\(anim = 
        Table[
Show[
            GraphicsArray[{
Plot[\ f[r], {r, 0, l}, 
                  AspectRatio -> Automatic, 
                  PlotRange -> {{0, l\ }, {0, l}}, 
                  DisplayFunction -> Identity, Frame -> True, 
                  FrameTicks -> \((\({#, #, {}, {}} &\)[
                        Table[{x, "", {If[
                                Mod[x,  .5] == 0,  .015,  .005], 
                              0}}, {x, 0, 
                            l,  .1}]])\)], 
Graphics[
                  Flatten[{GrayLevel[ .3], 
                      Thickness[ .004], \(ParametricPlot[Release[Join[Table[xyp[{t, y}], {y, \(-l\), l, dl}], Table[xyp[{x, t}], {x, \(-l\), l, dl}]]], {t, \(-l\), l}, DisplayFunction -> Identity]\)\_\(\([[\)\(1\)\(]]\)\), rayStyle, \(ParametricPlot[Release[Table[xyp[{t,  .6\ t -  .05 + y0}], {y0, \(-1.1\)\ l, 1.2\ l, 3\ dl}]], {t, \(-l\), l}, DisplayFunction -> Identity]\)\_\(\([[\)\(1\)\(]]\)\)}], 
                  AspectRatio -> Automatic, 
                  PlotRange -> 1.01\ l {{\(-1\), 1\ }, {\(-1\), 1}}, 
                  Background -> 
                    GrayLevel[ .5]], 
Graphics[
                  Join[{Thickness[ .9  δ]}, 
                    Flatten[
                      Table[{color[r, a, b, ξmax], 
                          Circle[{0, 0}, r]}, {r, a + δ/2, 
                          b - δ/2, δ}]], {GrayLevel[ .3], 
                      Thickness[ .004], \(ParametricPlot[Release[Join[Table[{t, y}, {y, \(-l\), l, dl}], Table[{x, t}, {x, \(-l\), l, dl}]]], {t, \(-l\), l}, DisplayFunction -> Identity]\)\_\(\([[\)\(1\)\(]]\)\)}, 
                    rayStyle, \(ParametricPlot[Release[Table[xyp[{t,  .6\ t -  .05 + y0}], {y0, \(-1.1\)\ l, 1.2\ l, 3\ dl}]], {t, \(-l\), l}, DisplayFunction -> Identity]\)\_\(\([[\)\(1\)\(]]\)\), {RGBColor[1, 0, 0], Disk[{a, 0},  .1]}], 
                  AspectRatio -> Automatic, 
                  PlotRange -> {{\(-l\), l\ }, {\(-l\), l}}, 
                  Background -> 
                    GrayLevel[ .5]], 
Graphics[
                  Text[MatrixForm[
                      Map[formString, 
                        DiagonalMatrix[matProps[a +  .01, a, b]], {2}]], {0, 
                      0}, TextStyle -> {FontFamily -> Times, 
                        FontSize -> 22}]]
}], 
            Background -> RGBColor[193/255, 213/255, 193/255], 
            ImageSize -> 900], 
{a, 0, amax, 
            amax/40}];\)\)

Export["cloak.gif", Join[anim, Rest[Reverse[anim]]], "GIF", 
        ConversionOptions -> {"AnimationDisplayTime" -> 
              0.1, "Loop" -> True}, 
        ImageSize -> 900];

matProps[r_, a_, b_, c_] := 
      Which[r < a, (b/a) {1, 1, 1}, 
        r ≤ 
          c, ((c - b)/(c - 
                a)) {(((1 + ((b - a)/(c - b)) (c/r)))^2), 1, 1}, 
        True, {1, 1, 1}]

cF[r_, ξ_, ξ1_, ξ2_] := 
      Which[ξ ≤ 1, Max[0, (1/2) ξ], r < a, 
        Min[(1/2) ((ξ - 1)/(ξ1 - 1)) + (1/2), 1], True, 
        Min[(1/2) ((ξ - 1)/(ξ2 - 1)) + (1/2), 1]]

color[r_, a_, b_, c_, ξ1_, ξ2_] := 
      Apply[RGBColor, 
        Map[cF[r, #, ξ1, ξ2] &, matProps[r, a, b, c]]]

f[r_] := 
      Which[r ≤ b, r  (a/b), r ≤ c, 
        r (( c - a)/(c - b)) - c (( b - a)/(c - b)), True, 
        r]

\(formString[
        x_] := \(StringJoin[
            StringTake[#\_\(\([[\)\(1\)\(]]\)\), \(-2\)], ".", 
            StringTake[#\_\(\([[\)\(2\)\(]]\)\), 
              2]] &\)[\(StringSplit["  " <> 
                If[StringCount[#, "."] == 
                    0, # <> ".", #] <> "00", "."] &\)[
          ToString[N[x]]]]\)

l = 2.375; dl =  .25;
b = 1.5; c = 2;
δ =  .012; amax = 1.5; amin =  .5;
ξ1 = 3; ξ2 = 20;
rayStyle = {RGBColor[0, 0, 1], 
          Thickness[ .01]};
\(\(anim = 
        Table[
Show[
            GraphicsArray[{
Plot[\ f[r], {r, 0, l}, 
                  AspectRatio -> Automatic, 
                  PlotRange -> {{0, l\ }, {0, l}}, 
                  DisplayFunction -> Identity, Frame -> True, 
                  FrameTicks -> \((\({#, #, {}, {}} &\)[
                        Table[{x, "", {If[
                                Mod[x,  .5] == 0,  .015,  .005], 
                              0}}, {x, 0, 
                            l,  .1}]])\)], 
Graphics[
                  Flatten[{GrayLevel[ .3], \(ParametricPlot[Release[Join[Table[xyp[{t, y}], {y, \(-l\), l, dl}], Table[xyp[{x, t}], {x, \(-l\), l, dl}]]], {t, \(-l\), l}, DisplayFunction -> Identity]\)\_\(\([[\)\(1\)\(]]\)\), rayStyle, \(ParametricPlot[Release[Table[xyp[{t,  .6\ t -  .05 + y0}], {y0, \(-1.1\)\ l, 1.2\ l, 3\ dl}]], {t, \(-l\), l}, DisplayFunction -> Identity]\)\_\(\([[\)\(1\)\(]]\)\)}], 
                  AspectRatio -> Automatic, 
                  PlotRange -> 1.01\ l {{\(-1\), 1\ }, {\(-1\), 1}}, 
                  Background -> 
                    GrayLevel[ .5]], 
Graphics[
                  Join[{Thickness[ .9  δ]}, 
                    Flatten[
                      Table[{color[r, a, b, c, ξ1, ξ2], 
                          Circle[{0, 0}, r]}, {r, δ/2, 
                          c - δ/2, δ}]], {GrayLevel[ .3], 
                      Thickness[ .004], \(ParametricPlot[Release[Join[Table[{t, y}, {y, \(-l\), l, dl}], Table[{x, t}, {x, \(-l\), l, dl}]]], {t, \(-l\), l}, DisplayFunction -> Identity]\)\_\(\([[\)\(1\)\(]]\)\)}, 
                    rayStyle, \(ParametricPlot[Release[Table[xyp[{t,  .6\ t -  .05 + y0}], {y0, \(-1.1\)\ l, 1.2\ l, 3\ dl}]], {t, \(-l\), l}, DisplayFunction -> Identity]\)\_\(\([[\)\(1\)\(]]\)\), {RGBColor[0,  .8, 0], Disk[{0, 0},  .1]}], 
                  AspectRatio -> Automatic, 
                  PlotRange -> {{\(-l\), l\ }, {\(-l\), l}}, 
                  Background -> 
                    GrayLevel[ .5]], 
Graphics[
                  Text[MatrixForm[
                      Map[formString, 
                        DiagonalMatrix[matProps[0, a, b, c]], {2}]], {0, 0}, 
                    TextStyle -> {FontFamily -> Times, 
                        FontSize -> 21}]]
}], 
            Background -> RGBColor[193/255, 213/255, 193/255], 
            ImageSize -> 900], 
{a, b, 
            amin, \((amin - b)\)/40}];\)\)

Export["concentrator.gif", 
        Join[anim, Rest[Reverse[anim]]], "GIF", 
        ConversionOptions -> {"AnimationDisplayTime" -> 
              0.1, "Loop" -> True}, 
        ImageSize -> 900];