manim.mobject.geometry.TipableVMobject

class TipableVMobject(tip_length=0.35, normal_vector=array([0.0, 0.0, 1.0]), tip_style={}, **kwargs)[source]

Bases: manim.mobject.types.vectorized_mobject.VMobject

Meant 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

add_tip

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_attr

create_tip

Stylises the tip, positions it spatially, and returns the newly instantiated tip to the caller.

get_default_tip_length

get_end

Returns the point, where the stroke that surrounds the Mobject ends.

get_first_handle

get_last_handle

get_length

get_start

Returns the point, where the stroke that surrounds the Mobject starts.

get_tip

Returns the TipableVMobject instance’s (first) tip, otherwise throws an exception.

get_tips

Returns a VGroup (collection of VMobjects) containing the TipableVMObject instance’s tips.

get_unpositioned_tip

Returns a tip that has been stylistically configured, but has not yet been given a position in space.

has_start_tip

has_tip

pop_tips

position_tip

reset_endpoints_based_on_tip

Attributes

animate

Used to animate the application of a method.

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.

add_tip(tip=None, tip_shape=None, tip_length=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, at_start=False)[source]

Stylises the tip, positions it spatially, and returns the newly instantiated tip to the caller.

get_end()[source]

Returns the point, where the stroke that surrounds the Mobject ends.

get_start()[source]

Returns the point, where the stroke that surrounds the Mobject starts.

get_tip()[source]

Returns the TipableVMobject instance’s (first) tip, otherwise throws an exception.

get_tips()[source]

Returns a VGroup (collection of VMobjects) containing the TipableVMObject instance’s tips.

get_unpositioned_tip(tip_shape=None, tip_length=None)[source]

Returns a tip that has been stylistically configured, but has not yet been given a position in space.