File:Coherent Compounding.webm
Original file (WebM audio/video file, VP9, length 15 s, 918 × 322 pixels, 422 kbps overall, file size: 748 KB)
Captions
Summary
[edit]DescriptionCoherent Compounding.webm |
English: Coherent Compounding: Light in a scattering medium will be scrambled. But if the medium is moving, the scattered electric field will average to zero, thus leaving only the field scattered by the part of the medium that did not move. |
Date | |
Source | https://twitter.com/j_bertolotti/status/1457679852325253120 |
Author | Jacopo Bertolotti |
Permission (Reusing this file) |
https://twitter.com/j_bertolotti/status/1030470604418428929 |
Mathematica 12.0 code
[edit]\[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] = 30*\[Lambda]0; (*Parameters for the grid*)
ReMapC[x_] := RGBColor[(2 x - 1) UnitStep[x - 0.5], 0, (1 - 2 x) UnitStep[0.5 - x]];
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[imn][[1]];
L = -1/\[Delta]^2*KirchhoffMatrix[GridGraph[{dim, dim}]]; (*Discretized Laplacian*)
\[Sigma] = 10 \[Lambda]0;
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]}];
randomstructure[n_] := Table[RotateRight[ DiskMatrix[2, dim], {RandomInteger[{-Round[dim/2], Round[dim/2] }], RandomInteger[{ -Round[dim/2], Round[dim/2] - 10}]}], {n}];
\[Phi] = Table[ren = Clip[Total[randomstructure[100]] , {0, 1}] + 1;
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*)
Partition[LinearSolve[M, b], dim], {600}];
\[Phi]meanempty = Mean[\[Phi]];
averages = 200; nscatterers = 100;
scatterers = Table[{RandomInteger[{-Round[dim/2], Round[dim/2] }], RandomInteger[{ -Round[dim/2], Round[dim/2] - 10}]}, {averages}, {nscatterers}];
\[Phi] = Table[ ren = Clip[ Total[Join[ RotateRight[DiskMatrix[2, dim], #] & /@ scatterers[[j]], {2*RotateRight[DiskMatrix[4, dim], {0, -80}]}] ] , {0, 1}] + 1;
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*)
Partition[LinearSolve[M, b], dim], {j, 1, averages}];
frames = Table[\[Phi]tmp = Mean[\[Phi][[1 ;; j]]] - \[Phi]meanempty;
Grid[{
{Style[StringForm["\!\(\*SubscriptBox[\(E\), \(``\)]\)", NumberForm[j, {3, 0}]], Black, Bold, FontSize -> 16], Style["<\!\(\*SubscriptBox[\(E\), \(tot\)]\)>", Black, Bold, FontSize -> 16], Style["<\!\(\*SubscriptBox[\(E\), \(scatter\)]\)>", Black, Bold, FontSize -> 16]},
{
ImageAdd[
ArrayPlot[
Transpose[(Re@\[Phi][[j]]/
Max[Abs@\[Phi][[j]][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (
4 d)/\[Delta] ;; (-4 d)/\[Delta]]]])][[(
4 d)/\[Delta] ;; (-4 d)/\[Delta], (
4 d)/\[Delta] ;; (-4 d)/\[Delta]]], DataReversed -> True,
Frame -> False, PlotRange -> {-1, 1},
LabelStyle -> {Black, Bold, FontSize -> 14},
ColorFunctionScaling -> True, ColorFunction -> ReMapC,
ImageSize -> 300]
,
ArrayPlot[
Transpose[Clip[Total[Join[RotateRight[DiskMatrix[2, dim], #] & /@ scatterers[[j]], {2*RotateRight[DiskMatrix[4, dim], {0, -80}]}] ] , {0, 1}]/5] , DataReversed -> True , ColorFunctionScaling -> False, ColorFunction -> GrayLevel, Frame -> False, ImageSize -> 300, ImagePadding -> 0.001]],
ArrayPlot[ Transpose[(Re@Mean[\[Phi][[1 ;; j]]]/Max[Abs@Mean[\[Phi][[1 ;; j]]][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]]])][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], DataReversed -> True, Frame -> False, PlotRange -> {-1, 1}, LabelStyle -> {Black, Bold, FontSize -> 14}, ColorFunctionScaling -> True, ColorFunction -> ReMapC, ImageSize -> 300],
ArrayPlot[ Transpose[(Re@\[Phi]tmp/Max[Abs@\[Phi]tmp[[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]]])][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], DataReversed -> True, Frame -> False, PlotRange -> {-1, 1}, LabelStyle -> {Black, Bold, FontSize -> 14}, ColorFunctionScaling -> True, ColorFunction -> ReMapC, ImageSize -> 300]
}}]
, {j, 1, 100, 1}];
ListAnimate[Join[
Flatten@Table[Table[frames[[j]], {11 - j}], {j, 1, 10}]
,
frames[[11 ;; 100]]
]
]
Licensing
[edit]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 |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 09:21, 9 November 2021 | 15 s, 918 × 322 (748 KB) | Berto (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Transcode status
Update transcode statusMetadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
User comments | Created with the Wolfram Language : www.wolfram.com |
---|---|
Software used |