记录 | linux安装Manim

linux 安装 Manim

sudo apt update
sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg
sudo apt install xdg-utils
conda create manim_py39 python=3.9
conda activate manim_py39

pip install manim

安装好环境后来测试一个例程,编写一个 demo.py,如下,

from manim import *

class CreateCircle(Scene):
    def construct(self):
        circle = Circle()  # create a circle
        circle.set_fill(PINK, opacity=0.5)  # set the color and transparency
        self.play(Create(circle))

然后在终端执行,

manim -pql demo.py CreateCircle

这样执行成功后会在当前目录下生成 video 的文件夹,里面就包含了 CreateCircle.mp4 动画,如下,
在这里插入图片描述

当然,这只是一个很简单的动画演示,它还有很多很酷炫的数学动画展示。

相关推荐

  1. manim

    2023-12-13 06:24:03       16 阅读
  2. Linux Wine安装微信记录

    2023-12-13 06:24:03       39 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-13 06:24:03       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-13 06:24:03       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-13 06:24:03       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-13 06:24:03       18 阅读

热门阅读

  1. IP协议

    IP协议

    2023-12-13 06:24:03      39 阅读
  2. DP算法入门(3)

    2023-12-13 06:24:03       37 阅读
  3. 自建网站如何快速被搜索引擎搜索到?

    2023-12-13 06:24:03       39 阅读
  4. react中使用antd的tabs进行标签切换时,销毁dom

    2023-12-13 06:24:03       38 阅读
  5. Flink之keyby状态

    2023-12-13 06:24:03       37 阅读
  6. Linux驱动开发中private_data变量的理解

    2023-12-13 06:24:03       35 阅读
  7. TCP/UDP 的区别及优缺点

    2023-12-13 06:24:03       36 阅读
  8. 如何用WireShark分析HFP协议

    2023-12-13 06:24:03       40 阅读
  9. 第三十三课 电商控制台增删改查接口的编写

    2023-12-13 06:24:03       44 阅读