用Mathematica制作镂空曲面

2024-11-04 21:54:08

1、画一个球面:ContourPlot3D[x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}

用Mathematica制作镂空曲面

3、在y方向和z方向上,各绘制15条网格线:ContourPlot3D[x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1},MeshFunctions -> {#3 &, #2 &}, Mesh -> 15

用Mathematica制作镂空曲面

5、对网格线之间的区域,分别着色:MeshShading -> {None, Directive[Blue, Specularity[White, 50]], None, Directive[Yellow, Specularity[White, 50]]}有一些区域没有着色,所以看起来是镂空的。

用Mathematica制作镂空曲面用Mathematica制作镂空曲面
猜你喜欢