椭圆

限定名称: manim.mobject.geometry.arc.Ellipse

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

基础类: Circle

圆形;椭圆形,圆形。

Parameters:
  • width (float) – 椭圆的水平宽度。

  • height (float) – 椭圆的垂直高度。

  • 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

color

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

Parameters:
  • width (float)

  • 高度 (浮点数)

Return type: