Manim汉化官方简介

Manim官网 : https://www.manim.community/
Manim项目地址 : https://github.com/ManimCommunity/manim#command-line-arguments
Manim 文档 : https://docs.manim.community/en/stable/#




Manim is an animation engine for explanatory math videos. It’s used to create precise animations programmatically, as demonstrated in the videos of 3Blue1Brown.

Manim 是一个用于解说数学视频的动画引擎。正如 3Blue1Brown 视频中演示的那样,它用于以编程方式创建精确的动画。

NOTE: This repository is maintained by the Manim Community and is not associated with Grant Sanderson or 3Blue1Brown in any way (although we are definitely indebted to him for providing his work to the world). If you would like to study how Grant makes his videos, head over to his repository (3b1b/manim). This fork is updated more frequently than his, and it’s recommended to use this fork if you’d like to use Manim for your own projects.

注:本资源库由 Manim 社区维护,与 Grant Sanderson 或 3Blue1Brown 没有任何关联(不过我们非常感谢他向全世界提供他的作品)。如果你想了解 Grant 是如何制作视频的,请访问他的软件仓库(3b1b/manim)。这个分叉比他的更新更频繁,如果你想在自己的项目中使用 Manim,建议使用这个分叉。

Table of Contents:(目录)

Installation安装

WARNING: These instructions are for the community version only. Trying to use these instructions to install 3b1b/manim or instructions there to install this version will cause problems. Read this and decide which version you wish to install, then only follow the instructions for your desired version.

警告:这些说明仅适用于社区版本。尝试使用这些说明安装 3b1b/manim 或使用那里的说明安装此版本将导致问题。请阅读本说明并决定您要安装的版本,然后只按照您所需版本的说明进行操作。

Manim requires a few dependencies that must be installed prior to using it. If youwant to try it out first before installing it locally, you can do soin our online Jupyter environment.

使用 Manim 之前,必须先安装一些依赖项。如果您想在本地安装之前先试用一下,可以在我们的在线 Jupyter 环境中进行。

For local installation, please visit the Documentation and follow the appropriate instructions for your operating system.

如需本地安装,请访问文档,并根据您的操作系统遵循相应的说明。

Usage使用方法

Manim is an extremely versatile package. The following is an example Scene you can construct:

Manim 是一款用途极为广泛的软件包。下面是您可以构建的场景示例:

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))

In order to view the output of this scene, save the code in a file called example.py. Then, run the following in a terminal window:

要查看此场景的输出,请将代码保存到名为 example.py 的文件中。然后,在终端窗口中运行以下程序:

manim -p -ql example.py SquareToCircle

You should see your native video player program pop up and play a simple scene in which a square is transformed into a circle. You may find some more simple examples within thisGitHub repository. You can also visit the official gallery for more advanced examples.

你应该会看到你的本地视频播放器程序弹出并播放一个简单的场景,在这个场景中,一个正方形变成了一个圆形。你可以在 GitHub 仓库中找到更多简单的示例。你还可以访问官方图库,查看更多高级示例。

Manim also ships with a %%manim IPython magic which allows to use it conveniently in JupyterLab (as well as classic Jupyter) notebooks. See the
corresponding documentation for some guidance and
try it out online.

Command line arguments命令行参数

The general usage of Manim is as follows:

Manim的编译参数一般如下:

manim-illustration

The -p flag in the command above is for previewing, meaning the video file will automatically open when it is done rendering. The -ql flag is for a faster rendering at a lower quality.

上述命令中的 -p 标志用于预览,这意味着视频文件将在渲染完成后自动打开。-ql标志用于以较低的质量加快渲染速度。(两个参数不冲突)

Some other useful flags include:

一些其他的命令如下 :

  • -s to skip to the end and just show the final frame.
  • -n <number> to skip ahead to the n’th animation of a scene.
  • -f show the file in the file browser.
  • -s 跳到结尾,只显示最后一帧。
    -n <数字> 跳至场景的第 n 个动画。
    -f 在文件浏览器中显示文件。

For a thorough list of command line arguments, visit the documentation.

有关命令行参数的详细列表,请访问文档。

Documentation文档

Documentation is in progress at ReadTheDocs.

文件正在 ReadTheDocs 上公示。

Docker

The community also maintains a docker image (manimcommunity/manim), which can be found on DockerHub.
Instructions on how to install and use it can be found in our documentation.

社区还维护了一个 docker 镜像(manimcommunity/manim),可以在 DockerHub 上找到。关于如何安装和使用它的说明,请参阅我们的文档。

Help with Manim

If you need help installing or using Manim, feel free to reach out to our Discord Server or Reddit Community. If you would like to submit a bug report or feature request, please open an issue.

如果您在安装或使用 Manim 时需要帮助,请随时联系我们的 Discord 服务器或 Reddit 社区。如果您想提交错误报告或功能请求,请打开一个问题。

Contributing

Contributions to Manim are always welcome. In particular, there is a dire need for tests and documentation. For contribution guidelines, please see the documentation.

欢迎为 Manim 投稿。特别是,我们迫切需要测试和文档。有关贡献指南,请参阅文档。

However, please note that Manim is currently undergoing a major refactor. In general,contributions implementing new features will not be accepted in this period.The contribution guide may become outdated quickly; we highly recommend joining ourDiscord server to discuss any potentialcontributions and keep up to date with the latest developments.

但是,请注意 Manim 目前正在进行重大重构。一般来说,在此期间将不接受实现新功能的贡献。贡献指南可能很快就会过时;我们强烈建议您加入我们的 Discord 服务器,以讨论任何潜在贡献并了解最新进展。

Most developers on the project use poetry for management. You’ll want to have poetry installed and available in your environment.
Learn more about poetry at its documentation and find out how to install manim with poetry at the manim dev-installation guide in the manim documentation.

项目中的大多数开发人员都使用poetry进行管理。你需要在环境中安装并使用poetry。有关poetry的更多信息,请参阅其文档,如何使用poetry安装 manim,请参阅 manim 文档中的 manim 开发安装指南。

How to Cite Manim

We acknowledge the importance of good software to support research, and we notethat research becomes more valuable when it is communicated effectively. To demonstrate the value of Manim, we ask that you cite Manim in your work.Currently, the best way to cite Manim is to go to ourrepository page (if you aren’t already) andclick the “cite this repository” button on the right sidebar. This will generate a citation in your preferred format, and will also integrate well with citation managers.

我们承认优秀软件对支持研究工作的重要性,我们也注意到,如果研究工作能够得到有效的传播,那么它就会变得更有价值。为了证明 Manim 的价值,我们请求您在工作中引用 Manim。目前,引用 Manim 的最佳方式是访问我们的资源库页面(如果还没有的话),然后点击右侧边栏的 "引用此资源库 "按钮。这将以您喜欢的格式生成引文,并与引文管理器很好地集成。

Code of Conduct

Our full code of conduct, and how we enforce it, can be read on our website.

您可以在我们的网站上阅读我们的完整行为准则以及我们如何执行该准则。

License

The software is double-licensed under the MIT license, with copyright by 3blue1brown LLC (see LICENSE), and copyright by Manim Community Developers (see LICENSE.community).

该软件采用 MIT 许可证双重授权,版权归 3blue1brown LLC(见 LICENSE)和 Manim Community Developers(见 LICENSE.community)所有。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值