可提示的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),其长度等

方法

add_tip

向TipableVMobject实例添加一个提示,识别端点是否需要切换,如果它是一个“起始提示”或不是。

asign_tip_attr

create_tip

对提示进行样式化,将其定位在空间上,并将新实例化的提示返回给调用者。

get_default_tip_length

get_end

返回围绕Mobject的描边结束的点。

get_first_handle

get_last_handle

get_length

get_start

返回围绕Mobject的描边开始的点。

get_tip

返回TipableVMobject实例的(第一个)提示,否则抛出异常。

get_tips

返回一个包含TipableVMObject实例提示的VGroup(VMobjects集合)。

get_unpositioned_tip

返回一个已经进行了样式配置但尚未在空间中定位的提示。

has_start_tip

has_tip

pop_tips

position_tip

reset_endpoints_based_on_tip

属性

animate

用于动画化self的任何方法的应用。

animation_overrides

color

depth

mobject的深度。

fill_color

如果有多种颜色(用于渐变),则返回第一个颜色

height

mobject的高度。

n_points_per_curve

sheen_factor

stroke_color

width

mobject的宽度。

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_end()[来源]

返回围绕Mobject的描边结束的点。

Return type:

Point3D

get_start()[source]

返回围绕Mobject的描边开始的点。

Return type:

Point3D

get_tip()[source]

返回TipableVMobject实例的(第一个)提示,否则抛出异常。

get_tips()[来源]

返回一个包含TipableVMObject实例的尖端的VGroup(VMobjects集合)。

Return type:

VGroup

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)