点之间的括号

限定名称: manim.mobject.svg.brace.BraceBetweenPoints

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

基础类: Brace

类似于Brace,但它不是使用一个mobject,而是使用2个点来放置大括号。

为支撑物计算了一个合适的方向,但仍然可以手动覆盖。 如果点从左到右移动,支撑物将从下方绘制。 交换点的位置会将支撑物放置在相反的一侧。

Parameters:
  • point_1 (Sequence[float] | None) – 第一个点。

  • point_2 (Sequence[float] | None) – 第二个点。

  • direction (Sequence[float] | None) – 大括号朝向点的方向。

示例

示例: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)
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)

方法

属性

animate

用于动画化self的任何方法的应用。

animation_overrides

color

depth

mobject的深度。

fill_color

如果有多种颜色(用于渐变),则返回第一个颜色

height

mobject的高度。

n_points_per_curve

sheen_factor

stroke_color

width

mobject的宽度。

_original__init__(point_1, point_2, direction=array([0., 0., 0.]), **kwargs)

初始化自身。有关准确的签名,请参阅 help(type(self))。

Parameters:
  • point_1 (序列[浮点数] | )

  • point_2 (序列[浮点数] | )

  • 方向 (序列[浮点数] | )