对于3维中同一曲面能否根据自己的需要涂色
mathematica吧
全部回复
仅看楼主
level 12
丙亭 楼主
就是不用根据网格线来涂色
比如
Plot3D[x^3+y^3-2x*y^2-2x^2*y+x^2-2y^2-10,{x,-10,10},{y,-10,10},RegionFunction→Function[{x,y,z}, (x^2)/100+(y^2)/81<=1.03],PlotStyle→Opacity[0.8],PlotRange→All,Axes→False,Boxed→False,BoxRatios→{1,1,1.2},PlotPoints→100,Mesh→6]
图像如下:
我需要 z ≥0 时作一种色;z ≤0 时作另一种色,请问可以怎么做?
2024年01月24日 12点01分 1
level 10
参考;
Plot3D[x^3 + y^3 - 2 x*y^2 - 2 x^2*y + x^2 - 2 y^2 - 10, {x, -10,
10}, {y, -10, 10},
RegionFunction -> Function[{x, y, z}, (x^2)/100 + (y^2)/81 <= 1.03],
PlotStyle -> Opacity[0.8], PlotRange -> All, Axes -> False,
Boxed -> False, BoxRatios -> {1, 1, 1.2}, PlotPoints -> 100,
Mesh -> 6, ColorFunctionScaling -> False,
ColorFunction -> Function[{x, y, z}, Hue[1.99 ArcTan[z]]]]
2024年01月25日 03点01分 3
多谢,多谢,太好了[玫瑰]
2024年01月25日 07点01分
可否指点一下,为什么用反正切就能够对 z ≥0和 z ≤0作色?
2024年01月26日 08点01分
1