2
$\begingroup$

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}]

enter image description here

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?

$\endgroup$

1 Answer 1

4
$\begingroup$

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 &}
 ]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.