Wêne:Spherical Lens.gif
Naverokên rûpelê bi zimanên din nayê destekkirin.
Spherical_Lens.gif (543 × 543 pixel, mezinbûnê data: 6,8 MB, MIME-typ: image/gif, looped, 92 frames, 9,2 s)
Ev pel ji Wikimedia Commonsê ye. Agahdariya li ser rûpela danasîna pelê li jêr tê nîşandan. |
Danasîn
DanasînSpherical Lens.gif |
English: Visualization of light through a spherical lens, as a function of the radii of curvature of the two facets. Notice that we are far from the "thin lens" approximation. |
Dîrok | |
Çavkanî | https://twitter.com/j_bertolotti/status/1392058658520027138 |
Xwedî | Jacopo Bertolotti |
Destûr (Dîsa bikaranînê vê dosyeye) |
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/15; \[CapitalDelta] = 40*\[Lambda]0; (*Parameters for the grid*)
\[Sigma] = 10 \[Lambda]0; (*width of the gaussian beam*)
sourcef[x_, y_] := E^(-(x^2/(2 \[Sigma]^2))) E^(-((y + \[CapitalDelta]/2)^2/(2 (\[Lambda]0/2)^2))) E^(I k0 y);
\[Phi]in = Table[Chop[sourcef[x, y]], {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/ 2, \[Delta]}]; (*Discretized source*)
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[\[Phi]in][[1]];
L = -1/\[Delta]^2*KirchhoffMatrix[GridGraph[{dim, dim}]]; (*Discretized Laplacian*)
ycenter = Map[y0 /. # &, FullSimplify[Solve[(x1)^2 + (y1 - y0)^2 == r^2, {y0}]][[All, 1, All]] ];
surface2[x_] := Evaluate[Evaluate[((Sqrt[r^2 - (x)^2] + y0) /. {y0 -> ycenter[[1]]}) /. {y1 -> -(\[CapitalDelta]/4), x1 -> \[CapitalDelta]/2, r -> 100 \[CapitalDelta]} ] ];
surface1[x_] := Evaluate[((-Sqrt[r^2 - (x)^2] + y0 - 1) /. {y0 -> ycenter[[2]]}) /. {y1 -> -(\[CapitalDelta]/4), x1 -> \[CapitalDelta]/2, r -> 100 \[CapitalDelta]}];
frames1 = Table[
ren = Table[ If[y < Re@Evaluate[surface2[x]] && y > Re@surface1[x], n0, 1], {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
n = ren + I imn;
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*)
ImageAdd[
ArrayPlot[ Transpose[(Abs[\[Phi]in + \[Phi]s]/Max[Abs[\[Phi]in + \[Phi]s]])^2][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], ColorFunction -> "AvocadoColors" , DataReversed -> True, Frame -> False, PlotRange -> {0, 1}],
ArrayPlot[Transpose@Re[(n - 1)/5] , DataReversed -> True , ColorFunctionScaling -> False, ColorFunction -> GrayLevel, Frame -> False]
](*Plot everything*)
, {n0, 1, 2.5, 0.24}];
surface2[x_] := Evaluate[Evaluate[((Sqrt[r^2 - (x)^2] + y0) /. {y0 -> ycenter[[1]]}) /. {y1 -> -(\[CapitalDelta]/4), x1 -> \[CapitalDelta]/2, r -> (c^2 + (c \[CapitalDelta])/2 + (5 \[CapitalDelta]^2)/16)/(
2 (c + \[CapitalDelta]/4))} ] ];
surface1[x_] := Evaluate[((-Sqrt[r^2 - (x)^2] + y0 - 1) /. {y0 -> ycenter[[2]]}) /. {y1 -> -(\[CapitalDelta]/4), x1 -> \[CapitalDelta]/2, r -> 100 \[CapitalDelta]}];
frames2 = Table[
ren = Table[ If[y < Re@Evaluate[surface2[x]] && y > Re@surface1[x], 2.5, 1], {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
n = ren + I imn;
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*)
ImageAdd[
ArrayPlot[
Transpose[(Abs[\[Phi]in + \[Phi]s]/Max[Abs[\[Phi]in + \[Phi]s]])^2][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], ColorFunction -> "AvocadoColors" , DataReversed -> True,
Frame -> False, PlotRange -> {0, 1}],ArrayPlot[Transpose@Re[(n - 1)/5] , DataReversed -> True , ColorFunctionScaling -> False, ColorFunction -> GrayLevel, Frame -> False]
](*Plot everything*)
, {c, -(\[CapitalDelta]/4) + 0.01, 0, \[CapitalDelta]/(20*3)}];
surface2[x_] := Evaluate[Evaluate[((Sqrt[r^2 - (x)^2] + y0) /. {y0 -> ycenter[[1]]}) /. {y1 -> -(\[CapitalDelta]/4), x1 -> \[CapitalDelta]/2, r -> 5/8 \[CapitalDelta]} ] ];
surface1[x_] := Evaluate[((-Sqrt[r^2 - (x)^2] + y0 - 1) /. {y0 -> ycenter[[2]]}) /. {y1 -> -(\[CapitalDelta]/4), x1 -> \[CapitalDelta]/2, r -> (c^2 + (c \[CapitalDelta])/2 + (5 \[CapitalDelta]^2)/16)/(2 (c + \[CapitalDelta]/4))}];
frames3 = Table[
ren = Table[If[y < Re@Evaluate[surface2[x]] && y > Re@surface1[x], 2.5, 1], {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
n = ren + I imn;
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*)
ImageAdd[
ArrayPlot[Transpose[(Abs[\[Phi]in + \[Phi]s]/Max[Abs[\[Phi]in + \[Phi]s]])^2][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], ColorFunction -> "AvocadoColors" , DataReversed -> True, Frame -> False, PlotRange -> {0, 1}],
ArrayPlot[Transpose@Re[(n - 1)/5] , DataReversed -> True , ColorFunctionScaling -> False, ColorFunction -> GrayLevel, Frame -> False]
](*Plot everything*)
, {c, -(\[CapitalDelta]/4) + 0.01, -\[CapitalDelta]/10, \[CapitalDelta]/(20*3)}];
surface2[x_] := Evaluate[Evaluate[((Sqrt[r^2 - (x)^2] + y0) /. {y0 -> ycenter[[1]]}) /. {y1 -> -(\[CapitalDelta]/4), x1 -> \[CapitalDelta]/2, r -> (c^2 + (c \[CapitalDelta])/2 + (5 \[CapitalDelta]^2)/16)/(2 (c + \[CapitalDelta]/4))} ] ];
surface1[x_] := Evaluate[((-Sqrt[r^2 - (x)^2] + y0 - 1) /. {y0 -> ycenter[[2]]}) /. {y1 -> -(\[CapitalDelta]/4), x1 -> \[CapitalDelta]/2, r -> 109/120 \[CapitalDelta]}];
frames4 = Table[
ren = Table[If[y < Re@Evaluate[surface2[x]] && y > Re@surface1[x], 2.5, 1], {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
n = ren + I imn;
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*)
ImageAdd[
ArrayPlot[Transpose[(Abs[\[Phi]in + \[Phi]s]/Max[Abs[\[Phi]in + \[Phi]s]])^2][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], ColorFunction -> "AvocadoColors" , DataReversed -> True, Frame -> False, PlotRange -> {0, 1}], ArrayPlot[Transpose@Re[(n - 1)/5] , DataReversed -> True , ColorFunctionScaling -> False, ColorFunction -> GrayLevel, Frame -> False]
](*Plot everything*)
, {c, 0, -(\[CapitalDelta]/4) + 0.01, -(\[CapitalDelta]/(20*3))}];
surface2[x_] := Evaluate[Evaluate[((Sqrt[r^2 - (x)^2] + y0) /. {y0 -> ycenter[[1]]}) /. {y1 -> -(\[CapitalDelta]/4), x1 -> \[CapitalDelta]/2, r -> 100 \[CapitalDelta]} ] ];
surface1[x_] := Evaluate[((-Sqrt[r^2 - (x)^2] + y0 - 1) /. {y0 -> ycenter[[2]]}) /. {y1 -> -(\[CapitalDelta]/4), x1 -> \[CapitalDelta]/2, r -> (c^2 + (c \[CapitalDelta])/2 + (5 \[CapitalDelta]^2)/16)/(2 (c + \[CapitalDelta]/4))}];
frames5 = Table[
ren = Table[If[y < Re@Evaluate[surface2[x]] && y > Re@surface1[x], 2.5, 1], {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
n = ren + I imn;
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*)
ImageAdd[
ArrayPlot[Transpose[(Abs[\[Phi]in + \[Phi]s]/Max[Abs[\[Phi]in + \[Phi]s]])^2][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], ColorFunction -> "AvocadoColors" , DataReversed -> True, Frame -> False, PlotRange -> {0, 1}], ArrayPlot[Transpose@Re[(n - 1)/5] , DataReversed -> True , ColorFunctionScaling -> False, ColorFunction -> GrayLevel, Frame -> False]
](*Plot everything*)
, {c, -\[CapitalDelta]/10, -(\[CapitalDelta]/4) + 0.01, -(\[CapitalDelta]/(20*3))}];
ListAnimate[ Flatten[ Join[Table[frames1[[1]], {5}], frames1, Table[frames2[[1]], {5}], frames2, Table[frames3[[1]], {5}], frames3, Table[frames4[[1]], {5}], frames4, Table[frames5[[1]], {5}], frames5, Table[frames1[[-1]], {5}], Reverse@frames1]] ]
Lîsans
I, the copyright holder of this work, hereby publish it under the following license:
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Items portrayed in this file
motîv Kurdish (Latin script) (transliterated)
some value
rewşa mafê telîfê Kurdish (Latin script) (transliterated)
destûr Kurdish (Latin script) (transliterated)
Creative Commons CC0 License îngilîzî
dema avabûnê Kurdish (Latin script) (transliterated)
11 gulan 2021
Dîroka daneyê
Ji bo dîtina guhartoya wê demê bişkoka dîrokê bitikîne.
Dîrok/Katjimêr | Wêneyê biçûk | Mezinahî | Bikarhêner | Şirove | |
---|---|---|---|---|---|
niha | 09:19, 12 gulan 2021 | 543 x 543 (6,8 MB) | Berto | Uploaded own work with UploadWizard |
Bikaranîna pelê
Rûpelekî ku ji vê dosyeyê bi kar tîne nîne.
Bikaranîna gerdûnî ya pelê
Ev wîkiyên di rêzê de vê pelê bi kar tînin:
- Bikaranîna di en.wikipedia.org de
Daneyên meta
Dosye zêdetir agahiyan dihewîne, mihtemelen ji kamera an skennira dijîtal hatine ku ji bo çêkirin an dîjîtalîzekirina wan hatine bikaranîn.
Ger dosye ji halê xwe yê eslî hatibe guhartin, dibe ku hin detay bi temamî neyên xuya li ser dosyeya guhartî.
GIF file comment | Created with the Wolfram Language : www.wolfram.com |
---|
Ji "https://ku.wikipedia.org/wiki/Wêne:Spherical_Lens.gif" hatiye standin.