PolarPlane¶
完整名称: manim.mobject.graphing.coordinate\_systems.PolarPlane
- class PolarPlane(radius_max=4.0, size=None, radius_step=1, azimuth_step=None, azimuth_units='PI radians', azimuth_compact_fraction=True, azimuth_offset=0, azimuth_direction='CCW', azimuth_label_buff=0.1, azimuth_label_font_size=24, radius_config=None, background_line_style=None, faded_line_style=None, faded_line_ratio=1, make_smooth_after_applying_functions=True, **kwargs)[source]¶
基类:
Axes
创建一个带有背景线的极坐标平面。
- 参数:
azimuth_step (浮点数 | 无) –
方位角(也称为角坐标或极角)的分割数量。如果指定为
None
,则将使用azimuth_units
中指定的默认值。"PI radians"
或"TAU radians"
: 20"degrees"
: 36"gradians"
: 40无
: 1
非整数值将导致圆末端出现部分分割。
size (浮点数 | 无) – 平面的直径。
radius_step (浮点数) – 模糊半径线之间的距离。
radius_max (浮点数) – 半径的最大值。
azimuth_units (字符串 | 无) –
指定方位角的默认标签系统。选项有:
"PI radians"
: 在区间 \(\left[0, 2\pi\right]\) 内的分数标签,其中 \(\pi\) 为常数。"TAU radians"
: 在区间 \(\left[0, \tau\right]\)(其中 \(\tau = 2\pi\))内的小数标签,其中 \(\tau\) 为常数。"degrees"
: 在区间 \(\left[0, 360\right]\) 内的十进制标签,带有度数 (\(^{\circ}\)) 符号。"gradians"
: 在区间 \(\left[0, 400\right]\) 内的十进制标签,带有一个上标“g” (\(^{g}\))。None
: 在区间 \(\left[0, 1\right]\) 内的十进制标签。
azimuth_compact_fraction (布尔值) – 如果
azimuth_units
选项包含分数标签,选择是否将常数以紧凑形式 \(\tfrac{xu}{y}\) 组合,而不是 \(\tfrac{x}{y}u\),其中 \(u\) 是常数。azimuth_offset (浮点数) – 方位角的角度偏移量,以弧度表示。
azimuth_direction (字符串) –
方位角的方向。
"CW"
: 顺时针。"CCW"
: 逆时针。
azimuth_label_buff (浮点数) – 方位角标签的缓冲。
azimuth_label_font_size (浮点数) – 方位角标签的字体大小。
radius_config (字典[字符串, 任意] | 无) – 半径的坐标轴配置。
background_line_style (字典[字符串, 任意] | 无)
faded_line_style (字典[字符串, 任意] | 无)
faded_line_ratio (整数)
make_smooth_after_applying_functions (布尔值)
kwargs (任意)
示例
示例: PolarPlaneExample ¶
from manim import * class PolarPlaneExample(Scene): def construct(self): polarplane_pi = PolarPlane( azimuth_units="PI radians", size=6, azimuth_label_font_size=33.6, radius_config={"font_size": 33.6}, ).add_coordinates() self.add(polarplane_pi)
class PolarPlaneExample(Scene): def construct(self): polarplane_pi = PolarPlane( azimuth_units="PI radians", size=6, azimuth_label_font_size=33.6, radius_config={"font_size": 33.6}, ).add_coordinates() self.add(polarplane_pi)
参考:
PolarPlane
方法
添加坐标。
获取坐标轴。
获取坐标标签
get_radian_label
get_vector
prepare_for_nonlinear_transform
属性
animate (动画)
用于动画化
self
的任何方法的应用。animation_overrides (动画覆盖)
颜色
depth (深度)
mobject 的深度。
fill_color (填充颜色)
如果存在多种颜色(用于渐变),则返回第一种颜色
height (高度)
mobject 的高度。
n_points_per_curve (每条曲线的点数)
sheen_factor (光泽因子)
stroke_color (描边颜色)
width (宽度)
mobject 的宽度。
- _original__init__(radius_max=4.0, size=None, radius_step=1, azimuth_step=None, azimuth_units='PI radians', azimuth_compact_fraction=True, azimuth_offset=0, azimuth_direction='CCW', azimuth_label_buff=0.1, azimuth_label_font_size=24, radius_config=None, background_line_style=None, faded_line_style=None, faded_line_ratio=1, make_smooth_after_applying_functions=True, **kwargs)¶
初始化自身。有关准确签名,请参阅 help(type(self))。
- 参数:
radius_max (浮点数)
size (浮点数 | 无)
radius_step (浮点数)
azimuth_step (浮点数 | 无)
azimuth_units (字符串 | 无)
azimuth_compact_fraction (布尔值)
azimuth_offset (浮点数)
azimuth_direction (字符串)
azimuth_label_buff (浮点数)
azimuth_label_font_size (浮点数)
radius_config (字典[字符串, 任意] | 无)
background_line_style (字典[字符串, 任意] | 无)
faded_line_style (字典[字符串, 任意] | 无)
faded_line_ratio (整数)
make_smooth_after_applying_functions (布尔值)
kwargs (任意)
- 返回类型:
无