八面体¶
限定名称: manim.mobject.three\_d.polyhedra.Octahedron
- class Octahedron(edge_length=1, **kwargs)[source]¶
基础类:
Polyhedron八面体,五种柏拉图立体之一。它有8个面,12条边和6个顶点。
- Parameters:
edge_length (float) – 任意两个顶点之间的边的长度。
示例
示例:八面体场景 ¶
from manim import * class OctahedronScene(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) obj = Octahedron() self.add(obj)
class OctahedronScene(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) obj = Octahedron() 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)