manim.mobject.types.vectorized_mobject.VectorizedPoint

class VectorizedPoint(location=array([0.0, 0.0, 0.0]), color='#000000', fill_opacity=0, stroke_width=0, artificial_width=0.01, artificial_height=0.01, **kwargs)[source]

Bases: manim.mobject.types.vectorized_mobject.VMobject

Methods

get_location

set_location

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.

property height

The height of the mobject.

Returns

Return type

float

Examples

Example: HeightExample

from manim import *

class HeightExample(Scene):
    def construct(self):
        decimal = DecimalNumber().to_edge(UP)
        rect = Rectangle(color=BLUE)
        rect_copy = rect.copy().set_stroke(GRAY, opacity=0.5)

        decimal.add_updater(lambda d: d.set_value(rect.height))

        self.add(rect_copy, rect, decimal)
        self.play(rect.animate.set(height=5))
        self.wait()

See also

length_over_dim()

property width

The width of the mobject.

Returns

Return type

float

Examples

Example: WidthExample

from manim import *

class WidthExample(Scene):
    def construct(self):
        decimal = DecimalNumber().to_edge(UP)
        rect = Rectangle(color=BLUE)
        rect_copy = rect.copy().set_stroke(GRAY, opacity=0.5)

        decimal.add_updater(lambda d: d.set_value(rect.width))

        self.add(rect_copy, rect, decimal)
        self.play(rect.animate.set(width=7))
        self.wait()

See also

length_over_dim()