可提示的VM对象¶
限定名称: manim.mobject.geometry.arc.TipableVMobject
- class TipableVMobject(tip_length=0.35, normal_vector=array([0., 0., 1.]), tip_style={}, **kwargs)[source]¶
基础类:
VMobject用于Arc和Line之间的共享功能。 功能可以大致分为以下几类:
- Adding, Creating, Modifying tips
- add_tip calls create_tip, before pushing the new tip
进入TipableVMobject的子对象列表
风格和位置配置
- Checking for tips
- Boolean checks for whether the TipableVMobject has a tip
以及一个开始的提示
- Getters
- Straightforward accessors, returning information pertaining
到TipableVMobject实例的提示(s),其长度等
方法
向TipableVMobject实例添加一个提示,识别端点是否需要切换,如果它是一个“起始提示”或不是。
asign_tip_attr对提示进行样式化,将其定位在空间上,并将新实例化的提示返回给调用者。
get_default_tip_length返回围绕
Mobject的描边结束的点。get_first_handleget_last_handleget_length返回围绕
Mobject的描边开始的点。返回TipableVMobject实例的(第一个)提示,否则抛出异常。
返回一个包含TipableVMObject实例提示的VGroup(VMobjects集合)。
返回一个已经进行了样式配置但尚未在空间中定位的提示。
has_start_tiphas_tippop_tipsposition_tipreset_endpoints_based_on_tip属性
animate用于动画化
self的任何方法的应用。animation_overridescolordepthmobject的深度。
fill_color如果有多种颜色(用于渐变),则返回第一个颜色
heightmobject的高度。
n_points_per_curvesheen_factorstroke_colorwidthmobject的宽度。
- Parameters:
tip_length (float)
normal_vector (Vector3D)
tip_style (字典)
- _original__init__(tip_length=0.35, normal_vector=array([0., 0., 1.]), tip_style={}, **kwargs)¶
初始化自身。有关准确的签名,请参阅 help(type(self))。
- Parameters:
tip_length (float)
normal_vector (Vector3D)
tip_style (dict)
- Return type:
无
- add_tip(tip=None, tip_shape=None, tip_length=None, tip_width=None, at_start=False)[source]¶
向TipableVMobject实例添加一个提示,识别如果它是一个“起始提示”或不是,端点可能需要切换。
- Parameters:
提示 (tips.ArrowTip | 无)
tip_shape (类型[tips.ArrowTip] | 无)
tip_length (float | None)
tip_width (float | None)
at_start (布尔值)
- Return type:
自我
- create_tip(tip_shape=None, tip_length=None, tip_width=None, at_start=False)[来源]¶
对提示进行样式化,进行空间定位,并将新实例化的提示返回给调用者。
- Parameters:
tip_shape (类型[tips.ArrowTip] | 无)
tip_length (float)
tip_width (float)
at_start (bool)
- get_unpositioned_tip(tip_shape=None, tip_length=None, tip_width=None)[来源]¶
返回一个已经进行了样式配置的提示,但尚未在空间中指定位置。
- Parameters:
tip_shape (类型[tips.ArrowTip] | 无)
tip_length (float | None)
tip_width (float | None)