Q:

Density Plot on a Parametric Plot 3D

I am trying to insert a density plot on a parametric plot in 3D, but I am not successful.
I post the part of the code on which I am working on.
b2[r_] := r/Exp[r - r0];
z2[r_] := NIntegrate[(t/b2[t] - 1)^(-1/2), {t, 1, r}];
up2 = ParametricPlot3D[{r*Cos[x], r*Sin[x], z2[r]}, {x, 0, 2 Pi}, {r, 
    1, 10}, ColorFunction -> "LakeColors", 
   PlotStyle -> {"LakeColors", Opacity[0.4]}, PlotPoints -> 50];
dp2 = ParametricPlot3D[{r*Cos[x], r*Sin[x], -z2[r]}, {x, 0, 2 Pi}, {r,
     1, 10}, ColorFunction -> "LakeColors", 
   PlotStyle -> {"LakeColors", Opacity[0.4]}, PlotPoints -> 50];
Show[up2, dp2, PlotRange -> All, Boxed -> False, 
 Axes -> {False, False, False}, 
 ImageSize -> 800]

This is the parametric 3D plot. And I would like to plot on it the following function
\[CapitalPhi2][r_] := -a/r;

I would like to obtain something similar to this image
PlotImage. Could you please help me to fix this issue? Thank you very much! :-)

A:

The ColorFunction option of ParametricPlot3D can color the surface according to a function you specify. Here's a simpler example to show the idea without the NIntegrate.
The function you'd like to use as a density plot on the parametric plot has a typo: \[CapitalPhi]2 instead of \[CapitalPhi2]. You don't specify a value for the parameter a, so I set a=1 for this example:
\[CapitalPhi]2[r_] := -1/r;

The ColorFunction option of ParametricPlot3D has r as its fifth argument. You need to scale the range of the function to the range 0 to 1 for color gradients, e.g., using Rescale:
With[{rMin = 1, rMax = 10},
  ParametricPlot3D[{r*Cos[x], r*Sin[x], r}, {x, 0, 2 Pi}, {r, rMin, rMax}, 
    ColorFunction -> (ColorData["TemperatureMap"][
      Rescale[\[CapitalPhi]2[#5], {\[CapitalPhi]2[rMin], \[CapitalPhi]2[
     rMax]}]] &), 
    ColorFunctionScaling -> False]
]

