熟悉mathematica的人能告诉我为什么我的绘图不能生成吗?
plot1 = ContourPlot3D[{x^2 + (y + 0.25)^2 + (z - 0.45)^2 = 0.25,
x^2 + y^2 + (z + 0.5)^2 = 0.25,
x^2 + (y + 0.5)^2 + (z - 1.4)^2 = 0.25,
x^2 + (y + 0.25)^2 + (z - 2.35)^2 = 0.25,
x^2 + y^2 + (z - 3.3)^2 = 0.25,
x^2 + (y + 0.25)^2 + (z - 4.25)^2 = 0.25,
x^2 + (y + 0.5)^2 + (z - 5.2)^2 = 0.25,
x^2 + (y + 0.25)^2 + (z - 6.15)^2 = 0.25,
x^2 + y^2 + (z - 7.1)^2 = 0.25}, {x, -3, 3}, {y, -3, 3}, {z, -3, 3}]
plot2 = ContourPlot3D[{x^2 + (y - 0.5)^2 + (z - 0.25)^2 = 0.25,
x^2 + (y - 0.75)^2 + (z - 1.15)^2 = 0.25,
x^2 + (y - 1)^2 + (z - 2.05)^2 = 0.25,
x^2 + (y - 1.25)^2 + (z - 2.95)^2 = 0.25,
x^2 + (y - 1.5)^2 + (z - 3.85)^2 = 0.25,
x^2 + (y - 1.75)^2 + (z - 4.75)^2 = 0.25}, {x, -3, 3}, {y, -3,
3}, {z, -3, 3}]
plot3 = ContourPlot3D[{x^2 + (y + 0.5)^2 + z^2 = 0.25,
x^2 + (y + 1)^2 + (z - 0.75)^2 = 0.25,
x^2 + (y + 1.5)^2 + (z - 1.5)^2 = 0.25,
x^2 + (y + 2)^2 + (z - 2.25)^2 = 0.25}, {x, -3, 3}, {y, -3,
3}, {z, -3, 3}]对于每个绘图,此错误出现三次:
Set::write: Tag Plus in 7.56014\[VeryThinSpace]+8.99743\[VeryThinSpace]+11.8995
is Protected. >>
Set::write: Tag Plus in 6.24786\[VeryThinSpace]+8.99743\[VeryThinSpace]+8.99743
is Protected. >>
Set::write: Tag Plus in 6.24786\[VeryThinSpace]+8.99743\[VeryThinSpace]+19.3562
is Protected. >>
General::stop: Further output of Set::write will be suppressed during this calculation. >>发布于 2013-04-09 16:01:46
这是一个很小的语法错误=符号用于设置(赋值和定义) ==符号用于等于(等式检查)因此,在每个ContourPlot的主体中,用==替换=,就完成了
你的代码应该是
plot1 = ContourPlot3D[{x^2 + (y + 0.25)^2 + (z - 0.45)^2 == 0.25,
x^2 + y^2 + (z + 0.5)^2 == 0.25,
x^2 + (y + 0.5)^2 + (z - 1.4)^2 == 0.25,
x^2 + (y + 0.25)^2 + (z - 2.35)^2 == 0.25,
x^2 + y^2 + (z - 3.3)^2 == 0.25,
x^2 + (y + 0.25)^2 + (z - 4.25)^2 == 0.25,
x^2 + (y + 0.5)^2 + (z - 5.2)^2 == 0.25,
x^2 + (y + 0.25)^2 + (z - 6.15)^2 == 0.25,
x^2 + y^2 + (z - 7.1)^2 == 0.25}, {x, -3, 3}, {y, -3, 3}, {z, -3,
3}]等。
耶胡达
https://stackoverflow.com/questions/15889516
复制相似问题