manim.mobject.svg.brace.BraceBetweenPoints

class BraceBetweenPoints(point_1, point_2, direction=array([0.0, 0.0, 0.0]), **kwargs)[source]

Bases: manim.mobject.svg.brace.Brace

Similar 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 (Union[list, numpy.array]) – The first point.

  • point_2 (Union[list, numpy.array]) – The second point.

  • direction (Optional[Union[list, numpy.array]]) – 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

animate

Used to animate the application of a method.

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.