File:Multiple Scattering02.gif

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Multiple_Scattering02.gif(263 × 263 pixels, file size: 1.18 MB, MIME type: image/gif, looped, 93 frames, 9.3 s)

Captions

Captions

A pulse of light scrambled by a random collection of scatterers.

Summary[edit]

Description
English: A pulse of light scrambled by a random collection of scatterers.
Date
Source https://twitter.com/j_bertolotti/status/1506226782944518145
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 13.0 code[edit]

c = 1; (*speed of light*)
\[Omega]min = 1.; \[Omega]max = 5.;
\[Omega]0 = Mean[{\[Omega]min, \[Omega]max}]; \[Sigma]0 = (\[Omega]max - \[Omega]min)/10;
amplitude[w_] := E^(-(1/(2 \[Sigma]0^2)) ((w - \[Omega]0)^2) );

k0 = N[\[Omega]0/c];  \[Lambda]0 = N[(2 \[Pi])/k0]; d = \[Lambda]0/2; (*typical scale of the absorbing layer*)
\[Delta] = \[Lambda]0/10; \[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]];
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*)
ren0 = 1.5 - 1;
ren = ren0*Clip[Total[ Table[RotateRight[DiskMatrix[3, dim], {RandomInteger[{0, dim}], RandomInteger[{-50, Round[dim/2] - 15}]}], {200}] ], {0, 1}] + 1;
n = ren + I imn;
\[Sigma] = 2 \[Lambda]0;
sourcef[x_, y_, w_] := Sqrt[w/c] E^(-(x^2/(2 \[Sigma]^2))) E^(-((y + \[CapitalDelta]/2)^2/(2 (\[Lambda]0/2)^2))) E^(I w/c y);
\[Delta]\[Omega] = (\[Omega]max - \[Omega]min)/200;
\[Phi] = Table[
   \[Phi]in = Table[amplitude[\[Omega]]*sourcef[x, y, \[Omega]] , {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}];
   b = -(Flatten[n]^2 - 1) (\[Omega]/c)^2 Flatten[\[Phi]in]; (*Right-hand side of the equation we want to solve*)
   M = L + DiagonalMatrix[ SparseArray[Flatten[n]^2 (\[Omega]/c)^2]]; (*Operator on the left-hand side of the equation we want to solve*)
   Partition[LinearSolve[M, b], dim], {\[Omega], \[Omega]min, \[Omega]max, 1*\[Delta]\[Omega]}];
\[Phi]dim = Dimensions[\[Phi]][[1]];

frames = Table[ ImageAdd[
ArrayPlot[ Transpose[((Abs@Total[Table[\[Phi][[j]] E^(I (\[Omega]min + \[Delta]\[Omega] (j - 1) ) t), {j, 1, \[Phi]dim}] ][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]])/3)^2], DataReversed -> True, Frame -> False, PlotRange -> {0, 1}, LabelStyle -> {Black, Bold}, ColorFunctionScaling -> True, ColorFunction -> "AvocadoColors", ClippingStyle -> White, Background -> Black, ImageSize -> 300]
    ,
ArrayPlot[Transpose[(ren - 1)/5] , DataReversed -> True , ColorFunctionScaling -> False, ColorFunction -> GrayLevel, Frame -> False]
    ]
   , {t, 32, -60, -1}];

ListAnimate[frames]

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero 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.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current13:59, 23 March 2022Thumbnail for version as of 13:59, 23 March 2022263 × 263 (1.18 MB)Berto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata