1
$\begingroup$

the paper from this https://arxiv.org/pdf/2112.01420v2.pdf

I finished the first few pictures of the paper,and now I have this unwieldy graph。

enter image description here

This graph is actually a graph of conformal transformations

$$ W=z+\frac{1}{z} $$

form maping ,we get get new x' and y',like this

$$ x^{\prime}+i y^{\prime}=(x+i y)+\frac{1}{(x+i y)} $$

I take the real and imaginary parts of this

$$ \begin{aligned} &x^{\prime}=\operatorname{Re}\left[x+i y+\frac{1}{(x+i y)}\right] \\ &y^{\prime}=\operatorname{Im}\left[x+i y+\frac{1}{(x+i y)}\right] \end{aligned} $$

and do this

$$ \begin{aligned} &\left(\nabla x^{\prime}\right)^{2}=\left(\frac{\partial x^{\prime}}{\partial x}\right)^{2}+\left(\frac{\partial x^{\prime}}{\partial y}\right)^{2} \\ &\left(\nabla y^{\prime}\right)^{2}=\left(\frac{\partial y^{\prime}}{\partial x}\right)^{2}+\left(\frac{\partial y^{\prime}}{\partial y}\right)^{2} \end{aligned} $$

Finally, I define the function I want:

$$ \begin{gathered} n^{2}(x, y)=\frac{n_{0}}{2}\left[\left(\nabla x^{\prime}\right)^{2}+\left(\nabla y^{\prime}\right)^{2}\right] \\ n_{0}=3.1 \end{gathered} $$

I have do some work by Wolfram

Clear["Global`*"];
(*=== constant ===*)
n0 = 3.1;

(*===define maping ===*)

confun[x_, y_] := x + I y + 1/(x + I y);
comconfun = 
  Assuming[x \[Element] Reals && y \[Element] Reals, 
   ComplexExpand@confun[x, y]];

(*=== Re and Im ===*)
reconfun = x + x/(x^2 + y^2);
imconfun = y - y/(x^2 + y^2);
(*=== calculate delta(x') and delta(y')===*)

deltaXY = 
  Plus @@ Map[Power[#, 2] &, Grad[{reconfun, imconfun}, {x, y}]] // 
   Simplify;

(*=== define I want function u(x,y) ===*)

n[x_, y_] := n0^2/2*(deltaXY[[1]] + deltaXY[[2]]*I);

(*=== plot Re[function] ===*)
recontour = 
 DensityPlot[n0^2/2*deltaXY[[1]],
  {x, -5, 5},
  {y, -5, 5},
  ColorFunction -> "Rainbow",
  PlotLegends -> Automatic
  ]

get this:

enter image description here

Comparing the two pictures, I found a big difference. Now I don't know how to deal with it

enter image description here

enter image description here

(=================== upgrate ==========================)

by @rhermans suggest

I change some


(*=== plot Re[function] ===*)

disk = Graphics[{Black, Disk[{0, 0}, 1]}];

recontour = DensityPlot[n0^2/2*deltaXY[[1]],
  {x, -5, 5},
  {y, -5, 5},
  ColorFunction -> "Rainbow",
  RegionFunction -> Function[{x, y}, Norm[{x, y}] > 1],
  PlotRange -> {0, 6},
  ClippingStyle -> {RGBColor["#e93424"]},
  PlotLegends -> Automatic
  ]
Show[recontour, disk]

enter image description here

"Red" here is not gradient

$\endgroup$
13
  • $\begingroup$ Then, what is the question? $\endgroup$
    – rhermans
    Commented Jul 11, 2022 at 16:09
  • $\begingroup$ @rhermans Comparing the two pictures, I found a big difference. Now I don't know how to deal with it $\endgroup$ Commented Jul 11, 2022 at 16:10
  • 1
    $\begingroup$ Are you sure that the function (n0^2/2*deltaXY[[1]]) is correct? I say that because the value is 3 where the bright yellow is on the original figure (along the diagonals). However, on your last figure given, the diagonals have a value between 4 and 5 (with something closer to 4.8 if one uses ContourPlot with 30 contours). And the black disk has a radius around 2.4 and not 1 as your last figure indicates. Finally, please be more specific than "but it's still not perfect". $\endgroup$
    – JimB
    Commented Jul 11, 2022 at 22:58
  • 1
    $\begingroup$ In the original picture,what is the value λ in x/λ and y/λ? $\endgroup$
    – cvgmt
    Commented Jul 12, 2022 at 2:12
  • 1
    $\begingroup$ @cvgmt I think you solved it with that comment. I measured the radius of the black disk to be close to 2.4 (using some digitizer software). And now looking at the article there is the following in the Figure 1 caption: "Real-valued refractive index distribution of the conformal Zhukovsky cloak, reaching values of n = 0 at x = ±2.4λ". $\endgroup$
    – JimB
    Commented Jul 12, 2022 at 2:36

2 Answers 2

5
$\begingroup$

Maybe the paper draw such figure by the following approach.

Edit

The correct n[x,y] still need to be study.

n0 = 3.1;
w = Block[{z = x + I*y}, ComplexExpand@ReIm[z + 1/z]];
f[x_, y_] = 
 Norm[Grad[w, {x, y}], "Frobenius"] /. Abs -> Identity // Simplify
n[x_, y_] = n0/Sqrt[2] f[x, y]

recontour = 
  DensityPlot[n[x, y], {x, -5, 5}, {y, -5, 5}, 
   ColorFunction -> Hue, PlotLegends -> Automatic, PlotPoints -> 80, 
   MaxRecursion -> 4];
Show[recontour, Graphics[Disk[{0, 0}, 2.14]]]

enter image description here

$\endgroup$
4
$\begingroup$

The following sequence of commands seems to come close to duplicating that figure:

n0 = 3.1;
reconfun = x + x/(x^2 + y^2);
imconfun = y - y/(x^2 + y^2);
g = Sqrt[(n0^2/2) Plus @@ Map[Power[#, 2] &, Grad[{reconfun, imconfun}, {x, y}]] // Total];

Show[DensityPlot[g, {x, -6/2.4, 6/2.4}, {y, -6/2.4, 6/2.4}, 
  PlotRange -> {All, All, {0, 6.2}}, PlotPoints -> 100, 
  ColorFunction -> (Blend[{Darker[Blue], Cyan, Yellow, Orange, Darker[Red, 0.5]}, #] &),
  PlotLegends -> Automatic, Frame -> True, PlotRangePadding -> None, 
  FrameTicks -> {{{{-5/2.4, 5}, 0, {5/2.4, -5}}, None}, {{{-5/2.4, -5}, 0, {5/2.4, 5}}, None}},
  FrameTicksStyle -> Directive[Black, 24], 
  FrameLabel -> {{Style["y/λ", 24, FontFamily -> "Times New Roman", Italic],        None}, 
    {Style["x/λ", 24, FontFamily -> "Times New Roman", Italic], 
     Style["n(x,y)", 24, FontFamily -> "Times New Roman", Italic]}}],
 Graphics[Disk[{0, 0}, 1]]]

Figure 2a

$\endgroup$
4
  • $\begingroup$ That's a good color mix $\endgroup$ Commented Jul 12, 2022 at 7:24
  • $\begingroup$ I change PlotLegends -> BarLegend[Automatic,Ticks->{0,3,6}] ,“0” not find? $\endgroup$ Commented Jul 12, 2022 at 8:05
  • 1
    $\begingroup$ @我心永恒 and Jim: I implemented the jet colormap here, if you really want to reproduce the original coloration. Also, here's how to get g in one line: n0 Sqrt[Simplify[# . # &[Flatten[D[ComplexExpand[ReIm[(x + I y) + 1/(x + I y)], TargetFunctions -> {Re, Im}], {{x, y}}]]]/2]]. $\endgroup$ Commented Jul 12, 2022 at 8:46
  • $\begingroup$ @J.M. Thanks to U $\endgroup$ Commented Jul 12, 2022 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.