二十面体¶
限定名称: manim.mobject.three\_d.polyhedra.Icosahedron
- class Icosahedron(edge_length=1, **kwargs)[source]¶
基础类:
Polyhedron二十面体,五种柏拉图立体之一。它有20个面,30条边和12个顶点。
- Parameters:
edge_length (float) – 任意两个顶点之间的边的长度。
示例
示例:IcosahedronScene ¶
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_overridescolordepthmobject的深度。
fill_color如果有多种颜色(用于渐变),则返回第一个颜色
heightmobject的高度。
n_points_per_curvesheen_factorstroke_colorwidthmobject的宽度。
- _original__init__(edge_length=1, **kwargs)¶
初始化自身。有关准确的签名,请参阅 help(type(self))。
- Parameters:
edge_length (float)