Mathematica,结合ContourPlot3D和ListPointPlot3D

时间:2017-02-27 10:38:48

标签: function plot 3d wolfram-mathematica

我想将三维函数图与一些3D点结合起来。一些分开工作的行是:

D3Plot= ContourPlot3D[x^2+y^2+z^2== 2, {x, 0, 2}, {y, 0, 2}, {z, 0,2}, ColorFunction -> Function[{x, y, z}, Hue[1*(1 - z)]]]

atest3D = {{1, 1, 1}, {2, 1, 1}, {1, 2, 1}, {1, 1, 2}, {2, 2, 2}};

但是,将它们组合在一起时会遇到一些问题:

Show[atest3D,D3Plot,AxesOrigin -> {0, 0, 0}, PlotRange -> {{0, 3}, {0, 3}, {0, 3}}]

有没有办法让这个工作或其他方式显示这两个图?

2 个答案:

答案 0 :(得分:1)

这样的东西?

Show[D3Plot, Graphics3D[{Red, PointSize[0.1], Point[atest3D]}], PlotRange -> All]

enter image description here

答案 1 :(得分:0)

是否有任何方法可以使点始终可见,如果它们位于表面的另一侧?