BraceBetweenPoints#
Qualified name: manim.mobject.svg.brace.BraceBetweenPoints
- class BraceBetweenPoints(point_1, point_2, direction=array([0., 0., 0.]), **kwargs)[source]#
Bases:
BraceSimilar to Brace, but instead of taking a mobject it uses 2 points to place the brace.
A fitting direction for the brace is computed, but it still can be manually overridden. If the points go from left to right, the brace is drawn from below. Swapping the points places the brace on the opposite side.
- Parameters
point_1 (Sequence[float] | None) – The first point.
point_2 (Sequence[float] | None) – The second point.
direction (Sequence[float] | None) – The direction from which the brace faces towards the points.
Examples
Example: BraceBPExample ¶
from manim import * class BraceBPExample(Scene): def construct(self): p1 = [0,0,0] p2 = [1,2,0] brace = BraceBetweenPoints(p1,p2) self.play(Create(NumberPlane())) self.play(Create(brace)) self.wait(2)
Methods
Attributes
animateUsed to animate the application of any method of
self.animation_overridescolordepthThe depth of the mobject.
fill_colorIf there are multiple colors (for gradient) this returns the first one
heightThe height of the mobject.
n_points_per_curvesheen_factorstroke_colorwidthThe width of the mobject.