二十面体

限定名称: manim.mobject.three\_d.polyhedra.Icosahedron

class Icosahedron(edge_length=1, **kwargs)[source]

基类: Polyhedron

二十面体是五种柏拉图多面体之一。它有20个面、30条边和12个顶点。

参数:

edge_length (浮点数) – 任意两个顶点之间棱的长度。

示例

示例: IcosahedronScene

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

class IcosahedronScene(ThreeDScene):
    def construct(self):
        self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
        obj = Icosahedron()
        self.add(obj)
class IcosahedronScene(ThreeDScene):
    def construct(self):
        self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
        obj = Icosahedron()
        self.add(obj)

方法

属性

animate (动画)

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

animation_overrides (动画覆盖)

颜色

depth (深度)

mobject 的深度。

fill_color (填充颜色)

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

height (高度)

mobject 的高度。

n_points_per_curve (每条曲线的点数)

sheen_factor (光泽因子)

stroke_color (描边颜色)

width (宽度)

mobject 的宽度。

_original__init__(edge_length=1, **kwargs)

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

参数:

edge_length (浮点数)