From the beginning: I have function $u(r)$ and radial symmetry in system. Also I've got results as data array ${u_i(r_i)}$. And I want to plot it as $u(x,y)$. Due to radial symmetry its gonna be like $x=r \cos(\varphi), y=r \sin(\varphi)$ In other words I have function profile and want to "integrate" it over $2\pi\,\mathrm d\varphi$. Like this for Gaussian
1 Answer
$\begingroup$
$\endgroup$
0
One option would be to use RevolutionPlot3D.
u = Table[Sin[2 \[Pi]*r], {r, 0, 1, 0.1}]; (*u is a dummy u[r]*)
f = ListInterpolation[u, {0, 1}]; (*Create an interpolating function over the range {0,1}*)
(*Plot it over the domain.*)
RevolutionPlot3D[f[r], {r, #1, #2}] & @@@ f["Domain"]

You could also generate the points yourself and use ListPointPlot3D
u = Table[{r, Sin[2 \[Pi]*r]}, {r, 0, 1, 0.1}];(*table of {r,u[r]}*)
xyz = Flatten[Table[{#1*Cos[\[Theta]], #1*Sin[\[Theta]], #2} & @@@ u, {\[Theta],0, 2 \[Pi], 2 \[Pi]/100} ], 1];
ListPointPlot3D[
xyz
, Filling -> Axis
]

RevolutionPlot3D[]instead. $\endgroup$ParametricPlot3D? I believe it can be applied. $\endgroup$