# DensityPlot3D of a Laguerre-Gaussian

I just posted this question yesterday, Color a phase and density of a density plot, and I was also curious how I can see this in 3D. I want to use the same equation,

LG[r_, \[Phi]_, p_, l_, w_] := (
Sqrt[(2 p!)/(\[Pi] (p + Abs[l])!)]
1/w E^(-r^2/w^2)
((r Sqrt[2])/w)^Abs[l]
LaguerreL[p, Abs[l], 2 r^2/w^2]
E^(I l \[Phi])
)


and plot it in 3D similar to this,

Plot3D[
Evaluate[
Arg@LG[
Sqrt[x^2 + y^2],
ArcTan[x, y],
2, 2, 1
]
]
, {x, -2, 2}
, {y, -2, 2}
, Mesh -> None
, PlotPoints -> 50
, PlotRange -> All
, ImageSize -> {400, 400}
]


The Arg takes the complex component and plots it on the z axis and this is good, but now I want to include along that path a density.

To further clarify, I'm interested in seeing a 3D density plot of Orbital Angular Momentum of light (OAM wiki page). The only image on that wiki page not only has a 3D representation of the phase (just as I have in the figure above), but it also has the density along that phase. I would like to take it one step further, (since the density is not limited to a cork screw plane) and show the 3D cork screw like density. (I'm not sure if it is frowned upon to copy an image over from that wiki page, so I won't.)

So I was trying to use DensityPlot3D, but I'm unsure how to proceed. So to recap the same as the first link above just in 3D (and there will be no need for the Hue for the phase since the phase will be shown in the $z$ direction). The final picture should just look like a spiral that has a density along that spiral (and obviously as you increase $p$ then you have additional spirals).

• What does "I want to include along that path a density" mean? Jul 12 '18 at 20:57
• Are you wanting to use ColorFunction? Jul 12 '18 at 22:20
• Also FYI, Exclusions -> {x^2 + y^2 == 1, x == 0, y == 0, x^2 + y^2 == 3} will get rid of the artifacts at the discontinuities. Jul 12 '18 at 22:20
• @DavidG.Stork I updated my post to clarify what I'm after.
– Josh
Jul 13 '18 at 12:15
• Quite closely related, but not really a duplicate: How to visualize Riemann surfaces?
– Jens
Jul 13 '18 at 20:25

You're explicitly asking for a DensityPlot3D but want a representation similar to the corkscrews in the Wikipedia link. The two don't quite correspond to the same representation, so I'll focus on the volumetric plot and not on reproducing the Wikipedia plots:

Since the domain of the plot is three-dimensional, you have to first reinstate the z dependent phase factor that describes the propagation of the beam in space. For our purposes, it has the effect of making the z coordinate into a variable that directly measures the phase advance of the beam. This is the reason for the factor Exp[-I z] multiplying your LG in the following. I'm plotting the real part of the combined wave function, so there are positive and negative function values in the volume:

Module[{l = 2, p = 2, xMax = 3, zMax},
zMax = Pi l;
DensityPlot3D[
Re[LG[Sqrt[x^2 + y^2], ArcTan[x, y], p, l, 1] Exp[-I z]],
{x, -xMax, xMax}, {y, -xMax, xMax}, {z, -zMax, zMax}, PlotPoints -> 60,
AxesLabel -> {"x", "y", "phase"}, PlotTheme -> "Classic"]]


Adding the z coordinate to your function was the only trick I used.

Here you can see the helical structure of the wave. The vertical axis is labeled "phase" but could also be called "dimensionless propagation distance". The maximum intensity in this plot occurs when the radial function is large in magnitude and the phase of the LG beam is equal to z modulo $2\pi$. The combination of these dependencies creates the interwoven tubes.

Coming back to the corkscrews in the Wikipedia link: they are surfaces of constant (fixed) phase with color-coded intensity. That's not a volumetric plot, but a surface plot because you're restricting to only those combinations of x, y and z for which the overall phase has a constant value.

Note about $z$

I should perhaps clarify that z in the above plot is an auxiliary variable to measure the phase of LG, just like it is always used in basic discussions of orbital angular momentum, e.g. on the linked Wikipedia page. For an actual Gaussian beam in space, there are additional z dependent effects that would have to be included: the dependence of the parameter w on z, and the Gouy phase. But the goal of the question was limited to characterizing the phase without these effects.