SpecialThreeDScene

完整名称: manim.scene.three\_d\_scene.SpecialThreeDScene

class SpecialThreeDScene(cut_axes_at_radius=True, camera_config={'exponential_projection': True, 'should_apply_shading': True}, three_d_axes_config={'axis_config': {'numbers_with_elongated_ticks': [0, 1, 2], 'stroke_width': 2, 'tick_frequency': 1, 'unit_size': 2}, 'num_axis_pieces': 1}, sphere_config={'radius': 2, 'resolution': (24, 48)}, default_angled_camera_position={'phi': 1.2217304763960306, 'theta': -1.9198621771937625}, low_quality_config={'camera_config': {'should_apply_shading': False}, 'sphere_config': {'resolution': (12, 24)}, 'three_d_axes_config': {'num_axis_pieces': 1}}, **kwargs)[source]

基类: ThreeDScene

ThreeDScene 的扩展,具有更多设置。

它为坐标轴、球体和低质量渲染提供了额外的配置。此外,主要区别在于:

  • 摄像机默认对适用的三维对象进行着色,除非以低质量渲染。

  • 已添加球体和坐标轴的一些默认参数。

方法

get_axes

返回一组三维坐标轴。

get_default_camera_position

返回默认的斜角摄像机位置。

get_sphere

返回一个球体,其属性为传入的关键字参数。

set_camera_to_default_position

将摄像机设置为其默认位置。

属性

相机

时间

场景开始以来的时间。

get_axes()[source]

返回一组三维坐标轴。

返回:

一组三维坐标轴。

返回类型:

三维坐标轴

get_default_camera_position()[source]

返回默认的斜角摄像机位置。

返回:

包含phi、theta、focal_distance和gamma的字典。

返回类型:

dict

get_sphere(**kwargs)[source]

返回一个球体,其属性为传入的关键字参数。

参数:

**kwargsSphereSurface 的任何有效参数。

返回:

球体对象。

返回类型:

球体

set_camera_to_default_position()[source]

将摄像机设置为其默认位置。