为什么这不起作用? 我以前绕过过这个,但我不记得我是怎么做到的,而且我从来没有继续弄清楚为什么这种类型的输入不起作用。是时候了解它了!
对于那些看不到图片的人:
RegionPlot3D[
x^2 + 2 y^2 - 2 z^2 = 1 && -1 <= z <= 1, {x, -5, 5}, {y, -5,
5}, {z, -1, 1}]
Set::write: "Tag Plus in -2.+25.+50. is Protected"
然后就只剩下一个空的立方体,没有我的表面。
最佳答案
如果 z 受到其他表面的限制,你可以这样:
RegionPlot3D[
x^2 + 2 y^2 - 2 z^2 < 1 && z < x + 2 y && z^2 < .5,
{x, -2, 2}, {y, -2, 2}, {z, -1, 1},
PlotPoints -> 50, MeshFunctions -> {Function[{x, y, z}, z]},
PlotStyle -> Directive[Red, Opacity[0.8]]]
或者使用ContourPlot:
ContourPlot3D[
x^2 + 2 y^2 - 2 z^2 == 1,
{x, -2, 2}, {y, -2, 2}, {z, -1, 1},
RegionFunction -> Function[{x, y, z}, z < x + 2 y && z^2 < .5],
PlotPoints -> 50, MeshFunctions -> {Function[{x, y, z}, z]},
ContourStyle -> Directive[Red, Opacity[0.8]]]]
关于wolfram-mathematica - 将 Boole 与 MaxValue 和/或 PlotRegion 结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6081935/