SphericalShell[c,{rinner,router}]
代表一个球心在 c ,内半径为 rinner 且外半径为 router 的填充球壳.
SphericalShell
SphericalShell[c,{rinner,router}]
代表一个球心在 c ,内半径为 rinner 且外半径为 router 的填充球壳.
更多信息和选项
- SphericalShell 可被用作几何区域和图形基元.
- SphericalShell[] 等价于 SphericalShell[{0,0,0},{1/2,1}].
- SphericalShell[r] 等价于 SphericalShell[{0,0,0},{r/2,r}].
- SphericalShell[{rinner,router}] 等价于 SphericalShell[{0,0,0},{rinner,router}].
- SphericalShell 代表一个填充球壳
. 这个区域对长度为
的点 c 是
维的. - SphericalShell 允许 c 为
中的任意一点,且有
. - SphericalShell 可用于 Graphics 和 Graphics3D 中.
- 在图形中,点 c 和半径 r 可以是 Dynamic 表达式.
- 有些指令,比如 FaceForm、EdgeForm、Specularity、Opacity 和着色会影响图形渲染.
范例
打开所有单元 关闭所有单元基本范例 (2)
SphericalShell[]Graphics3D[{Opacity[0.5], %}]Volume[SphericalShell[{0, 0, 0}, {Subscript[r, inner], Subscript[r, outer]}]]RegionCentroid[SphericalShell[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, {Subscript[r, inner], Subscript[r, outer]}]]范围 (20)
图形 (10)
规范 (5)
Graphics3D[{Opacity[0.5], SphericalShell[{0, 0, 0}, {1 / 2, 1}]}]Graphics3D[{Opacity[0.5], SphericalShell[{0, 0, 0}, {1 / 2, 1}], SphericalShell[{3, 0, 0}, {1 / 2, 2}]}]Graphics3D[{FaceForm[Yellow, Blue], SphericalShell[{0, 0, 0}, {1 / 2, 1}], FaceForm[Yellow, Blue], SphericalShell[{2, 0, 0}, {1 / 4, 1}]}, PlotRange -> {{-1, 3}, {-.2, 1}, {-1, 1}}]Graphics3D[{Opacity[0.5], SphericalShell[]}, Axes -> True]Graphics3D[{Opacity[0.5], SphericalShell[4]}, Axes -> True]样式 (4)
Table[Graphics3D[{Opacity[0.5], c, SphericalShell[]}], {c, {Red, Green, Blue, Yellow}}]可以用 FaceForm 来指定前后表面的不同属性:
Graphics3D[{FaceForm[Yellow, Blue], SphericalShell[]}, PlotRange -> {{-1, 1}, {-.3, 1}, {-1, 1}}]Table[Graphics3D[{Orange, Specularity[White, n], Opacity[0.5], SphericalShell[]}], {n, {5, 20, 100}}]Graphics3D[{Glow[Red], White, Opacity[0.5], SphericalShell[]}]Opacity 指定表面不透明度:
Table[Graphics3D[{Opacity[o], SphericalShell[]}], {o, {0.3, 0.5, 0.9}}]坐标 (1)
点可以是 Dynamic:
DynamicModule[{x}, {Slider[Dynamic[x], {-0.5, 0.5}], Graphics3D[{SphericalShell[], SphericalShell[Dynamic[{x, 1, 1}], 1 / 4]}]}]区域 (10)
RegionEmbeddingDimension[SphericalShell[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, {Subscript[``r``, ``inner``], Subscript[``r``, ``outer``]}]]RegionDimension[SphericalShell[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, {Subscript[``r``, ``inner``], Subscript[``r``, ``outer``]}]]ℛ = SphericalShell[{0, 0, 0}, 1];{RegionMember[ℛ, {1, 0, 0}], RegionMember[ℛ, {0, 0, 0}], RegionMember[ℛ, {1, 1, 1}]}RegionMember[SphericalShell[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, r], {x, y, z}]ℛ = SphericalShell[{0, 0, 0}, 1];{Volume[ℛ], RegionMeasure[ℛ]}c = RegionCentroid[ℛ]Graphics3D[{{Opacity[0.5], LightBlue, ℛ}, {PointSize[Large], Red, Point[c]}}]ℛ = SphericalShell[{0, 0, 0}, {3 / 4, 1}];{RegionDistance[ℛ, {1, 0, 0}], RegionDistance[ℛ, {0, 0, 0}], RegionDistance[ℛ, {1, 1, 1}]}ContourPlot3D[Evaluate@RegionDistance[ℛ, {x, y, z}], {x, -2, 2}, {y, 0, 2}, {z, -2, 2}, Mesh -> None, Contours -> {0.25, 0.5, 1}, BoxRatios -> Automatic]ℛ = SphericalShell[{0, 0, 0}, 1];{SignedRegionDistance[ℛ, {1, 0, 0}], SignedRegionDistance[ℛ, {1 / 2, 1 / 2, 1 / 2}], SignedRegionDistance[ℛ, {1, 1, 1}]}ℛ = SphericalShell[{0, 0, 0}, 1];{RegionNearest[ℛ, {1, 0, 0}], RegionNearest[ℛ, {1 / 2, 1 / 2, 1 / 2}]}spherePoints[{n_, m_}, c_, r_] :=
Flatten[Table[c + r{Cos[k 2π / n]Sin[l π / m], Sin[k 2π / n]Sin[l π / m], Cos[l π / m]}, {k, 0., n - 1}, {l, 0., m - 1}], 1];pl = spherePoints[{16, 8}, RegionCentroid[ℛ], 2];
npl = Table[RegionNearest[ℛ, p], {p, pl}];Legended[Graphics3D[{ℛ, {Thin, Gray, Line[Transpose[{pl, npl}]]}, {Red, Point[pl]}, {PointSize[Medium], Blue, Point[npl]}}, Lighting -> "Neutral", Boxed -> False], PointLegend[{Red, Blue}, {"start", "nearest"}]]BoundedRegionQ[SphericalShell[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, r]]RegionBounds[SphericalShell[{0, 0, 0}, r]]ℛ = SphericalShell[{0, 0, 0}, 1];BoundedRegionQ[ℛ]b = RegionBounds[ℛ]Graphics3D[{{EdgeForm[White], Opacity[0.2, Yellow], Cuboid@@Transpose[b]}, ℛ}, Boxed -> False]ℛ = SphericalShell[{Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}, r];Integrate[x y z, {x, y, z}∈ℛ]ℛ = SphericalShell[{1, 2, 3}, 4];MinValue[{x y z - x y, {x, y, z}∈ℛ}, {x, y, z}]ℛ = SphericalShell[{1, 2, 3}, 3];Reduce[x^2 + y^2 + z^2 == 1 && x - y - z == -(1/2) && z^2 == x y + (1/4) && {x, y, z}∈ℛ, {x, y, z}]应用 (5)
outerradius = Quantity[40, "Millimeters"];
mass = Quantity[2.7, "Grams"];density = Quantity[1.4*^3, "Kilograms" / "Meters" ^ 3];{sol} = Solve[Volume[SphericalShell[{innerradius, outerradius}]] * density == mass, innerradius, Reals]thickness = outerradius - innerradius /. sol人们曾经相信宇宙是一个同心的天球系统. 宇宙的中心是地球,外面是包括行星和太阳的球壳. 关于行星和太阳的准确次序存在着争议. 柏拉图和托勒密对天球进行了不同的排序:
universeaccordingtoplato = {"Earth", "Moon", "Sun", "Mercury", "Venus", "Mars", "Jupiter", "Saturn"};
universeaccordingtoptolemy = {"Earth", "Moon", "Mercury", "Venus", "Sun", "Mars", "Jupiter", "Saturn"};celestialSphericalShellls = {Ball[], SphericalShell[{1, 2}], SphericalShell[{2, 3}], SphericalShell[{3, 4}], SphericalShell[{4, 5}], SphericalShell[{5, 6}], SphericalShell[{6, 7}], SphericalShell[{7, 8}]};Row[Graphics3D[Table[{Hue[i / 16], celestialSphericalShellls[[i]], Text[#[[i]], {0, 0, i - .5}]}, {i, 8}], PlotRange -> {{-9, 9}, {0, 9}, {-9, 9}}, ViewPoint -> Front]& /@ {universeaccordingtoplato, universeaccordingtoptolemy}]珍珠是软体动物的产物,一层套一层. 珍珠的光学特性来自光线在许多半透明层的反射,而不是只有一层不透明的表面. 可以构建两套相互嵌套的、透明度不同的球壳来查看半透明层所产生的不同效果:
layers = 30;pearl = Table[{Specularity[.3, 100], Opacity[.2], SphericalShell[{0, 0, 0}, {Sqrt[i], Sqrt[i + 1]}]}, {i, layers}];
nonpearl = Table[{Specularity[.3, 100], Opacity[1], SphericalShell[{0, 0, 0}, {Sqrt[i], Sqrt[i + 1]}]}, {i, layers}];Row[Graphics3D[#, PlotRange -> Sqrt[layers + 1] * {{-1, 1}, {-1, .1}, {-1, 1}}, ViewPoint -> Back]& /@ {pearl, nonpearl}]高尔夫球有很多层,外层、凹痕层、一个或更多内层. 用球壳和一组球的 RegionDifference 来模拟外层. 利用球的网格的 MeshCoordinates 来获得凹痕的分布:
points = MeshCoordinates@DiscretizeRegion[Sphere[], MaxCellMeasure -> .02];outershell = BoundaryDiscretizeRegion[RegionDifference[SphericalShell[{0, 0, 0}, {.7, 1}], Ball[points, .1]], {{-1, 0}, {-1, 1}, {-1, 1}}, MaxCellMeasure -> .01];最后,画出高尔夫球的内核,稍稍偏离中心,使我们能同时看到各层结构:
innercore = Graphics3D[{Gray, Ball[{0.3, 0, 0}, .7]}];Show[outershell, innercore]可以用球壳来近似模拟一个气球. 假设气球是由10个单位的某种材料构成的,求气球的厚度和外半径之间的关系:
t = ϵ /. First@Solve[Volume[SphericalShell[{ρ - ϵ, ρ}]] == 10, ϵ, Reals]Plot[t, {ρ, 1, 10}, PlotRange -> All, ImageSize -> Small, AxesOrigin -> {0, 0}]假定在给定条件下,如果所用材料的厚度小于
,气球将会破裂,求气球最大的可能的外半径:
MaxValue[{ρ, t ≥ 0.1}, ρ]Graphics3D[{FaceForm[Red, Blue], Table[SphericalShell[{ρ - t, ρ}], {ρ, {2, 3, 4}}]}, PlotRange -> {All, All, {-4, 0}}]属性和关系 (4)
Ball 是 SphericalShell 在
接近0时的极限情况:
Manipulate[Graphics3D[{FaceForm[Yellow, Blue], Ball[], SphericalShell[{2, 0, 0}, {ri, 1}]}, PlotRange -> {{-1, 3}, {0, 1}, {-1, 1}}, ImageSize -> Small], {{ri, .5}, .5, .00001}]Sphere 是 SphericalShell 在
接近
时的极限情况:
Manipulate[Graphics3D[{Yellow, Sphere[], FaceForm[Yellow, Blue], SphericalShell[{2, 0, 0}, {ri, 1}]}, PlotRange -> {{-1, 3}, {0, 1}, {-1, 1}}, ImageSize -> Small], {{ri, .5}, .5, .9999}]SphericalShell 是两个同心 Ball 区域之间 RegionDifference 的封闭外包:
Subscript[ℛ, 1] = RegionUnion[RegionDifference[Ball[{0, 0, 0}, 2], Ball[{0, 0, 0}, 1]], Sphere[{0, 0, 0}, 1]];
Subscript[ℛ, 2] = SphericalShell[{0, 0, 0}, {1, 2}];RegionEqual[Subscript[ℛ, 1], Subscript[ℛ, 2]]SphericalShell 距半径为
的球面距离小于
的所有点:
Subscript[ℛ, 1] = Sphere[{a, b, c}, (Subscript[r, o] + Subscript[r, i]) / 2];
Subscript[ℛ, 2] = SphericalShell[{a, b, c}, {Subscript[r, i], Subscript[r, o]}];Reduce[Subscript[∀, {Subscript[r, i], Subscript[r, o]}, 0 < Subscript[r, i] < Subscript[r, o]](RegionDistance[Subscript[ℛ, 1], {x, y, z}] ≤ (1/2) (Subscript[r, o] - Subscript[r, i])⧦RegionMember[Subscript[ℛ, 2], {x, y, z}]), {x, y, z}, Reals]巧妙范例 (3)
Graphics3D[Table[{Opacity[.5, Hue[RandomReal[]]], SphericalShell[RandomReal[1, {3}], RandomReal[1]]}, {50}]]Graphics3D[Table[{Opacity[.5, Hue[i / 20]], SphericalShell[{2Cos[i * Pi / 5], 2Sin[i * Pi / 5], i}, 1]}, {i, 1, 20}]]Graphics3D[Table[{Opacity[.15, Hue[i / 3]], SphericalShell[{0, 0, 0}, {3i, 3i + 1}]}, {i, 1, 5}]]相关指南
文本
Wolfram Research (2015),SphericalShell,Wolfram 语言函数,https://reference.wolfram.com/language/ref/SphericalShell.html.
CMS
Wolfram 语言. 2015. "SphericalShell." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/SphericalShell.html.
APA
Wolfram 语言. (2015). SphericalShell. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/SphericalShell.html 年
BibTeX
@misc{reference.wolfram_2026_sphericalshell, author="Wolfram Research", title="{SphericalShell}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/SphericalShell.html}", note=[Accessed: 05-October-2026]}
BibLaTeX
@online{reference.wolfram_2026_sphericalshell, organization={Wolfram Research}, title={SphericalShell}, year={2015}, url={https://reference.wolfram.com/language/ref/SphericalShell.html}, note=[Accessed: 05-October-2026]}