主要代码:
Clear["Global`*"]
Manipulate[
Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi}, PlotLabel -> cf,
ImageSize -> 360, ColorFunction -> cf, Mesh -> mesh,
Lighting -> {{"Ambient", cs}, {"Directional", RGBColor[{s, 0., 0.}],
ImageScaled[{2, 0, 2}]}, {"Directional", RGBColor[{0., s, 0.}],
ImageScaled[{2, 2, 2}]}, {"Directional", RGBColor[{0., 0., s}],
ImageScaled[{0, 2, 2}]}}], {{cf, None, "color function"},
Prepend[ColorData["Gradients"], None]}, {{cs,
RGBColor[{0.356, 0.294, 0.4}]},
ColorSlider}, {{s, .5, "brightness"}, 0, 1,
Appearance -> "Labeled"}, {{mesh, 15}, 0, 30, 1,
Appearance -> "Labeled"}]
效果图: