Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I wish to generate a surface intensity plot of an Airy disk (or perhaps a two-dimensional Gaussian approximation to an Airy disk) on an (x, y)-plane at a specified coordinate. The hope is to have something like this: http://en.wikipedia.org/wiki/File:Airy-3d.svg with solid surface coloration. I am OK with a decent mesh approximation of a representative curve.

Is there a built in method of generating these sorts of intensity plots and treating them like Graphics3D objects that can be translated and placed as desired?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

RevolutionPlot3D is a good tool for handling this question. The Airy function is given by

airy[r_?NumericQ, β_?NumericQ] := ((1 - E^(-(2/β^2))) BesselJ[1, (2 π r)/β]^2)/(π r^2 β^2)

Because 3D plotting is much slower, before proceeding to 3D, I recommend making a 2D plot to check that the parameter β has been chosen to give a good looking curve.

Plot[airy[r, 1.], {r, 0, 1.5}, AspectRatio -> Automatic, PlotRange -> All]

2Dplot.png

Because the revolution will be made about the z-axis, the arguments from the 2D plot can be transferred directly. To get the right look, it is necessary to adjust some the display options away from their default values.

plot = RevolutionPlot3D[airy[r, 1.], {r, 0, 1.5},
  Boxed -> False,
  BoxRatios -> {1, 1, 1},
  Axes -> None,
  PlotRange -> All,
  Mesh -> 20,
  PlotPoints -> 100,
  Lighting -> {{"Ambient", White}}]

3Dplot.png

A fine witches hat for Halloween.

To extract the polygons used to draw the RevolutionPlot3D, you can use kguler's function getVrtxCoords from this answer. Here is what you will get

polygons = Polygon@getVrtxCoords[plot, {Polygon}];
Graphics3D[polygons]

polygons.png

share|improve this answer

The plot referenced can be done with Plot3D. I grabbed the intensity profile from the wiki page

{x0,y0}={0,0};
s[x_,y_]:=Sqrt[(x-x0)^2 + (y-y0)^2]
Plot3D[(2 BesselJ[1, s[x,y]]/s[x,y])^2,
  {x, -10, 10}, {y, -10, 10}, PlotRange -> All,
  ColorFunction -> "BlueGreenYellow"]

Airy disk

I wasn't sure about what you meant by translating and placing, so you may have to redefine s[x,y] according its definition

k a Sin[θ] == s[x,y,z]
share|improve this answer
    
Intensity should be square of Bessel function of first kind (intensity non-negative)...but pretty plot –  ubpdqn Oct 20 '13 at 13:40
    
You are very right. My original plot had the square, but when I made it again with fancy colors and shifted origin, I lost the square. Edited. –  Timothy Wofford Oct 20 '13 at 13:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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