Manim 创建数学动画的 Python 框架

Manim 是一个用于解释数学视频的动画引擎,由社区维护。它被用来以编程方式创建精确的动画,具体可查看 3Blue1Brown 的视频。

技术概念的动画制作在传统上是相当乏味的,因为要使动画足够精确,以准确地表达它们是很困难的。Manim 使用 Python 以编程方式生成动画,使其有可能准确地指定每一个动画应该如何运行。目前,该项目正在积极开发中。

from manim import *


class SquareToCircle(Scene):
    def construct(self):
        circle = Circle()
        square = Square()
        square.flip(RIGHT)
        square.rotate(-3 * TAU / 8)
        circle.set_fill(PINK, opacity=0.5)

        self.play(Create(square))
        self.play(Transform(square, circle))
        self.play(FadeOut(square))

© 版权声明
THE END
喜欢就支持一下吧
点赞572 分享
Whatever I believed, I did; and whatever I did, I did with my whole heart and mind.
凡是我相信的,我都做了;凡是我做了的事,都是全身心地投入去做的