# Difficulty with making the color gradient in the Parametric3D plot

I am making a parametric 3D plot representing a graphical solution of a nonlinear equation. This explains, why the expression is so heavy.

I would like to plot it with the color gradient such as "Rainbow", and also I need to show a mesh to better visualize the 3D surface. While the surface itself is successfully plotted:

ParametricPlot3D[{-(1/(2^(1/3) R)) - (-1 - Sqrt[
1 - 4 (a - Sqrt[2] Sqrt[1/R])] + 8 (a - Sqrt[2] Sqrt[1/R]))/(
2^(5/6) Sqrt[3] Sqrt[
Abs[-1 - Sqrt[1 - 4 (a - Sqrt[2] Sqrt[1/R])] +
2 (a - Sqrt[2] Sqrt[1/R])]]),
a, (6.56*1.84*R^0.73)/((-1 - Sqrt[1 - 4 a] + 8 a)/(
2^(5/6) Sqrt[3] Sqrt[
Abs[-1 - Sqrt[1 - 4 a] + 2 a]]))*(-(1/(2^(1/3) R)) - (-1 - Sqrt[
1 - 4 (a - Sqrt[2] Sqrt[1/R])] + 8 (a - Sqrt[2] Sqrt[1/R]))/(
2^(5/6) Sqrt[3] Sqrt[
Abs[-1 - Sqrt[1 - 4 (a - Sqrt[2] Sqrt[1/R])] +
2 (a - Sqrt[2] Sqrt[1/R])]]))}, {a, 3/16, 0.25}, {R, 1, 2000},
BoxRatios -> {1, 1, 1.5},
ColorFunction -> (ColorData["Rainbow"][#3/10000] &),
PlotRange -> {{-0.1, 1.}, {3/16, 0.24}, Automatic}]

it is shown with a single color. I did not manage to get the color gradient depending on the third coordinate of the plot. It works though, if I make the gradient along the first or the second coordinates.

I also cannot force the image to show a homogeneous mesh on the surface to better visualize it.

Any ideas?

You need to deactivate ColorFunctionScaling because the graphics is actually very large in the z-direction. Unsing x- and y-coodrinates as MeshFunctions produces nicer mesh lines.

ParametricPlot3D[{-(1/(2^(1/3) R)) - (-1 -
Sqrt[1 - 4 (a - Sqrt[2] Sqrt[1/R])] +
8 (a - Sqrt[2] Sqrt[1/R]))/(2^(5/6) Sqrt[3] Sqrt[
Abs[-1 - Sqrt[1 - 4 (a - Sqrt[2] Sqrt[1/R])] +
2 (a - Sqrt[2] Sqrt[1/R])]]),
a, (6.56*1.84*
R^0.73)/((-1 - Sqrt[1 - 4 a] +
8 a)/(2^(5/6) Sqrt[3] Sqrt[
Abs[-1 - Sqrt[1 - 4 a] + 2 a]]))*(-(1/(2^(1/3) R)) - (-1 -
Sqrt[1 - 4 (a - Sqrt[2] Sqrt[1/R])] +
8 (a - Sqrt[2] Sqrt[1/R]))/(2^(5/6) Sqrt[3] Sqrt[
Abs[-1 - Sqrt[1 - 4 (a - Sqrt[2] Sqrt[1/R])] +
2 (a - Sqrt[2] Sqrt[1/R])]]))
},
{a, 3/16, 0.25}, {R, 1, 2000},
BoxRatios -> {1, 1, 1.5},
ColorFunction -> (ColorData["Rainbow"][#3/10000] &),
ColorFunctionScaling -> None,
PlotRange -> {{-0.1, 1.}, {3/16, 0.24}, Automatic},
PlotPoints -> {200, 200},
MeshFunctions -> {#1 &, #2 &}
]