椭圆

完全限定名: manim.mobject.geometry.arc.Ellipse

Ellipse(width=2, height=1, **kwargs)[源]

基类: Circle

一种圆形形状;卵形,圆形。

参数:
  • 宽度 (浮点数) – 椭圆的水平宽度。

  • 高度 (浮点数) – 椭圆的垂直高度。

  • kwargs (任意类型) – 要传递给 Circle 的附加参数。

示例

示例: EllipseExample

../_images/EllipseExample-1.png
from manim import *

class EllipseExample(Scene):
    def construct(self):
        ellipse_1 = Ellipse(width=2.0, height=4.0, color=BLUE_B)
        ellipse_2 = Ellipse(width=4.0, height=1.0, color=BLUE_D)
        ellipse_group = Group(ellipse_1,ellipse_2).arrange(buff=1)
        self.add(ellipse_group)
class EllipseExample(Scene):
    def construct(self):
        ellipse_1 = Ellipse(width=2.0, height=4.0, color=BLUE_B)
        ellipse_2 = Ellipse(width=4.0, height=1.0, color=BLUE_D)
        ellipse_group = Group(ellipse_1,ellipse_2).arrange(buff=1)
        self.add(ellipse_group)

方法

属性

animate (动画)

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

animation_overrides (动画覆盖)

颜色

depth (深度)

mobject 的深度。

fill_color (填充颜色)

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

height (高度)

mobject 的高度。

n_points_per_curve (每条曲线的点数)

sheen_factor (光泽因子)

stroke_color (描边颜色)

width (宽度)

mobject 的宽度。

_original__init__(width=2, height=1, **kwargs)

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

参数:
  • 宽度 (浮点数)

  • 高度 (浮点数)

  • kwargs (任意类型)

返回类型: