title: Mathematica to Python/C code
body: <p>I am trying to understand some code in Mathematica, but am not familiar with its syntax. I can't seem to wrap my head around the logic here.</p>
  
  <pre><code>anamorph3[img_, angle_: 270 Degree, imgWidth_: 512] :=
  Module[{data, f, matrix, dim, rOuter, rInner = 1.},
  dim = ImageDimensions[img];
  rOuter = rInner (1 + angle #2/#1 &amp; @@ dim);
  data = Table[
  ListInterpolation[#[[All, All, i]], 
  {{rOuter, rInner}, {-angle/2, angle/2}}], {i, 3}] &amp;@ImageData[img];
  f[i_, j_] := If[Abs[j] &lt;= angle/2 &amp;&amp; rInner &lt;= i &lt;= rOuter, 
  Through[data[i, j]], {1., 1., 1.}];
  Image@Table[f[Sqrt[i^2 + j^2], ArcTan[i, -j]], 
  {i, -rOuter, rOuter, 2 rOuter/(imgWidth - 1)},
  {j, -rOuter, rOuter, 2 rOuter/(imgWidth - 1)}]]
  </code></pre>
  
  <p>More details about this code can be found here </p>
  
  <p><a href="https://stackoverflow.com/questions/8235517/how-to-make-imagetransformation-produce-an-anamorphic-version-of-image">How to make ImageTransformation produce an anamorphic version of image</a>.</p>
  
  <p>It would be great if someone could write the pseudocode/ python code for this.</p>