TipableVMobject#
Qualified name: manim.mobject.geometry.arc.TipableVMobject
- class TipableVMobject(tip_length=0.35, normal_vector=array([0., 0., 1.]), tip_style={}, **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.
asign_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
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.
- 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.
- 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.
- get_tip()[source]#
Returns the TipableVMobject instance’s (first) tip, otherwise throws an exception.