Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 472
zdarova_koresh Avatar asked Mar 03 '23 04:03

zdarova_koresh


1 Answers

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.

like image 141
zdarova_koresh Avatar answered Mar 20 '23 07:03

zdarova_koresh