Talk:Mathematica/Polar Surface Plots

For Mathematica 6.0, please use the next code:

MyListPolarPlot3D[data_, rRange_, thetaRange_, zRange_] := Module[ {}, gr1 = ListPlot3D[ data, DataRange -> { { rRange1, rRange2}, { thetaRange1, thetaRange2} },   DisplayFunction -> Identity, ColorFunction -> "SolarColors", ColorFunction -> Automatic, MeshFunctions -> {Function[{x, y, z}, x*Cos[y]], Function[{x, y, z}, x*Sin[y]]}, BoundaryStyle -> None, ColorFunctionScaling -> True, Mesh -> 30 ]; substitution = {r_, theta_, z_} -> {r Cos[theta], r Sin[theta], z}; gr2 = gr1 /. GraphicsComplex[p_List, rest__] :> GraphicsComplex[ReplaceAll[p, substitution], rest] ; (* * Retitle the axes and show final graph  *) Return[ Show[ gr2, AxesLabel -> {"X", "Y", "Z"}, DisplayFunction -> $DisplayFunction , BoxRatios -> {1, 1, 0.8}, PlotRange -> { {-0.65*rRange2, 0.65*rRange2}, {-0.65 rRange2, 0.65*rRange2}, {zRange1, zRange2} }   ]   ] ;    ]

This is an example

Fun[r_, t_] := 0.632 (0.710 \[ExponentialE]^(-1.166 (0.492+ r^2 -         1.403 r Cos[t])) +      0.710 \[ExponentialE]^(-1.166 (0.492+ r^2 + 1.403 r Cos[t]))) ;

dataPlot = Table[ \[Psi][r, t], {t, 0.0, 2.0*Pi, 2*Pi/100}, {r, 0.0, 4.0, 0.08}] ; MyListPolarPlot3D[ dataPlot, {0.0, 4.0}, {0.0, 2*Pi}, {0, 0.55}]