是三维图形函数的一个选项,指定是否缩放最后的图象,以使得一个围绕该三维边界框外侧的球体能装入指定的显示区域.
SphericalRegion
是三维图形函数的一个选项,指定是否缩放最后的图象,以使得一个围绕该三维边界框外侧的球体能装入指定的显示区域.
更多信息
- SphericalRegionFalse 对三维图形做比例变换以使该图形在指定显示区域中尽可能大.
- SphericalRegionTrue 对三维图形作比例变换以使得围绕该三维边界框所作的球总能装入指定显示区域.
- 对于顶层的图形,SphericalRegionAutomatic 等价于 SphericalRegionFalse. 但是如果图形被包含在另一个排版形式或图形构造(如 Inset、Row 或 Grid),Automatic 将被视为等价于 True.
- 这个球体的中心与边界框的中心重合,并且选择球体的半径使得边界框恰好能放在球体内.
- 在 SphericalRegion->True 中,保持特定对象的图形大小,而不考虑对象的方向.
- SphericalRegionSphere[center,radius] 指定图形坐标系中的边界球. radius 指定
方向上的半径. 而在
和
方向上,将在相机空间中自动缩放以具有球形视图范围. 有效的 Sphere 指定将使 ViewAngle 和 ViewVector 选项被忽略. - 如果 center 被指定为 Automatic,那么中心会是 ViewCenter. 否则,ViewCenter 选项会被 center 覆盖.
范例
打开所有单元 关闭所有单元基本范例 (1)
范围 (3)
Table[Graphics3D[Cuboid[{0, 0, 0}], SphericalRegion -> True, ImageSize -> 80, ViewPoint -> 3.{ Sin[t], Cos[t], 1}], {t, 0, 4}]不设置 SphericalRegion,每个图形将尽可能的大:
Table[Graphics3D[Cuboid[{0, 0, 0}], SphericalRegion -> False, ImageSize -> 80, ViewPoint -> 3.{ Sin[t], Cos[t], 1}], {t, 0, 4}]使用边界 Sphere 指定 SphericalRegion:
Graphics3D[Sphere[{0, 0, 0}], Boxed -> False, SphericalRegion -> Sphere[{0, 0, 0}, #], Epilog -> Circle[Scaled[{0.5, 0.5}], 0.5]]& /@ {1, 3}使用 ViewCenter 指定边界球的中心:
Graphics3D[{Cuboid[{0, 0, 0}], Point[Scaled[{0.5, 0, 1}]]}, Boxed -> False, PlotRange -> {{0, 1}, {0, 1}, {0, 1}}, SphericalRegion -> Sphere[Automatic, 0.5 * Sqrt[3]], ViewCenter -> {0.5, 0, 1}, Epilog -> Circle[Scaled[{0.5, 0.5}], 0.5]]属性和关系 (2)
Graphics3D[Cuboid[{0, 0, 0}], Background -> LightGray]设置 SphericalRegion,图形可以在边界框内:
Graphics3D[Cuboid[{0, 0, 0}], SphericalRegion -> True, Background -> LightGray]Graphics3D[Cuboid[{0, 0, 0}], Boxed -> False, SphericalRegion -> True, Epilog -> Circle[Scaled[{0.5, 0.5}], 0.5]]Cuboid 的 SphericalRegion->True 从各种视点来看:
Table[Graphics3D[Cuboid[{0, 0, 0}], Boxed -> False, SphericalRegion -> True, Epilog -> Circle[Scaled[{0.5, 0.5}], 0.5], ImageSize -> 80, ViewPoint -> 3.{ Sin[t], Cos[t], 1}], {t, 0, 4}]Table[Graphics3D[Cuboid[{0, 0, 0}], Boxed -> False, SphericalRegion -> Sphere[{0.5, 0.5, 0.5}, 0.5 * Sqrt[3]], Epilog -> Circle[Scaled[{0.5, 0.5}], 0.5], ImageSize -> 80, ViewPoint -> 3.{ Sin[t], Cos[t], 1}], {t, 0, 4}]不设置 SphericalRegion:
Table[Graphics3D[Cuboid[{0, 0, 0}], Boxed -> False, SphericalRegion -> False, Epilog -> Circle[Scaled[{0.5, 0.5}], 0.5], ImageSize -> 80, ViewPoint -> 3.{ Sin[t], Cos[t], 1}], {t, 0, 4}]可能存在的问题 (2)
如果指定边界球的明确中心,则 ViewCenter 会被忽略:
Graphics3D[{Cuboid[{0, 0, 0}], Point[{0.5, 0, 1}]}, Boxed -> False, PlotRange -> {{0, 1}, {0, 1}, {0, 1}}, SphericalRegion -> Sphere[{0.5, 0, 1}, 1], ViewCenter -> {0.5, 0.5, 0.5}, Epilog -> Circle[Scaled[{0.5, 0.5}], 0.5]]如果指定有效的的边界球,则 ViewAngle 会被忽略:
{Graphics3D[Sphere[{0, 0, 0}], Boxed -> False, ViewAngle -> 20 * Degree, Epilog -> Circle[Scaled[{0.5, 0.5}], 0.5]], Graphics3D[Sphere[{0, 0, 0}], Boxed -> False, ViewAngle -> 20 * Degree, SphericalRegion -> Sphere[{0, 0, 0}, 1], Epilog -> Circle[Scaled[{0.5, 0.5}], 0.5]]}技术笔记
-
▪
- 图形结构
历史
1991年引入 (2.0) | 在以下年份被更新:2019 (12.0) ▪ 2020 (12.1)
文本
Wolfram Research (1991),SphericalRegion,Wolfram 语言函数,https://reference.wolfram.com/language/ref/SphericalRegion.html (更新于 2020 年).
CMS
Wolfram 语言. 1991. "SphericalRegion." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2020. https://reference.wolfram.com/language/ref/SphericalRegion.html.
APA
Wolfram 语言. (1991). SphericalRegion. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/SphericalRegion.html 年
BibTeX
@misc{reference.wolfram_2026_sphericalregion, author="Wolfram Research", title="{SphericalRegion}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/SphericalRegion.html}", note=[Accessed: 27-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_sphericalregion, organization={Wolfram Research}, title={SphericalRegion}, year={2020}, url={https://reference.wolfram.com/language/ref/SphericalRegion.html}, note=[Accessed: 27-November-2026]}