Wolfram mathematica 数学问题

Wolfram mathematica 数学问题,wolfram-mathematica,Wolfram Mathematica,一个熟悉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

一个熟悉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. >>

这是一个小的语法错误 =符号用于集合(赋值和定义)
=
符号用于相等(相等检查) 因此,在每个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}]
等等


yehuda

实际上“/verythinspace”是一个很小的空间,不是代码的一部分。您正在为方程式指定0.25。