Brace
(mobject, direction=array([0.0, - 1.0, 0.0]), buff=0.2, width_multiplier=2, max_num_quads=15, min_num_quads=0, background_stroke_width=0, **kwargs)[source]¶Bases: manim.mobject.svg.tex_mobject.MathTex
Takes a mobject and draws a brace adjacent to it.
Passing a direction vector determines the direction from which the brace is drawn. By default it is drawn from below.
mobject (Mobject
) – The mobject adjacent to which the brace is placed.
direction (Optional[Union[list
, numpy.array
]]) – The direction from which the brace faces the mobject.
See also
Examples
class BraceExample(Scene):
def construct(self):
circle = Circle()
brace = Brace(circle, direction=RIGHT)
self.play(Create(circle))
self.play(Create(brace))
self.wait(2)
Methods
Uses |
|
|
|
|
|
|
|
|
Attributes
|
Used to animate the application of a method. |
|
The depth of the mobject. |
|
The height of the mobject. |
|
The width of the mobject. |
get_direction
()[source]¶Uses shoelace_direction()
to calculate the direction.
The direction of points determines in which direction the
object is drawn, clockwise or counterclockwise.
Examples
The default direction of a Circle
is counterclockwise:
>>> from manim import Circle
>>> Circle().get_direction()
'CCW'
Either "CW"
or "CCW"
.
str