mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
fix bugs and update README
This commit is contained in:
parent
06ba7031c7
commit
f900669bc4
4 changed files with 21 additions and 19 deletions
|
@ -3,6 +3,7 @@
|
||||||
[](http://choosealicense.com/licenses/mit/)
|
[](http://choosealicense.com/licenses/mit/)
|
||||||
[](https://www.reddit.com/r/manim/)
|
[](https://www.reddit.com/r/manim/)
|
||||||
[](https://discord.gg/mMRrZQW)
|
[](https://discord.gg/mMRrZQW)
|
||||||
|
[](https://3b1b.github.io/manim/)
|
||||||
|
|
||||||
Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as seen in the videos at [3Blue1Brown](https://www.3blue1brown.com/).
|
Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as seen in the videos at [3Blue1Brown](https://www.3blue1brown.com/).
|
||||||
|
|
||||||
|
@ -11,7 +12,8 @@ This repository contains the version of manim used by 3Blue1Brown. There is als
|
||||||
## Installation
|
## Installation
|
||||||
Manim runs on Python 3.8.
|
Manim runs on Python 3.8.
|
||||||
|
|
||||||
System requirements are [FFmpeg](https://ffmpeg.org/), [OpenGL](https://www.opengl.org//) and [latex](https://www.latex-project.org) (optional, if you want to use LaTeX).
|
System requirements are [FFmpeg](https://ffmpeg.org/), [OpenGL](https://www.opengl.org//), [LaTeX](https://www.latex-project.org) (optional, if you want to use LaTeX)
|
||||||
|
and [cairo](https://www.cairographics.org/) (optional, if you want to use Text).
|
||||||
|
|
||||||
For more options, take a look at the [Using manim](#using-manim) sections further below.
|
For more options, take a look at the [Using manim](#using-manim) sections further below.
|
||||||
|
|
||||||
|
@ -24,7 +26,7 @@ If you want to hack on manimlib itself, clone this repository and in that direct
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# Try it out
|
# Try it out
|
||||||
python -m manim example_scenes.py OpeningManimExample
|
python manim.py example_scenes.py OpeningManimExample
|
||||||
```
|
```
|
||||||
|
|
||||||
### Directly (Windows)
|
### Directly (Windows)
|
||||||
|
@ -74,7 +76,7 @@ Take a look at custom_defaults.yml for further configuration. To add your custo
|
||||||
Look through [https://github.com/3b1b/videos](https://github.com/3b1b/videos) to see the code for previous 3b1b videos. Note, however, that developments are often made to the library without considering backwards compatibility with those old projects. To run an old project with a guarantee that it will work, you will have to go back to the commit which completed that project.
|
Look through [https://github.com/3b1b/videos](https://github.com/3b1b/videos) to see the code for previous 3b1b videos. Note, however, that developments are often made to the library without considering backwards compatibility with those old projects. To run an old project with a guarantee that it will work, you will have to go back to the commit which completed that project.
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
Documentation is in progress at [eulertour.com/docs](https://www.eulertour.com/docs/). And there is also an all-in-one documentation and tutorials maintained by **@manim-kindergarten**: [manim.ml](https://manim.ml/) (in Chinese).
|
Documentation is in progress at [3b1b.github.io/manim](https://3b1b.github.io/manim/). And there is also a Chinese version maintained by **@manim-kindergarten**: [manim.ml](https://manim.ml/) (in Chinese).
|
||||||
|
|
||||||
### Walkthrough
|
### Walkthrough
|
||||||
Todd Zimmerman put together a [tutorial](https://talkingphysics.wordpress.com/2019/01/08/getting-started-animating-with-manim-and-python-3-7/) on getting started with manim, which has been updated to run on Python 3.7.
|
Todd Zimmerman put together a [tutorial](https://talkingphysics.wordpress.com/2019/01/08/getting-started-animating-with-manim-and-python-3-7/) on getting started with manim, which has been updated to run on Python 3.7.
|
||||||
|
|
|
@ -23,7 +23,7 @@ About this documentation
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
This documentation is based on the version in `3b1b/manim <https://github.com/3b1b/manim>`_.
|
This documentation is based on the version in `3b1b/manim <https://github.com/3b1b/manim>`_.
|
||||||
Created by `TonyCrane <https://github.com/TonyCrane>`_ and in production.
|
Created by `TonyCrane <https://github.com/TonyCrane>`_ ("鹤翔万里" in Chinese) and in production.
|
||||||
|
|
||||||
Among them, the ``manim_example_ext`` extension for Sphinx refers to
|
Among them, the ``manim_example_ext`` extension for Sphinx refers to
|
||||||
`the documentation of ManimCommunity <https://docs.manim.community/>`_.
|
`the documentation of ManimCommunity <https://docs.manim.community/>`_.
|
||||||
|
|
|
@ -21,31 +21,31 @@ There are many class inheritance relationships in ``manimlib/mobject/geometry.py
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# Line 699
|
# Line 279
|
||||||
class Polygon(VMobject):
|
class Circle(Arc):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"color": BLUE,
|
"color": RED,
|
||||||
|
"close_new_points": True,
|
||||||
|
"anchors_span_full_range": False
|
||||||
}
|
}
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# Line 801
|
# Line 304
|
||||||
class Rectangle(Polygon):
|
class Dot(Circle):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"color": WHITE,
|
"radius": DEFAULT_DOT_RADIUS,
|
||||||
"height": 2.0,
|
"stroke_width": 0,
|
||||||
"width": 4.0,
|
"fill_opacity": 1.0,
|
||||||
"mark_paths_closed": True,
|
"color": WHITE
|
||||||
"close_new_points": True,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
The ``Polygon`` class uses the key-value pair ``"color": BLUE`` in the ``CONFIG``
|
The ``Circle`` class uses the key-value pair ``"color": RED`` in the ``CONFIG``
|
||||||
dictionary to add the attribute ``self.color``.
|
dictionary to add the attribute ``self.color``.
|
||||||
|
|
||||||
At the same time, the ``Rectangle`` class also contains the key ``color`` in the
|
At the same time, the ``Dot`` class also contains the key ``color`` in the
|
||||||
``CONFIG`` dictionary, but the value is different. At this time, the priority will
|
``CONFIG`` dictionary, but the value is different. At this time, the priority will
|
||||||
modify the attribute ``self.color`` to ``WHITE``. And it also set some unique attributes
|
modify the attribute ``self.color`` to ``WHITE``.
|
||||||
through the key-value pair ``"height": 2.0"``, etc., which is convenient for later use.
|
|
||||||
|
|
||||||
CONFIG nesting
|
CONFIG nesting
|
||||||
--------------
|
--------------
|
||||||
|
|
|
@ -21,7 +21,7 @@ Some useful flags
|
||||||
- ``-w`` to write the scene to a file.
|
- ``-w`` to write the scene to a file.
|
||||||
- ``-o`` to write the scene to a file and open the result.
|
- ``-o`` to write the scene to a file and open the result.
|
||||||
- ``-s`` to skip to the end and just show the final frame.
|
- ``-s`` to skip to the end and just show the final frame.
|
||||||
- ``-so`` will save the final frame to an image and show it.
|
- ``-so`` will save the final frame to an image and show it.
|
||||||
- ``-n <number>`` to skip ahead to the ``n``\ ’th animation of a scene.
|
- ``-n <number>`` to skip ahead to the ``n``\ ’th animation of a scene.
|
||||||
- ``-f`` to make the playback window fullscreen.
|
- ``-f`` to make the playback window fullscreen.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue