# Bessel Beam , how it is possible to plot a 3D with a 2D projection in one plot? [duplicate]

Sincerely, I am new in Mathematica, I checked all the previous post.

The idea is to plot a 3D Bessel function with a 2D projection

They can be generated as follows.

Plot3D[BesselJ[0, Sqrt[x^2 + y^2]], {x, -10, 10}, {y, -10, 10},
ColorFunction -> "Rainbow"]

DensityPlot[BesselJ[0, Sqrt[x^2 + y^2]], {x, -10, 10}, {y, -10, 10},
PlotPoints -> 100, ColorFunction -> "Rainbow",
PerformanceGoal -> "Quality"]


The final goal is to obtain a similar picture as was included

• So what's your question? Dec 23, 2018 at 16:11
• How to join both plots 3D and 2D in an single one Dec 23, 2018 at 16:23
• Possibly duplicate of this question and this one Dec 23, 2018 at 16:48
• This question might help you too. Dec 23, 2018 at 17:20
• Dec 24, 2018 at 0:52

p1 = Plot3D[BesselJ[0, Sqrt[x^2 + y^2]], {x, -10, 10}, {y, -10, 10},
PlotPoints -> 200, ColorFunction -> "Rainbow", Mesh -> None,
Boxed -> False, BoxRatios -> {1, 1, 1}];

p2 = DensityPlot[
BesselJ[0, Sqrt[x^2 + y^2]], {x, -10, 10}, {y, -10, 10},
PlotPoints -> 300, ColorFunction -> "Rainbow",
PerformanceGoal -> "Quality", Frame -> False,

p3 = Plot3D[-1, {x, -10, 10}, {y, -10, 10}, PlotStyle -> Texture[p2],
Mesh -> None];

Show[p1, p3, PlotRange -> {-1, 1}]


• Okkes, thank you for your help! Dec 24, 2018 at 1:23

Let's call the second plot

pic = DensityPlot[BesselJ[0, Sqrt[x^2 + y^2]], {x, -10, 10}, {y, -10, 10},PlotPoints -> 100, ColorFunction -> "Rainbow",PerformanceGoal -> "Quality"]


pic is a Graphicsobject Graphics[GraphicsComplex[arg]], arg[1] is a twodimensional list of points. The third dimension of arg[1], for example z==-1, has to be added.

arg = Apply[List, pic[[1]]];


We now have to change the pointlist 2D->3D

pic3D=Graphics3D[Apply[GraphicsComplex, {Map[{#[[1]], #[[2]], -1} &, arg[[1]]],arg[[2]], arg[[3]]}]]


This 3D-picture can be displayed together with the first

Show[{Plot3D[BesselJ[0, Sqrt[x^2 + y^2]], {x, -10, 10}, {y, -10, 10}, ColorFunction -> "Rainbow"], pic3D}, PlotRange -> All]


• Ulrich, thank you very much! Dec 24, 2018 at 1:22