Source code for manim_pymunk.custom_mobjects.apple

from manim import *

[docs] class Apple(VMobject): def __init__(self, **kwargs): super().__init__(**kwargs) # 贝塞尔曲线点集 points = np.array( [ [0.10526316, -0.47368421, 0.0], [-0.94736842, -0.89473684, 0.0], [-0.52631579, 1.0, 0.0], [0.10526316, 0.47368421, 0.0], [0.10526316, 0.47368421, 0.0], [0.84210526, 1.0, 0.0], [0.94736842, -0.89473684, 0.0], [0.10526316, -0.47368421, 0.0], [0.10526316, -0.47368421, 0.0], [0.31578947, -0.78947368, 0.0], [0.42105263, -0.68421053, 0.0], [0.52631579, -0.78947368, 0.0], [0.52631579, -0.78947368, 0.0], [0.52631579, -1.0, 0.0], [0.10526316, -0.78947368, 0.0], [0.10526316, -0.47368421, 0.0], ] ) points[:, 1] *= -1 self.set_points(points)