TipableVMobject¶
Qualified name: manim.mobject.geometry.arc.TipableVMobject
- class TipableVMobject(tip_length=0.35, normal_vector=array([0., 0., 1.]), tip_style=None, **kwargs)[source]¶
Bases:
VMobjectMeant for shared functionality between Arc and Line. Functionality can be classified broadly into these groups:
- Adding, Creating, Modifying tips
- add_tip calls create_tip, before pushing the new tip
into the TipableVMobject’s list of submobjects
stylistic and positional configuration
- Checking for tips
- Boolean checks for whether the TipableVMobject has a tip
and a starting tip
- Getters
- Straightforward accessors, returning information pertaining
to the TipableVMobject instance’s tip(s), its length etc
Methods
Adds a tip to the TipableVMobject instance, recognising that the endpoints might need to be switched if it's a 'starting tip' or not.
assign_tip_attrStylises the tip, positions it spatially, and returns the newly instantiated tip to the caller.
get_default_tip_lengthReturns the point, where the stroke that surrounds the
Mobjectends.get_first_handleget_last_handleget_lengthReturns the point, where the stroke that surrounds the
Mobjectstarts.Returns the TipableVMobject instance's (first) tip, otherwise throws an exception.
Returns a VGroup (collection of VMobjects) containing the TipableVMObject instance's tips.
Returns a tip that has been stylistically configured, but has not yet been given a position in space.
has_start_tiphas_tippop_tipsposition_tipreset_endpoints_based_on_tipAttributes
alwaysCall a method on a mobject every frame.
animateUsed to animate the application of any method of
self.animation_overridescolordepthThe depth of the mobject.
fill_colorIf there are multiple colors (for gradient) this returns the first one
heightThe height of the mobject.
n_points_per_curvesheen_factorstroke_colorwidthThe width of the mobject.
- Parameters:
tip_length (float)
normal_vector (Vector3DLike)
tip_style (dict | None)
kwargs (Any)
- _original__init__(tip_length=0.35, normal_vector=array([0., 0., 1.]), tip_style=None, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
tip_length (float)
normal_vector (Vector3DLike)
tip_style (dict | None)
kwargs (Any)
- Return type:
None
- add_tip(tip=None, tip_shape=None, tip_length=None, tip_width=None, at_start=False)[source]¶
Adds a tip to the TipableVMobject instance, recognising that the endpoints might need to be switched if it’s a ‘starting tip’ or not.
- Parameters:
tip (tips.ArrowTip | None)
tip_shape (type[tips.ArrowTip] | None)
tip_length (float | None)
tip_width (float | None)
at_start (bool)
- Return type:
Self
- create_tip(tip_shape=None, tip_length=None, tip_width=None, at_start=False)[source]¶
Stylises the tip, positions it spatially, and returns the newly instantiated tip to the caller.
- Parameters:
tip_shape (type[tips.ArrowTip] | None)
tip_length (float | None)
tip_width (float | None)
at_start (bool)
- Return type:
- get_end()[source]¶
Returns the point, where the stroke that surrounds the
Mobjectends.- Return type:
- get_start()[source]¶
Returns the point, where the stroke that surrounds the
Mobjectstarts.- Return type:
- get_tip()[source]¶
Returns the TipableVMobject instance’s (first) tip, otherwise throws an exception.
- Return type:
- get_tips()[source]¶
Returns a VGroup (collection of VMobjects) containing the TipableVMObject instance’s tips.
- Return type:
- get_unpositioned_tip(tip_shape=None, tip_length=None, tip_width=None)[source]¶
Returns a tip that has been stylistically configured, but has not yet been given a position in space.
- Parameters:
tip_shape (type[tips.ArrowTip] | None)
tip_length (float | None)
tip_width (float | None)
- Return type: