CurvesAsSubmobjects#

Qualified name: manim.mobject.types.vectorized\_mobject.CurvesAsSubmobjects

class CurvesAsSubmobjects(vmobject, **kwargs)[source]#

Bases: VGroup

Convert a curve’s elements to submobjects.

Examples

Example: LineGradientExample

../_images/LineGradientExample-1.png
from manim import *

class LineGradientExample(Scene):
    def construct(self):
        curve = ParametricFunction(lambda t: [t, np.sin(t), 0], t_range=[-PI, PI, 0.01], stroke_width=10)
        new_curve = CurvesAsSubmobjects(curve)
        new_curve.set_color_by_gradient(BLUE, RED)
        self.add(new_curve.shift(UP), curve)

Methods

Attributes

animate

Used to animate the application of any method of self.

animation_overrides

color

depth

The depth of the mobject.

fill_color

If there are multiple colors (for gradient) this returns the first one

height

The height of the mobject.

n_points_per_curve

sheen_factor

stroke_color

width

The width of the mobject.