File:Transmission Matrix.gif

Summary

Description
English: Multiple scattering in disordered systems is, for low enough amplitudes, a linear process. As such it can be fully described by a matrix. This "transmission matrix" can be measured column by column measuring the response to a set of input signals. Just like with any other linear operator, once you know how it acts on a complete basis, you know in principle everything about it, and so you know exactly what input will produce any desired output.
Date
Source https://twitter.com/j_bertolotti/status/1288156950400765952
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929
GIF development
InfoField

Mathematica 12.1 code

\[Lambda] = 1;
k0 = (2 \[Pi])/\[Lambda];
c = 1;
\[Omega] = c k0;
\[Alpha] = (4 I)/k0^2;
\[Sigma] = (k0^3 Norm[\[Alpha]]^2)/4;
G[r_] := N[I/4 HankelH1[0, k0 Norm[r] ]];
ReMapC[x_] := RGBColor[(Cos[2 \[Pi] x] + 1)/2 UnitStep[x - 0.5], 0, (Cos[2 \[Pi] x] + 1)/2 UnitStep[0.5 - x]];
\[Theta] = -\[Pi]/4;
source[{x_, y_}, y0_] := E^(I k0 x) E^(-((y - y0)^2/(2 0.5^2)));
dim = 3 10^2;
dipoles = RandomVariate[UniformDistribution[{{-5, 5}, {-10, 10}}], {dim}];
Eoutpos = Table[{5.5, y}, {y, -9, 9, 1.}];
p0 = Table[
  E0 = Table[source[dipoles[[j]], y0], {j, 1, dim}];
  ME = Table[If[k == j, 0, \[Alpha] k0^2 G[dipoles[[j]] - dipoles[[k]] ] ], {j, 1, dim}, {k, 1, dim}];
  Es = Inverse[IdentityMatrix[dim] - ME].E0; (*Es=E0+ME.ES\[Rule]Es=(1-ME)^-1.E0*)
  Etot[x_, y_, y0_] := source[{x, y}, y0] + \[Alpha] k0^2 Sum[G[{x, y} - dipoles[[j]] ] Es[[j]], {j, 1, dim}];
  {Eout = Table[Re[Etot[5.5, y, y0] ], {y, -9, 9, 1.}],
   DensityPlot[Re[Etot[x, y, y0] ], {x, -10, 10}, {y, -10, 10}, PlotPoints -> 50, ColorFunction -> ReMapC, Frame -> False, PlotRange -> All, ImageSize -> Large, Epilog -> {White, Point[dipoles], LightGray, Table[{Disk[Eoutpos[[j]], 0.22]}, {j, 1, Dimensions[Eout][[1]]}], Table[{ReMapC[(Eout[[j]]/Max[Abs@Eout] + 1)/2 ], Disk[Eoutpos[[j]], 0.2]}, {j, 1, Dimensions[Eout][[1]]}]} ]}
  , {y0, -9, 9, 1.}];
p1 = Table[
   matrix = Table[If[j <= k, ReMapC[(p0[[j, 1, i]]/Max[Abs@p0[[1, 1]]] + 1)/2 ], White], {i, 1, Dimensions[Eout][[1]]}, {j, 1, Dimensions[Eout][[1]]}];
   Grid[{{
      p0[[k, 2]],
      Text[Style["\!\(\*SubscriptBox[\(E\), \(out\)]\)= ", Black, Bold, FontSize -> 16]]
      ,
      Text[Style[MatrixForm[matrix], Bold, FontSize -> 16]]
      ,
      Text[Style["\!\(\*SubscriptBox[\(E\), \(in\)]\)", Black, Bold, FontSize -> 16]]
      }}]
   , {k, 1, Dimensions[Eout][[1]]}];
ListAnimate[p1]

Licensing

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.

Category:CC-Zero#Transmission%20Matrix.gifCategory:Self-published work
Category:Animated GIF files Category:Scattering Category:Optics Category:Images with Mathematica source code Category:Animations of optics
Category:Animated GIF files Category:Animations of optics Category:CC-Zero Category:Images with Mathematica source code Category:Optics Category:PNG created with Mathematica Category:Scattering Category:Self-published work