1
$\begingroup$

I have an annulus and I'd like to the take the 2D Fourier transform of it, my code:

a[x_, y_] := 1 < (x^2 + y^2) <= 2
RegionPlot[a[x, y], {x, -3, 3}, {y, -3, 3}]

I have tried FourierTransform and Fourier and they do nothing.

Am I doing something visibly stupid and wrong?

$\endgroup$
5
  • $\begingroup$ It's a little unclear what you mean by the Fourier transform of a region. Are you trying to do the 2D Fourier transform of the piecewise defined function a[x_, y_] = Piecewise[{{1, 1 < (x^2 + y^2) <= 2}, {0, True}}]? Or are you trying to do the Fourier transform of a constant over that region (like, if you're computing the far-field diffraction pattern created by light passing through an annular aperture)? Or something else? $\endgroup$
    – march
    Nov 21 '17 at 16:56
  • 1
    $\begingroup$ Just change from cartesian to polar coordinates and do HankelTransfrom $\endgroup$ Nov 21 '17 at 17:54
  • 1
    $\begingroup$ Just an FYI, RegionPlot returns a graphics object that is a polygonal representation of the input, and is meant for visualization only. $\endgroup$
    – Chip Hurst
    Nov 21 '17 at 18:56
  • $\begingroup$ My Mathematica (11.0) does not recognise HankelTransform as a command. It's not even in the help documentation! What could be the reason? $\endgroup$ Nov 22 '17 at 0:31
  • $\begingroup$ Solved!I went to 11.2. $\endgroup$ Nov 22 '17 at 0:55
2
$\begingroup$

Define your region as a Piecewise function (as suggested by march) and then apply FourierTransform:

a[x_, y_] := Piecewise[{{1, 1 < (x^2 + y^2) <= 2}, {0, True}}];
FourierTransform[a[x, y], {x, y}, {u, v}]

enter image description here

You may want to check to make sure that the FourierParameters are using the definition you are used to.

$\endgroup$
8
  • $\begingroup$ Thanks, I'm trying it but its takes ages to do the FT. Is there any way of speeding it up? $\endgroup$ Nov 21 '17 at 19:30
  • $\begingroup$ Its a bit faster if you use set instead of set delayed ("=" instead of ":="). If it is taking longer than a few seconds, then restart the kernel because something is wrong. $\endgroup$
    – bill s
    Nov 21 '17 at 20:11
  • $\begingroup$ I'm doing:<code>ring[x_, y_] = Piecewise[{{1,1<(x^2+y^2)<=2}, {0, True}] </code>, then <code>ft[u,v] = FourierTransform[ring[x,y],{x,y},{u,v}]</code>, it takes ages and it does not return anything! Anything wrong wiht me? $\endgroup$ Nov 21 '17 at 23:30
  • $\begingroup$ Start with a fresh session (quit the kernel), copy paste the code above as it is, and you will get the answer I just pasted after a few seconds. $\endgroup$
    – bill s
    Nov 21 '17 at 23:47
  • $\begingroup$ Yes that's what I did... I'll try on a different machine tomorrow... Which version of Mathematica are you on by the way? $\endgroup$ Nov 21 '17 at 23:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.