2
$\begingroup$

I have a Parametric Plot that has very high and low values. I used this answer Project RegionPlot3D to 2D using hue/color function to show third dimension to project the surface onto the 2D plane. This is the code:

ParametricPlot3D[{u, v, Exp[u]*Cos[u - v]}, {u, 1, 3}, {v, 1, 5}, 
 Boxed -> False, ViewPoint -> {0, 0, Infinity}, Axes -> False, 
 ColorFunction -> "TemperatureMap", Mesh -> None, Background -> Black]

However when I do that the resulting image seems to still have the shading which is what I want to avoid. I also would like to change the color function so that the color function goes from white to a darker orange going through shade of orange only.

$\endgroup$

3 Answers 3

3
$\begingroup$

You could follow this example from the documentation and use Glow:

ParametricPlot3D[{u, v, Exp[u]*Cos[u - v]}, {u, 1, 3}, {v, 1, 5}, 
 Boxed -> False, ViewPoint -> {0, 0, Infinity}, Axes -> False, 
 ColorFunction -> 
  Function[{x, y, z}, Glow[ColorData["TemperatureMap", z]]], 
 Mesh -> None, Lighting -> None]

enter image description here

Here is an example of adjusting the range of colors to be white to orange:

ParametricPlot3D[{u, v, Exp[u]*Cos[u - v]}, {u, 1, 3}, {v, 1, 5}, 
 Boxed -> False, ViewPoint -> {0, 0, Infinity}, Axes -> False, 
 ColorFunction -> 
  Function[{x, y, z}, 
   Glow[ColorData["TemperatureMap", 
     Rescale[z, {-10, 20}, {0.5, 0.95}]]]], 
 ColorFunctionScaling -> False, Mesh -> None, Lighting -> None]

ColorFunctionScaling False example

$\endgroup$
1
  • $\begingroup$ Thank you!! I actually tried to use glow but i was missing the z, I didn't know how to make it work $\endgroup$
    – maggie
    Commented Jul 20, 2020 at 22:39
3
$\begingroup$

You could use white ambient light and a custom ColorFunction based on a Blend of White and Darker@Orange.

ParametricPlot3D[{u, v, Exp[u]*Cos[u - v]}, {u, 1, 3}, {v, 1, 5}
 , Boxed -> False
 , ViewPoint -> {0, 0, Infinity}
 , Axes -> False
 , ColorFunction -> Function[{x, y, z, u, v}, Blend[{White, Darker@Orange}, z]]
 , Mesh -> None
 , Background -> Black
 , Lighting -> {"Ambient", White}
]

ParametricPlot3D + ambient lighting + white->dark orange blended color function

$\endgroup$
1
  • $\begingroup$ Thanks! :) this was very helful $\endgroup$
    – maggie
    Commented Jul 20, 2020 at 22:39
2
$\begingroup$

You can also use the option NormalsFunction:

ParametricPlot3D[{u, v, Exp[u] Cos[u - v]}, {u, 1, 3}, {v, 1, 5}, 
 Boxed -> False,
 ViewPoint -> {0, 0, ∞}, 
 Axes -> False, 
 Mesh -> None, 
 ColorFunction -> "TemperatureMap", 
 NormalsFunction -> ({1, 1, 0} &)]

enter image description here

Use ColorFunction -> (Blend[{White, Orange}, #3] &) (as in Josh Bishop's answer) we get:

enter image description here

Use ColorFunction -> (Blend[{White, Yellow, Red}, #3] &) to get

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you so much! the colors you put are perfect for what I needed $\endgroup$
    – maggie
    Commented Jul 20, 2020 at 22:40

Your Answer

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

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