File:Luneburg Lens.gif
来自testwiki
跳转到导航
跳转到搜索
Luneburg_Lens.gif (360 × 408像素,文件大小:4 MB,MIME类型:image/gif、循环、53帧、5.3秒)
本文件来自维基共享资源并可能被其他项目使用。 其文件描述页上的描述显示在下面。
摘要
| 描述Luneburg Lens.gif |
English: A Luneburg lens has a gradually varying refractive index, such that a point source on its edge will be converted into a plane wave (and vice-versa, a plane wave will be focussed on its edge). |
| 日期 | |
| 来源 | https://twitter.com/j_bertolotti/status/1394635354209230849 |
| 作者 | Jacopo Bertolotti |
| 授权 (二次使用本文件) |
https://twitter.com/j_bertolotti/status/1030470604418428929 |
Mathematica 12.0 code
\[Lambda]0 = 1.; k0 = N[(2 \[Pi])/\[Lambda]0]; (*The wavelength in vacuum is set to 1, so all lengths are now in units of wavelengths*)
\[Delta] = \[Lambda]0/20; \[CapitalDelta] = 40*\[Lambda]0; (*Parameters for the grid*)
ReMapC[x_] := RGBColor[(2 x - 1) UnitStep[x - 0.5], 0, (1 - 2 x) UnitStep[0.5 - x]];
R = \[CapitalDelta]/3;
ren = Table[
If[x^2 + y^2 <= R^2, Sqrt[2 - ((x^2 + y^2)/R^2)], 1], {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
d = \[Lambda]0/2; (*typical scale of the absorbing layer*)
imn = Table[
Chop[5 (E^-((x + \[CapitalDelta]/2)/d) + E^((x - \[CapitalDelta]/2)/d) + E^-((y + \[CapitalDelta]/2)/d) + E^((y - \[CapitalDelta]/2)/d))], {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}]; (*Imaginary part of the refractive index (used to emulate absorbing boundaries)*)
dim = Dimensions[ren][[1]];
L = -1/\[Delta]^2*KirchhoffMatrix[GridGraph[{dim, dim}]]; (*Discretized Laplacian*)
n = ren + I imn;
sinstep[t_] := 20 - (5/6 \[CapitalDelta]) Sin[\[Pi]/2 t]^2;
frames1 = Table[
\[Phi]in = Table[E^(-((x)^2 + (y + sinstep[t])^2)/(2 (\[Lambda]0/5)^2)), {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];(*Discretized source*)
b = -(Flatten[n]^2 - 1) k0^2 Flatten[\[Phi]in]; (*Right-hand side of the equation we want to solve*)
M = L + DiagonalMatrix[SparseArray[Flatten[n]^2 k0^2]]; (*Operator on the left-hand side of the equation we want to solve*)
\[Phi]s = Partition[LinearSolve[M, b], dim]; (*Solve the linear system*)
MatrixPlot[Transpose[(Re[(\[Phi]in + \[Phi]s)]/Max[Abs@Re[\[Phi]in + \[Phi]s][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]]])][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], ColorFunction -> ReMapC, DataReversed -> True, Frame -> False, PlotRange -> {-1, 1}, PlotLabel -> "Luneburg Lens: n=\!\(\*SqrtBox[\(2 - \*FractionBox[SuperscriptBox[\(r\), \(2\)], SuperscriptBox[\(R\), \(2\)]]\)]\)", LabelStyle -> {Black, Bold}, Epilog -> {White, Circle[{Round[dim/2 - (4 d)/\[Delta]], Round[dim/2 - (4 d)/\[Delta]]}, dim/3 - (1 d)/\[Delta]]}](*Plot everything*)
, {t, 0, 1, 1/20}];
sinstep[t_] := 20 - (5/6 \[CapitalDelta]) Sin[\[Pi]/2 t]^2;
frames2 = Table[
\[Phi]in = Table[E^(-((x - \[CapitalDelta]/3 Cos[\[Theta]])^2 + (y - \[CapitalDelta]/3 Sin[\[Theta]])^2)/(2 (\[Lambda]0/5)^2)), {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];(*Discretized source*)
b = -(Flatten[n]^2 - 1) k0^2 Flatten[\[Phi]in]; (*Right-hand side of the equation we want to solve*)
M = L + DiagonalMatrix[SparseArray[Flatten[n]^2 k0^2]]; (*Operator on the left-hand side of the equation we want to solve*)
\[Phi]s = Partition[LinearSolve[M, b], dim]; (*Solve the linear system*)
MatrixPlot[Transpose[(Re[(\[Phi]in + \[Phi]s)]/Max[Abs@Re[\[Phi]in + \[Phi]s][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]]])][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], ColorFunction -> ReMapC, DataReversed -> True, Frame -> False, PlotRange -> {-1, 1}, PlotLabel -> "Luneburg Lens: n=\!\(\*SqrtBox[\(2 - \*FractionBox[SuperscriptBox[\(r\), \(2\)], SuperscriptBox[\(R\), \(2\)]]\)]\)", LabelStyle -> {Black, Bold}, Epilog -> {White, Circle[{Round[dim/2 - (4 d)/\[Delta]], Round[dim/2 - (4 d)/\[Delta]]}, dim/3 - (1 d)/\[Delta]]}](*Plot everything*)
, {\[Theta], \[Pi]/2, 3/2 \[Pi], \[Pi]/20}];
sinstep[t_] := 1/3 \[CapitalDelta] + (\[CapitalDelta]/2 - \[CapitalDelta]/3) Sin[\[Pi]/2 t]^2;
frames3 = Table[
\[Phi]in = Table[E^(-((x)^2 + (y + sinstep[t])^2)/(2 (\[Lambda]0/5)^2)), {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];(*Discretized source*)
b = -(Flatten[n]^2 - 1) k0^2 Flatten[\[Phi]in]; (*Right-hand side of the equation we want to solve*)
M = L + DiagonalMatrix[SparseArray[Flatten[n]^2 k0^2]]; (*Operator on the left-hand side of the equation we want to solve*)
\[Phi]s = Partition[LinearSolve[M, b], dim]; (*Solve the linear system*)
MatrixPlot[ Transpose[(Re[(\[Phi]in + \[Phi]s)]/Max[Abs@Re[\[Phi]in + \[Phi]s][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]]])][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], ColorFunction -> ReMapC, DataReversed -> True, Frame -> False, PlotRange -> {-1, 1}, PlotLabel -> "Luneburg Lens: n=\!\(\*SqrtBox[\(2 - \*FractionBox[SuperscriptBox[\(r\), \(2\)], SuperscriptBox[\(R\), \(2\)]]\)]\)", LabelStyle -> {Black, Bold}, Epilog -> {White, Circle[{Round[dim/2 - (4 d)/\[Delta]], Round[dim/2 - (4 d)/\[Delta]]}, dim/3 - (1 d)/\[Delta]]}](*Plot everything*)
, {t, 0, 1, 1/10}];
ListAnimate[Join[frames1, frames2, frames3]]
许可协议
我,本作品著作权人,特此采用以下许可协议发表本作品:
| 本作品采用知识共享CC0 1.0 通用公有领域贡献许可协议授权。 | |
| 采用本宣告发表本作品的人,已在法律允许的范围内,通过在全世界放弃其对本作品拥有的著作权法规定的所有权利(包括所有相关权利),将本作品贡献至公有领域。您可以复制、修改、传播和表演本作品,将其用于商业目的,无需要求授权。
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
说明
添加一行文字以描述该文件所表现的内容
Luneburg lens illuminated with a point source at varying positions.
18 5 2021
文件历史
点击某个日期/时间查看对应时刻的文件。
| 日期/时间 | 缩略图 | 大小 | 用户 | 备注 | |
|---|---|---|---|---|---|
| 当前 | 2021年5月19日 (三) 09:05 | 360 × 408(4 MB) | wikimediacommons>Berto | Uploaded own work with UploadWizard |
文件用途
以下页面使用本文件:
