BraceBetweenPoints

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

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

基类: Brace

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

大括号的合适方向是自动计算的,但仍可手动覆盖。如果点从左到右排列,大括号会从下方绘制。交换点的顺序会将大括号放置在相反的一侧。

参数:
  • point_1 (Point3DLike | None) – 第一个点。

  • point_2 (Point3DLike | None) – 第二个点。

  • direction (Vector3D | 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 (动画覆盖)

颜色

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))。

参数: