Search code examples
pythonanimationmanim

Line width Manim


Is there any way to increase the width of the specific line on animation?

I have tried to change DEFAULT_STROKE_WIDTH in constants.py and set stroke_width in CONFIG equal to some number but it did not work.

Here is the part of my code. My line is just a path along a tuple of points.

        path = VMobject()
        path.set_points_smoothly([*[coord(x,y) for x,y in self.tuples]])
        path.set_color(RED)

Any suggestions?

UPD

Setting DEFAULT_STROKE_WIDTH in constants.py works, but it is not surprising that it changes width of ALL lines.


Solution

  • Parameter stroke_width could be used.

    For example:

    rect = Rectangle(height=1, width=1, stroke_width=1)

    P.S. I got an answer after some playing with object parameters.