Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

merge master

leotrs12e1e528eb8d
diff --git a/.github/manimdependency.json b/.github/manimdependency.json
index c9db99700..960c1f900 100644
--- a/.github/manimdependency.json
+++ b/.github/manimdependency.json
@@ -1,6 +1,25 @@
{
- "windows": {
- "ffmpeg": "https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-4.3.1-2020-09-21-full_build.zip",
- "pango": "v0.1.0"
- }
+ "windows": {
+ "ffmpeg": "https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-4.3.1-2020-09-21-full_build.zip",
+ "pango": "v0.1.0",
+ "tinytex": [
+ "standalone",
+ "preview",
+ "doublestroke",
+ "ms",
+ "setspace",
+ "rsfs",
+ "relsize",
+ "ragged2e",
+ "fundus-calligra",
+ "microtype",
+ "wasysym",
+ "physics",
+ "dvisvgm",
+ "jknapltx",
+ "wasy",
+ "cm-super",
+ "babel-english"
+ ]
+ }
}
\ No newline at end of file
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 83f89cdd9..dfed89748 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,22 +1,22 @@
name: CI
on:
push:
- branches:
- - master
+ branches:
+ - master
pull_request:
- branches:
- - master
+ branches:
+ - master
jobs:
test:
runs-on: ${{ matrix.os }}
env:
- POETRY_VIRTUALENVS_CREATE: false
+ POETRY_VIRTUALENVS_CREATE: false
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- python: [3.6,3.7, 3.8]
+ python: [3.6, 3.7, 3.8]
steps:
- name: Checkout the repository
@@ -36,8 +36,8 @@ jobs:
shell: bash
id: pip-cache-and-time
run: |
- echo "::set-output name=dir::$(pip cache dir)"
- echo "::set-output name=date::$(/bin/date -u "+%m%Y")"
+ echo "::set-output name=dir::$(pip cache dir)"
+ echo "::set-output name=date::$(/bin/date -u "+%m%Y")"
- name: pip cache
uses: actions/cache@v2
@@ -73,27 +73,31 @@ jobs:
if: runner.os == 'Windows'
uses: actions/cache@v2
with:
- path: ${{ github.workspace }}\ManimCache
- key: ${{ runner.os }}-dependencies-ffmpeg-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.pip-cache-and-time.outputs.date }}
+ path: ${{ github.workspace }}\ManimCache
+ key: ${{ runner.os }}-dependencies-ffmpeg-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.pip-cache-and-time.outputs.date }}
- name: Download system dependencies (Windows)
if: runner.os == 'Windows' && steps.cache-windows.outputs.cache-hit != 'true'
run: |
$ffmpegUrl = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['ffmpeg'])"
$pangoVersion = python -c "import json;print(json.load(open('.github/manimdependency.json'))['windows']['pango'])"
+ $tinyTexPackages = $(python -c "import json;print(' '.join(json.load(open('.github/manimdependency.json'))['windows']['tinytex']))") -Split ' '
$OriPath = $env:PATH
echo "Install Tinytex"
Invoke-WebRequest "https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip?job=image:%20Visual%20Studio%202019" -O "$($env:TMP)\TinyTex.zip"
Expand-Archive -LiteralPath "$($env:TMP)\TinyTex.zip" -DestinationPath "$($PWD)\ManimCache\LatexWindows"
$env:Path = "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\win32;$($env:PATH)"
tlmgr update --self
- tlmgr install standalone preview doublestroke ms setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english
+ foreach ($c in $tinyTexPackages){
+ $c=$c.Trim()
+ tlmgr install $c
+ }
$env:PATH=$OriPath
echo "Completed Latex"
Invoke-WebRequest "$ffmpegUrl" -O "$($env:TMP)\ffmpeg.zip"
7z x "$($env:TMP)\ffmpeg.zip" -o"$($PWD)\ManimCache"
Move-Item "ManimCache\ffmpeg-*" "ManimCache\FFmpeg"
- Invoke-WebRequest "https://github.com/ManimCommunity/manim-windows/releases/download/$($pangoVersion)/pango-windows-binaires-x64.zip" -O "$($env:TMP)\Pango.zip"
+ Invoke-WebRequest "https://github.com/ManimCommunity/pango-windows-binaries/releases/download/$($pangoVersion)/pango-windows-binaires-x64.zip" -O "$($env:TMP)\Pango.zip"
mkdir "$($PWD)\ManimCache\Pango"
7z x "$($env:TMP)\Pango.zip" -o"$($PWD)\ManimCache\Pango"
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml
index 1e6d6e28b..f6c415b0b 100644
--- a/.github/workflows/python-publish.yml
+++ b/.github/workflows/python-publish.yml
@@ -26,3 +26,26 @@ jobs:
- name: Publish release to pypi
run: poetry publish --build
+
+ - name: Get Upload URL
+ id: create_release
+ shell: bash
+ env:
+ access_token: ${{ secrets.GITHUB_TOKEN }}
+ tag_act: ${{ github.ref }}
+ run: |
+ ref_tag=$(python -c "print('${tag_act}'.split('/')[-1])")
+ res=$(curl -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${access_token}" https://api.github.com/repos/ManimCommunity/manim/releases/tags/${ref_tag})
+ upload_url=$(python -c "import json;print(json.loads('''${res}''')['upload_url'])")
+ echo "::set-output name=upload_url::${upload_url}"
+
+ - name: Upload Release Asset
+ id: upload-release
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
+ asset_path: dist/*.tar.gz
+ asset_name: manimce-${{ steps.tag.outputs.tag }}.tar.gz
+ asset_content_type: application/gzip
diff --git a/.gitignore b/.gitignore
index f7da3fa52..4606afd95 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,6 +58,7 @@ docs/_build/
docs/build/
docs/source/_autosummary/
docs/source/reference/
+docs/source/_build/
# PyBuilder
target/
diff --git a/README.md b/README.md
index 02199c7da..ef925be87 100644
--- a/README.md
+++ b/README.md
@@ -10,8 +10,8 @@ Manim is an animation engine for explanatory math videos. It's used to create pr
> NOTE: This repository is maintained by the Manim Community, and is not associated with Grant Sanderson or 3Blue1Brown in any way (though we are definitely indebted to him for providing his work to the world). If you want to study how Grant makes his videos, head over to his repository (3b1b/manim). This is a more frequently updated repository than that one, and is recommended if you want to use Manim for your own projects.
-
## Table of Contents:
+
- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
@@ -19,7 +19,6 @@ Manim is an animation engine for explanatory math videos. It's used to create pr
- [Contributing](#contributing)
- [License](#license)
-
## Installation
Manim has a few dependencies that need to be installed before it. Please visit
@@ -27,10 +26,10 @@ the
[documentation](https://manimce.readthedocs.io/en/latest/installation.html)
and follow the instructions according to your operating system.
-
## Usage
Here is an example manim script:
+
```python
from manim import *
@@ -47,18 +46,18 @@ class SquareToCircle(Scene):
self.play(FadeOut(square))
```
-Save this code in a file called `example.py`. Now open your terminal in the
+Save this code in a file called `example.py`. Now open your terminal in the
folder where you saved the file and execute
+
```sh
manim example.py SquareToCircle -pl
```
You should see your video player pop up and play a simple scene where a square
-is transformed into a circle. You can find some more simple examples in the
+is transformed into a circle. You can find some more simple examples in the
[GitHub repository](https://github.com/ManimCommunity/manim/tree/master/example_scenes).
Visit the [official gallery](https://manimce.readthedocs.io/en/latest/examples.html) for more advanced examples.
-
## Command line arguments
The general usage of manim is as follows:
@@ -68,33 +67,33 @@ The general usage of manim is as follows:
The `-p` flag in the command above is for previewing, meaning the video file will automatically open when it is done rendering. The `-l` flag is for a faster rendering at a lower quality.
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` 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.
For a thorough list of command line arguments, visit the
[documentation](https://manimce.readthedocs.io/en/latest/tutorials/configuration.html).
-
## Documentation
-Documentation is in progress at [ReadTheDocs](https://manimce.readthedocs.io/en/latest/).
+Documentation is in progress at [ReadTheDocs](https://manimce.readthedocs.io/en/latest/).
## Help with Manim
+
If you need help installing or using Manim, please take a look at [the Reddit
Community](https://www.reddit.com/r/manim) or the [Discord
-Community](https://discord.gg/mMRrZQW). For bug reports and feature requests,
+Community](https://discord.gg/mMRrZQW). For bug reports and feature requests,
please open an issue.
-
## Contributing
+
Is always welcome. In particular, there is a dire need for tests and
documentation. For guidelines please see the
[documentation](https://manimce.readthedocs.io/en/latest/contributing.html).
This project uses [Poetry](https://python-poetry.org/docs/) for management. You need to have poetry installed and available in your environment.
You can find more information about it in its [Documentation](https://manimce.readthedocs.io/en/latest/installation/for_dev.html)
-
## License
The software is double-licensed under the MIT license, with copyright
diff --git a/docs/requirements.txt b/docs/requirements.txt
index efc99da41..cdcccbc2a 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,3 +1,4 @@
Sphinx==3.1.2
guzzle-sphinx-theme
recommonmark>=0.5.0
+sphinx-copybutton
\ No newline at end of file
diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css
index 343a51bd1..e7c4f59c9 100644
--- a/docs/source/_static/custom.css
+++ b/docs/source/_static/custom.css
@@ -28,3 +28,8 @@ img {
padding: 14px 0 14px 20px;
margin: 20px 0;
}
+
+div.example-reference {
+ background-color: #dff0d8;
+ border: 1px solid #3c763d;
+}
diff --git a/docs/source/_static/manim-logo-sidebar.svg b/docs/source/_static/manim-logo-sidebar.svg
new file mode 100644
index 000000000..115e0cc8a
--- /dev/null
+++ b/docs/source/_static/manim-logo-sidebar.svg
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
+ id="svg64"
+ version="1.1"
+ viewBox="0 0 155.19392 80.609703"
+ height="80.609703mm"
+ width="155.19392mm">
+ <defs
+ id="defs58" />
+ <sodipodi:namedview
+ inkscape:snap-page="false"
+ inkscape:window-maximized="0"
+ inkscape:window-y="228"
+ inkscape:window-x="299"
+ inkscape:window-height="1198"
+ inkscape:window-width="1985"
+ fit-margin-bottom="0"
+ fit-margin-right="0"
+ fit-margin-left="0"
+ fit-margin-top="0"
+ showgrid="false"
+ inkscape:document-rotation="0"
+ inkscape:current-layer="layer1"
+ inkscape:document-units="mm"
+ inkscape:cy="24.575193"
+ inkscape:cx="329.94865"
+ inkscape:zoom="1.5480095"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base" />
+ <metadata
+ id="metadata61">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(-0.6440986,-9.5880074)"
+ id="layer1"
+ inkscape:groupmode="layer"
+ inkscape:label="Ebene 1">
+ <g
+ id="g86"
+ transform="translate(-152.56314,14.339231)">
+ <path
+ inkscape:connector-curvature="0"
+ d="m 270.08866,54.482299 h -23.55221 l 11.7761,-20.39681 z"
+ id="path34"
+ style="fill:#e07a5f;fill-opacity:1;stroke:none;stroke-width:0.381578;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="20.803919"
+ x="231.22784"
+ height="27.255585"
+ width="27.255585"
+ id="rect36"
+ style="fill:#525893;fill-opacity:1;stroke:none;stroke-width:0.547864;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <circle
+ r="13.947841"
+ cy="47.737576"
+ cx="230.86613"
+ id="circle38"
+ style="fill:#87c2a5;fill-opacity:1;stroke:none;stroke-width:0.406653;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="fill:#343434;fill-opacity:1;stroke:none;stroke-width:4.94272"
+ d="m 213.60755,32.822539 -9.4221,-22.39672 c -0.3861,-1.0039802 -0.3861,-1.0039802 -1.7762,-1.0039802 h -9.1132 c -0.9268,0 -1.6218,0 -1.6218,0.8495302 0,0.84952 0.8495,0.84952 1.0812,0.84952 0.6178,0 1.9307,0.15447 3.012,0.54061 v 26.25823 c 0,1.08121 0,3.24365 -3.3209,3.55258 -0.9268,0.0772 -0.9268,0.7723 -0.9268,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 7.5685 c 0.9268,0 1.6219,0 1.6219,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.7843,-0.30893 -3.7843,-2.39413 -3.7843,-3.55258 v -24.48193 l 0.077,-0.0772 11.9706,28.80681 c 0.4634,0.84954 0.7724,1.004 1.0813,1.004 0.6178,0 0.695,-0.38615 1.004,-1.004 l 12.0479,-28.80681 0.077,0.0772 v 24.48193 c 0,1.08121 0,3.24365 -3.3982,3.55258 -0.9267,0.0772 -0.9267,0.7723 -0.9267,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 13.1291 c 0.9267,0 1.6218,0 1.6218,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.7843,-0.30893 -3.7843,-2.39413 -3.7843,-3.55258 v -23.24624 c 0,-1.08123 0,-3.24368 3.3209,-3.5526 0.5406,0 0.9268,-0.30891 0.9268,-0.84952 0,-0.8495302 -0.6951,-0.8495302 -1.6219,-0.8495302 h -9.4993 c -1.2356,0 -1.3901,0 -1.7763,1.0039802 z m -1.4674,0.92677 c 0.3862,0.77229 0.4634,0.84952 1.0813,1.08121 l -2.2397,5.17441 h -0.077 l -11.1984,-26.79882 c -0.2317,-0.61785 -0.6951,-1.46737 -1.3129,-2.08522 h 4.2477 z m 13.6698,-22.62842 h 5.2516 c -1.1585,1.23568 -1.1585,2.5486 -1.1585,3.39813 v 23.55516 c 0,0.84954 0,2.16244 1.1585,3.39813 h -6.3329 c 1.0813,-1.23569 1.0813,-2.54859 1.0813,-3.39813 z"
+ id="path1500"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+</svg>
diff --git a/docs/source/_static/non_standard_rate_funcs.png b/docs/source/_static/non_standard_rate_funcs.png
new file mode 100644
index 000000000..ab3aa8346
Binary files /dev/null and b/docs/source/_static/non_standard_rate_funcs.png differ
diff --git a/docs/source/_templates/logo-text.html b/docs/source/_templates/logo-text.html
new file mode 100644
index 000000000..a54311e04
--- /dev/null
+++ b/docs/source/_templates/logo-text.html
@@ -0,0 +1,2 @@
+<img src="{{ pathto('_static/manim-logo-sidebar.svg', 1) }}" alt="ManimCommunity logo" width="100%">
+<a href="{{ homepage() }}" class="text-logo">{{ theme_project_nav_name or shorttitle }}</a>
diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
index 72046986b..500b075cb 100644
--- a/docs/source/changelog.rst
+++ b/docs/source/changelog.rst
@@ -2,11 +2,33 @@
Changelog
*********
-manimce-v1.0.0-dev
+
+v0.2.0
==================
:Date: TBD
+Changes since Manim Community release v0.1.0
+
+
+
+Mobjects, Scenes, and Animations
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+#. The ``alignment`` attribute to Tex and MathTex has been removed in favour of ``tex_environment``.
+#. :class:`~.Text` now uses Pango for rendering. ``PangoText`` has been removed. The old implementation is still available as a fallback as :class:`~.CairoText`.
+
+
+
+
+
+
+
+v0.1.0
+==================
+
+:Date: October 21, 2020
+
This is the first release of manimce after forking from 3b1b/manim. As such,
developers have focused on cleaning up and refactoring the codebase while still
maintaining backwards compatibility wherever possible.
@@ -20,7 +42,7 @@ Command line
^^^^^^^^^^^^
#. Output of 'manim --help' has been improved
-#. Implement logging with the :code:`rich` library and a :code:`logger` object instead of plain ol` prints
+#. Implement logging with the :code:`rich` library and a :code:`logger` object instead of plain ol' prints
#. Added a flag :code:`--dry_run`, which doesn’t write any media
#. Allow for running manim with :code:`python3 -m manim`
#. Refactored Tex Template management. You can now use custom templates with command line args using :code:`--tex_template`!
@@ -42,6 +64,16 @@ Config system
#. Implement a :code:`manim.cfg` config file system, that consolidates the global configuration, the command line argument parsing, and some of the constants defined in :code:`constants.py`
#. Added utilities for manipulating Manim’s :code:`.cfg` files.
#. Added a subcommand structure for easier use of utilities managing :code:`.cfg` files
+#. Also some variables have been moved from ``constants.py`` to the new config system:
+
+ #. ``FRAME_HEIGHT`` to ``config["frame_width"]``
+ #. ``TOP`` to ``config["frame_height"] / 2 * UP``
+ #. ``BOTTOM`` to ``config["frame_height"] / 2 * DOWN``
+ #. ``LEFT_SIDE`` to ``config["frame_width"] / 2 * LEFT``
+ #. ``RIGHT_SIDE`` to ``config["frame_width"] / 2 * RIGHT``
+ #. ``self.camera.frame_rate`` to ``config["frame_rate"]``
+
+
Mobjects, Scenes, and Animations
@@ -50,6 +82,7 @@ Mobjects, Scenes, and Animations
#. Add customizable left and right bracket for :code:`Matrix` mobject and :code:`set_row_colors` method for matrix mobject
#. Add :code:`AddTeXLetterByLetter` animation
#. Enhanced GraphScene
+
#. You can now add arrow tips to axes
#. extend axes a bit at the start and/or end
#. have invisible axes
@@ -64,6 +97,7 @@ Mobjects, Scenes, and Animations
#. Add a :code:`Variable` class for displaying text that continuously updates to reflect the value of a python variable.
#. The ``Tex`` and ``MathTex`` objects allow you to specify a custom TexTemplate using the ``template`` keyword argument.
#. :code:`VGroup` now supports printing the class names of contained mobjects and :code:`VDict` supports printing the internal dict of mobjects
+#. Add all the standard easing functions
#. :code:`Scene` now renders when :code:`Scene.render()` is called rather than upon instantiation.
#. :code:`ValueTracker` now supports increment using the `+=` operator (in addition to the already existing `increment_value` method)
#. Add :class:`PangoText` for rendering texts using Pango.
@@ -106,3 +140,6 @@ Other Changes
#. Rename package from manimlib to manim
#. Move all imports to :code:`__init__`, so :code:`from manim import *` replaces :code:`from manimlib.imports import *`
#. Global dir variable handling has been removed. Instead :code:`initialize_directories`, if needed, overrides the values from the cfg files at runtime.
+
+
+
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 08605eeff..4e4e15dce 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -39,7 +39,7 @@ if os.environ.get("READTHEDOCS") == "True":
# -- Project information -----------------------------------------------------
-project = "manim"
+project = "Manim"
copyright = "2020, The Manim Community Dev Team"
author = "The Manim Community Dev Team"
@@ -52,6 +52,7 @@ author = "The Manim Community Dev Team"
extensions = [
"sphinx.ext.autodoc",
"recommonmark",
+ "sphinx_copybutton",
"sphinx.ext.napoleon",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
diff --git a/docs/source/examples.rst b/docs/source/examples.rst
index fea2e23c5..5f5fff964 100644
--- a/docs/source/examples.rst
+++ b/docs/source/examples.rst
@@ -1,15 +1,14 @@
-Examples
-============
+Example Gallery
+===============
.. toctree::
- examples/shapes
+ examples/shapes_images_positions
examples/annotations
examples/plots
- examples/text
+ examples/tex
examples/formulas
examples/3d
examples/camera_settings
examples/animations
- examples/neat_projects
examples/advanced_projects
diff --git a/docs/source/examples/3d.rst b/docs/source/examples/3d.rst
index 6a46f018d..9c25ab664 100644
--- a/docs/source/examples/3d.rst
+++ b/docs/source/examples/3d.rst
@@ -1,10 +1,10 @@
3D Scenes
=================================
-.. manim:: Example3DNo1
+.. manim:: ThreeDSphere
:save_last_frame:
- class Example3DNo1(ThreeDScene):
+ class ThreeDSphere(ThreeDScene):
def construct(self):
axes = ThreeDAxes()
sphere = ParametricSurface(
@@ -18,10 +18,10 @@
self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
self.add(axes, sphere)
-.. manim:: Example3DLightSourcePosition
+.. manim:: ThreeDLightSourcePosition
:save_last_frame:
- class Example3DLightSourcePosition(ThreeDScene):
+ class ThreeDLightSourcePosition(ThreeDScene):
def construct(self):
axes = ThreeDAxes()
sphere = ParametricSurface(
@@ -32,13 +32,13 @@
]), v_min=0, v_max=TAU, u_min=-PI / 2, u_max=PI / 2,
checkerboard_colors=[RED_D, RED_E], resolution=(15, 32)
)
- self.camera.light_source.move_to(3*IN) # changes the source of the light
+ self.renderer.camera.light_source.move_to(3*IN) # changes the source of the light
self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
self.add(axes, sphere)
-.. manim:: Example3DNo3
+.. manim:: ThreeDCameraRotation
- class Example3DNo3(ThreeDScene):
+ class ThreeDCameraRotation(ThreeDScene):
def construct(self):
axes = ThreeDAxes()
circle=Circle()
@@ -50,9 +50,9 @@
self.move_camera(phi=75 * DEGREES, theta=30 * DEGREES)
self.wait()
-.. manim:: Example3DNo4
+.. manim:: ThreeDCameraIllusionRotation
- class Example3DNo4(ThreeDScene):
+ class ThreeDCameraIllusionRotation(ThreeDScene):
def construct(self):
axes = ThreeDAxes()
circle=Circle()
@@ -62,10 +62,10 @@
self.wait(PI)
self.stop_3dillusion_camera_rotation()
-.. manim:: Example3DNo5
+.. manim:: ThreeDParametricSpring
:save_last_frame:
- class Example3DNo5(ThreeDScene):
+ class ThreeDParametricSpring(ThreeDScene):
def construct(self):
curve1 = ParametricFunction(
lambda u: np.array([
@@ -79,3 +79,54 @@
self.set_camera_orientation(phi=80 * DEGREES, theta=-60 * DEGREES)
self.wait()
+.. manim:: ThreeDFunctionPlot
+
+ class ThreeDFunctionPlot(ThreeDScene):
+ def construct(self):
+ resolution_fa = 22
+ self.set_camera_orientation(phi=75 * DEGREES, theta=-30 * DEGREES)
+
+ def param_plane(u, v):
+ x = u
+ y = v
+ z = 0
+ return np.array([x, y, z])
+
+ plane = ParametricSurface(
+ param_plane,
+ resolution=(resolution_fa, resolution_fa),
+ v_min=-2,
+ v_max=+2,
+ u_min=-2,
+ u_max=+2,
+ )
+ plane.scale_about_point(2, ORIGIN)
+
+ def param_gauss(u, v):
+ x = u
+ y = v
+ d = np.sqrt(x * x + y * y)
+ sigma, mu = 0.4, 0.0
+ z = np.exp(-((d - mu) ** 2 / (2.0 * sigma ** 2)))
+ return np.array([x, y, z])
+
+ gauss_plane = ParametricSurface(
+ param_gauss,
+ resolution=(resolution_fa, resolution_fa),
+ v_min=-2,
+ v_max=+2,
+ u_min=-2,
+ u_max=+2,
+ )
+
+ gauss_plane.scale_about_point(2, ORIGIN)
+ gauss_plane.set_style(fill_opacity=1)
+ gauss_plane.set_style(stroke_color=GREEN)
+ gauss_plane.set_fill_by_checkerboard(GREEN, BLUE, opacity=0.1)
+
+ axes = ThreeDAxes()
+
+ self.add(axes)
+ self.play(Write(plane))
+ self.play(Transform(plane, gauss_plane))
+ self.wait()
diff --git a/docs/source/examples/advanced_projects.rst b/docs/source/examples/advanced_projects.rst
index 6490877ce..9e4552571 100644
--- a/docs/source/examples/advanced_projects.rst
+++ b/docs/source/examples/advanced_projects.rst
@@ -1,10 +1,251 @@
Advanced Projects
=================================
-.. manim:: ExampleSineCurve
+.. manim:: OpeningManim
+ :ref_classes: Tex MathTex NumberPlane
- class ExampleSineCurve(Scene):
- # contributed by heejin_park, https://infograph.tistory.com/230
+ class OpeningManim(Scene):
+ def construct(self):
+ title = Tex("This is some \\LaTeX")
+ basel = MathTex("\\sum_{n=1}^\\infty " "\\frac{1}{n^2} = \\frac{\\pi^2}{6}")
+ VGroup(title, basel).arrange(DOWN)
+ self.play(
+ Write(title),
+ FadeInFrom(basel, UP),
+ )
+ self.wait()
+
+ transform_title = Tex("That was a transform")
+ transform_title.to_corner(UP + LEFT)
+ self.play(
+ Transform(title, transform_title),
+ LaggedStart(*map(lambda obj: FadeOutAndShift(obj, direction=DOWN), basel)),
+ )
+ self.wait()
+
+ grid = NumberPlane()
+ grid_title = Tex("This is a grid")
+ grid_title.scale(1.5)
+ grid_title.move_to(transform_title)
+
+ self.add(grid, grid_title) # Make sure title is on top of grid
+ self.play(
+ FadeOut(title),
+ FadeInFrom(grid_title, direction=DOWN),
+ ShowCreation(grid, run_time=3, lag_ratio=0.1),
+ )
+ self.wait()
+
+ grid_transform_title = Tex(
+ "That was a non-linear function \\\\" "applied to the grid"
+ )
+ grid_transform_title.move_to(grid_title, UL)
+ grid.prepare_for_nonlinear_transform()
+ self.play(
+ grid.apply_function,
+ lambda p: p
+ + np.array(
+ [
+ np.sin(p[1]),
+ np.sin(p[0]),
+ 0,
+ ]
+ ),
+ run_time=3,
+ )
+ self.wait()
+ self.play(Transform(grid_title, grid_transform_title))
+ self.wait()
+
+
+.. manim:: SquareToCircle
+ :quality: low
+
+ 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(ShowCreation(square))
+ self.play(Transform(square, circle))
+ self.play(FadeOut(square))
+
+
+.. manim:: WarpSquare
+ :quality: low
+
+ class WarpSquare(Scene):
+ def construct(self):
+ square = Square()
+ self.play(
+ ApplyPointwiseFunction(
+ lambda point: complex_to_R3(np.exp(R3_to_complex(point))), square
+ )
+ )
+ self.wait()
+
+.. manim:: WriteStuff
+ :quality: low
+
+ class WriteStuff(Scene):
+ def construct(self):
+ example_text = Tex("This is a some text", tex_to_color_map={"text": YELLOW})
+ example_tex = MathTex(
+ "\\sum_{k=1}^\\infty {1 \\over k^2} = {\\pi^2 \\over 6}",
+ )
+ group = VGroup(example_text, example_tex)
+ group.arrange(DOWN)
+ group.set_width(config["frame_width"] - 2 * LARGE_BUFF)
+
+ self.play(Write(example_text))
+ self.play(Write(example_tex))
+ self.wait()
+
+.. manim:: SquareMovingWithUpdaters
+ :quality: low
+
+ class SquareMovingWithUpdaters(Scene):
+ def construct(self):
+ decimal = DecimalNumber(
+ 0,
+ show_ellipsis=True,
+ num_decimal_places=3,
+ include_sign=True,
+ )
+ square = Square().to_edge(UP)
+
+ decimal.add_updater(lambda d: d.next_to(square, RIGHT))
+ decimal.add_updater(lambda d: d.set_value(square.get_center()[1]))
+ self.add(square, decimal)
+ self.play(
+ square.to_edge,
+ DOWN,
+ rate_func=there_and_back,
+ run_time=5,
+ )
+ self.wait()
+
+
+.. manim:: ShapesWithVDics
+ :quality: low
+
+ class ShapesWithVDics(Scene):
+ def construct(self):
+ square = Square().set_color(RED)
+ circle = Circle().set_color(YELLOW).next_to(square, UP)
+
+ # create dict from list of tuples each having key-mobject pair
+ pairs = [("s", square), ("c", circle)]
+ my_dict = VDict(pairs, show_keys=True)
+
+ # display it just like a VGroup
+ self.play(ShowCreation(my_dict))
+ self.wait()
+
+ text = Tex("Some text").set_color(GREEN).next_to(square, DOWN)
+
+ # add a key-value pair by wrapping it in a single-element list of tuple
+ # after attrs branch is merged, it will be easier like `.add(t=text)`
+ my_dict.add([("t", text)])
+ self.wait()
+
+ rect = Rectangle().next_to(text, DOWN)
+ # can also do key assignment like a python dict
+ my_dict["r"] = rect
+
+ # access submobjects like a python dict
+ my_dict["t"].set_color(PURPLE)
+ self.play(my_dict["t"].scale, 3)
+ self.wait()
+
+ # also supports python dict styled reassignment
+ my_dict["t"] = Tex("Some other text").set_color(BLUE)
+ self.wait()
+
+ # remove submoject by key
+ my_dict.remove("t")
+ self.wait()
+
+ self.play(Uncreate(my_dict["s"]))
+ self.wait()
+
+ self.play(FadeOut(my_dict["c"]))
+ self.wait()
+
+ self.play(FadeOutAndShift(my_dict["r"], DOWN))
+ self.wait()
+
+ # you can also make a VDict from an existing dict of mobjects
+ plain_dict = {
+ 1: Integer(1).shift(DOWN),
+ 2: Integer(2).shift(2 * DOWN),
+ 3: Integer(3).shift(3 * DOWN),
+ }
+
+ vdict_from_plain_dict = VDict(plain_dict)
+ vdict_from_plain_dict.shift(1.5 * (UP + LEFT))
+ self.play(ShowCreation(vdict_from_plain_dict))
+
+ # you can even use zip
+ vdict_using_zip = VDict(zip(["s", "c", "r"], [Square(), Circle(), Rectangle()]))
+ vdict_using_zip.shift(1.5 * RIGHT)
+ self.play(ShowCreation(vdict_using_zip))
+ self.wait()
+
+
+.. manim:: VariablesWithValueTracker
+ :quality: low
+
+ class VariablesWithValueTracker(Scene):
+ def construct(self):
+ var = 0.5
+ on_screen_var = Variable(var, Text("var"), num_decimal_places=3)
+
+ # You can also change the colours for the label and value
+ on_screen_var.label.set_color(RED)
+ on_screen_var.value.set_color(GREEN)
+
+ self.play(Write(on_screen_var))
+ # The above line will just display the variable with
+ # its initial value on the screen. If you also wish to
+ # update it, you can do so by accessing the `tracker` attribute
+ self.wait()
+ var_tracker = on_screen_var.tracker
+ var = 10.5
+ self.play(var_tracker.set_value, var)
+ self.wait()
+
+ int_var = 0
+ on_screen_int_var = Variable(
+ int_var, Text("int_var"), var_type=Integer
+ ).next_to(on_screen_var, DOWN)
+ on_screen_int_var.label.set_color(RED)
+ on_screen_int_var.value.set_color(GREEN)
+
+ self.play(Write(on_screen_int_var))
+ self.wait()
+ var_tracker = on_screen_int_var.tracker
+ var = 10.5
+ self.play(var_tracker.set_value, var)
+ self.wait()
+
+ # If you wish to have a somewhat more complicated label for your
+ # variable with subscripts, superscripts, etc. the default class
+ # for the label is MathTex
+ subscript_label_var = 10
+ on_screen_subscript_var = Variable(subscript_label_var, "{a}_{i}").next_to(
+ on_screen_int_var, DOWN
+ )
+ self.play(Write(on_screen_subscript_var))
+ self.wait()
+
+.. manim:: SineCurvePlot
+
+ class SineCurvePlot(Scene):
+ # contributed by heejin_park, https://infograph.tistory.com/230
def construct(self):
self.show_axis()
self.show_circle()
diff --git a/docs/source/examples/animations.rst b/docs/source/examples/animations.rst
index 33eab8e9c..8aeae5567 100644
--- a/docs/source/examples/animations.rst
+++ b/docs/source/examples/animations.rst
@@ -10,9 +10,9 @@ Some more examples will come soon here!
Updaters
##########
-.. manim:: Updater1Example
+.. manim:: RotationUpdater
- class Updater1Example(Scene):
+ class RotationUpdater(Scene):
def construct(self):
def my_rotation_updater(mobj,dt):
mobj.rotate_about_origin(dt)
@@ -22,9 +22,9 @@ Updaters
self.add(line_reference, line_moving)
self.wait(PI)
-.. manim:: Updater2Example
+.. manim:: RotationUpdater2
- class Updater2Example(Scene):
+ class RotationUpdater2(Scene):
def construct(self):
def updater_forth(mobj, dt):
mobj.rotate_about_origin(dt)
@@ -41,9 +41,9 @@ Updaters
line_moving.remove_updater(updater_back)
self.wait(0.5)
-.. manim:: Example3
+.. manim:: NumberLinePointer
- class Example3(Scene):
+ class NumberLinePointer(Scene):
def construct(self):
number_line = NumberLine() ##with all your parameters and stuff
pointer = Vector(DOWN)
@@ -57,10 +57,11 @@ Updaters
self.play(pointer_value.set_value, 5)
self.wait()
self.play(pointer_value.set_value, 3)
+ self.wait()
-.. manim:: Example4
+.. manim:: PointWithTrace
- class Example4(Scene):
+ class PointWithTrace(Scene):
def construct(self):
path = VMobject()
dot = Dot()
@@ -77,9 +78,9 @@ Updaters
self.play(dot.shift, LEFT)
self.wait()
-.. manim:: Example1ValTracker
+.. manim:: PointMovingWithValTracker
- class Example1ValTracker(Scene):
+ class PointMovingWithValTracker(Scene):
def construct(self):
dot_disp = Dot().set_color(RED)
self.add(dot_disp)
@@ -92,9 +93,9 @@ Updaters
self.play(val_tracker.set_value, tick_end, rate_func=linear)
self.wait()
-.. manim:: Example2ValTracker
+.. manim:: RotationValTracker
- class Example2ValTracker(Scene):
+ class RotationValTracker(Scene):
def construct(self):
tick_start = 0
tick_end = 2 * PI
@@ -105,4 +106,38 @@ Updaters
line_moving = Line(ORIGIN, LEFT).set_color(ORANGE)
line_moving.add_updater(my_rotation_updater)
self.add(line_reference, line_moving)
- self.play(val_tracker.set_value, tick_end, run_time=PI)
\ No newline at end of file
+ self.play(val_tracker.set_value, tick_end, run_time=PI)
+
+.. manim:: PlaneFadeOut
+
+ class PlaneFadeOut(Scene):
+ def construct(self):
+ sq2 = Square()
+
+ sq1 = Square()
+ sq1.next_to(sq2, LEFT)
+
+ sq3 = Square()
+ sq3.next_to(sq2, RIGHT)
+
+ circ = Circle()
+ circ.next_to(sq2, DOWN)
+
+ self.add(sq1, sq2, sq3, circ)
+ self.wait()
+
+ self.play(FadeOut(sq1), FadeOut(sq2), FadeOut(sq3))
+ self.wait()
+
+.. manim:: FadeInAndOut
+
+ class FadeInAndOut(Scene):
+ def construct(self):
+ square = Square(color=BLUE).shift(2 * UP)
+ annotation = Text("Fade In", height=0.8)
+ self.add(annotation)
+ self.play(FadeIn(square))
+
+ annotation.become(Text("Fade Out", height=0.8))
+ self.add(annotation)
+ self.play(FadeOut(square))
diff --git a/docs/source/examples/annotations.rst b/docs/source/examples/annotations.rst
index 33a331bd9..746d53166 100644
--- a/docs/source/examples/annotations.rst
+++ b/docs/source/examples/annotations.rst
@@ -1,10 +1,10 @@
Annotations
=================================
-.. manim:: AnnotateBrace
+.. manim:: BraceAnnotation
:save_last_frame:
- class AnnotateBrace(Scene):
+ class BraceAnnotation(Scene):
def construct(self):
dot = Dot([0, 0, 0])
dot2 = Dot([2, 1, 0])
@@ -15,26 +15,26 @@ Annotations
b2text = b2.get_tex("x-x_1")
self.add(dot, dot2, line, b1, b2, b1text, b2text)
-.. manim:: ExampleArrow
+.. manim:: VectorArrow
:quality: medium
:save_last_frame:
- class ExampleArrow(Scene):
+ class VectorArrow(Scene):
def construct(self):
dot = Dot(ORIGIN)
arrow = Arrow(ORIGIN, [2, 2, 0], buff=0)
numberplane = NumberPlane()
- origin_text = TextMobject('(0, 0)').next_to(dot, DOWN)
- tip_text = TextMobject('(2, 2)').next_to(arrow.get_end(), RIGHT)
+ origin_text = Text('(0, 0)').next_to(dot, DOWN)
+ tip_text = Text('(2, 2)').next_to(arrow.get_end(), RIGHT)
self.add(numberplane, dot, arrow, origin_text, tip_text)
-.. manim:: ExampleArrowTips
+.. manim:: ArrowTipsShowcase
:quality: medium
:save_last_frame:
from manim.mobject.geometry import ArrowTriangleTip, ArrowSquareTip, ArrowSquareFilledTip,\
ArrowCircleTip, ArrowCircleFilledTip
- class ExampleArrowTips(Scene):
+ class ArrowTipsShowcase(Scene):
def construct(self):
a00 = Arrow(start=[-2, 3, 0], end=[2, 3, 0], color=YELLOW)
a11 = Arrow(start=[-2, 2, 0], end=[2, 2, 0], tip_shape=ArrowTriangleTip)
diff --git a/docs/source/examples/camera_settings.rst b/docs/source/examples/camera_settings.rst
index 5b28addf0..c41fb2f77 100644
--- a/docs/source/examples/camera_settings.rst
+++ b/docs/source/examples/camera_settings.rst
@@ -1,18 +1,18 @@
Camera Settings
=================================
-.. manim:: Example1
+.. manim:: ChangingCameraWidth
- class Example1(MovingCameraScene):
+ class ChangingCameraWidth(MovingCameraScene):
def construct(self):
text = Text("Hello World")
self.add(text)
self.play(self.camera_frame.set_width, text.get_width() * 1.2)
self.wait()
-.. manim:: Example2a
+.. manim:: ChangingCameraWidthAndRestore
- class Example2a(MovingCameraScene):
+ class ChangingCameraWidthAndRestore(MovingCameraScene):
def construct(self):
text = Text("Hello World").set_color(BLUE)
self.add(text)
@@ -21,9 +21,9 @@ Camera Settings
self.wait(0.3)
self.play(Restore(self.camera_frame))
-.. manim:: Example2b
+.. manim:: ChangingCameraWidthAndRevert
- class Example2b(MovingCameraScene):
+ class ChangingCameraWidthAndRevert(MovingCameraScene):
def construct(self):
text = Text("Hello World").set_color(BLUE)
self.add(text)
@@ -32,20 +32,21 @@ Camera Settings
self.play(self.camera_frame.set_width, 14)
-.. manim:: Example3
+.. manim:: MovingCameraCenter
- class Example3(MovingCameraScene):
+ class MovingCameraCenter(MovingCameraScene):
def construct(self):
s = Square(color=RED, fill_opacity=0.5).move_to(2 * LEFT)
t = Triangle(color=GREEN, fill_opacity=0.5).move_to(2 * RIGHT)
+ self.wait(0.3)
self.add(s, t)
self.play(self.camera_frame.move_to, s)
self.wait(0.3)
self.play(self.camera_frame.move_to, t)
-.. manim:: Example4
+.. manim:: MovingAndZoomingCamera
- class Example4(MovingCameraScene):
+ class MovingAndZoomingCamera(MovingCameraScene):
def construct(self):
s = Square(color=BLUE, fill_opacity=0.5).move_to(2 * LEFT)
t = Triangle(color=YELLOW, fill_opacity=0.5).move_to(2 * RIGHT)
@@ -59,9 +60,9 @@ Camera Settings
self.play(self.camera_frame.move_to, ORIGIN,
self.camera_frame.set_width,14)
-.. manim:: Example5
+.. manim:: MovingCameraOnGraph
- class Example5(GraphScene, MovingCameraScene):
+ class MovingCameraOnGraph(GraphScene, MovingCameraScene):
def setup(self):
GraphScene.setup(self)
MovingCameraScene.setup(self)
@@ -81,9 +82,9 @@ Camera Settings
self.play(Restore(self.camera_frame))
self.wait()
-.. manim:: Example6
+.. manim:: FollowingGraphCamera
- class Example6(GraphScene, MovingCameraScene):
+ class FollowingGraphCamera(GraphScene, MovingCameraScene):
def setup(self):
GraphScene.setup(self)
MovingCameraScene.setup(self)
@@ -115,9 +116,9 @@ Camera Settings
Note: ZoomedScene is derived class of MovingCameraScene,
so one can use all functionality that were used before in the MovingCameraScene examples.
-.. manim:: ExampleZoom1
+.. manim:: UseZoomedScene
- class ExampleZoom1(ZoomedScene):
+ class UseZoomedScene(ZoomedScene):
def construct(self):
dot = Dot().set_color(GREEN)
self.add(dot)
@@ -126,9 +127,9 @@ so one can use all functionality that were used before in the MovingCameraScene
self.wait(1)
self.play(dot.shift, LEFT)
-.. manim:: ExampleZoom2
+.. manim:: ChangingZoomScale
- class ExampleZoom2(ZoomedScene):
+ class ChangingZoomScale(ZoomedScene):
CONFIG = {
"zoom_factor": 0.3,
"zoomed_display_height": 1,
@@ -151,9 +152,9 @@ so one can use all functionality that were used before in the MovingCameraScene
self.play(self.zoomed_camera.frame.shift, 0.5 * DOWN)
-.. manim:: ExampleZoom3
+.. manim:: MovingZoomedSceneAround
- class ExampleZoom3(ZoomedScene):
+ class MovingZoomedSceneAround(ZoomedScene):
# contributed by TheoremofBeethoven, www.youtube.com/c/TheoremofBeethoven
CONFIG = {
"zoom_factor": 0.3,
@@ -170,8 +171,8 @@ so one can use all functionality that were used before in the MovingCameraScene
image = ImageMobject(np.uint8([[0, 100, 30, 200],
[255, 0, 5, 33]]))
image.set_height(7)
- frame_text = TextMobject("Frame", color=PURPLE).scale(1.4)
- zoomed_camera_text = TextMobject("Zoomed camera", color=RED).scale(1.4)
+ frame_text = Text("Frame", color=PURPLE).scale(1.4)
+ zoomed_camera_text = Text("Zoomed camera", color=RED).scale(1.4)
self.add(image, dot)
zoomed_camera = self.zoomed_camera
@@ -191,12 +192,12 @@ so one can use all functionality that were used before in the MovingCameraScene
frame_text.next_to(frame, DOWN)
- self.play(ShowCreation(frame), FadeInFromDown(frame_text))
+ self.play(ShowCreation(frame), FadeInFrom(frame_text, direction=DOWN))
self.activate_zooming()
self.play(self.get_zoomed_display_pop_out_animation(), unfold_camera)
zoomed_camera_text.next_to(zoomed_display_frame, DOWN)
- self.play(FadeInFromDown(zoomed_camera_text))
+ self.play(FadeInFrom(zoomed_camera_text, direction=DOWN))
# Scale in x y z
scale_factor = [0.5, 1.5, 0]
self.play(
diff --git a/docs/source/examples/formulas.rst b/docs/source/examples/formulas.rst
index 5f615f963..9642fa4a1 100644
--- a/docs/source/examples/formulas.rst
+++ b/docs/source/examples/formulas.rst
@@ -4,9 +4,9 @@ Formulas
-.. manim:: MoveFrameBox
+.. manim:: MovingFrameBox
- class MoveFrameBox(Scene):
+ class MovingFrameBox(Scene):
def construct(self):
text=MathTex(
"\\frac{d}{dx}f(x)g(x)=","f(x)\\frac{d}{dx}g(x)","+",
@@ -24,9 +24,9 @@ Formulas
)
self.wait()
-.. manim:: MoveBraces
+.. manim:: MovingBraces
- class MoveBraces(Scene):
+ class MovingBraces(Scene):
def construct(self):
text=MathTex(
"\\frac{d}{dx}f(x)g(x)=", #0
diff --git a/docs/source/examples/neat_projects.rst b/docs/source/examples/neat_projects.rst
deleted file mode 100644
index 6c4863e9b..000000000
--- a/docs/source/examples/neat_projects.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-NeatProjects
-=================================
-
-This page is currently under construction. It will feature a selection of neat projects built with manim.
diff --git a/docs/source/examples/plots.rst b/docs/source/examples/plots.rst
index 2d5dc4ea7..0e1de60b2 100644
--- a/docs/source/examples/plots.rst
+++ b/docs/source/examples/plots.rst
@@ -4,19 +4,19 @@ Plotting with manim
Examples to illustrate the use of :class:`.GraphScene` in manim.
-.. manim:: Plot1
+.. manim:: FunctionPlot
:save_last_frame:
- class Plot1(GraphScene):
+ class FunctionPlot(GraphScene):
def construct(self):
self.setup_axes()
func_graph=self.get_graph(lambda x: np.sin(x))
self.add(func_graph)
-.. manim:: Plot2yLabelNumbers
+.. manim:: FunctionPlotWithLabbeledYAxe
:save_last_frame:
- class Plot2yLabelNumbers(GraphScene):
+ class FunctionPlotWithLabbeledYAxe(GraphScene):
CONFIG = {
"y_min": 0,
"y_max": 100,
@@ -30,10 +30,10 @@ Examples to illustrate the use of :class:`.GraphScene` in manim.
func_graph = self.get_graph(lambda x: 20 * np.sin(x))
self.add(dot,func_graph)
-.. manim:: Plot3DataPoints
+.. manim:: SequencePlot
:save_last_frame:
- class Plot3DataPoints(GraphScene):
+ class SequencePlot(GraphScene):
CONFIG = {
"y_axis_label": r"Concentration [\%]",
"x_axis_label": "Time [s]",
@@ -46,7 +46,7 @@ Examples to illustrate the use of :class:`.GraphScene` in manim.
dot = Dot().move_to(self.coords_to_point(time, dat))
self.add(dot)
-.. manim:: Plot3bGaussian
+.. manim:: GaussianFunctionPlot1
:save_last_frame:
amp = 5
@@ -56,16 +56,17 @@ Examples to illustrate the use of :class:`.GraphScene` in manim.
def gaussian(x):
return amp * np.exp((-1 / 2 * ((x - mu) / sig) ** 2))
- class Plot3bGaussian(GraphScene):
+ class GaussianFunctionPlot1(GraphScene):
def construct(self):
self.setup_axes()
- graph = self.get_graph(gaussian, x_min=-1, x_max=10).set_stroke(width=5)
+ graph = self.get_graph(gaussian, x_min=-1, x_max=10)
+ graph.set_stroke(width=5)
self.add(graph)
-.. manim:: Plot3cGaussian
+.. manim:: GaussianFunctionPlot2
:save_last_frame:
- class Plot3cGaussian(GraphScene):
+ class GaussianFunctionPlot2(GraphScene):
def construct(self):
def gaussian(x):
amp = 5
@@ -78,10 +79,10 @@ Examples to illustrate the use of :class:`.GraphScene` in manim.
self.add(graph)
-.. manim:: Plot4SinCos
+.. manim:: SinAndCosFunctionPlot
:save_last_frame:
- class Plot4SinCos(GraphScene):
+ class SinAndCosFunctionPlot(GraphScene):
CONFIG = {
"x_min": -10,
"x_max": 10.3,
@@ -107,10 +108,10 @@ Examples to illustrate the use of :class:`.GraphScene` in manim.
two_pi.next_to(label_coord, RIGHT + UP)
self.add(func_graph, func_graph2, vert_line, graph_lab, graph_lab2, two_pi)
-.. manim:: Plot5Area
+.. manim:: GraphAreaPlot
:save_last_frame:
- class Plot5Area(GraphScene):
+ class GraphAreaPlot(GraphScene):
CONFIG = {
"x_min" : 0,
"x_max" : 5,
@@ -130,10 +131,10 @@ Examples to illustrate the use of :class:`.GraphScene` in manim.
area2 = self.get_area(curve2, 2, 3, bounded=curve1)
self.add(curve1, curve2, line1, line2, area1, area2)
-.. manim:: Plot6HeatDiagram
+.. manim:: HeatDiagramPlot
:save_last_frame:
- class Plot6HeatDiagram(GraphScene):
+ class HeatDiagramPlot(GraphScene):
CONFIG = {
"y_axis_label": r"T[$^\circ C$]",
"x_axis_label": r"$\Delta Q$",
diff --git a/docs/source/examples/shapes.rst b/docs/source/examples/shapes.rst
deleted file mode 100644
index d7057b41c..000000000
--- a/docs/source/examples/shapes.rst
+++ /dev/null
@@ -1,43 +0,0 @@
-Shapes & Images
-=================================
-
-.. manim:: Example1Shape
- :save_last_frame:
-
- class Example1Shape(Scene):
- def construct(self):
- d = Dot()
- c = Circle()
- s = Square()
- t = Triangle()
- d.next_to(c, RIGHT)
- s.next_to(c, LEFT)
- t.next_to(c, DOWN)
- self.add(d, c, s, t)
- self.wait(1)
-
-.. manim:: Example1ImageFromArray
- :save_last_frame:
-
- class Example1ImageFromArray(Scene):
- def construct(self):
- image = ImageMobject(np.uint8([[0, 100, 30, 200],
- [255, 0, 5, 33]]))
- image.set_height(7)
- self.add(image)
-
-.. manim:: Example2ImageFromFile
- :save_last_frame:
-
- class Example2ImageFromFile(Scene):
- def construct(self):
- # Use PIL when you want to import an image from the web
- import requests
- from PIL import Image
- img = Image.open(requests.get("https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/cropped.png",
- stream=True).raw)
- img_mobject = ImageMobject(img)
- # this line, when you want to import your Image on your machine
- # img_mobject = ImageMobject("<your image address>")
- img_mobject.scale(3)
- self.add(img_mobject)
diff --git a/docs/source/examples/shapes_images_positions.rst b/docs/source/examples/shapes_images_positions.rst
new file mode 100644
index 000000000..57f69f149
--- /dev/null
+++ b/docs/source/examples/shapes_images_positions.rst
@@ -0,0 +1,199 @@
+Shapes, Images and Positions
+=================================
+
+.. manim:: GeometricShapes
+ :save_last_frame:
+
+ class GeometricShapes(Scene):
+ def construct(self):
+ d = Dot()
+ c = Circle()
+ s = Square()
+ t = Triangle()
+ d.next_to(c, RIGHT)
+ s.next_to(c, LEFT)
+ t.next_to(c, DOWN)
+ self.add(d, c, s, t)
+
+.. manim:: PointMovingOnShapes
+
+ class PointMovingOnShapes(Scene):
+ def construct(self):
+ circle = Circle(radius=1, color=BLUE)
+ dot = Dot()
+ dot2 = dot.copy().shift(RIGHT)
+ self.add(dot)
+
+ line = Line([3, 0, 0], [5, 0, 0])
+ self.add(line)
+
+ self.play(GrowFromCenter(circle))
+ self.play(Transform(dot, dot2))
+ self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
+ self.play(Rotating(dot, about_point=[2, 0, 0]), run_time=1.5)
+ self.wait()
+
+
+.. manim:: GradientImageFromArray
+ :save_last_frame:
+
+ class GradientImageFromArray(Scene):
+ def construct(self):
+ n = 256
+ imageArray = np.uint8(
+ [[i * 256 / n for i in range(0, n)] for _ in range(0, n)]
+ )
+ image = ImageMobject(imageArray).scale(2)
+ self.add(image)
+
+
+.. manim:: ArcShapeIris
+ :save_last_frame:
+
+ class ArcShapeIris(Scene):
+ def construct(self):
+ colors = [DARK_BLUE, DARK_BROWN, BLUE_E, BLUE_D, BLUE_A, TEAL_B, GREEN_B, YELLOW_E]
+ radius = [1 + rad * 0.1 for rad in range(len(colors))]
+
+ circles_group = VGroup()
+
+ # zip(radius, color) makes the iterator [(radius[i], color[i]) for i in range(radius)]
+ circles_group.add(*[Circle(radius=rad, stroke_width=10, color=col)
+ for rad, col in zip(radius, colors)])
+ self.add(circles_group)
+
+
+.. manim:: DotInterpolation
+ :save_last_frame:
+
+ class DotInterpolation(Scene):
+ def construct(self):
+ dotL = Dot(color=DARK_GREY)
+ dotL.shift(2 * RIGHT)
+ dotR = Dot(color=WHITE)
+ dotR.shift(2 * LEFT)
+
+ dotMiddle = VMobject().interpolate(dotL, dotR, alpha=0.3)
+
+ self.add(dotL, dotR, dotMiddle)
+
+
+.. manim:: MovingAround
+
+ class MovingAround(Scene):
+ def construct(self):
+ square = Square(color=BLUE, fill_opacity=1)
+
+ self.play(square.shift, LEFT)
+ self.play(square.set_fill, ORANGE)
+ self.play(square.scale, 0.3)
+ self.play(square.rotate, 0.4)
+
+
+.. manim:: TextAlignement
+ :save_last_frame:
+
+ class TextAlignement(Scene):
+ def construct(self):
+ title = Text("K-means clustering and Logistic Regression", color=WHITE)
+ title.scale_in_place(0.75)
+ self.add(title.to_edge(UP))
+
+ t1 = Text("1. Measuring").set_color(WHITE)
+ t1.next_to(ORIGIN, direction=RIGHT, aligned_edge=UP)
+
+ t2 = Text("2. Clustering").set_color(WHITE)
+ t2.next_to(t1, direction=DOWN, aligned_edge=LEFT)
+
+ t3 = Text("3. Regression").set_color(WHITE)
+ t3.next_to(t2, direction=DOWN, aligned_edge=LEFT)
+
+ t4 = Text("4. Prediction").set_color(WHITE)
+ t4.next_to(t3, direction=DOWN, aligned_edge=LEFT)
+
+ x = VGroup(t1, t2, t3, t4).scale_in_place(0.7)
+ x.set_opacity(0.5)
+ x.submobjects[1].set_opacity(1)
+ self.add(x)
+
+
+.. manim:: BezierSpline
+ :save_last_frame:
+
+ class BezierSpline(Scene):
+ def construct(self):
+ np.random.seed(42)
+ area = 4
+
+ x1 = np.random.randint(-area, area)
+ y1 = np.random.randint(-area, area)
+ p1 = np.array([x1, y1, 0])
+ destination_dot1 = Dot(point=p1).set_color(BLUE)
+
+ x2 = np.random.randint(-area, area)
+ y2 = np.random.randint(-area, area)
+ p2 = np.array([x2, y2, 0])
+ destination_dot2 = Dot(p2).set_color(RED)
+
+ deltaP = p1 - p2
+ deltaPNormalized = deltaP / get_norm(deltaP)
+
+ theta = np.radians(90)
+ r = np.array(
+ (
+ (np.cos(theta), -np.sin(theta), 0),
+ (np.sin(theta), np.cos(theta), 0),
+ (0, 0, 0),
+ )
+ )
+ senk = r.dot(deltaPNormalized)
+ offset = 0.1
+ offset_along = 0.5
+ offset_connect = 0.25
+
+ dest_line1_point1 = p1 + senk * offset - deltaPNormalized * offset_along
+ dest_line1_point2 = p2 + senk * offset + deltaPNormalized * offset_along
+ dest_line2_point1 = p1 - senk * offset - deltaPNormalized * offset_along
+ dest_line2_point2 = p2 - senk * offset + deltaPNormalized * offset_along
+ s1 = p1 - offset_connect * deltaPNormalized
+ s2 = p2 + offset_connect * deltaPNormalized
+ dest_line1 = Line(dest_line1_point1, dest_line1_point2)
+ dest_line2 = Line(dest_line2_point1, dest_line2_point2)
+
+ Lp1s1 = Line(p1, s1)
+
+ Lp1s1.add_cubic_bezier_curve(
+ s1,
+ s1 - deltaPNormalized * 0.1,
+ dest_line2_point1 + deltaPNormalized * 0.1,
+ dest_line2_point1 - deltaPNormalized * 0.01,
+ )
+ Lp1s1.add_cubic_bezier_curve(
+ s1,
+ s1 - deltaPNormalized * 0.1,
+ dest_line1_point1 + deltaPNormalized * 0.1,
+ dest_line1_point1,
+ )
+
+ Lp2s2 = Line(p2, s2)
+
+ Lp2s2.add_cubic_bezier_curve(
+ s2,
+ s2 + deltaPNormalized * 0.1,
+ dest_line2_point2 - deltaPNormalized * 0.1,
+ dest_line2_point2,
+ )
+ Lp2s2.add_cubic_bezier_curve(
+ s2,
+ s2 + deltaPNormalized * 0.1,
+ dest_line1_point2 - deltaPNormalized * 0.1,
+ dest_line1_point2,
+ )
+
+ mobjects = VGroup(
+ Lp1s1, Lp2s2, dest_line1, dest_line2, destination_dot1, destination_dot2
+ )
+
+ mobjects.scale(2)
+ self.add(mobjects)
+
diff --git a/docs/source/examples/tex.rst b/docs/source/examples/tex.rst
new file mode 100644
index 000000000..7e793e87e
--- /dev/null
+++ b/docs/source/examples/tex.rst
@@ -0,0 +1,161 @@
+Text and LaTeX
+===============
+
+
+Text
+--------------
+The simplest way to add text to you animation is to use the :class:`~.Text` class. It uses the Pango library to render text.
+With Pango, you are also able to render non-English alphabets like `你好` or `こんにちは` or `안녕하세요` or `مرحبا بالعالم`.
+
+The Text() mobject
++++++++++++++++++++
+
+.. manim:: HelloWorld
+ :save_last_frame:
+
+ class HelloWorld(Scene):
+ def construct(self):
+ text = Text('Hello world').scale(3)
+ self.add(text)
+
+For more examples, see: :class:`~.Text`.
+
+
+LaTeX
+-------------------
+
+The Tex() mobject
++++++++++++++++++++
+Just as you can use :class:`~.Text` to add text to your videos, you can use :class:`~.Tex` to insert LaTeX.
+
+.. manim:: HelloLaTeX
+ :save_last_frame:
+
+ class HelloLaTeX(Scene):
+ def construct(self):
+ tex = Tex(r'\LaTeX').scale(3)
+ self.add(tex)
+
+Note that we are using a raw string (``r'---'``) instead of a regular string (``'---'``).
+This is because TeX code uses a lot of special characters - like ``\`` for example -
+that have special meaning within a regular python string. An alternative would have
+been to write ``\\`` as in ``Tex('\\LaTeX')``.
+
+The MathTex() mobject
+++++++++++++++++++++++
+Anything enclosed in ``$`` signs is interpreted as maths-mode:
+
+.. manim:: HelloTex
+ :save_last_frame:
+
+ class HelloTex(Scene):
+ def construct(self):
+ tex = Tex(r'$\xrightarrow{Hello}$ \LaTeX').scale(3)
+ self.add(tex)
+
+Whereas in a :class:`~.MathTex` mobject everything is math-mode by default and you would use ``\text{}`` to
+insert regular text:
+
+.. manim:: HelloMathTex
+ :save_last_frame:
+
+ class HelloMathTex(Scene):
+ def construct(self):
+ tex = MathTex(r'\xrightarrow{Hello}\text{ \LaTeX}').scale(3)
+ self.add(tex)
+
+LaTeX commands and keyword arguments
++++++++++++++++++++++++++++++++++++++
+We can use any standard LaTeX commands in the AMS maths packages. For example the ``mathtt`` text type.
+
+.. manim:: AMSLaTeX
+ :save_last_frame:
+
+ class AMSLaTeX(Scene):
+ def construct(self):
+ tex = Tex(r'$\mathtt{Hello}$ \LaTeX').scale(3)
+ self.add(tex)
+
+On the manim side, the :class:`~.Tex` class also accepts attributes to change the appearance of the output.
+This is very similar to the :class:`~.Text` class. For example, the ``color`` keyword changes the color of the TeX mobject:
+
+.. manim:: LaTeXAttributes
+ :save_last_frame:
+
+ class LaTeXAttributes(Scene):
+ def construct(self):
+ tex = Tex(r'Hello \LaTeX', color=BLUE).scale(3)
+ self.add(tex)
+
+Extra LaTeX Packages
++++++++++++++++++++++
+Some commands require special packages to be loaded into the TeX template. For example,
+to use the ``mathscr`` script, we need to add the ``mathrsfs`` package. Since this package isn't loaded
+into manim's tex template by default, we add it manually:
+
+.. manim:: AddPackageLatex
+ :save_last_frame:
+
+ class AddPackageLatex(Scene):
+ def construct(self):
+ myTemplate = TexTemplate()
+ myTemplate.add_to_preamble(r"\usepackage{mathrsfs}")
+ tex = Tex(r'$\mathscr{H} \rightarrow \mathbb{H}$}', tex_template=myTemplate).scale(3)
+ self.add(tex)
+
+Substrings and parts
++++++++++++++++++++++
+The TeX mobject can accept multiple strings as arguments. Afterwards you can refer to the individual
+parts either by their index (like ``tex[1]``), or you can look them up by (parts of) the tex code like
+in this example where we set the color of the ``\bigstar`` using :func:`~.set_color_by_tex`:
+
+.. manim:: LaTeXSubstrings
+ :save_last_frame:
+
+ class LaTeXSubstrings(Scene):
+ def construct(self):
+ tex = Tex('Hello', r'$\bigstar$', r'\LaTeX').scale(3)
+ tex.set_color_by_tex('igsta', RED)
+ self.add(tex)
+
+LaTeX Maths Fonts - The Template Library
+++++++++++++++++++++++++++++++++++++++++++++
+Changing fonts in LaTeX when typesetting mathematical formulae is a little bit more tricky than
+with regular text. It requires changing the template that is used to compile the tex code.
+Manim comes with a collection of :class:`~.TexFontTemplates` ready for you to use. These templates will all work
+in maths mode:
+
+.. manim:: LaTeXMathFonts
+ :save_last_frame:
+
+ class LaTeXMathFonts(Scene):
+ def construct(self):
+ tex = Tex(r'$f: A \rightarrow B$', tex_template=TexFontTemplates.french_cursive).scale(3)
+ self.add(tex)
+
+Manim also has a :class:`~.TexTemplateLibrary` containing the TeX templates used by 3Blue1Brown. One example
+is the ctex template, used for typesetting Chinese. For this to work, the ctex LaTeX package
+must be installed on your system. Furthermore, if you are only typesetting Text, you probably do not
+need :class:`~.Tex` at all, and should use :class:`~.Text` or :class:`~.PangoText` instead.
+
+.. manim:: LaTeXTemplateLibrary
+ :save_last_frame:
+
+ class LaTeXTemplateLibrary(Scene):
+ def construct(self):
+ tex = Tex('Hello 你好 \\LaTeX', tex_template=TexTemplateLibrary.ctex).scale(3)
+ self.add(tex)
+
+
+Aligning formulae
+++++++++++++++++++
+A :class:`~.MathTex` mobject is typeset in the LaTeX ``align*`` environment. This means you can use the ``&`` alignment
+character when typesetting multiline formulae:
+
+.. manim:: LaTeXAlignEnvironment
+ :save_last_frame:
+
+ class LaTeXAlignEnvironment(Scene):
+ def construct(self):
+ tex = MathTex(r'f(x) &= 3 + 2 + 1\\ &= 5 + 1 \\ &= 6').scale(2)
+ self.add(tex)
diff --git a/docs/source/examples/text.rst b/docs/source/examples/text.rst
deleted file mode 100644
index d27e294ff..000000000
--- a/docs/source/examples/text.rst
+++ /dev/null
@@ -1,14 +0,0 @@
-Text
-=================================
-
-.. manim:: Example1Text
- :save_last_frame:
-
- class Example1Text(Scene):
- def construct(self):
- text = Text('Hello world').scale(3)
- self.add(text)
-
-This is an example that illustrates how to use the :class:`~.Text` class.
-
-In case you want to use other alphabets like `你好` or `こんにちは` or `안녕하세요` or `مرحبا بالعالم`, you can have a look at :class:`~.PangoText`
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 866827c75..f249eac70 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -25,6 +25,7 @@ information here will make it easier for newcomers to get started using
tutorials
reporting_bugs
contributing
+ changelog
Navigation
==================
diff --git a/docs/source/installation/linux.rst b/docs/source/installation/linux.rst
index 18bcb7e9b..44c52d15b 100644
--- a/docs/source/installation/linux.rst
+++ b/docs/source/installation/linux.rst
@@ -10,8 +10,8 @@ instructions in `Certifying a clean install`_.
The two necessary dependencies are cairo and ffmpeg. LaTeX is strongly
recommended, as it is necessary to have access to the ``Tex`` and ``MathTex`` classes.
-Ubuntu/Debian
-*************
+Ubuntu/Mint/Debian
+******************
Before installing anything, make sure that your system is up to date.
@@ -39,13 +39,57 @@ To install LaTeX:
sudo apt install texlive texlive-latex-extra texlive-fonts-extra \
texlive-latex-recommended texlive-science texlive-fonts-extra tipa
+If you don't have python3-pip installed, install it:
+
+.. code-block:: bash
+
+ sudo apt install python3-pip
+
.. note:: These instructions are also valid for other Debian-based
distributions or distributions that use the ``apt`` package manager.
+Fedora/CentOS/RHEL
+******************
+
+To install cairo:
+
+.. code-block:: bash
+
+ sudo dnf install cairo-devel
+
+To install ffmpeg, you have to add RPMfusion repository (If it's not already added). Please follow the instructions for your specific distribution in the following URL:
+
+https://rpmfusion.org/Configuration/
+
+Install ffmpeg from RPMfusion repository:
+
+.. code-block:: bash
+
+ sudo dnf install ffmpeg
+
+Install python development headers in order to successfully build pycairo wheel:
+
+.. code-block:: bash
+
+ sudo dnf install python3-devel
+
+To install LaTeX:
+
+.. code-block:: bash
+
+ sudo dnf install texlive-scheme-medium
+
+
Arch/Manjaro
************
+Before installing anything, make sure that your system is up to date.
+
+.. code-block:: bash
+
+ sudo pacman -Syu
+
To install cairo:
.. code-block:: bash
@@ -65,6 +109,12 @@ To install LaTeX:
sudo pacman -S texlive-most
+If you don't have python-pip installed, install it:
+
+.. code-block:: bash
+
+ sudo pacman -S python-pip
+
.. note:: These instructions are also valid for other Arch-based
distributions or distributions that use the ``pacman`` package
diff --git a/docs/source/installation/troubleshooting.rst b/docs/source/installation/troubleshooting.rst
index 356008bac..4839e3422 100644
--- a/docs/source/installation/troubleshooting.rst
+++ b/docs/source/installation/troubleshooting.rst
@@ -12,3 +12,66 @@ uses. Which can be done by running:
.. code-block:: bash
fmtutil -sys --all
+
+
+.. _dvisvgm-troubleshoot:
+
+Installation does not support converting PDF to SVG?
+----------------------------------------------------
+
+First, make sure your ``dvisvgm`` version is at least 2.4:
+
+.. code-block:: bash
+
+ dvisvgm --version
+
+
+If you do not know how to update ``dvisvgm``, please refer to your operating system's documentation.
+
+Second, check whether your ``dvisvgm`` supports PostScript specials. This is needed in order to convert from PDF to SVG.
+
+.. code-block:: bash
+
+ dvisvgm -l
+
+
+If the output to this command does **not** contain ``ps dvips PostScript specials``, this is a bad sign.
+In this case, run
+
+.. code-block:: bash
+
+ dvisvgm -h
+
+
+If the output does **not** contain ``--libgs=filename``, this means your ``dvisvgm`` does not currently support PostScript. You must get another binary.
+
+If, however, ``--libgs=filename`` appears in the help, that means that your ``dvisvgm`` needs the Ghostscript library in order to support PostScript. Search for ``libgs.so`` (on Linux, probably in ``/usr/local/lib`` or ``/usr/lib``) or ``gsdll32.dll`` (on 32-bit Windows, probably in ``C:\windows\system32``) or ``gsdll64.dll`` (on 64-bit Windows, probably in ``c:\windows\system32`` -- yes 32) or ``libgsl.dylib`` (on Mac OS, probably in ``/usr/local/lib`` or ``/opt/local/lib``). Please look carefully, as the file might be located elsewhere, e.g. in the directory where Ghostscript is installed.
+
+As soon as you have found the library, try (on Mac OS or Linux)
+
+.. code-block:: bash
+
+ export LIBS=<path to your library including the file name>
+ dvisvgm -l
+
+or (on Windows)
+
+.. code-block:: bat
+
+ set LIBS=<path to your library including the file name>
+ dvisvgm -l
+
+
+You should now see ``ps dvips PostScript specials`` in the output. Refer to your operating system's documentation in order to find out how you can set or export the environment variable ``LIBGS`` automatically whenever you open a shell.
+
+As a last check, you can run
+
+.. code-block:: bash
+
+ dvisvgm -V1
+
+while still having ``LIBGS`` set to the correct path, of course. If ``dvisvgm`` can find your Ghostscript installation, it will be shown in the output together with the version number.
+
+If you do not have the necessary library on your system, please refer to your operating system's documentation in order to find out where you can get it and how you have to install it.
+
+If you are unable to solve your problem, check out the `dvisvgm FAQ <https://dvisvgm.de/FAQ/>`_.
diff --git a/docs/source/installation/win.rst b/docs/source/installation/win.rst
index 4023722b6..9b9516c5c 100644
--- a/docs/source/installation/win.rst
+++ b/docs/source/installation/win.rst
@@ -8,8 +8,12 @@ instructions.
Installing using Chocolatey
***************************
-You can install manim very easily using chocolatey, by typing the following command.
+.. important:: This is an outdated version. We are currently not able to update this package, though we are working on it. Please use other installation methods until
+ this problem is fixed. More inforation about this problem
+ is on _`this chat
+ <https://discord.com/channels/581738731934056449/581738732646957057/768900904887123988>`_.
+You can install manim very easily using chocolatey, by typing the following command.
.. code-block:: powershell
diff --git a/docs/source/manim_directive.py b/docs/source/manim_directive.py
index 7e0fb3cdb..ffd8e90f4 100644
--- a/docs/source/manim_directive.py
+++ b/docs/source/manim_directive.py
@@ -21,6 +21,7 @@ As a second application, the directive can also be used to
render scenes that are defined within doctests, for example::
.. manim:: DirectiveDoctestExample
+ :ref_classes: Dot
>>> dot = Dot(color=RED)
>>> dot.color
@@ -58,19 +59,44 @@ directive:
an image representing the last frame of the scene will
be rendered and displayed, instead of a video.
+ ref_classes
+ A list of classes, separated by spaces, that is
+ rendered in a reference block after the source code.
+
+ ref_functions
+ A list of functions and methods, separated by spaces,
+ that is rendered in a reference block after the source code.
+
"""
from docutils.parsers.rst import directives, Directive
-from docutils.parsers.rst.directives.images import Image
import jinja2
import os
from os.path import relpath
+from typing import List
import shutil
classnamedict = {}
+def process_name_list(option_input: str, reference_type: str) -> List[str]:
+ r"""Reformats a string of space separated class names
+ as a list of strings containing valid Sphinx references.
+
+ TESTS
+ -----
+
+ ::
+
+ >>> process_name_list("Tex TexTemplate", "class")
+ [":class:`~.Tex`", ":class:`~.TexTemplate`"]
+ >>> process_name_list("Scene.play Mobject.rotate", "func")
+ [":func:`~.Scene.play`", ":func:`~.Mobject.rotate`"]
+ """
+ return [f":{reference_type}:`~.{name}`" for name in option_input.split()]
+
+
class ManimDirective(Directive):
r"""The manim directive, rendering videos while building
the documentation.
@@ -87,6 +113,8 @@ class ManimDirective(Directive):
),
"save_as_gif": bool,
"save_last_frame": bool,
+ "ref_classes": lambda arg: process_name_list(arg, "class"),
+ "ref_functions": lambda arg: process_name_list(arg, "func"),
}
final_argument_whitespace = True
@@ -105,6 +133,17 @@ class ManimDirective(Directive):
save_as_gif = "save_as_gif" in self.options
save_last_frame = "save_last_frame" in self.options
assert not (save_as_gif and save_last_frame)
+ if "ref_classes" in self.options or "ref_functions" in self.options:
+ ref_classes = self.options.get("ref_classes", [])
+ ref_functions = self.options.get("ref_functions", [])
+ ref_content = ref_classes + ref_functions
+ ref_block = f"""
+.. admonition:: Example References
+ :class: example-reference
+
+ {' '.join(ref_content)}"""
+ else:
+ ref_block = ""
frame_rate = 30
pixel_height = 480
@@ -172,14 +211,14 @@ class ManimDirective(Directive):
f'config["frame_rate"] = {frame_rate}',
f'config["pixel_height"] = {pixel_height}',
f'config["pixel_width"] = {pixel_width}',
- f'file_writer_config["media_dir"] = "{media_dir}"',
- f'file_writer_config["images_dir"] = "{images_dir}"',
- f'file_writer_config["tex_dir"] = "{tex_dir}"',
- f'file_writer_config["text_dir"] = "{text_dir}"',
- f'file_writer_config["video_dir"] = "{video_dir}"',
+ f'file_writer_config["media_dir"] = r"{media_dir}"',
+ f'file_writer_config["images_dir"] = r"{images_dir}"',
+ f'file_writer_config["tex_dir"] = r"{tex_dir}"',
+ f'file_writer_config["text_dir"] = r"{text_dir}"',
+ f'file_writer_config["video_dir"] = r"{video_dir}"',
f'file_writer_config["save_last_frame"] = {save_last_frame}',
f'file_writer_config["save_as_gif"] = {save_as_gif}',
- f'file_writer_config["output_file"] = "{output_file}"',
+ f'file_writer_config["output_file"] = r"{output_file}"',
]
user_code = self.content
@@ -218,6 +257,7 @@ class ManimDirective(Directive):
save_last_frame=save_last_frame,
save_as_gif=save_as_gif,
source_block=source_block,
+ ref_block=ref_block,
)
state_machine.insert_input(
rendered_template.split("\n"), source=document.attributes["source"]
@@ -245,6 +285,7 @@ TEMPLATE = r"""
<div class="manim-example">
{{ source_block }}
+{{ ref_block }}
{% endif %}
{% if not (save_as_gif or save_last_frame) %}
diff --git a/docs/source/reference.rst b/docs/source/reference.rst
index 804869f38..6dd7cfe9c 100644
--- a/docs/source/reference.rst
+++ b/docs/source/reference.rst
@@ -29,7 +29,6 @@ Mathematical Objects
~mobject.numbers
~mobject.probability
~mobject.shape_matchers
- ~mobject.three_d_shading_utils
~mobject.three_d_utils
~mobject.three_dimensions
~mobject.value_tracker
@@ -118,6 +117,7 @@ Utilities
~utils.space_ops
~utils.strings
~utils.tex
+ ~utils.tex_templates
~utils.tex_file_writing
@@ -131,11 +131,3 @@ Other modules
_config
constants
container
-
-
-.. This is here so that sphinx doesn't complain about changelog.rst not being
- included in any toctree
-.. toctree::
- :hidden:
-
- changelog
diff --git a/example_scenes/advanced_tex_fonts.py b/example_scenes/advanced_tex_fonts.py
new file mode 100644
index 000000000..04d8ce74c
--- /dev/null
+++ b/example_scenes/advanced_tex_fonts.py
@@ -0,0 +1,141 @@
+from manim import *
+
+# French Cursive LaTeX font example from http://jf.burnol.free.fr/showcase.html
+
+# Example 1 Manually creating a Template
+
+TemplateForFrenchCursive = TexTemplate(
+ preamble=r"""
+\usepackage[english]{babel}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage[T1]{fontenc}
+\usepackage[default]{frcursive}
+\usepackage[eulergreek,noplusnominus,noequal,nohbar,%
+nolessnomore,noasterisk]{mathastext}
+"""
+)
+
+
+def FrenchCursive(*tex_strings, **kwargs):
+ return Tex(*tex_strings, tex_template=TemplateForFrenchCursive, **kwargs)
+
+
+class TexFontTemplateManual(Scene):
+ """An example scene that uses a manually defined TexTemplate() object to create
+ LaTeX output in French Cursive font"""
+
+ def construct(self):
+ self.add(Tex("Tex Font Example").to_edge(UL))
+ self.play(ShowCreation(FrenchCursive("$f: A \\longrightarrow B$").shift(UP)))
+ self.play(
+ ShowCreation(FrenchCursive("Behold! We can write math in French Cursive"))
+ )
+ self.wait(1)
+ self.play(
+ ShowCreation(
+ Tex(
+ "See more font templates at \\\\ http://jf.burnol.free.fr/showcase.html"
+ ).shift(2 * DOWN)
+ )
+ )
+ self.wait(2)
+
+
+# Example 2, using a Template from the collection
+
+
+class TexFontTemplateLibrary(Scene):
+ """An example scene that uses TexTemplate objects from the TexFontTemplates collection
+ to create sample LaTeX output in every font that will compile on the local system.
+
+ Please Note:
+ Many of the in the TexFontTemplates collection require that specific fonts
+ are installed on your local machine.
+ For example, choosing the template TexFontTemplates.comic_sans will
+ not compile if the Comic Sans Micrososft font is not installed.
+
+ This scene will only render those Templates that do not cause a TeX
+ compilation error on your system. Furthermore, some of the ones that do render,
+ may still render incorrectly. This is beyond the scope of manim.
+ Feel free to experiment.
+ """
+
+ def construct(self):
+ def write_one_line(template):
+ x = Tex(template.description, tex_template=template).shift(UP)
+ self.play(ShowCreation(x))
+ self.wait(1)
+ self.play(FadeOut(x))
+
+ examples = [
+ TexFontTemplates.american_typewriter, # "American Typewriter"
+ TexFontTemplates.antykwa, # "Antykwa Półtawskiego (TX Fonts for Greek and math symbols)"
+ TexFontTemplates.apple_chancery, # "Apple Chancery"
+ TexFontTemplates.auriocus_kalligraphicus, # "Auriocus Kalligraphicus (Symbol Greek)"
+ TexFontTemplates.baskervald_adf_fourier, # "Baskervald ADF with Fourier"
+ TexFontTemplates.baskerville_it, # "Baskerville (Italic)"
+ TexFontTemplates.biolinum, # "Biolinum"
+ TexFontTemplates.brushscriptx, # "BrushScriptX-Italic (PX math and Greek)"
+ TexFontTemplates.chalkboard_se, # "Chalkboard SE"
+ TexFontTemplates.chalkduster, # "Chalkduster"
+ TexFontTemplates.comfortaa, # "Comfortaa"
+ TexFontTemplates.comic_sans, # "Comic Sans MS"
+ TexFontTemplates.droid_sans, # "Droid Sans"
+ TexFontTemplates.droid_sans_it, # "Droid Sans (Italic)"
+ TexFontTemplates.droid_serif, # "Droid Serif"
+ TexFontTemplates.droid_serif_px_it, # "Droid Serif (PX math symbols) (Italic)"
+ TexFontTemplates.ecf_augie, # "ECF Augie (Euler Greek)"
+ TexFontTemplates.ecf_jd, # "ECF JD (with TX fonts)"
+ TexFontTemplates.ecf_skeetch, # "ECF Skeetch (CM Greek)"
+ TexFontTemplates.ecf_tall_paul, # "ECF Tall Paul (with Symbol font)"
+ TexFontTemplates.ecf_webster, # "ECF Webster (with TX fonts)"
+ TexFontTemplates.electrum_adf, # "Electrum ADF (CM Greek)"
+ TexFontTemplates.epigrafica, # Epigrafica
+ TexFontTemplates.fourier_utopia, # "Fourier Utopia (Fourier upright Greek)"
+ TexFontTemplates.french_cursive, # "French Cursive (Euler Greek)"
+ TexFontTemplates.gfs_bodoni, # "GFS Bodoni"
+ TexFontTemplates.gfs_didot, # "GFS Didot (Italic)"
+ TexFontTemplates.gfs_neoHellenic, # "GFS NeoHellenic"
+ TexFontTemplates.gnu_freesans_tx, # "GNU FreeSerif (and TX fonts symbols)"
+ TexFontTemplates.gnu_freeserif_freesans, # "GNU FreeSerif and FreeSans"
+ TexFontTemplates.helvetica_fourier_it, # "Helvetica with Fourier (Italic)"
+ TexFontTemplates.latin_modern_tw_it, # "Latin Modern Typewriter Proportional (CM Greek) (Italic)"
+ TexFontTemplates.latin_modern_tw, # "Latin Modern Typewriter Proportional"
+ TexFontTemplates.libertine, # "Libertine"
+ TexFontTemplates.libris_adf_fourier, # "Libris ADF with Fourier"
+ TexFontTemplates.minion_pro_myriad_pro, # "Minion Pro and Myriad Pro (and TX fonts symbols)"
+ TexFontTemplates.minion_pro_tx, # "Minion Pro (and TX fonts symbols)"
+ TexFontTemplates.new_century_schoolbook, # "New Century Schoolbook (Symbol Greek)"
+ TexFontTemplates.new_century_schoolbook_px, # "New Century Schoolbook (Symbol Greek, PX math symbols)"
+ TexFontTemplates.noteworthy_light, # "Noteworthy Light"
+ TexFontTemplates.palatino, # "Palatino (Symbol Greek)"
+ TexFontTemplates.papyrus, # "Papyrus"
+ TexFontTemplates.romande_adf_fourier_it, # "Romande ADF with Fourier (Italic)"
+ TexFontTemplates.slitex, # "SliTeX (Euler Greek)"
+ TexFontTemplates.times_fourier_it, # "Times with Fourier (Italic)"
+ TexFontTemplates.urw_avant_garde, # "URW Avant Garde (Symbol Greek)"
+ TexFontTemplates.urw_zapf_chancery, # "URW Zapf Chancery (CM Greek)"
+ TexFontTemplates.venturis_adf_fourier_it, # "Venturis ADF with Fourier (Italic)"
+ TexFontTemplates.verdana_it, # "Verdana (Italic)"
+ TexFontTemplates.vollkorn_fourier_it, # "Vollkorn with Fourier (Italic)"
+ TexFontTemplates.vollkorn, # "Vollkorn (TX fonts for Greek and math symbols)"
+ TexFontTemplates.zapf_chancery, # "Zapf Chancery"
+ ]
+
+ self.add(Tex("Tex Font Template Example").to_edge(UL))
+
+ for font in examples:
+ try:
+ write_one_line(font)
+ except:
+ print("FAILURE on ", font.description, " - skipping.")
+
+ self.play(
+ ShowCreation(
+ Tex(
+ "See more font templates at \\\\ http://jf.burnol.free.fr/showcase.html"
+ ).shift(2 * DOWN)
+ )
+ )
+ self.wait(2)
diff --git a/example_scenes/basic.py b/example_scenes/basic.py
index 6b2d6aa63..5eefaf3b9 100644
--- a/example_scenes/basic.py
+++ b/example_scenes/basic.py
@@ -3,12 +3,11 @@
from manim import *
# To watch one of these scenes, run the following:
-# python -m manim example_scenes.py SquareToCircle -pl
+# python --quality m manim example_scenes.py SquareToCircle -p
#
-# Use the flat -l for a faster rendering at a lower
-# quality.
+# Use the flag --quality l for a faster rendering at a lower quality.
# Use -s to skip to the end and just save the final frame
-# Use the -p to have the animation (or image, if -s was
+# Use the -p to have preview of the animation (or image, if -s was
# used) pop up once done.
# Use -n <number> to skip ahead to the n'th animation of a scene.
# Use -r <number> to specify a resolution (for example, -r 1080
@@ -130,109 +129,4 @@ class UpdatersExample(Scene):
self.wait()
-class VDictExample(Scene):
- def construct(self):
- square = Square().set_color(RED)
- circle = Circle().set_color(YELLOW).next_to(square, UP)
-
- # create dict from list of tuples each having key-mobject pair
- pairs = [("s", square), ("c", circle)]
- my_dict = VDict(pairs, show_keys=True)
-
- # display it just like a VGroup
- self.play(ShowCreation(my_dict))
- self.wait()
-
- text = Tex("Some text").set_color(GREEN).next_to(square, DOWN)
-
- # add a key-value pair by wrapping it in a single-element list of tuple
- # after attrs branch is merged, it will be easier like `.add(t=text)`
- my_dict.add([("t", text)])
- self.wait()
-
- rect = Rectangle().next_to(text, DOWN)
- # can also do key assignment like a python dict
- my_dict["r"] = rect
-
- # access submobjects like a python dict
- my_dict["t"].set_color(PURPLE)
- self.play(my_dict["t"].scale, 3)
- self.wait()
-
- # also supports python dict styled reassignment
- my_dict["t"] = Tex("Some other text").set_color(BLUE)
- self.wait()
-
- # remove submoject by key
- my_dict.remove("t")
- self.wait()
-
- self.play(Uncreate(my_dict["s"]))
- self.wait()
-
- self.play(FadeOut(my_dict["c"]))
- self.wait()
-
- self.play(FadeOutAndShift(my_dict["r"], DOWN))
- self.wait()
-
- # you can also make a VDict from an existing dict of mobjects
- plain_dict = {
- 1: Integer(1).shift(DOWN),
- 2: Integer(2).shift(2 * DOWN),
- 3: Integer(3).shift(3 * DOWN),
- }
-
- vdict_from_plain_dict = VDict(plain_dict)
- vdict_from_plain_dict.shift(1.5 * (UP + LEFT))
- self.play(ShowCreation(vdict_from_plain_dict))
-
- # you can even use zip
- vdict_using_zip = VDict(zip(["s", "c", "r"], [Square(), Circle(), Rectangle()]))
- vdict_using_zip.shift(1.5 * RIGHT)
- self.play(ShowCreation(vdict_using_zip))
- self.wait()
-
-
-class VariableExample(Scene):
- def construct(self):
- var = 0.5
- on_screen_var = Variable(var, Text("var"), num_decimal_places=3)
-
- # You can also change the colours for the label and value
- on_screen_var.label.set_color(RED)
- on_screen_var.value.set_color(GREEN)
-
- self.play(Write(on_screen_var))
- # The above line will just display the variable with
- # its initial value on the screen. If you also wish to
- # update it, you can do so by accessing the `tracker` attribute
- self.wait()
- var_tracker = on_screen_var.tracker
- var = 10.5
- self.play(var_tracker.set_value, var)
- self.wait()
-
- int_var = 0
- on_screen_int_var = Variable(
- int_var, Text("int_var"), var_type=Integer
- ).next_to(on_screen_var, DOWN)
- on_screen_int_var.label.set_color(RED)
- on_screen_int_var.value.set_color(GREEN)
-
- self.play(Write(on_screen_int_var))
- self.wait()
- var_tracker = on_screen_int_var.tracker
- var = 10.5
- self.play(var_tracker.set_value, var)
- self.wait()
-
- # If you wish to have a somewhat more complicated label for your
- # variable with subscripts, superscripts, etc. the default class
- # for the label is MathTex
- subscript_label_var = 10
- on_screen_subscript_var = Variable(subscript_label_var, "{a}_{i}").next_to(
- on_screen_int_var, DOWN
- )
- self.play(Write(on_screen_subscript_var))
- self.wait()
+# See many more examples at https://manimce.readthedocs.io/en/latest/examples.html
diff --git a/example_scenes/custom_template.tex b/example_scenes/custom_template.tex
index cf730f975..feb78b76e 100644
--- a/example_scenes/custom_template.tex
+++ b/example_scenes/custom_template.tex
@@ -4,21 +4,6 @@
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[f]{esvect}
-\usepackage{dsfont}
-\usepackage{setspace}
-\usepackage{tipa}
-\usepackage{relsize}
-\usepackage{textcomp}
-\usepackage{mathrsfs}
-\usepackage{calligra}
-\usepackage{wasysym}
-\usepackage{ragged2e}
-\usepackage{physics}
-\usepackage{xcolor}
-\usepackage{microtype}
-\DisableLigatures{encoding = *, family = * }
-%\usepackage[UTF8]{ctex}
-\linespread{1}
\begin{document}
diff --git a/example_scenes/customtex.py b/example_scenes/customtex.py
index bb50bb455..a4f9a0146 100644
--- a/example_scenes/customtex.py
+++ b/example_scenes/customtex.py
@@ -12,8 +12,8 @@ class TexTemplateFromCLI(Scene):
def construct(self):
text = MathTex(r"\vv{vb}")
- # text=Tex(r"$\vv{vb}$")
self.play(Write(text))
+ self.wait(1)
class InCodeTexTemplate(Scene):
@@ -22,10 +22,20 @@ class InCodeTexTemplate(Scene):
"""
def construct(self):
- tpl = TexTemplate()
- tpl.append_package(["esvect", ["f"]])
- config["tex_template"] = tpl
+ # Create a new template
+ myTemplate = TexTemplate()
- # text=Tex(r"$\vv{vb}$")
- text = MathTex(r"\vv{vb}")
+ # Add packages to the template
+ myTemplate.add_to_preamble(r"\usepackage{esvect}")
+
+ # Set the compiler and output format (default: latex and .dvi)
+ # possible tex compilers: "latex", "pdflatex", "xelatex", "lualatex", "luatex"
+ # possible output formats: ".dvi", ".pdf", and ".xdv"
+ myTemplate.tex_compiler = "pdflatex"
+ myTemplate.output_format = ".pdf"
+
+ # To use this template in a Tex() or MathTex() object
+ # use the keyword argument tex_template
+ text = MathTex(r"\vv{vb}", tex_template=myTemplate)
self.play(Write(text))
+ self.wait(1)
diff --git a/logo/cropped.png b/logo/cropped.png
index 8b584ca97..5e7e9ac9e 100644
Binary files a/logo/cropped.png and b/logo/cropped.png differ
diff --git a/logo/dark/dark_background.svg b/logo/dark/dark_background.svg
new file mode 100644
index 000000000..f3aa92c90
--- /dev/null
+++ b/logo/dark/dark_background.svg
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="210mm"
+ height="297mm"
+ viewBox="0 0 210 297"
+ version="1.1"
+ id="svg208"
+ inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
+ sodipodi:docname="dark.svg">
+ <defs
+ id="defs202" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="408.80385"
+ inkscape:cy="461.23026"
+ inkscape:document-units="mm"
+ inkscape:current-layer="g184"
+ inkscape:document-rotation="0"
+ showgrid="false"
+ inkscape:window-width="1915"
+ inkscape:window-height="2011"
+ inkscape:window-x="48"
+ inkscape:window-y="93"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata205">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <g
+ id="g184"
+ transform="translate(674.78338,-185.34168)"
+ style="display:inline">
+ <circle
+ style="fill:#353535;fill-opacity:1;stroke:none;stroke-width:0.471091;stop-color:#000000"
+ id="circle130"
+ cx="-574.78339"
+ cy="285.34167"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ r="50" />
+ <path
+ sodipodi:type="star"
+ style="fill:#e07a5f;fill-opacity:1;stroke:none;stroke-width:0.381578;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="path132"
+ sodipodi:sides="3"
+ sodipodi:cx="-546.15442"
+ sodipodi:cy="301.1611"
+ sodipodi:r1="13.597875"
+ sodipodi:r2="6.7989364"
+ sodipodi:arg1="0.52359878"
+ sodipodi:arg2="1.5707963"
+ inkscape:flatsided="true"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ inkscape:transform-center-x="-1.7698101"
+ inkscape:transform-center-y="-7.3687432"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ d="m -534.37831,307.96004 -23.55221,0 11.7761,-20.39681 z"
+ transform="matrix(1.0000016,0,0,1,0.46777211,-2.1019999)" />
+ <rect
+ style="fill:#525893;fill-opacity:1;stroke:none;stroke-width:0.547864;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="rect134"
+ width="27.255629"
+ height="27.255585"
+ x="-572.94318"
+ y="271.6669"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ <ellipse
+ style="fill:#87c2a5;fill-opacity:1;stroke:none;stroke-width:0.406653;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="circle136"
+ cx="-573.13397"
+ cy="299.11331"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ rx="13.947864"
+ ry="13.947841" />
+ <path
+ style="fill:#ece6e2;fill-opacity:1;stroke:none;stroke-width:4.94272"
+ d="m -590.39254,284.19839 -9.42211,-22.39672 c -0.3861,-1.00398 -0.3861,-1.00398 -1.7762,-1.00398 h -9.11322 c -0.9268,0 -1.6218,0 -1.6218,0.84953 0,0.84952 0.8495,0.84952 1.0812,0.84952 0.6178,0 1.93071,0.15447 3.01201,0.54061 v 26.25823 c 0,1.08121 0,3.24365 -3.32091,3.55258 -0.9268,0.0772 -0.9268,0.7723 -0.9268,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 7.56852 c 0.9268,0 1.6219,0 1.6219,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.78431,-0.30893 -3.78431,-2.39413 -3.78431,-3.55258 v -24.48193 l 0.077,-0.0772 11.97062,28.80681 c 0.4634,0.84954 0.77241,1.004 1.08131,1.004 0.6178,0 0.695,-0.38615 1.004,-1.004 l 12.04791,-28.80681 0.077,0.0772 v 24.48193 c 0,1.08121 0,3.24365 -3.39821,3.55258 -0.9267,0.0772 -0.9267,0.7723 -0.9267,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 13.12913 c 0.9267,0 1.6218,0 1.6218,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.78431,-0.30893 -3.78431,-2.39413 -3.78431,-3.55258 v -23.24624 c 0,-1.08123 0,-3.24368 3.32091,-3.5526 0.5406,0 0.9268,-0.30891 0.9268,-0.84952 0,-0.84953 -0.6951,-0.84953 -1.6219,-0.84953 h -9.49932 c -1.2356,0 -1.3901,0 -1.7763,1.00398 z m -1.46739,0.92677 c 0.3862,0.77229 0.4634,0.84952 1.08129,1.08121 l -2.23969,5.17441 h -0.077 l -11.19842,-26.79882 c -0.23171,-0.61785 -0.69511,-1.46737 -1.31291,-2.08522 h 4.24771 z m 13.66981,-22.62842 h 5.25161 c -1.1585,1.23568 -1.1585,2.5486 -1.1585,3.39813 v 23.55516 c 0,0.84954 0,2.16244 1.1585,3.39813 h -6.33291 c 1.0813,-1.23569 1.0813,-2.54859 1.0813,-3.39813 z"
+ id="path138"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ sodipodi:nodetypes="ccsssscscsssscscccscccscsssscsscsssccccccccccccssccsc" />
+ </g>
+ </g>
+</svg>
diff --git a/logo/dark/transparent_background.svg b/logo/dark/transparent_background.svg
new file mode 100644
index 000000000..9ae1cef73
--- /dev/null
+++ b/logo/dark/transparent_background.svg
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="210mm"
+ height="297mm"
+ viewBox="0 0 210 297"
+ version="1.1"
+ id="svg208"
+ inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
+ sodipodi:docname="dark_t.svg">
+ <defs
+ id="defs202" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="271.30385"
+ inkscape:cy="461.23026"
+ inkscape:document-units="mm"
+ inkscape:current-layer="g184"
+ inkscape:document-rotation="0"
+ showgrid="false"
+ inkscape:window-width="1915"
+ inkscape:window-height="1018"
+ inkscape:window-x="48"
+ inkscape:window-y="93"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata205">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <g
+ id="g184"
+ transform="translate(674.78338,-185.34168)"
+ style="display:inline">
+ <path
+ sodipodi:type="star"
+ style="fill:#e07a5f;fill-opacity:1;stroke:none;stroke-width:0.381578;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="path132"
+ sodipodi:sides="3"
+ sodipodi:cx="-546.15442"
+ sodipodi:cy="301.1611"
+ sodipodi:r1="13.597875"
+ sodipodi:r2="6.7989364"
+ sodipodi:arg1="0.52359878"
+ sodipodi:arg2="1.5707963"
+ inkscape:flatsided="true"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ inkscape:transform-center-x="-1.7698101"
+ inkscape:transform-center-y="-7.3687432"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ d="m -534.37831,307.96004 -23.55221,0 11.7761,-20.39681 z"
+ transform="matrix(1.0000016,0,0,1,0.46777211,-2.1019999)" />
+ <rect
+ style="fill:#525893;fill-opacity:1;stroke:none;stroke-width:0.547864;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="rect134"
+ width="27.255629"
+ height="27.255585"
+ x="-572.94318"
+ y="271.6669"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ <ellipse
+ style="fill:#87c2a5;fill-opacity:1;stroke:none;stroke-width:0.406653;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="circle136"
+ cx="-573.13397"
+ cy="299.11331"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ rx="13.947864"
+ ry="13.947841" />
+ <path
+ style="fill:#ece6e2;fill-opacity:1;stroke:none;stroke-width:4.94272"
+ d="m -590.39254,284.19839 -9.42211,-22.39672 c -0.3861,-1.00398 -0.3861,-1.00398 -1.7762,-1.00398 h -9.11322 c -0.9268,0 -1.6218,0 -1.6218,0.84953 0,0.84952 0.8495,0.84952 1.0812,0.84952 0.6178,0 1.93071,0.15447 3.01201,0.54061 v 26.25823 c 0,1.08121 0,3.24365 -3.32091,3.55258 -0.9268,0.0772 -0.9268,0.7723 -0.9268,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 7.56852 c 0.9268,0 1.6219,0 1.6219,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.78431,-0.30893 -3.78431,-2.39413 -3.78431,-3.55258 v -24.48193 l 0.077,-0.0772 11.97062,28.80681 c 0.4634,0.84954 0.77241,1.004 1.08131,1.004 0.6178,0 0.695,-0.38615 1.004,-1.004 l 12.04791,-28.80681 0.077,0.0772 v 24.48193 c 0,1.08121 0,3.24365 -3.39821,3.55258 -0.9267,0.0772 -0.9267,0.7723 -0.9267,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 13.12913 c 0.9267,0 1.6218,0 1.6218,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.78431,-0.30893 -3.78431,-2.39413 -3.78431,-3.55258 v -23.24624 c 0,-1.08123 0,-3.24368 3.32091,-3.5526 0.5406,0 0.9268,-0.30891 0.9268,-0.84952 0,-0.84953 -0.6951,-0.84953 -1.6219,-0.84953 h -9.49932 c -1.2356,0 -1.3901,0 -1.7763,1.00398 z m -1.46739,0.92677 c 0.3862,0.77229 0.4634,0.84952 1.08129,1.08121 l -2.23969,5.17441 h -0.077 l -11.19842,-26.79882 c -0.23171,-0.61785 -0.69511,-1.46737 -1.31291,-2.08522 h 4.24771 z m 13.66981,-22.62842 h 5.25161 c -1.1585,1.23568 -1.1585,2.5486 -1.1585,3.39813 v 23.55516 c 0,0.84954 0,2.16244 1.1585,3.39813 h -6.33291 c 1.0813,-1.23569 1.0813,-2.54859 1.0813,-3.39813 z"
+ id="path138"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ sodipodi:nodetypes="ccsssscscsssscscccscccscsssscsscsssccccccccccccssccsc" />
+ </g>
+ </g>
+</svg>
diff --git a/logo/graph.png b/logo/graph.png
deleted file mode 100644
index 9ce65e9b1..000000000
Binary files a/logo/graph.png and /dev/null differ
diff --git a/logo/light/light_background.svg b/logo/light/light_background.svg
new file mode 100644
index 000000000..1c3033b03
--- /dev/null
+++ b/logo/light/light_background.svg
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="210mm"
+ height="297mm"
+ viewBox="0 0 210 297"
+ version="1.1"
+ id="svg208"
+ inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
+ sodipodi:docname="light.svg">
+ <defs
+ id="defs202" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="271.30385"
+ inkscape:cy="461.23026"
+ inkscape:document-units="mm"
+ inkscape:current-layer="g184"
+ inkscape:document-rotation="0"
+ showgrid="false"
+ inkscape:window-width="1915"
+ inkscape:window-height="1018"
+ inkscape:window-x="48"
+ inkscape:window-y="93"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata205">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <g
+ id="g184"
+ transform="translate(674.78338,-185.34168)"
+ style="display:inline">
+ <circle
+ style="fill:#ece6e2;fill-opacity:1;stroke:none;stroke-width:0.471091;stop-color:#000000"
+ id="circle130"
+ cx="-574.78339"
+ cy="285.34167"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ r="50" />
+ <path
+ sodipodi:type="star"
+ style="fill:#e07a5f;fill-opacity:1;stroke:none;stroke-width:0.381578;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="path132"
+ sodipodi:sides="3"
+ sodipodi:cx="-546.15442"
+ sodipodi:cy="301.1611"
+ sodipodi:r1="13.597875"
+ sodipodi:r2="6.7989364"
+ sodipodi:arg1="0.52359878"
+ sodipodi:arg2="1.5707963"
+ inkscape:flatsided="true"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ inkscape:transform-center-x="-1.7698101"
+ inkscape:transform-center-y="-7.3687432"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ d="m -534.37831,307.96004 -23.55221,0 11.7761,-20.39681 z"
+ transform="matrix(1.0000016,0,0,1,0.46777211,-2.1019999)" />
+ <rect
+ style="fill:#454866;fill-opacity:1;stroke:none;stroke-width:0.547864;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="rect134"
+ width="27.255629"
+ height="27.255585"
+ x="-572.94318"
+ y="271.6669"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ <ellipse
+ style="fill:#81b29a;fill-opacity:1;stroke:none;stroke-width:0.406653;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="circle136"
+ cx="-573.13397"
+ cy="299.11331"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ rx="13.947864"
+ ry="13.947841" />
+ <path
+ style="fill:#343434;fill-opacity:1;stroke:none;stroke-width:4.94272"
+ d="m -590.39254,284.19839 -9.42211,-22.39672 c -0.3861,-1.00398 -0.3861,-1.00398 -1.7762,-1.00398 h -9.11322 c -0.9268,0 -1.6218,0 -1.6218,0.84953 0,0.84952 0.8495,0.84952 1.0812,0.84952 0.6178,0 1.93071,0.15447 3.01201,0.54061 v 26.25823 c 0,1.08121 0,3.24365 -3.32091,3.55258 -0.9268,0.0772 -0.9268,0.7723 -0.9268,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 7.56852 c 0.9268,0 1.6219,0 1.6219,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.78431,-0.30893 -3.78431,-2.39413 -3.78431,-3.55258 v -24.48193 l 0.077,-0.0772 11.97062,28.80681 c 0.4634,0.84954 0.77241,1.004 1.08131,1.004 0.6178,0 0.695,-0.38615 1.004,-1.004 l 12.04791,-28.80681 0.077,0.0772 v 24.48193 c 0,1.08121 0,3.24365 -3.39821,3.55258 -0.9267,0.0772 -0.9267,0.7723 -0.9267,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 13.12913 c 0.9267,0 1.6218,0 1.6218,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.78431,-0.30893 -3.78431,-2.39413 -3.78431,-3.55258 v -23.24624 c 0,-1.08123 0,-3.24368 3.32091,-3.5526 0.5406,0 0.9268,-0.30891 0.9268,-0.84952 0,-0.84953 -0.6951,-0.84953 -1.6219,-0.84953 h -9.49932 c -1.2356,0 -1.3901,0 -1.7763,1.00398 z m -1.46739,0.92677 c 0.3862,0.77229 0.4634,0.84952 1.08129,1.08121 l -2.23969,5.17441 h -0.077 l -11.19842,-26.79882 c -0.23171,-0.61785 -0.69511,-1.46737 -1.31291,-2.08522 h 4.24771 z m 13.66981,-22.62842 h 5.25161 c -1.1585,1.23568 -1.1585,2.5486 -1.1585,3.39813 v 23.55516 c 0,0.84954 0,2.16244 1.1585,3.39813 h -6.33291 c 1.0813,-1.23569 1.0813,-2.54859 1.0813,-3.39813 z"
+ id="path138"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ sodipodi:nodetypes="ccsssscscsssscscccscccscsssscsscsssccccccccccccssccsc" />
+ </g>
+ </g>
+</svg>
diff --git a/logo/light/transparent_background.svg b/logo/light/transparent_background.svg
new file mode 100644
index 000000000..2fb30170b
--- /dev/null
+++ b/logo/light/transparent_background.svg
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="210mm"
+ height="297mm"
+ viewBox="0 0 210 297"
+ version="1.1"
+ id="svg208"
+ inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
+ sodipodi:docname="light_t.svg">
+ <defs
+ id="defs202" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="271.30385"
+ inkscape:cy="461.23026"
+ inkscape:document-units="mm"
+ inkscape:current-layer="g184"
+ inkscape:document-rotation="0"
+ showgrid="false"
+ inkscape:window-width="1915"
+ inkscape:window-height="1018"
+ inkscape:window-x="48"
+ inkscape:window-y="93"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata205">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <g
+ id="g184"
+ transform="translate(674.78338,-185.34168)"
+ style="display:inline">
+ <path
+ sodipodi:type="star"
+ style="fill:#e07a5f;fill-opacity:1;stroke:none;stroke-width:0.381578;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="path132"
+ sodipodi:sides="3"
+ sodipodi:cx="-546.15442"
+ sodipodi:cy="301.1611"
+ sodipodi:r1="13.597875"
+ sodipodi:r2="6.7989364"
+ sodipodi:arg1="0.52359878"
+ sodipodi:arg2="1.5707963"
+ inkscape:flatsided="true"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ inkscape:transform-center-x="-1.7698101"
+ inkscape:transform-center-y="-7.3687432"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ d="m -534.37831,307.96004 -23.55221,0 11.7761,-20.39681 z"
+ transform="matrix(1.0000016,0,0,1,0.46777211,-2.1019999)" />
+ <rect
+ style="fill:#454866;fill-opacity:1;stroke:none;stroke-width:0.547864;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="rect134"
+ width="27.255629"
+ height="27.255585"
+ x="-572.94318"
+ y="271.6669"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
+ <ellipse
+ style="fill:#81b29a;fill-opacity:1;stroke:none;stroke-width:0.406653;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
+ id="circle136"
+ cx="-573.13397"
+ cy="299.11331"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ rx="13.947864"
+ ry="13.947841" />
+ <path
+ style="fill:#343434;fill-opacity:1;stroke:none;stroke-width:4.94272"
+ d="m -590.39254,284.19839 -9.42211,-22.39672 c -0.3861,-1.00398 -0.3861,-1.00398 -1.7762,-1.00398 h -9.11322 c -0.9268,0 -1.6218,0 -1.6218,0.84953 0,0.84952 0.8495,0.84952 1.0812,0.84952 0.6178,0 1.93071,0.15447 3.01201,0.54061 v 26.25823 c 0,1.08121 0,3.24365 -3.32091,3.55258 -0.9268,0.0772 -0.9268,0.7723 -0.9268,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 7.56852 c 0.9268,0 1.6219,0 1.6219,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.78431,-0.30893 -3.78431,-2.39413 -3.78431,-3.55258 v -24.48193 l 0.077,-0.0772 11.97062,28.80681 c 0.4634,0.84954 0.77241,1.004 1.08131,1.004 0.6178,0 0.695,-0.38615 1.004,-1.004 l 12.04791,-28.80681 0.077,0.0772 v 24.48193 c 0,1.08121 0,3.24365 -3.39821,3.55258 -0.9267,0.0772 -0.9267,0.7723 -0.9267,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 13.12913 c 0.9267,0 1.6218,0 1.6218,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.78431,-0.30893 -3.78431,-2.39413 -3.78431,-3.55258 v -23.24624 c 0,-1.08123 0,-3.24368 3.32091,-3.5526 0.5406,0 0.9268,-0.30891 0.9268,-0.84952 0,-0.84953 -0.6951,-0.84953 -1.6219,-0.84953 h -9.49932 c -1.2356,0 -1.3901,0 -1.7763,1.00398 z m -1.46739,0.92677 c 0.3862,0.77229 0.4634,0.84952 1.08129,1.08121 l -2.23969,5.17441 h -0.077 l -11.19842,-26.79882 c -0.23171,-0.61785 -0.69511,-1.46737 -1.31291,-2.08522 h 4.24771 z m 13.66981,-22.62842 h 5.25161 c -1.1585,1.23568 -1.1585,2.5486 -1.1585,3.39813 v 23.55516 c 0,0.84954 0,2.16244 1.1585,3.39813 h -6.33291 c 1.0813,-1.23569 1.0813,-2.54859 1.0813,-3.39813 z"
+ id="path138"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ sodipodi:nodetypes="ccsssscscsssscscccscccscsssscsscsssccccccccccccssccsc" />
+ </g>
+ </g>
+</svg>
diff --git a/logo/logo.py b/logo/logo.py
deleted file mode 100644
index 235b6c608..000000000
--- a/logo/logo.py
+++ /dev/null
@@ -1,185 +0,0 @@
-from manim import *
-
-NEW_BLUE = "#68a8e1"
-
-
-class Thumbnail(GraphScene):
- CONFIG = {
- "y_max": 8,
- "y_axis_height": 5,
- }
-
- def construct(self):
- self.show_function_graph()
-
- def show_function_graph(self):
- self.setup_axes(animate=False)
-
- def func(x):
- return 0.1 * (x + 3 - 5) * (x - 3 - 5) * (x - 5) + 5
-
- def rect(x):
- return 2.775 * (x - 1.5) + 3.862
-
- recta = self.get_graph(rect, x_min=-1, x_max=5)
- graph = self.get_graph(func, x_min=0.2, x_max=9)
- graph.set_color(NEW_BLUE)
- input_tracker_p1 = ValueTracker(1.5)
- input_tracker_p2 = ValueTracker(3.5)
-
- def get_x_value(input_tracker):
- return input_tracker.get_value()
-
- def get_y_value(input_tracker):
- return graph.underlying_function(get_x_value(input_tracker))
-
- def get_x_point(input_tracker):
- return self.coords_to_point(get_x_value(input_tracker), 0)
-
- def get_y_point(input_tracker):
- return self.coords_to_point(0, get_y_value(input_tracker))
-
- def get_graph_point(input_tracker):
- return self.coords_to_point(
- get_x_value(input_tracker), get_y_value(input_tracker)
- )
-
- def get_v_line(input_tracker):
- return DashedLine(
- get_x_point(input_tracker),
- get_graph_point(input_tracker),
- stroke_width=2,
- )
-
- def get_h_line(input_tracker):
- return DashedLine(
- get_graph_point(input_tracker),
- get_y_point(input_tracker),
- stroke_width=2,
- )
-
- #
- input_triangle_p1 = RegularPolygon(n=3, start_angle=TAU / 4)
- output_triangle_p1 = RegularPolygon(n=3, start_angle=0)
- for triangle in input_triangle_p1, output_triangle_p1:
- triangle.set_fill(WHITE, 1)
- triangle.set_stroke(width=0)
- triangle.scale(0.1)
- #
- input_triangle_p2 = RegularPolygon(n=3, start_angle=TAU / 4)
- output_triangle_p2 = RegularPolygon(n=3, start_angle=0)
- for triangle in input_triangle_p2, output_triangle_p2:
- triangle.set_fill(WHITE, 1)
- triangle.set_stroke(width=0)
- triangle.scale(0.1)
-
- #
- x_label_p1 = MathTex("a")
- output_label_p1 = MathTex("f(a)")
- x_label_p2 = MathTex("b")
- output_label_p2 = MathTex("f(b)")
- v_line_p1 = get_v_line(input_tracker_p1)
- v_line_p2 = get_v_line(input_tracker_p2)
- h_line_p1 = get_h_line(input_tracker_p1)
- h_line_p2 = get_h_line(input_tracker_p2)
- graph_dot_p1 = Dot(color=WHITE)
- graph_dot_p2 = Dot(color=WHITE)
-
- # reposition mobjects
- x_label_p1.next_to(v_line_p1, DOWN)
- x_label_p2.next_to(v_line_p2, DOWN)
- output_label_p1.next_to(h_line_p1, LEFT)
- output_label_p2.next_to(h_line_p2, LEFT)
- input_triangle_p1.next_to(v_line_p1, DOWN, buff=0)
- input_triangle_p2.next_to(v_line_p2, DOWN, buff=0)
- output_triangle_p1.next_to(h_line_p1, LEFT, buff=0)
- output_triangle_p2.next_to(h_line_p2, LEFT, buff=0)
- graph_dot_p1.move_to(get_graph_point(input_tracker_p1))
- graph_dot_p2.move_to(get_graph_point(input_tracker_p2))
-
- #
- self.play(ShowCreation(graph),)
- # Animacion del punto a
- self.add_foreground_mobject(graph_dot_p1)
- self.add_foreground_mobject(graph_dot_p2)
- self.play(
- DrawBorderThenFill(input_triangle_p1),
- Write(x_label_p1),
- ShowCreation(v_line_p1),
- GrowFromCenter(graph_dot_p1),
- ShowCreation(h_line_p1),
- Write(output_label_p1),
- DrawBorderThenFill(output_triangle_p1),
- DrawBorderThenFill(input_triangle_p2),
- Write(x_label_p2),
- ShowCreation(v_line_p2),
- GrowFromCenter(graph_dot_p2),
- ShowCreation(h_line_p2),
- Write(output_label_p2),
- DrawBorderThenFill(output_triangle_p2),
- run_time=0.5,
- )
- self.add(
- input_triangle_p2,
- x_label_p2,
- graph_dot_p2,
- v_line_p2,
- h_line_p2,
- output_triangle_p2,
- output_label_p2,
- )
- ###################
- pendiente_recta = self.get_secant_slope_group(
- 1.9,
- recta,
- dx=1.4,
- df_label=None,
- dx_label=None,
- dx_line_color=PURPLE,
- df_line_color=ORANGE,
- )
- grupo_secante = self.get_secant_slope_group(
- 1.5,
- graph,
- dx=2,
- df_label=None,
- dx_label=None,
- dx_line_color="#942357",
- df_line_color="#3f7d5c",
- secant_line_color=RED,
- )
-
- self.add(
- input_triangle_p2, graph_dot_p2, v_line_p2, h_line_p2, output_triangle_p2,
- )
- self.play(FadeIn(grupo_secante))
-
- kwargs = {
- "x_min": 4,
- "x_max": 9,
- "fill_opacity": 0.75,
- "stroke_width": 0.25,
- }
- self.graph = graph
- iteraciones = 6
-
- self.rect_list = self.get_riemann_rectangles_list(
- graph, iteraciones, start_color=PURPLE, end_color=ORANGE, **kwargs
- )
- flat_rects = self.get_riemann_rectangles(
- self.get_graph(lambda x: 0),
- dx=0.5,
- start_color=invert_color(PURPLE),
- end_color=invert_color(ORANGE),
- **kwargs
- )
- rects = self.rect_list[0]
- self.transform_between_riemann_rects(
- flat_rects, rects, replace_mobject_with_target_in_scene=True, run_time=0.9
- )
-
- # adding manim
- picture = Group(*self.mobjects)
- picture.scale(0.6).to_edge(LEFT, buff=SMALL_BUFF)
- manim = Tex("Manim").set_height(1.5).next_to(picture, RIGHT).shift(DOWN * 0.7)
- self.add(manim)
diff --git a/logo/with_name.png b/logo/with_name.png
deleted file mode 100644
index 04b710ab0..000000000
Binary files a/logo/with_name.png and /dev/null differ
diff --git a/logo/with_subtext.png b/logo/with_subtext.png
deleted file mode 100644
index f1e818dc4..000000000
Binary files a/logo/with_subtext.png and /dev/null differ
diff --git a/manim/__init__.py b/manim/__init__.py
index 0f6b70bfd..d54257be2 100644
--- a/manim/__init__.py
+++ b/manim/__init__.py
@@ -21,6 +21,8 @@ from .animation.specialized import *
from .animation.transform import *
from .animation.update import *
+from .renderer.cairo_renderer import *
+
from .camera.camera import *
from .camera.mapping_camera import *
from .camera.moving_camera import *
@@ -74,8 +76,10 @@ from .utils.iterables import *
from .utils.file_ops import *
from .utils.paths import *
from .utils.rate_functions import *
+from .utils import rate_functions
from .utils.simple_functions import *
from .utils.sounds import *
from .utils.space_ops import *
from .utils.strings import *
from .utils.tex import *
+from .utils.tex_templates import *
diff --git a/manim/__main__.py b/manim/__main__.py
index d1acc0050..0f13228f6 100644
--- a/manim/__main__.py
+++ b/manim/__main__.py
@@ -1,12 +1,7 @@
-import inspect
import os
import platform
-import subprocess as sp
import sys
-import re
import traceback
-import importlib.util
-import types
from manim import constants, logger, console, config
from manim import Scene
@@ -84,7 +79,7 @@ def main():
else:
scene = SceneClass()
scene.render()
- open_file_if_needed(scene.file_writer)
+ open_file_if_needed(scene.renderer.file_writer)
except Exception:
print("\n\n")
traceback.print_exc()
diff --git a/manim/animation/creation.py b/manim/animation/creation.py
index ef67b0eb9..4964f85a3 100644
--- a/manim/animation/creation.py
+++ b/manim/animation/creation.py
@@ -37,7 +37,7 @@ class ShowPartial(Animation):
submob.pointwise_become_partial(start_submob, *self.get_bounds(alpha))
def get_bounds(self, alpha):
- raise Exception("Not Implemented")
+ raise NotImplementedError()
class ShowCreation(ShowPartial):
@@ -69,7 +69,7 @@ class DrawBorderThenFill(Animation):
def check_validity_of_input(self, vmobject):
if not isinstance(vmobject, VMobject):
- raise Exception("DrawBorderThenFill only works for VMobjects")
+ raise TypeError("DrawBorderThenFill only works for VMobjects")
def begin(self):
self.outline = self.get_outline()
diff --git a/manim/animation/numbers.py b/manim/animation/numbers.py
index 1af261eb1..c45ac9838 100644
--- a/manim/animation/numbers.py
+++ b/manim/animation/numbers.py
@@ -23,7 +23,7 @@ class ChangingDecimal(Animation):
def check_validity_of_input(self, decimal_mob):
if not isinstance(decimal_mob, DecimalNumber):
- raise Exception("ChangingDecimal can only take " "in a DecimalNumber")
+ raise TypeError("ChangingDecimal can only take in a DecimalNumber")
def yell_about_depricated_configuration(self, **kwargs):
# Obviously this would optimally be removed at
diff --git a/manim/animation/specialized.py b/manim/animation/specialized.py
index 4d9eb6ed3..b4c83ae84 100644
--- a/manim/animation/specialized.py
+++ b/manim/animation/specialized.py
@@ -29,7 +29,7 @@ class MoveCar(ApplyMethod):
def check_if_input_is_car(self, car):
if not isinstance(car, Car):
- raise Exception("MoveCar must take in Car object")
+ raise TypeError("MoveCar must take in Car object")
def begin(self):
super().begin()
diff --git a/manim/animation/transform.py b/manim/animation/transform.py
index 43cd7ac9f..e9960ff65 100644
--- a/manim/animation/transform.py
+++ b/manim/animation/transform.py
@@ -84,7 +84,7 @@ class Transform(Animation):
def check_target_mobject_validity(self):
if self.target_mobject is None:
message = "{}.create_target not properly implemented"
- raise Exception(message.format(self.__class__.__name__))
+ raise NotImplementedError(message.format(self.__class__.__name__))
def clean_up_from_scene(self, scene):
super().clean_up_from_scene(scene)
@@ -157,7 +157,7 @@ class MoveToTarget(Transform):
def check_validity_of_input(self, mobject):
if not hasattr(mobject, "target"):
- raise Exception(
+ raise ValueError(
"MoveToTarget called on mobject" "without attribute 'target'"
)
@@ -179,7 +179,7 @@ class ApplyMethod(Transform):
def check_validity_of_input(self, method):
if not inspect.ismethod(method):
- raise Exception(
+ raise ValueError(
"Whoops, looks like you accidentally invoked "
"the method you want to animate"
)
@@ -244,7 +244,7 @@ class ApplyFunction(Transform):
def create_target(self):
target = self.function(self.mobject.copy())
if not isinstance(target, Mobject):
- raise Exception(
+ raise TypeError(
"Functions passed to ApplyFunction must return object of type Mobject"
)
return target
@@ -266,7 +266,7 @@ class ApplyMatrix(ApplyPointwiseFunction):
new_matrix[:2, :2] = matrix
matrix = new_matrix
elif matrix.shape != (3, 3):
- raise Exception("Matrix has bad dimensions")
+ raise ValueError("Matrix has bad dimensions")
return matrix
diff --git a/manim/camera/camera.py b/manim/camera/camera.py
index 69d1e28c5..f9811705a 100644
--- a/manim/camera/camera.py
+++ b/manim/camera/camera.py
@@ -28,6 +28,7 @@ from ..utils.iterables import remove_list_redundancies
from ..utils.simple_functions import fdiv
from ..utils.space_ops import angle_of_vector
from ..utils.space_ops import get_norm
+from ..utils.family import extract_mobject_family_members
class Camera(object):
@@ -65,7 +66,7 @@ class Camera(object):
"use_z_index": True,
}
- def __init__(self, background=None, **kwargs):
+ def __init__(self, video_quality_config, background=None, **kwargs):
"""Initialises the Camera.
Parameters
@@ -363,33 +364,6 @@ class Camera(object):
####
- # TODO, it's weird that this is part of camera.
- # Clearly it should live elsewhere.
- def extract_mobject_family_members(self, mobjects, only_those_with_points=False):
- """Returns a list of the types of mobjects and
- their family members present.
-
- Parameters
- ----------
- mobjects : Mobject
- The Mobjects currently in the Scene
- only_those_with_points : bool, optional
- Whether or not to only do this for
- those mobjects that have points. By default False
-
- Returns
- -------
- list
- list of the mobjects and family members.
- """
- if only_those_with_points:
- method = Mobject.family_members_with_points
- else:
- method = Mobject.get_family
- if self.use_z_index:
- mobjects = sorted(mobjects, key=lambda m: m.z_index)
- return remove_list_redundancies(list(it.chain(*[method(m) for m in mobjects])))
-
def get_mobjects_to_display(
self, mobjects, include_submobjects=True, excluded_mobjects=None
):
@@ -411,11 +385,13 @@ class Camera(object):
list of mobjects
"""
if include_submobjects:
- mobjects = self.extract_mobject_family_members(
- mobjects, only_those_with_points=True
+ mobjects = extract_mobject_family_members(
+ mobjects, use_z_index=self.use_z_index, only_those_with_points=True
)
if excluded_mobjects:
- all_excluded = self.extract_mobject_family_members(excluded_mobjects)
+ all_excluded = extract_mobject_family_members(
+ excluded_mobjects, use_z_index=self.use_z_index
+ )
mobjects = list_difference_update(mobjects, all_excluded)
return mobjects
diff --git a/manim/camera/moving_camera.py b/manim/camera/moving_camera.py
index f5d649f9e..9cf891ff3 100644
--- a/manim/camera/moving_camera.py
+++ b/manim/camera/moving_camera.py
@@ -46,7 +46,7 @@ class MovingCamera(Camera):
"default_frame_stroke_width": 0,
}
- def __init__(self, frame=None, **kwargs):
+ def __init__(self, video_quality_config, frame=None, **kwargs):
"""
frame is a Mobject, (should almost certainly be a rectangle)
determining which region of space the camera displys
@@ -59,7 +59,7 @@ class MovingCamera(Camera):
self.default_frame_stroke_width,
)
self.frame = frame
- Camera.__init__(self, **kwargs)
+ Camera.__init__(self, video_quality_config, **kwargs)
# TODO, make these work for a rotated frame
@property
diff --git a/manim/camera/multi_camera.py b/manim/camera/multi_camera.py
index a503a849a..1cec58462 100644
--- a/manim/camera/multi_camera.py
+++ b/manim/camera/multi_camera.py
@@ -14,7 +14,9 @@ class MultiCamera(MovingCamera):
"allow_cameras_to_capture_their_own_display": False,
}
- def __init__(self, *image_mobjects_from_cameras, **kwargs):
+ def __init__(
+ self, video_quality_config, image_mobjects_from_cameras=None, **kwargs
+ ):
"""Initalises the MultiCamera
Parameters:
@@ -25,9 +27,10 @@ class MultiCamera(MovingCamera):
Any valid keyword arguments of MovingCamera.
"""
self.image_mobjects_from_cameras = []
- for imfc in image_mobjects_from_cameras:
- self.add_image_mobject_from_camera(imfc)
- MovingCamera.__init__(self, **kwargs)
+ if image_mobjects_from_cameras is not None:
+ for imfc in image_mobjects_from_cameras:
+ self.add_image_mobject_from_camera(imfc)
+ MovingCamera.__init__(self, video_quality_config, **kwargs)
def add_image_mobject_from_camera(self, image_mobject_from_camera):
"""Adds an ImageMobject that's been obtained from the camera
diff --git a/manim/config/logger.py b/manim/config/logger.py
index 9b1d91291..6c2aead34 100644
--- a/manim/config/logger.py
+++ b/manim/config/logger.py
@@ -90,10 +90,9 @@ def parse_theme(config_logger):
def set_file_logger(config, verbosity):
# Note: The log file name will be
- # <name_of_animation_file>_<name_of_scene>.log, gotten from
- # file_writer_config. So it can differ from the real name of the scene.
- # <name_of_scene> would only appear if scene name was provided when manim
- # was called.
+ # <name_of_animation_file>_<name_of_scene>.log, gotten from config. So it
+ # can differ from the real name of the scene. <name_of_scene> would only
+ # appear if scene name was provided when manim was called.
scene_name_suffix = "".join(config["scene_names"])
scene_file_name = os.path.basename(config["input_file"]).split(".")[0]
log_file_name = (
diff --git a/manim/grpc/impl/frame_server_impl.py b/manim/grpc/impl/frame_server_impl.py
index d87f2cd95..5960e7430 100644
--- a/manim/grpc/impl/frame_server_impl.py
+++ b/manim/grpc/impl/frame_server_impl.py
@@ -97,7 +97,7 @@ class FrameServer(frameserver_pb2_grpc.FrameServerServicer):
selected_scene.static_image,
)
serialized_mobject_list, duration = selected_scene.add_frame(
- selected_scene.get_frame()
+ selected_scene.renderer.get_frame()
)
resp = list_to_frame_response(
selected_scene, duration, serialized_mobject_list
diff --git a/manim/mobject/coordinate_systems.py b/manim/mobject/coordinate_systems.py
index 3cb876fad..c77f0ed7a 100644
--- a/manim/mobject/coordinate_systems.py
+++ b/manim/mobject/coordinate_systems.py
@@ -41,10 +41,10 @@ class CoordinateSystem:
self.y_max = config["frame_y_radius"]
def coords_to_point(self, *coords):
- raise Exception("Not implemented")
+ raise NotImplementedError()
def point_to_coords(self, point):
- raise Exception("Not implemented")
+ raise NotImplementedError()
def c2p(self, *coords):
"""Abbreviation for coords_to_point"""
@@ -55,7 +55,7 @@ class CoordinateSystem:
return self.point_to_coords(point)
def get_axes(self):
- raise Exception("Not implemented")
+ raise NotImplementedError()
def get_axis(self, index):
return self.get_axes()[index]
diff --git a/manim/mobject/mobject.py b/manim/mobject/mobject.py
index 66fdead7c..5a3458218 100644
--- a/manim/mobject/mobject.py
+++ b/manim/mobject/mobject.py
@@ -8,10 +8,10 @@ from functools import reduce
import copy
import itertools as it
import operator as op
-import os
import random
import sys
+from pathlib import Path
from colour import Color
import numpy as np
@@ -199,7 +199,7 @@ class Mobject(Container):
def save_image(self, name=None):
self.get_image().save(
- os.path.join(config["video_dir"], (name or str(self)) + ".png")
+ Path(config["video_dir"]).joinpath((name or str(self)) + ".png")
)
def copy(self):
@@ -670,7 +670,7 @@ class Mobject(Container):
def set_submobject_colors_by_gradient(self, *colors):
if len(colors) == 0:
- raise Exception("Need at least one color")
+ raise ValueError("Need at least one color")
elif len(colors) == 1:
return self.set_color(*colors)
@@ -1182,6 +1182,6 @@ class Group(Mobject):
def __init__(self, *mobjects, **kwargs):
if not all([isinstance(m, Mobject) for m in mobjects]):
- raise Exception("All submobjects must be of type Mobject")
+ raise TypeError("All submobjects must be of type Mobject")
Mobject.__init__(self, **kwargs)
self.add(*mobjects)
diff --git a/manim/mobject/svg/drawings.py b/manim/mobject/svg/drawings.py
index a25fdd4ec..31084394d 100644
--- a/manim/mobject/svg/drawings.py
+++ b/manim/mobject/svg/drawings.py
@@ -1001,7 +1001,7 @@ class SuitSymbol(SVGMobject):
"clubs": self.black,
}
if suit_name not in suits_to_colors:
- raise Exception("Invalid suit name")
+ raise ValueError("Invalid suit name")
SVGMobject.__init__(self, file_name=suit_name, **kwargs)
color = suits_to_colors[suit_name]
diff --git a/manim/mobject/svg/svg_mobject.py b/manim/mobject/svg/svg_mobject.py
index 0d2cbdf54..9fe65d26d 100644
--- a/manim/mobject/svg/svg_mobject.py
+++ b/manim/mobject/svg/svg_mobject.py
@@ -396,7 +396,7 @@ class VMobjectFromSVGPathstring(VMobject):
# TODO, this is a suboptimal approximation
new_points = np.append([new_points[0]], new_points, axis=0)
elif command == "A": # elliptical Arc
- raise Exception("Not implemented")
+ raise NotImplementedError()
elif command == "Z": # closepath
return
diff --git a/manim/mobject/svg/tex_mobject.py b/manim/mobject/svg/tex_mobject.py
index 8f6230214..f661d0457 100644
--- a/manim/mobject/svg/tex_mobject.py
+++ b/manim/mobject/svg/tex_mobject.py
@@ -27,6 +27,7 @@ from ...utils.config_ops import digest_config
from ...utils.strings import split_string_list_to_isolate_substrings
from ...utils.tex_file_writing import tex_to_svg_file
from ...utils.color import BLACK
+from ...utils.tex import TexTemplate
TEX_MOB_SCALE_FACTOR = 0.05
@@ -38,29 +39,39 @@ class TexSymbol(VMobjectFromSVGPathstring):
class SingleStringMathTex(SVGMobject):
+ """Elementary building block for rendering text with LaTeX.
+
+ Tests
+ -----
+ Check that creating a :class:`~.SingleStringMathTex` object works::
+
+ >>> SingleStringMathTex('Test')
+ SingleStringMathTex('Test')
+ """
+
CONFIG = {
"stroke_width": 0,
"fill_opacity": 1.0,
- "background_stroke_width": 1,
+ "background_stroke_width": 0,
"background_stroke_color": BLACK,
"should_center": True,
"height": None,
"organize_left_to_right": False,
- "alignment": "",
- "type": "tex",
- "template": None,
+ "tex_environment": "align*",
+ "tex_template": None,
}
def __init__(self, tex_string, **kwargs):
digest_config(self, kwargs)
- if self.template is None:
- self.template = kwargs.get("tex_template", config["tex_template"])
+ if self.tex_template is None:
+ self.tex_template = kwargs.get("tex_template", config["tex_template"])
+
assert isinstance(tex_string, str)
self.tex_string = tex_string
file_name = tex_to_svg_file(
self.get_modified_expression(tex_string),
- self.type,
- tex_template=self.template,
+ environment=self.tex_environment,
+ tex_template=self.tex_template,
)
SVGMobject.__init__(self, file_name=file_name, **kwargs)
if self.height is None:
@@ -68,8 +79,11 @@ class SingleStringMathTex(SVGMobject):
if self.organize_left_to_right:
self.organize_submobjects_left_to_right()
+ def __repr__(self):
+ return f"{type(self).__name__}({repr(self.tex_string)})"
+
def get_modified_expression(self, tex_string):
- result = self.alignment + " " + tex_string
+ result = tex_string
result = result.strip()
result = self.modify_special_strings(result)
return result
@@ -152,25 +166,32 @@ class SingleStringMathTex(SVGMobject):
class MathTex(SingleStringMathTex):
- """
- A class for displaying mathematical formulas with Latex syntax.
-
+ """A string compiled with LaTeX in math mode.
Examples
--------
- .. manim:: Formula1
+ .. manim:: Formula
:save_last_frame:
- class Formula1(Scene):
+ class Formula(Scene):
def construct(self):
t = MathTex(r"\int_a^b f'(x) dx = f(b)- f(a)")
self.add(t)
+
+ Tests
+ -----
+ Check that creating a :class:`~.MathTex` works::
+
+ >>> MathTex('a^2 + b^2 = c^2')
+ MathTex('a^2 + b^2 = c^2')
+
"""
CONFIG = {
"arg_separator": " ",
"substrings_to_isolate": [],
"tex_to_color_map": {},
+ "tex_environment": "align*",
}
def __init__(self, *tex_strings, **kwargs):
@@ -264,7 +285,7 @@ class MathTex(SingleStringMathTex):
def index_of_part(self, part):
split_self = self.split()
if part not in split_self:
- raise Exception("Trying to get index of part not in MathTex")
+ raise ValueError("Trying to get index of part not in MathTex")
return split_self.index(part)
def index_of_part_by_tex(self, tex, **kwargs):
@@ -276,10 +297,21 @@ class MathTex(SingleStringMathTex):
class Tex(MathTex):
+ r"""A string compiled with LaTeX in normal mode.
+
+ Tests
+ -----
+
+ Check whether writing a LaTeX string works::
+
+ >>> Tex('The horse does not eat cucumber salad.')
+ Tex('The horse does not eat cucumber salad.')
+
+ """
+
CONFIG = {
- "alignment": "\\centering",
"arg_separator": "",
- "type": "text",
+ "tex_environment": "center",
}
@@ -288,7 +320,7 @@ class BulletedList(Tex):
"buff": MED_LARGE_BUFF,
"dot_scale_factor": 2,
# Have to include because of handle_multiple_args implementation
- "alignment": "",
+ "tex_environment": None,
}
def __init__(self, *items, **kwargs):
@@ -307,7 +339,7 @@ class BulletedList(Tex):
elif isinstance(arg, int):
part = self.submobjects[arg]
else:
- raise Exception("Expected int or string, got {0}".format(arg))
+ raise TypeError("Expected int or string, got {0}".format(arg))
for other_part in self.submobjects:
if other_part is part:
other_part.set_fill(opacity=1)
diff --git a/manim/mobject/svg/text_mobject.py b/manim/mobject/svg/text_mobject.py
index 60a3d1034..204834ed1 100644
--- a/manim/mobject/svg/text_mobject.py
+++ b/manim/mobject/svg/text_mobject.py
@@ -1,6 +1,6 @@
"""Mobjects used for displaying (non-LaTeX) text."""
-__all__ = ["Text", "Paragraph", "PangoText", "CairoText"]
+__all__ = ["Text", "Paragraph", "CairoText"]
import copy
@@ -83,8 +83,13 @@ class CairoText(SVGMobject):
`weird <https://github.com/3b1b/manim/issues/1067>`_. Consider using
:meth:`remove_invisible_chars` to resolve this issue.
+ Tests
+ -----
+ Check whether writing text works::
+ >>> Text('The horse does not eat cucumber salad.')
+ Text('The horse does not eat cucumber salad.')
"""
@@ -158,6 +163,9 @@ class CairoText(SVGMobject):
if self.height is None and self.width is None:
self.scale(TEXT_MOB_SCALE_FACTOR)
+ def __repr__(self):
+ return f"Text({repr(self.original_text)})"
+
def gen_chars(self):
chars = VGroup()
submobjects_char_index = 0
@@ -299,9 +307,13 @@ class CairoText(SVGMobject):
line_spacing = self.line_spacing * 10
if self.font == "":
- if NOT_SETTING_FONT_MSG != "":
- print(NOT_SETTING_FONT_MSG)
+ if NOT_SETTING_FONT_MSG:
+ logger.warning(NOT_SETTING_FONT_MSG)
+
dir_name = config["text_dir"]
+ if not os.path.exists(dir_name):
+ os.makedirs(dir_name)
+
hash_name = self.text2hash()
file_name = os.path.join(dir_name, hash_name) + ".svg"
if os.path.exists(file_name):
@@ -333,71 +345,6 @@ class CairoText(SVGMobject):
return file_name
-# Following class is just a Little implementation of upcomming feautures. Ignore it for now.
-class TextWithBackground(CairoText):
- CONFIG = {
- "background_color": BLACK,
- }
-
- def __init__(self, text, **config):
- Text.__init__(self, text, **config)
- # self.text_backgrounds = self.gen_text_backgrounds(text)
-
- def gen_text_backgrounds(self, text):
- text_with_visible_chars = text.replace(" ", "").replace("\t", "")
- text_list = text_with_visible_chars.split("\n")
- text_backgrounds = VGroup()
- start_i = 0
- for line_no in range(text_list.__len__()):
- rect_counts = len(text_list[line_no])
- text_backgrounds.add(*self[start_i:rect_counts])
- start_i += 2 * rect_counts
- text_backgrounds.set_color(self.background_color)
-
- return text_backgrounds
-
- def text2svg1(self):
- # anti-aliasing
- size = self.size * 10
- line_spacing = self.line_spacing * 10
-
- if self.font == "":
- if NOT_SETTING_FONT_MSG != "":
- logger.warning(NOT_SETTING_FONT_MSG)
- dir_name = consts.TEXT_DIR
- hash_name = self.text2hash()
- file_name = os.path.join(dir_name, hash_name) + ".svg"
- # if os.path.exists(file_name):
- # return file_name
-
- surface = cairo.SVGSurface(file_name, 600, 400)
- context = cairo.Context(surface)
- context.set_font_size(size)
- context.move_to(START_X, START_Y)
-
- settings = self.text2settings()
- offset_x = 0
- last_line_num = 0
- for setting in settings:
- font = setting.font
- slant = self.str2slant(setting.slant)
- weight = self.str2weight(setting.weight)
- text = self.text[setting.start : setting.end].replace("\n", " ")
- context.select_font_face(font, slant, weight)
- if setting.line_num != last_line_num:
- offset_x = 0
- last_line_num = setting.line_num
- tempx = START_X + offset_x
- tempy = START_Y + line_spacing * setting.line_num
- char_offset_x = 0
- char_height = tempy - size / 2 - (line_spacing - size)
- context.move_to(tempx, tempy)
- context.show_text(text)
- offset_x += context.text_extents(text)[4]
- surface.finish()
- return file_name
-
-
class Paragraph(VGroup):
r"""Display a paragraph of text.
@@ -586,10 +533,10 @@ class Paragraph(VGroup):
)
-class PangoText(SVGMobject):
+class Text(SVGMobject):
r"""Display (non-LaTeX) text rendered using `Pango <https://pango.gnome.org/>`_.
- PangoText objects behave like a :class:`.VGroup`-like iterable of all characters
+ Text objects behave like a :class:`.VGroup`-like iterable of all characters
in the given text. In particular, slicing is possible.
Parameters
@@ -599,27 +546,74 @@ class PangoText(SVGMobject):
Returns
-------
- :class:`PangoText`
+ :class:`Text`
The mobject like :class:`.VGroup`.
Examples
---------
+
+ .. manim:: Example1Text
+ :save_last_frame:
+
+ class Example1Text(Scene):
+ def construct(self):
+ text = Text('Hello world').scale(3)
+ self.add(text)
+
+ .. manim:: TextColorExample
+ :save_last_frame:
+
+ class TextColorExample(Scene):
+ def construct(self):
+ text1 = Text('Hello world', color=BLUE).scale(3)
+ text2 = Text('Hello world', gradient=(BLUE, GREEN)).scale(3).next_to(text1, DOWN)
+ self.add(text1, text2)
+
+ .. manim:: TextItalicAndBoldExample
+ :save_last_frame:
+
+ class TextItalicAndBoldExample(Scene):
+ def construct(self):
+ text0 = Text('Hello world', slant=ITALIC)
+ text1 = Text('Hello world', t2s={'world':ITALIC})
+ text2 = Text('Hello world', weight=BOLD)
+ text3 = Text('Hello world', t2w={'world':BOLD})
+ self.add(text0,text1, text2,text3)
+ for i,mobj in enumerate(self.mobjects):
+ mobj.shift(DOWN*(i-1))
+
+
+ .. manim:: TextMoreCustomization
+ :save_last_frame:
+
+ class TextMoreCustomization(Scene):
+ def construct(self):
+ text1 = Text(
+ 'Google',
+ t2c={'[:1]': '#3174f0', '[1:2]': '#e53125',
+ '[2:3]': '#fbb003', '[3:4]': '#3174f0',
+ '[4:5]': '#269a43', '[5:]': '#e53125'}, size=1.2).scale(3)
+ self.add(text1)
+
+ As :class:`Text` uses Pango to render text, rendering non-English
+ characters is easily possible:
+
.. manim:: MultipleFonts
:save_last_frame:
class MultipleFonts(Scene):
def construct(self):
- morning = PangoText("வணக்கம்", font="sans-serif")
- chin = PangoText(
+ morning = Text("வணக்கம்", font="sans-serif")
+ chin = Text(
"見 角 言 谷 辛 辰 辵 邑 酉 釆 里!", t2c={"見 角 言": BLUE}
) # works same as ``Text``.
- mess = PangoText("Multi-Language", style=BOLD)
- russ = PangoText("Здравствуйте मस नम म ", font="sans-serif")
- hin = PangoText("नमस्ते", font="sans-serif")
- arb = PangoText(
+ mess = Text("Multi-Language", style=BOLD)
+ russ = Text("Здравствуйте मस नम म ", font="sans-serif")
+ hin = Text("नमस्ते", font="sans-serif")
+ arb = Text(
"صباح الخير \n تشرفت بمقابلتك", font="sans-serif"
) # don't mix RTL and LTR languages nothing shows up then ;-)
- japanese = PangoText("臂猿「黛比」帶著孩子", font="sans-serif")
+ japanese = Text("臂猿「黛比」帶著孩子", font="sans-serif")
self.add(morning,chin,mess,russ,hin,arb,japanese)
for i,mobj in enumerate(self.mobjects):
mobj.shift(DOWN*(i-3))
@@ -630,10 +624,18 @@ class PangoText(SVGMobject):
class PangoRender(Scene):
def construct(self):
- morning = PangoText("வணக்கம்", font="sans-serif")
+ morning = Text("வணக்கம்", font="sans-serif")
self.play(Write(morning))
self.wait(2)
+ Tests
+ -----
+
+ Check that the creation of :class:`~.Text` works::
+
+ >>> Text('The horse does not eat cucumber salad.')
+ Text('The horse does not eat cucumber salad.')
+
.. WARNING::
Using a :class:`.Transform` on text with leading whitespace can look
@@ -667,6 +669,10 @@ class PangoText(SVGMobject):
}
def __init__(self, text: str, **config): # pylint: disable=redefined-outer-name
+ logger.info(
+ "Text now uses Pango for rendering. "
+ "In case of problems, the old implementation is available as CairoText."
+ )
self.full2short(config)
digest_config(self, config)
self.original_text = text
@@ -711,6 +717,9 @@ class PangoText(SVGMobject):
if self.height is None and self.width is None:
self.scale(TEXT_MOB_SCALE_FACTOR)
+ def __repr__(self):
+ return f"Text({repr(self.original_text)})"
+
def remove_last_M(self, file_name: str): # pylint: disable=invalid-name
"""Internally used. Use to format the rendered SVG files."""
with open(file_name, "r") as fpr:
@@ -816,7 +825,7 @@ class PangoText(SVGMobject):
"""
settings = (
"PANGO" + self.font + self.slant + self.weight
- ) # to differentiate Text and PangoText
+ ) # to differentiate Text and CairoText
settings += str(self.t2f) + str(self.t2s) + str(self.t2w)
settings += str(self.line_spacing) + str(self.size)
id_str = self.text + settings
@@ -914,70 +923,3 @@ class PangoText(SVGMobject):
offset_x += layout.get_extents()[0].x
surface.finish()
return file_name
-
-
-class Text(CairoText):
- """Display (non-LaTeX) text.
-
- Text objects behave like a :class:`.VGroup`-like iterable of all characters
- in the given text. In particular, slicing is possible.
-
- Examples
- --------
- .. manim:: Example1Text
- :save_last_frame:
-
- class Example1Text(Scene):
- def construct(self):
- text = Text('Hello world').scale(3)
- self.add(text)
-
- .. manim:: TextColorExample
- :save_last_frame:
-
- class TextColorExample(Scene):
- def construct(self):
- text1 = Text('Hello world', color=BLUE).scale(3)
- text2 = Text('Hello world', gradient=(BLUE, GREEN)).scale(3).next_to(text1, DOWN)
- self.add(text1, text2)
-
- .. manim:: TextItalicAndBoldExample
- :save_last_frame:
-
- class TextItalicAndBoldExample(Scene):
- def construct(self):
- text0 = Text('Hello world', slant=ITALIC)
- text1 = Text('Hello world', t2s={'world':ITALIC})
- text2 = Text('Hello world', weight=BOLD)
- text3 = Text('Hello world', t2w={'world':BOLD})
- self.add(text0,text1, text2,text3)
- for i,mobj in enumerate(self.mobjects):
- mobj.shift(DOWN*(i-1))
-
-
- .. manim:: TextMoreCustomization
- :save_last_frame:
-
- class TextMoreCustomization(Scene):
- def construct(self):
- text1 = Text(
- 'Google',
- t2c={'[:1]': '#3174f0', '[1:2]': '#e53125',
- '[2:3]': '#fbb003', '[3:4]': '#3174f0',
- '[4:5]': '#269a43', '[5:]': '#e53125'}, size=1.2).scale(3)
- self.add(text1)
-
- .. WARNING::
-
- Using a :class:`.Transform` on text with leading whitespace can look
- `weird <https://github.com/3b1b/manim/issues/1067>`_. Consider using
- :meth:`remove_invisible_chars` to resolve this issue.
-
- """
-
- def __init__(self, text, **config):
- logger.warning(
- "Using Text uses Cairo Toy API to Render Text."
- "Using PangoText is recommended and soon Text would point to PangoText"
- )
- CairoText.__init__(self, text, **config)
diff --git a/manim/mobject/three_d_shading_utils.py b/manim/mobject/three_d_shading_utils.py
deleted file mode 100644
index 25dc41f32..000000000
--- a/manim/mobject/three_d_shading_utils.py
+++ /dev/null
@@ -1,54 +0,0 @@
-"""Utility functions for shading of three-dimensional mobjects."""
-
-import numpy as np
-
-from ..constants import ORIGIN
-from ..utils.space_ops import get_unit_normal
-
-
-def get_3d_vmob_gradient_start_and_end_points(vmob):
- return (
- get_3d_vmob_start_corner(vmob),
- get_3d_vmob_end_corner(vmob),
- )
-
-
-def get_3d_vmob_start_corner_index(vmob):
- return 0
-
-
-def get_3d_vmob_end_corner_index(vmob):
- return ((len(vmob.points) - 1) // 6) * 3
-
-
-def get_3d_vmob_start_corner(vmob):
- if vmob.get_num_points() == 0:
- return np.array(ORIGIN)
- return vmob.points[get_3d_vmob_start_corner_index(vmob)]
-
-
-def get_3d_vmob_end_corner(vmob):
- if vmob.get_num_points() == 0:
- return np.array(ORIGIN)
- return vmob.points[get_3d_vmob_end_corner_index(vmob)]
-
-
-def get_3d_vmob_unit_normal(vmob, point_index):
- n_points = vmob.get_num_points()
- if vmob.get_num_points() == 0:
- return np.array(ORIGIN)
- i = point_index
- im1 = i - 1 if i > 0 else (n_points - 2)
- ip1 = i + 1 if i < (n_points - 1) else 1
- return get_unit_normal(
- vmob.points[ip1] - vmob.points[i],
- vmob.points[im1] - vmob.points[i],
- )
-
-
-def get_3d_vmob_start_corner_unit_normal(vmob):
- return get_3d_vmob_unit_normal(vmob, get_3d_vmob_start_corner_index(vmob))
-
-
-def get_3d_vmob_end_corner_unit_normal(vmob):
- return get_3d_vmob_unit_normal(vmob, get_3d_vmob_end_corner_index(vmob))
diff --git a/manim/mobject/types/image_mobject.py b/manim/mobject/types/image_mobject.py
index a4e11136d..1158872c5 100644
--- a/manim/mobject/types/image_mobject.py
+++ b/manim/mobject/types/image_mobject.py
@@ -27,7 +27,7 @@ class AbstractImageMobject(Mobject):
}
def get_pixel_array(self):
- raise Exception("Not implemented")
+ raise NotImplementedError()
def set_color(self):
# Likely to be implemented in subclasses, but no obgligation
@@ -49,6 +49,22 @@ class AbstractImageMobject(Mobject):
class ImageMobject(AbstractImageMobject):
+ """Displays an Image from a numpy array or a file.
+
+ Example
+ -------
+ .. manim:: ImageFromArray
+ :save_last_frame:
+
+ class ImageFromArray(Scene):
+ def construct(self):
+ image = ImageMobject(np.uint8([[0, 100, 30, 200],
+ [255, 0, 5, 33]]))
+ image.set_height(7)
+ self.add(image)
+
+ """
+
CONFIG = {
"invert": False,
"image_mode": "RGBA",
diff --git a/manim/mobject/types/point_cloud_mobject.py b/manim/mobject/types/point_cloud_mobject.py
index 6c5be357c..f092de718 100644
--- a/manim/mobject/types/point_cloud_mobject.py
+++ b/manim/mobject/types/point_cloud_mobject.py
@@ -39,7 +39,7 @@ class PMobject(Mobject):
color = Color(color) if color else self.color
rgbas = np.repeat([color_to_rgba(color, alpha)], num_new_points, axis=0)
elif len(rgbas) != len(points):
- raise Exception("points and rgbas must have same shape")
+ raise ValueError("points and rgbas must have same shape")
self.rgbas = np.append(self.rgbas, rgbas, axis=0)
return self
@@ -214,7 +214,7 @@ class Mobject2D(PMobject):
class PGroup(PMobject):
def __init__(self, *pmobs, **kwargs):
if not all([isinstance(m, PMobject) for m in pmobs]):
- raise Exception("All submobjects must be of type PMobject")
+ raise ValueError("All submobjects must be of type PMobject")
super().__init__(**kwargs)
self.add(*pmobs)
diff --git a/manim/mobject/types/vectorized_mobject.py b/manim/mobject/types/vectorized_mobject.py
index 1d2dc81f6..8f7546cfe 100644
--- a/manim/mobject/types/vectorized_mobject.py
+++ b/manim/mobject/types/vectorized_mobject.py
@@ -471,7 +471,7 @@ class VMobject(Mobject):
handle2, new_anchor = points
else:
name = sys._getframe(0).f_code.co_name
- raise Exception("Only call {} with 1 or 2 points".format(name))
+ raise ValueError("Only call {} with 1 or 2 points".format(name))
if self.has_new_path_started():
self.add_line_to(new_anchor)
diff --git a/manim/renderer/__init__.py b/manim/renderer/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/manim/renderer/cairo_renderer.py b/manim/renderer/cairo_renderer.py
new file mode 100644
index 000000000..fdecae324
--- /dev/null
+++ b/manim/renderer/cairo_renderer.py
@@ -0,0 +1,218 @@
+import numpy as np
+from .. import config
+from ..utils.iterables import list_update
+from ..utils.exceptions import EndSceneEarlyException
+from ..constants import DEFAULT_WAIT_TIME
+from ..scene.scene_file_writer import SceneFileWriter
+from ..utils.caching import handle_caching_play, handle_caching_wait
+from ..camera.camera import Camera
+
+
+def pass_scene_reference(func):
+ def wrapper(self, scene, *args, **kwargs):
+ func(self, scene, *args, **kwargs)
+
+ return wrapper
+
+
+def handle_play_like_call(func):
+ """
+ This method is used internally to wrap the
+ passed function, into a function that
+ actually writes to the video stream.
+ Simultaneously, it also adds to the number
+ of animations played.
+
+ Parameters
+ ----------
+ func : function
+ The play() like function that has to be
+ written to the video file stream.
+
+ Returns
+ -------
+ function
+ The play() like function that can now write
+ to the video file stream.
+ """
+
+ def wrapper(self, scene, *args, **kwargs):
+ allow_write = not config["skip_animations"]
+ self.file_writer.begin_animation(allow_write)
+ func(self, scene, *args, **kwargs)
+ self.file_writer.end_animation(allow_write)
+ self.num_plays += 1
+
+ return wrapper
+
+
+class CairoRenderer:
+ """A renderer using Cairo.
+
+ num_plays : Number of play() functions in the scene.
+ time: time elapsed since initialisation of scene.
+ """
+
+ def __init__(self, camera_class=None, **kwargs):
+ # All of the following are set to EITHER the value passed via kwargs,
+ # OR the value stored in the global config dict at the time of
+ # _instance construction_. Before, they were in the CONFIG dict, which
+ # is a class attribute and is defined at the time of _class
+ # definition_. This did not allow for creating two Cameras with
+ # different configurations in the same session.
+ self.file_writer = None
+ self.video_quality_config = {}
+ for attr in [
+ "pixel_height",
+ "pixel_width",
+ "frame_height",
+ "frame_width",
+ "frame_rate",
+ ]:
+ self.video_quality_config[attr] = kwargs.get(attr, config[attr])
+ camera_cls = camera_class if camera_class is not None else Camera
+ self.camera = camera_cls(self.video_quality_config)
+ self.original_skipping_status = config["skip_animations"]
+ self.animations_hashes = []
+ self.num_plays = 0
+ self.time = 0
+ self.static_mobject_data = None
+
+ def init(self, scene):
+ self.file_writer = SceneFileWriter(
+ self,
+ self.video_quality_config,
+ scene.__class__.__name__,
+ )
+
+ @pass_scene_reference
+ @handle_caching_play
+ @handle_play_like_call
+ def play(self, scene, *args, **kwargs):
+ scene.play_internal(*args, **kwargs)
+
+ @pass_scene_reference
+ @handle_caching_wait
+ @handle_play_like_call
+ def wait(self, scene, duration=DEFAULT_WAIT_TIME, stop_condition=None):
+ scene.wait_internal(duration=duration, stop_condition=stop_condition)
+
+ def update_frame( # TODO Description in Docstring
+ self,
+ scene,
+ mobjects=None,
+ include_submobjects=True,
+ ignore_skipping=True,
+ **kwargs,
+ ):
+ """Update the frame.
+
+ Parameters
+ ----------
+ mobjects: list, optional
+ list of mobjects
+
+ background: np.ndarray, optional
+ Pixel Array for Background.
+
+ include_submobjects: bool, optional
+
+ ignore_skipping : bool, optional
+
+ **kwargs
+
+ """
+ if config["skip_animations"] and not ignore_skipping:
+ return
+ if mobjects is None:
+ mobjects = list_update(
+ scene.mobjects,
+ scene.foreground_mobjects,
+ )
+ if self.static_mobject_data is not None:
+ self.camera.set_frame_to_background(self.static_mobject_data)
+ else:
+ self.camera.reset()
+
+ kwargs["include_submobjects"] = include_submobjects
+ self.camera.capture_mobjects(mobjects, **kwargs)
+
+ def get_frame(self):
+ """
+ Gets the current frame as NumPy array.
+
+ Returns
+ -------
+ np.array
+ NumPy array of pixel values of each pixel in screen.
+ The shape of the array is height x width x 3
+ """
+ return np.array(self.camera.pixel_array)
+
+ def save_static_mobject_data(self, scene, static_mobjects):
+ self.update_frame(scene, static_mobjects)
+ self.static_mobject_data = self.get_frame()
+
+ def add_frame(self, frame, num_frames=1):
+ """
+ Adds a frame to the video_file_stream
+
+ Parameters
+ ----------
+ frame : numpy.ndarray
+ The frame to add, as a pixel array.
+ num_frames: int
+ The number of times to add frame.
+ """
+ dt = 1 / self.camera.frame_rate
+ self.time += num_frames * dt
+ if config["skip_animations"]:
+ return
+ for _ in range(num_frames):
+ self.file_writer.write_frame(frame)
+
+ def show_frame(self):
+ """
+ Opens the current frame in the Default Image Viewer
+ of your system.
+ """
+ self.update_frame(ignore_skipping=True)
+ self.camera.get_image().show()
+
+ def update_skipping_status(self):
+ """
+ This method is used internally to check if the current
+ animation needs to be skipped or not. It also checks if
+ the number of animations that were played correspond to
+ the number of animations that need to be played, and
+ raises an EndSceneEarlyException if they don't correspond.
+ """
+ if config["from_animation_number"]:
+ if self.num_plays < config["from_animation_number"]:
+ config["skip_animations"] = True
+ if config["upto_animation_number"]:
+ if self.num_plays > config["upto_animation_number"]:
+ config["skip_animations"] = True
+ raise EndSceneEarlyException()
+
+ def revert_to_original_skipping_status(self):
+ """
+ Forces the scene to go back to its original skipping status,
+ by setting skip_animations to whatever it reads
+ from original_skipping_status.
+
+ Returns
+ -------
+ Scene
+ The Scene, with the original skipping status.
+ """
+ if hasattr(self, "original_skipping_status"):
+ config["skip_animations"] = self.original_skipping_status
+ return self
+
+ def finish(self, scene):
+ config["skip_animations"] = False
+ self.file_writer.finish()
+ if config["save_last_frame"]:
+ self.update_frame(scene, ignore_skipping=False)
+ self.file_writer.save_final_image(self.camera.get_image())
diff --git a/manim/scene/graph_scene.py b/manim/scene/graph_scene.py
index 97313e08f..2e5c3a629 100644
--- a/manim/scene/graph_scene.py
+++ b/manim/scene/graph_scene.py
@@ -520,7 +520,7 @@ class GraphScene(Scene):
elif input_sample_type == "center":
sample_input = x + 0.5 * dx
else:
- raise Exception("Invalid input sample type")
+ raise ValueError("Invalid input sample type")
graph_point = self.input_to_graph_point(sample_input, graph)
if bounded_graph == None:
y_point = 0
@@ -1027,7 +1027,7 @@ class GraphScene(Scene):
NOTE: At least one of target_dx and target_x should be not None.
"""
if target_dx is None and target_x is None:
- raise Exception("At least one of target_x and target_dx must not be None")
+ raise ValueError("At least one of target_x and target_dx must not be None")
if added_anims is None:
added_anims = []
diff --git a/manim/scene/js_scene.py b/manim/scene/js_scene.py
index dafa33155..45bb46681 100644
--- a/manim/scene/js_scene.py
+++ b/manim/scene/js_scene.py
@@ -109,7 +109,6 @@ class JsScene(scene.Scene):
logger.error(e)
self.animation_finished.wait()
- @scene.handle_play_like_call
def wait(self, duration=DEFAULT_WAIT_TIME, stop_condition=None):
self.update_mobjects(dt=0) # Any problems with this?
self.animations = []
diff --git a/manim/scene/moving_camera_scene.py b/manim/scene/moving_camera_scene.py
index 31dc76a09..231df40c8 100644
--- a/manim/scene/moving_camera_scene.py
+++ b/manim/scene/moving_camera_scene.py
@@ -11,6 +11,7 @@ __all__ = ["MovingCameraScene"]
from ..camera.moving_camera import MovingCamera
from ..scene.scene import Scene
from ..utils.iterables import list_update
+from ..utils.family import extract_mobject_family_members
class MovingCameraScene(Scene):
@@ -31,8 +32,8 @@ class MovingCameraScene(Scene):
to set up the scene for proper use.
"""
Scene.setup(self)
- assert isinstance(self.camera, MovingCamera)
- self.camera_frame = self.camera.frame
+ assert isinstance(self.renderer.camera, MovingCamera)
+ self.camera_frame = self.renderer.camera.frame
# Hmm, this currently relies on the fact that MovingCamera
# willd default to a full-sized frame. Is that okay?
return self
@@ -48,10 +49,8 @@ class MovingCameraScene(Scene):
The Animations whose mobjects will be checked.
"""
moving_mobjects = Scene.get_moving_mobjects(self, *animations)
- all_moving_mobjects = self.camera.extract_mobject_family_members(
- moving_mobjects
- )
- movement_indicators = self.camera.get_mobjects_indicating_movement()
+ all_moving_mobjects = extract_mobject_family_members(moving_mobjects)
+ movement_indicators = self.renderer.camera.get_mobjects_indicating_movement()
for movement_indicator in movement_indicators:
if movement_indicator in all_moving_mobjects:
# When one of these is moving, the camera should
diff --git a/manim/scene/scene.py b/manim/scene/scene.py
index 779cbd43d..3595c7dda 100644
--- a/manim/scene/scene.py
+++ b/manim/scene/scene.py
@@ -1,7 +1,7 @@
"""Basic canvas for animations."""
-__all__ = ["Scene", "EndSceneEarlyException"]
+__all__ = ["Scene"]
import inspect
@@ -23,39 +23,9 @@ from ..mobject.mobject import Mobject
from ..scene.scene_file_writer import SceneFileWriter
from ..utils.iterables import list_update
from ..utils.hashing import get_hash_from_play_call, get_hash_from_wait_call
-
-
-def handle_play_like_call(func):
- """
- This method is used internally to wrap the
- passed function, into a function that
- actually writes to the video stream.
- Simultaneously, it also adds to the number
- of animations played.
-
- Parameters
- ----------
- func : function
- The play() like function that has to be
- written to the video file stream.
-
- Returns
- -------
- function
- The play() like function that can now write
- to the video file stream.
- """
-
- def wrapper(self, *args, **kwargs):
- allow_write = not config["skip_animations"]
- if not config.use_js_renderer:
- self.file_writer.begin_animation(allow_write)
- func(self, *args, **kwargs)
- if not config.use_js_renderer:
- self.file_writer.end_animation(allow_write)
- self.num_plays += 1
-
- return wrapper
+from ..utils.family import extract_mobject_family_members
+from ..renderer.cairo_renderer import CairoRenderer
+from ..utils.exceptions import EndSceneEarlyException
class Scene(Container):
@@ -82,8 +52,6 @@ class Scene(Container):
file_writer : The object that writes the animations in the scene to a video file.
mobjects : The list of mobjects present in the scene.
foreground_mobjects : List of mobjects explicitly in the foreground.
- num_plays : Number of play() functions in the scene.
- time: time elapsed since initialisation of scene.
random_seed: The seed with which all random operations are done.
"""
@@ -95,18 +63,17 @@ class Scene(Container):
"random_seed": 0,
}
- def __init__(self, **kwargs):
+ def __init__(self, renderer=None, **kwargs):
Container.__init__(self, **kwargs)
- self.camera = self.camera_class()
- if not config.use_js_renderer:
- self.file_writer = SceneFileWriter(self)
- self.animations_hashes = []
+ if renderer is None:
+ self.renderer = CairoRenderer(camera_class=self.camera_class)
+ else:
+ self.renderer = renderer
+ self.renderer.init(self)
self.mobjects = []
# TODO, remove need for foreground mobjects
self.foreground_mobjects = []
- self.num_plays = 0
- self.time = 0
if self.random_seed is not None:
random.seed(self.random_seed)
np.random.seed(self.random_seed)
@@ -122,13 +89,13 @@ class Scene(Container):
self.construct()
except EndSceneEarlyException:
pass
-
self.tear_down()
# We have to reset these settings in case of multiple renders.
config["skip_animations"] = self.original_skipping_status
-
- self.file_writer.finish()
- self.print_end_message()
+ self.renderer.finish(self)
+ logger.info(
+ f"Rendered {str(self)}\nPlayed {self.renderer.num_plays} animations"
+ )
def setup(self):
"""
@@ -156,15 +123,6 @@ class Scene(Container):
def __str__(self):
return self.__class__.__name__
- def print_end_message(self):
- """
- Used internally to print the number of
- animations played after the scene ends,
- as well as the name of the scene rendered
- (useful when using the `-a` option).
- """
- logger.info(f"Rendered {str(self)}\nPlayed {self.num_plays} animations")
-
def set_variables_as_attrs(self, *objects, **newly_named_objects):
"""
This method is slightly hacky, making it a little easier
@@ -196,63 +154,6 @@ class Scene(Container):
"""
return [getattr(self, key) for key in keys]
- def get_frame(self):
- """
- Gets the current frame as NumPy array.
-
- Returns
- -------
- np.array
- NumPy array of pixel values of each pixel in screen.
- The shape of the array is height x width x 3
- """
- return np.array(self.camera.pixel_array)
-
- def update_frame( # TODO Description in Docstring
- self,
- mobjects=None,
- background=None,
- include_submobjects=True,
- ignore_skipping=True,
- **kwargs,
- ):
- """Update the frame.
-
- Parameters
- ----------
- mobjects: list, optional
- list of mobjects
-
- background: np.ndarray, optional
- Pixel Array for Background.
-
- include_submobjects: bool, optional
-
- ignore_skipping : bool, optional
-
- **kwargs
-
- """
- if config["skip_animations"] and not ignore_skipping:
- return
- if mobjects is None:
- mobjects = list_update(
- self.mobjects,
- self.foreground_mobjects,
- )
- if background is not None:
- self.camera.set_frame_to_background(background)
- else:
- self.camera.reset()
-
- kwargs["include_submobjects"] = include_submobjects
- self.camera.capture_mobjects(mobjects, **kwargs)
-
- def freeze_background(self):
- self.update_frame()
- self.camera = Camera(self.get_frame())
- self.clear()
-
###
def update_mobjects(self, dt):
@@ -282,18 +183,6 @@ class Scene(Container):
###
- def increment_time(self, d_time):
- """
- Increments the time elapsed after intialisation of scene by
- passed "d_time".
-
- Parameters
- ----------
- d_time : int or float
- Time in seconds to increment by.
- """
- self.time += d_time
-
###
def get_top_level_mobjects(self):
@@ -328,7 +217,9 @@ class Scene(Container):
list
List of mobject family members.
"""
- return self.camera.extract_mobject_family_members(self.mobjects)
+ return extract_mobject_family_members(
+ self.mobjects, use_z_index=self.renderer.camera.use_z_index
+ )
def add(self, *mobjects):
"""
@@ -417,7 +308,9 @@ class Scene(Container):
The Scene mobject with restructured Mobjects.
"""
if extract_families:
- to_remove = self.camera.extract_mobject_family_members(to_remove)
+ to_remove = extract_mobject_family_members(
+ to_remove, use_z_index=self.renderer.camera.use_z_index
+ )
_list = getattr(self, mobject_list_name)
new_list = self.get_restructured_mobject_list(_list, to_remove)
setattr(self, mobject_list_name, new_list)
@@ -640,6 +533,23 @@ class Scene(Container):
return mobjects[i:]
return []
+ def get_moving_and_static_mobjects(self, animations):
+ all_mobjects = list_update(self.mobjects, self.foreground_mobjects)
+ all_mobject_families = extract_mobject_family_members(
+ all_mobjects,
+ use_z_index=self.renderer.camera.use_z_index,
+ only_those_with_points=True,
+ )
+ moving_mobjects = self.get_moving_mobjects(*animations)
+ all_moving_mobject_families = extract_mobject_family_members(
+ moving_mobjects,
+ use_z_index=self.renderer.camera.use_z_index,
+ )
+ static_mobjects = filter(
+ lambda m: m not in all_moving_mobject_families, all_mobject_families
+ )
+ return all_moving_mobject_families, static_mobjects
+
def get_time_progression(
self, run_time, n_iterations=None, override_skip_animations=False
):
@@ -672,7 +582,7 @@ class Scene(Container):
if config["skip_animations"] and not override_skip_animations:
times = [run_time]
else:
- step = 1 / self.camera.frame_rate
+ step = 1 / self.renderer.camera.frame_rate
times = np.arange(0, run_time, step)
time_progression = ProgressDisplay(
times,
@@ -721,11 +631,12 @@ class Scene(Container):
ProgressDisplay
The CommandLine Progress Bar.
"""
- time_progression = self.get_time_progression(self.run_time)
+ run_time = self.get_run_time(animations)
+ time_progression = self.get_time_progression(run_time)
time_progression.set_description(
"".join(
[
- "Animation {}: ".format(self.num_plays),
+ "Animation {}: ".format(self.renderer.num_plays),
str(animations[0]),
(", etc." if len(animations) > 1 else ""),
]
@@ -795,14 +706,14 @@ class Scene(Container):
elif state["curr_method"] is not None:
state["method_args"].append(arg)
elif isinstance(arg, Mobject):
- raise Exception(
+ raise ValueError(
"""
I think you may have invoked a method
you meant to pass in as a Scene.play argument
- """
+ """
)
else:
- raise Exception("Invalid play arguments")
+ raise ValueError("Invalid play arguments")
compile_method(state)
for animation in animations:
@@ -812,181 +723,13 @@ class Scene(Container):
return animations
- def update_skipping_status(self):
- """
- This method is used internally to check if the current
- animation needs to be skipped or not. It also checks if
- the number of animations that were played correspond to
- the number of animations that need to be played, and
- raises an EndSceneEarlyException if they don't correspond.
- """
- if config["from_animation_number"]:
- if self.num_plays < config["from_animation_number"]:
- config["skip_animations"] = True
- if config["upto_animation_number"]:
- if self.num_plays > config["upto_animation_number"]:
- config["skip_animations"] = True
- raise EndSceneEarlyException()
-
- def handle_caching_play(func):
- """
- Decorator that returns a wrapped version of func that will compute the hash of the play invocation.
-
- The returned function will act according to the computed hash: either skip the animation because it's already cached, or let the invoked function play normally.
-
- Parameters
- ----------
- func : Callable[[...], None]
- The play like function that has to be written to the video file stream. Take the same parameters as `scene.play`.
- """
-
- def wrapper(self, *args, **kwargs):
- self.revert_to_original_skipping_status()
- self.update_skipping_status()
- animations = self.compile_play_args_to_animation_list(*args, **kwargs)
- self.add_mobjects_from_animations(animations)
- if config["skip_animations"]:
- logger.debug(f"Skipping animation {self.num_plays}")
- func(self, *args, **kwargs)
- # If the animation is skipped, we mark its hash as None.
- # When sceneFileWriter will start combining partial movie files, it won't take into account None hashes.
- self.animations_hashes.append(None)
- self.file_writer.add_partial_movie_file(None)
- return
- if not config["disable_caching"]:
- mobjects_on_scene = self.get_mobjects()
- hash_play = get_hash_from_play_call(
- self, self.camera, animations, mobjects_on_scene
- )
- if self.file_writer.is_already_cached(hash_play):
- logger.info(
- f"Animation {self.num_plays} : Using cached data (hash : %(hash_play)s)",
- {"hash_play": hash_play},
- )
- config["skip_animations"] = True
- else:
- hash_play = "uncached_{:05}".format(self.num_plays)
- self.animations_hashes.append(hash_play)
- self.file_writer.add_partial_movie_file(hash_play)
- logger.debug(
- "List of the first few animation hashes of the scene: %(h)s",
- {"h": str(self.animations_hashes[:5])},
- )
- func(self, *args, **kwargs)
-
- return wrapper
-
- def handle_caching_wait(func):
- """
- Decorator that returns a wrapped version of func that will compute the hash of the wait invocation.
-
- The returned function will act according to the computed hash: either skip the animation because it's already cached, or let the invoked function play normally.
-
- Parameters
- ----------
- func : Callable[[...], None]
- The wait like function that has to be written to the video file stream. Take the same parameters as `scene.wait`.
- """
-
- def wrapper(self, duration=DEFAULT_WAIT_TIME, stop_condition=None):
- self.revert_to_original_skipping_status()
- self.update_skipping_status()
- if config["skip_animations"]:
- logger.debug(f"Skipping wait {self.num_plays}")
- func(self, duration, stop_condition)
- # If the animation is skipped, we mark its hash as None.
- # When sceneFileWriter will start combining partial movie files, it won't take into account None hashes.
- self.animations_hashes.append(None)
- self.file_writer.add_partial_movie_file(None)
- return
- if not config["disable_caching"]:
- hash_wait = get_hash_from_wait_call(
- self, self.camera, duration, stop_condition, self.get_mobjects()
- )
- if self.file_writer.is_already_cached(hash_wait):
- logger.info(
- f"Wait {self.num_plays} : Using cached data (hash : {hash_wait})"
- )
- config["skip_animations"] = True
- else:
- hash_wait = "uncached_{:05}".format(self.num_plays)
- self.animations_hashes.append(hash_wait)
- self.file_writer.add_partial_movie_file(hash_wait)
- logger.debug(
- "Animations hashes list of the scene : (concatened to 5) %(h)s",
- {"h": str(self.animations_hashes[:5])},
- )
- func(self, duration, stop_condition)
-
- return wrapper
-
- def begin_animations(self, animations):
- """
- This method begins the list of animations that is passed,
- and adds any mobjects involved (if not already present)
- to the scene again.
-
- Parameters
- ----------
- animations : list
- List of involved animations.
-
- """
- for animation in animations:
- # Begin animation
- animation.begin()
-
- def progress_through_animations(self):
- """
- This method progresses through each animation
- in the list passed and and updates the frames as required.
- """
- for t in self.get_animation_time_progression(self.animations):
- self.update_animation_to_time(t)
- self.update_frame(self.moving_mobjects, self.static_image)
- self.add_frame(self.get_frame())
-
- def update_animation_to_time(self, t):
- """
- Updates the current animation to the specified time.
-
- Parameters
- ----------
- t : int
- Offset from the start of the animation to which to update the current
- animation.
- """
- dt = t - self.last_t
- self.last_t = t
- for animation in self.animations:
- animation.update_mobjects(dt)
- alpha = t / animation.run_time
- animation.interpolate(alpha)
- self.update_mobjects(dt)
-
- def finish_animations(self, animations):
- """
- This function cleans up after the end
- of each animation in the passed list.
+ def play(self, *args, **kwargs):
+ self.renderer.play(self, *args, **kwargs)
- Parameters
- ----------
- animations : list
- list of animations to finish.
- """
- for animation in animations:
- animation.finish()
- animation.clean_up_from_scene(self)
- self.mobjects_from_last_animation = [anim.mobject for anim in animations]
- if config["skip_animations"]:
- # TODO, run this call in for each animation?
- self.update_mobjects(self.get_run_time(animations))
- else:
- self.update_mobjects(0)
+ def wait(self, duration=DEFAULT_WAIT_TIME, stop_condition=None):
+ self.renderer.wait(self, duration=duration, stop_condition=stop_condition)
- @handle_caching_play
- @handle_play_like_call
- def play(self, *args, **kwargs):
+ def play_internal(self, *args, **kwargs):
"""
This method is used to prep the animations for rendering,
apply the arguments and parameters required to them,
@@ -994,63 +737,68 @@ class Scene(Container):
Parameters
----------
- *args : Animation or mobject with mobject method and params
- **kwargs : named parameters affecting what was passed in *args e.g run_time, lag_ratio etc.
+ args
+ Animation or mobject with mobject method and params
+ kwargs
+ named parameters affecting what was passed in ``args`` e.g. ``run_time``, ``lag_ratio`` etc.
"""
if len(args) == 0:
warnings.warn("Called Scene.play with no animations")
return
- self.animations = self.compile_play_args_to_animation_list(*args, **kwargs)
- self.begin_animations(self.animations)
+
+ animations = self.compile_play_args_to_animation_list(*args, **kwargs)
+ for animation in animations:
+ animation.begin()
# Paint all non-moving objects onto the screen, so they don't
# have to be rendered every frame
- self.moving_mobjects = self.get_moving_mobjects(*self.animations)
- self.update_frame(excluded_mobjects=self.moving_mobjects)
- self.static_image = self.get_frame()
- self.last_t = 0
- self.run_time = self.get_run_time(self.animations)
-
- self.progress_through_animations()
-
- self.finish_animations(self.animations)
-
- def clean_up_animations(self, *animations):
- """
- This method cleans up and removes from the
- scene all the animations that were passed
-
- Parameters
- ----------
- *animations : Animation
- Animation to clean up.
-
- Returns
- -------
- Scene
- The scene with the animations
- cleaned up.
+ moving_mobjects, static_mobjects = self.get_moving_and_static_mobjects(
+ animations
+ )
+ self.renderer.save_static_mobject_data(self, static_mobjects)
+
+ last_t = 0
+ for t in self.get_animation_time_progression(animations):
+ dt = t - last_t
+ last_t = t
+ for animation in animations:
+ animation.update_mobjects(dt)
+ alpha = t / animation.run_time
+ animation.interpolate(alpha)
+ self.update_mobjects(dt)
+ self.renderer.update_frame(self, moving_mobjects)
+ self.renderer.add_frame(self.renderer.get_frame())
- """
for animation in animations:
+ animation.finish()
animation.clean_up_from_scene(self)
- return self
-
- def get_mobjects_from_last_animation(self):
- """
- This method returns the mobjects from the previous
- played animation, if any exist, and returns an empty
- list if not.
- Returns
- --------
- list
- The list of mobjects from the previous animation.
+ def wait_internal(self, duration=DEFAULT_WAIT_TIME, stop_condition=None):
+ self.update_mobjects(dt=0) # Any problems with this?
+ self.duration = duration
+ self.stop_condition = stop_condition
+ last_t = 0
- """
- if hasattr(self, "mobjects_from_last_animation"):
- return self.mobjects_from_last_animation
- return []
+ if self.should_update_mobjects():
+ time_progression = self.get_wait_time_progression(duration, stop_condition)
+ # TODO, be smart about setting a static image
+ # the same way Scene.play does
+ for t in time_progression:
+ dt = t - last_t
+ last_t = t
+ self.update_mobjects(dt)
+ self.renderer.update_frame(self)
+ self.renderer.add_frame(self.renderer.get_frame())
+ if stop_condition is not None and stop_condition():
+ time_progression.close()
+ break
+ else:
+ self.renderer.update_frame(self)
+ dt = 1 / self.renderer.camera.frame_rate
+ self.renderer.add_frame(
+ self.renderer.get_frame(), num_frames=int(duration / dt)
+ )
+ return self
def get_wait_time_progression(self, duration, stop_condition):
"""
@@ -1082,55 +830,11 @@ class Scene(Container):
)
else:
time_progression = self.get_time_progression(duration)
- time_progression.set_description("Waiting {}".format(self.num_plays))
+ time_progression.set_description(
+ "Waiting {}".format(self.renderer.num_plays)
+ )
return time_progression
- @handle_caching_wait
- @handle_play_like_call
- def wait(self, duration=DEFAULT_WAIT_TIME, stop_condition=None):
- """
- This method is used to wait, and do nothing to the scene, for some
- duration.
- Updaters stop updating, nothing happens.
-
- Parameters
- ----------
- duration : float or int, optional
- The duration of wait time.
- stop_condition :
- A function that determines whether to stop waiting or not.
-
- Returns
- -------
- Scene
- The scene, after waiting.
- """
- self.update_mobjects(dt=0) # Any problems with this?
- self.animations = []
- self.duration = duration
- self.stop_condition = stop_condition
- self.last_t = 0
-
- if self.should_update_mobjects():
- time_progression = self.get_wait_time_progression(duration, stop_condition)
- # TODO, be smart about setting a static image
- # the same way Scene.play does
- for t in time_progression:
- self.update_animation_to_time(t)
- self.update_frame()
- self.add_frame(self.get_frame())
- if stop_condition is not None and stop_condition():
- time_progression.close()
- break
- elif self.skip_animations:
- # Do nothing
- return self
- else:
- self.update_frame()
- dt = 1 / self.camera.frame_rate
- self.add_frame(self.get_frame(), num_frames=int(duration / dt))
- return self
-
def wait_until(self, stop_condition, max_time=60):
"""
Like a wrapper for wait().
@@ -1147,55 +851,6 @@ class Scene(Container):
"""
self.wait(max_time, stop_condition=stop_condition)
- def force_skipping(self):
- """
- This forces the skipping of animations,
- by setting original_skipping_status to
- whatever skip_animations was, and setting
- skip_animations to True.
-
- Returns
- -------
- Scene
- The Scene, with skipping turned on.
- """
- self.original_skipping_status = config["skip_animations"]
- config["skip_animations"] = True
- return self
-
- def revert_to_original_skipping_status(self):
- """
- Forces the scene to go back to its original skipping status,
- by setting skip_animations to whatever it reads
- from original_skipping_status.
-
- Returns
- -------
- Scene
- The Scene, with the original skipping status.
- """
- if hasattr(self, "original_skipping_status"):
- config["skip_animations"] = self.original_skipping_status
- return self
-
- def add_frame(self, frame, num_frames=1):
- """
- Adds a frame to the video_file_stream
-
- Parameters
- ----------
- frame : numpy.ndarray
- The frame to add, as a pixel array.
- num_frames: int
- The number of times to add frame.
- """
- dt = 1 / self.camera.frame_rate
- self.increment_time(num_frames * dt)
- if config["skip_animations"]:
- return
- for _ in range(num_frames):
- self.file_writer.write_frame(frame)
-
def add_sound(self, sound_file, time_offset=0, gain=None, **kwargs):
"""
This method is used to add a sound to the animation.
@@ -1215,16 +870,4 @@ class Scene(Container):
if config["skip_animations"]:
return
time = self.time + time_offset
- self.file_writer.add_sound(sound_file, time, gain, **kwargs)
-
- def show_frame(self):
- """
- Opens the current frame in the Default Image Viewer
- of your system.
- """
- self.update_frame(ignore_skipping=True)
- self.camera.get_image().show()
-
-
-class EndSceneEarlyException(Exception):
- pass
+ self.renderer.file_writer.add_sound(sound_file, time, gain, **kwargs)
diff --git a/manim/scene/scene_file_writer.py b/manim/scene/scene_file_writer.py
index b3dadbf75..b73753f80 100644
--- a/manim/scene/scene_file_writer.py
+++ b/manim/scene/scene_file_writer.py
@@ -42,24 +42,25 @@ class SceneFileWriter(object):
"""
- def __init__(self, scene, **kwargs):
+ def __init__(self, renderer, video_quality_config, scene_name, **kwargs):
digest_config(self, kwargs)
- self.scene = scene
+ self.renderer = renderer
+ self.video_quality_config = video_quality_config
self.stream_lock = False
- self.init_output_directories()
+ self.init_output_directories(scene_name)
self.init_audio()
self.frame_count = 0
self.partial_movie_files = []
# Output directories and files
- def init_output_directories(self):
+ def init_output_directories(self, scene_name):
"""
This method initialises the directories to which video
files will be written to and read from (within MEDIA_DIR).
If they don't already exist, they will be created.
"""
module_directory = self.get_default_module_directory()
- scene_name = self.get_default_scene_name()
+ default_name = self.get_default_scene_name(scene_name)
if config["save_last_frame"] or config["save_pngs"]:
if config["media_dir"] != "":
if not config["custom_folders"]:
@@ -72,7 +73,7 @@ class SceneFileWriter(object):
else:
image_dir = guarantee_existence(config["images_dir"])
self.image_file_path = os.path.join(
- image_dir, add_extension_if_not_present(scene_name, ".png")
+ image_dir, add_extension_if_not_present(default_name, ".png")
)
if config["write_to_movie"]:
@@ -91,18 +92,19 @@ class SceneFileWriter(object):
self.movie_file_path = os.path.join(
movie_dir,
add_extension_if_not_present(
- scene_name, config["movie_file_extension"]
+ default_name, config["movie_file_extension"]
),
)
self.gif_file_path = os.path.join(
- movie_dir, add_extension_if_not_present(scene_name, GIF_FILE_EXTENSION)
+ movie_dir,
+ add_extension_if_not_present(default_name, GIF_FILE_EXTENSION),
)
if not config["custom_folders"]:
self.partial_movie_directory = guarantee_existence(
os.path.join(
movie_dir,
"partial_movie_files",
- scene_name,
+ default_name,
)
)
else:
@@ -111,7 +113,7 @@ class SceneFileWriter(object):
config["media_dir"],
"temp_files",
"partial_movie_files",
- scene_name,
+ default_name,
)
)
@@ -154,7 +156,7 @@ class SceneFileWriter(object):
root, _ = os.path.splitext(filename)
return root
- def get_default_scene_name(self):
+ def get_default_scene_name(self, scene_name):
"""
This method returns the default scene name
which is the value of "output_file", if it exists and
@@ -167,7 +169,7 @@ class SceneFileWriter(object):
The default scene name.
"""
fn = config["output_file"]
- return fn if fn else self.scene.__class__.__name__
+ return fn if fn else scene_name
def get_resolution_directory(self):
"""Get the name of the resolution directory directly containing
@@ -194,8 +196,8 @@ class SceneFileWriter(object):
:class:`str`
The name of the directory.
"""
- pixel_height = self.scene.camera.pixel_height
- frame_rate = self.scene.camera.frame_rate
+ pixel_height = self.video_quality_config["pixel_height"]
+ frame_rate = self.video_quality_config["frame_rate"]
return "{}p{}".format(pixel_height, frame_rate)
# Directory getters
@@ -262,7 +264,7 @@ class SceneFileWriter(object):
if time is None:
time = curr_end
if time < 0:
- raise Exception("Adding sound at timestamp < 0")
+ raise ValueError("Adding sound at timestamp < 0")
new_end = time + new_segment.duration_seconds
diff = new_end - curr_end
@@ -373,7 +375,7 @@ class SceneFileWriter(object):
self.add_frame(*[frame] * n_frames)
b = datetime.datetime.now()
time_diff = (b - a).total_seconds()
- frame_duration = 1 / self.scene.camera.frame_rate
+ frame_duration = 1 / self.video_quality_config["frame_rate"]
if time_diff < frame_duration:
sleep(frame_duration - time_diff)
@@ -393,9 +395,6 @@ class SceneFileWriter(object):
self.flush_cache_directory()
else:
self.clean_cache()
- if config["save_last_frame"]:
- self.scene.update_frame(ignore_skipping=False)
- self.save_final_image(self.scene.camera.get_image())
def open_movie_pipe(self):
"""
@@ -403,7 +402,7 @@ class SceneFileWriter(object):
FFMPEG and begin writing to FFMPEG's input
buffer.
"""
- file_path = self.partial_movie_files[self.scene.num_plays]
+ file_path = self.partial_movie_files[self.renderer.num_plays]
# TODO #486 Why does ffmpeg need temp files ?
temp_file_path = (
@@ -412,9 +411,9 @@ class SceneFileWriter(object):
self.partial_movie_file_path = file_path
self.temp_partial_movie_file_path = temp_file_path
- fps = self.scene.camera.frame_rate
- height = self.scene.camera.pixel_height
- width = self.scene.camera.pixel_width
+ fps = self.video_quality_config["frame_rate"]
+ height = self.video_quality_config["pixel_height"]
+ width = self.video_quality_config["pixel_width"]
command = [
FFMPEG_BIN,
@@ -465,7 +464,7 @@ class SceneFileWriter(object):
self.partial_movie_file_path,
)
logger.info(
- f"Animation {self.scene.num_plays} : Partial movie file written in %(path)s",
+ f"Animation {self.renderer.num_plays} : Partial movie file written in %(path)s",
{"path": {self.partial_movie_file_path}},
)
diff --git a/manim/scene/three_d_scene.py b/manim/scene/three_d_scene.py
index 26dbf5ed2..5065899f5 100644
--- a/manim/scene/three_d_scene.py
+++ b/manim/scene/three_d_scene.py
@@ -53,13 +53,13 @@ class ThreeDScene(Scene):
The rotation of the camera about the vector from the ORIGIN to the Camera.
"""
if phi is not None:
- self.camera.set_phi(phi)
+ self.renderer.camera.set_phi(phi)
if theta is not None:
- self.camera.set_theta(theta)
+ self.renderer.camera.set_theta(theta)
if distance is not None:
- self.camera.set_distance(distance)
+ self.renderer.camera.set_distance(distance)
if gamma is not None:
- self.camera.set_gamma(gamma)
+ self.renderer.camera.set_gamma(gamma)
def begin_ambient_camera_rotation(self, rate=0.02):
"""
@@ -74,17 +74,17 @@ class ThreeDScene(Scene):
"""
# TODO, use a ValueTracker for rate, so that it
# can begin and end smoothly
- self.camera.theta_tracker.add_updater(
+ self.renderer.camera.theta_tracker.add_updater(
lambda m, dt: m.increment_value(rate * dt)
)
- self.add(self.camera.theta_tracker)
+ self.add(self.renderer.camera.theta_tracker)
def stop_ambient_camera_rotation(self):
"""
This method stops all ambient camera rotation.
"""
- self.camera.theta_tracker.clear_updaters()
- self.remove(self.camera.theta_tracker)
+ self.renderer.camera.theta_tracker.clear_updaters()
+ self.remove(self.renderer.camera.theta_tracker)
def begin_3dillusion_camera_rotation(
self, rate=1, origin_theta=-60 * DEGREES, origin_phi=75 * DEGREES
@@ -96,8 +96,8 @@ class ThreeDScene(Scene):
val_for_left_right = 0.2 * np.sin(val_tracker_theta.get_value())
return m.set_value(origin_theta + val_for_left_right)
- self.camera.theta_tracker.add_updater(uptate_theta)
- self.add(self.camera.theta_tracker)
+ self.renderer.camera.theta_tracker.add_updater(uptate_theta)
+ self.add(self.renderer.camera.theta_tracker)
val_tracker_phi = ValueTracker(0)
@@ -106,17 +106,17 @@ class ThreeDScene(Scene):
val_for_up_down = 0.1 * np.cos(val_tracker_phi.get_value())
return m.set_value(origin_phi + val_for_up_down)
- self.camera.phi_tracker.add_updater(update_phi)
- self.add(self.camera.phi_tracker)
+ self.renderer.camera.phi_tracker.add_updater(update_phi)
+ self.add(self.renderer.camera.phi_tracker)
def stop_3dillusion_camera_rotation(self):
"""
This method stops all illusion camera rotations.
"""
- self.camera.theta_tracker.clear_updaters()
- self.remove(self.camera.theta_tracker)
- self.camera.phi_tracker.clear_updaters()
- self.remove(self.camera.phi_tracker)
+ self.renderer.camera.theta_tracker.clear_updaters()
+ self.remove(self.renderer.camera.theta_tracker)
+ self.renderer.camera.phi_tracker.clear_updaters()
+ self.remove(self.renderer.camera.phi_tracker)
def move_camera(
self,
@@ -155,16 +155,18 @@ class ThreeDScene(Scene):
"""
anims = []
value_tracker_pairs = [
- (phi, self.camera.phi_tracker),
- (theta, self.camera.theta_tracker),
- (distance, self.camera.distance_tracker),
- (gamma, self.camera.gamma_tracker),
+ (phi, self.renderer.camera.phi_tracker),
+ (theta, self.renderer.camera.theta_tracker),
+ (distance, self.renderer.camera.distance_tracker),
+ (gamma, self.renderer.camera.gamma_tracker),
]
for value, tracker in value_tracker_pairs:
if value is not None:
anims.append(ApplyMethod(tracker.set_value, value, **kwargs))
if frame_center is not None:
- anims.append(ApplyMethod(self.camera.frame_center.move_to, frame_center))
+ anims.append(
+ ApplyMethod(self.renderer.camera.frame_center.move_to, frame_center)
+ )
self.play(*anims + added_anims)
@@ -179,7 +181,7 @@ class ThreeDScene(Scene):
The animations whose mobjects will be checked.
"""
moving_mobjects = Scene.get_moving_mobjects(self, *animations)
- camera_mobjects = self.camera.get_value_trackers()
+ camera_mobjects = self.renderer.camera.get_value_trackers()
if any([cm in moving_mobjects for cm in camera_mobjects]):
return self.mobjects
return moving_mobjects
@@ -203,7 +205,7 @@ class ThreeDScene(Scene):
center_func : function
"""
self.add(*mobjects)
- self.camera.add_fixed_orientation_mobjects(*mobjects, **kwargs)
+ self.renderer.camera.add_fixed_orientation_mobjects(*mobjects, **kwargs)
def add_fixed_in_frame_mobjects(self, *mobjects):
"""
@@ -218,7 +220,7 @@ class ThreeDScene(Scene):
The Mobjects whose orientation must be fixed.
"""
self.add(*mobjects)
- self.camera.add_fixed_in_frame_mobjects(*mobjects)
+ self.renderer.camera.add_fixed_in_frame_mobjects(*mobjects)
def remove_fixed_orientation_mobjects(self, *mobjects):
"""
@@ -232,7 +234,7 @@ class ThreeDScene(Scene):
*mobjects : Mobjects
The Mobjects whose orientation must be unfixed.
"""
- self.camera.remove_fixed_orientation_mobjects(*mobjects)
+ self.renderer.camera.remove_fixed_orientation_mobjects(*mobjects)
def remove_fixed_in_frame_mobjects(self, *mobjects):
"""
@@ -245,7 +247,7 @@ class ThreeDScene(Scene):
*mobjects : Mobjects
The Mobjects whose position and orientation must be unfixed.
"""
- self.camera.remove_fixed_in_frame_mobjects(*mobjects)
+ self.renderer.camera.remove_fixed_in_frame_mobjects(*mobjects)
##
def set_to_default_angled_camera_orientation(self, **kwargs):
@@ -305,7 +307,7 @@ class SpecialThreeDScene(ThreeDScene):
def __init__(self, **kwargs):
digest_config(self, kwargs)
- if self.camera_config["pixel_width"] == config["pixel_width"]:
+ if self.renderer.camera_config["pixel_width"] == config["pixel_width"]:
config = {}
else:
config = self.low_quality_config
diff --git a/manim/scene/vector_space_scene.py b/manim/scene/vector_space_scene.py
index 5d0f18720..464062459 100644
--- a/manim/scene/vector_space_scene.py
+++ b/manim/scene/vector_space_scene.py
@@ -109,7 +109,10 @@ class VectorScene(Scene):
axes.set_color(WHITE)
axes.fade(axes_dimness)
self.add(axes)
- self.freeze_background()
+
+ self.renderer.update_frame()
+ self.renderer.camera = Camera(self.renderer.get_frame())
+ self.clear()
def get_vector(self, numerical_vector, **kwargs):
"""
@@ -398,13 +401,14 @@ class VectorScene(Scene):
)
)
self.play(ShowCreation(x_line))
- self.play(
+ animations = [
ApplyFunction(
lambda y: self.position_y_coordinate(y, y_line, vector), y_coord
),
FadeOut(array.get_brackets()),
- )
- y_coord, brackets = self.get_mobjects_from_last_animation()
+ ]
+ self.play(*animations)
+ y_coord, _ = [anim.mobject for anim in animations]
self.play(ShowCreation(y_line))
self.play(ShowCreation(arrow))
self.wait()
@@ -868,7 +872,7 @@ class LinearTransformationScene(VectorScene):
new_matrix[:2, :2] = transposed_matrix
transposed_matrix = new_matrix
elif transposed_matrix.shape != (3, 3):
- raise Exception("Matrix has bad dimensions")
+ raise ValueError("Matrix has bad dimensions")
return lambda point: np.dot(point, transposed_matrix)
def get_piece_movement(self, pieces):
diff --git a/manim/scene/zoomed_scene.py b/manim/scene/zoomed_scene.py
index acbf1997f..e88bfa504 100644
--- a/manim/scene/zoomed_scene.py
+++ b/manim/scene/zoomed_scene.py
@@ -47,7 +47,7 @@ class ZoomedScene(MovingCameraScene):
"""
MovingCameraScene.setup(self)
# Initialize camera and display
- zoomed_camera = MovingCamera(**self.zoomed_camera_config)
+ zoomed_camera = MovingCamera({}, **self.zoomed_camera_config)
zoomed_display = ImageMobjectFromCamera(
zoomed_camera, **self.zoomed_camera_image_mobject_config
)
@@ -81,7 +81,7 @@ class ZoomedScene(MovingCameraScene):
of the zoomed camera.
"""
self.zoom_activated = True
- self.camera.add_image_mobject_from_camera(self.zoomed_display)
+ self.renderer.camera.add_image_mobject_from_camera(self.zoomed_display)
if animate:
self.play(self.get_zoom_in_animation())
self.play(self.get_zoomed_display_pop_out_animation())
diff --git a/manim/utils/caching.py b/manim/utils/caching.py
new file mode 100644
index 000000000..e14fa5ece
--- /dev/null
+++ b/manim/utils/caching.py
@@ -0,0 +1,102 @@
+from .. import config, logger
+from ..utils.hashing import get_hash_from_play_call, get_hash_from_wait_call
+from ..constants import DEFAULT_WAIT_TIME
+
+
+def handle_caching_play(func):
+ """Decorator that returns a wrapped version of func that will compute
+ the hash of the play invocation.
+
+ The returned function will act according to the computed hash: either skip
+ the animation because it's already cached, or let the invoked function
+ play normally.
+
+ Parameters
+ ----------
+ func : Callable[[...], None]
+ The play like function that has to be written to the video file stream.
+ Take the same parameters as `scene.play`.
+ """
+
+ def wrapper(self, scene, *args, **kwargs):
+ self.revert_to_original_skipping_status()
+ self.update_skipping_status()
+ animations = scene.compile_play_args_to_animation_list(*args, **kwargs)
+ scene.add_mobjects_from_animations(animations)
+ if config["skip_animations"]:
+ logger.debug(f"Skipping animation {self.num_plays}")
+ func(self, scene, *args, **kwargs)
+ # If the animation is skipped, we mark its hash as None.
+ # When sceneFileWriter will start combining partial movie files, it won't take into account None hashes.
+ self.animations_hashes.append(None)
+ self.file_writer.add_partial_movie_file(None)
+ return
+ if not config["disable_caching"]:
+ mobjects_on_scene = scene.get_mobjects()
+ hash_play = get_hash_from_play_call(
+ self, self.camera, animations, mobjects_on_scene
+ )
+ if self.file_writer.is_already_cached(hash_play):
+ logger.info(
+ f"Animation {self.num_plays} : Using cached data (hash : %(hash_play)s)",
+ {"hash_play": hash_play},
+ )
+ config["skip_animations"] = True
+ else:
+ hash_play = "uncached_{:05}".format(self.num_plays)
+ self.animations_hashes.append(hash_play)
+ self.file_writer.add_partial_movie_file(hash_play)
+ logger.debug(
+ "List of the first few animation hashes of the scene: %(h)s",
+ {"h": str(self.animations_hashes[:5])},
+ )
+ func(self, scene, *args, **kwargs)
+
+ return wrapper
+
+
+def handle_caching_wait(func):
+ """Decorator that returns a wrapped version of func that will compute the hash of
+ the wait invocation.
+
+ The returned function will act according to the computed hash: either skip the
+ animation because it's already cached, or let the invoked function play normally.
+
+ Parameters
+ ----------
+ func : Callable[[...], None]
+ The wait like function that has to be written to the video file stream.
+ Take the same parameters as `scene.wait`.
+ """
+
+ def wrapper(self, scene, duration=DEFAULT_WAIT_TIME, stop_condition=None):
+ self.revert_to_original_skipping_status()
+ self.update_skipping_status()
+ if config["skip_animations"]:
+ logger.debug(f"Skipping wait {self.num_plays}")
+ func(self, scene, duration, stop_condition)
+ # If the animation is skipped, we mark its hash as None.
+ # When sceneFileWriter will start combining partial movie files, it won't take into account None hashes.
+ self.animations_hashes.append(None)
+ self.file_writer.add_partial_movie_file(None)
+ return
+ if not config["disable_caching"]:
+ hash_wait = get_hash_from_wait_call(
+ self, self.camera, duration, stop_condition, scene.get_mobjects()
+ )
+ if self.file_writer.is_already_cached(hash_wait):
+ logger.info(
+ f"Wait {self.num_plays} : Using cached data (hash : {hash_wait})"
+ )
+ config["skip_animations"] = True
+ else:
+ hash_wait = "uncached_{:05}".format(self.num_plays)
+ self.animations_hashes.append(hash_wait)
+ self.file_writer.add_partial_movie_file(hash_wait)
+ logger.debug(
+ "List of the first few animation hashes of the scene: %(h)s",
+ {"h": str(self.animations_hashes[:5])},
+ )
+ func(self, scene, duration, stop_condition)
+
+ return wrapper
diff --git a/manim/utils/color.py b/manim/utils/color.py
index e7ca3ce3d..e6506cc80 100644
--- a/manim/utils/color.py
+++ b/manim/utils/color.py
@@ -264,7 +264,7 @@ def color_to_rgb(color):
elif isinstance(color, Color):
return np.array(color.get_rgb())
else:
- raise Exception("Invalid color type")
+ raise ValueError("Invalid color type")
def color_to_rgba(color, alpha=1):
diff --git a/manim/utils/exceptions.py b/manim/utils/exceptions.py
new file mode 100644
index 000000000..0326f46df
--- /dev/null
+++ b/manim/utils/exceptions.py
@@ -0,0 +1,2 @@
+class EndSceneEarlyException(Exception):
+ pass
diff --git a/manim/utils/family.py b/manim/utils/family.py
new file mode 100644
index 000000000..428f2c816
--- /dev/null
+++ b/manim/utils/family.py
@@ -0,0 +1,33 @@
+import itertools as it
+
+from ..mobject.mobject import Mobject
+from ..utils.iterables import remove_list_redundancies
+
+
+def extract_mobject_family_members(
+ mobjects, use_z_index=False, only_those_with_points=False
+):
+ """Returns a list of the types of mobjects and their family members present.
+ A "family" in this context refers to a mobject, its submobjects, and their
+ submobjects, recursively.
+
+ Parameters
+ ----------
+ mobjects : Mobject
+ The Mobjects currently in the Scene
+ only_those_with_points : bool, optional
+ Whether or not to only do this for
+ those mobjects that have points. By default False
+
+ Returns
+ -------
+ list
+ list of the mobjects and family members.
+ """
+ if only_those_with_points:
+ method = Mobject.family_members_with_points
+ else:
+ method = Mobject.get_family
+ if use_z_index:
+ mobjects = sorted(mobjects, key=lambda m: m.z_index)
+ return remove_list_redundancies(list(it.chain(*[method(m) for m in mobjects])))
diff --git a/manim/utils/module_ops.py b/manim/utils/module_ops.py
index a5b2f6f46..455e3ee45 100644
--- a/manim/utils/module_ops.py
+++ b/manim/utils/module_ops.py
@@ -4,6 +4,7 @@ import inspect
import os
import sys
import types
+import re
def get_module(file_name):
@@ -28,7 +29,7 @@ def get_module(file_name):
else:
if os.path.exists(file_name):
if file_name[-3:] != ".py":
- raise Exception(f"{file_name} is not a valid Manim python script.")
+ raise ValueError(f"{file_name} is not a valid Manim python script.")
module_name = file_name[:-3].replace(os.sep, ".").split(".")[-1]
spec = importlib.util.spec_from_file_location(module_name, file_name)
module = importlib.util.module_from_spec(spec)
diff --git a/manim/utils/rate_functions.py b/manim/utils/rate_functions.py
index dfd1a0c4d..d5e270c77 100644
--- a/manim/utils/rate_functions.py
+++ b/manim/utils/rate_functions.py
@@ -1,4 +1,50 @@
-"""A selection of rate functions, i.e., *speed curves* for animations."""
+"""A selection of rate functions, i.e., *speed curves* for animations.
+Please find a standard list at https://easings.net/. Here is a picture for the non-standard ones
+
+.. image:: /_static/non_standard_rate_funcs.png
+ :alt: Non-standard rate functions
+
+
+There are primarily 3 kinds of standard easing functions:
+
+#. Ease In - The animation has a smooth start.
+#. Ease Out - The animation has a smooth end.
+#. Ease In Out - The animation has a smooth start as well as smooth end.
+
+.. note:: The standard functions are not exported, so to use them you do something like this:
+ rate_func=rate_functions.ease_in_sine
+ On the other hand, the non-standard functions, which are used more commonly, are exported and can be used directly.
+
+.. manim:: RateFunctions1Example
+
+ class RateFunctions1Example(Scene):
+ def construct(self):
+ line1 = Line(3*LEFT, 3*RIGHT).shift(UP).set_color(RED)
+ line2 = Line(3*LEFT, 3*RIGHT).set_color(GREEN)
+ line3 = Line(3*LEFT, 3*RIGHT).shift(DOWN).set_color(BLUE)
+
+ dot1 = Dot().move_to(line1.get_left())
+ dot2 = Dot().move_to(line2.get_left())
+ dot3 = Dot().move_to(line3.get_left())
+
+ label1 = Tex("Ease In").next_to(line1, RIGHT)
+ label2 = Tex("Ease out").next_to(line2, RIGHT)
+ label3 = Tex("Ease In Out").next_to(line3, RIGHT)
+
+ self.play(
+ FadeIn(VGroup(line1, line2, line3),
+ FadeIn(VGroup(dot1, dot2, dot3))),
+ Write(VGroup(label1, label2, label3)),
+ )
+ self.play(
+ MoveAlongPath(dot1, line1, rate_func=rate_functions.ease_in_sine),
+ MoveAlongPath(dot2, line2, rate_func=rate_functions.ease_out_sine),
+ MoveAlongPath(dot3, line3, rate_func=rate_functions.ease_in_out_sine),
+ run_time=7
+ )
+ self.wait()
+"""
+
__all__ = [
"linear",
@@ -18,6 +64,8 @@ __all__ = [
]
+from math import sqrt
+
import numpy as np
from ..utils.bezier import bezier
@@ -115,3 +163,180 @@ def exponential_decay(t, half_life=0.1):
# The half-life should be rather small to minimize
# the cut-off error at the end
return 1 - np.exp(-t / half_life)
+
+
+def ease_in_sine(t):
+ return 1 - np.cos((t * np.pi) / 2)
+
+
+def ease_out_sine(t):
+ return np.sin((t * np.pi) / 2)
+
+
+def ease_in_out_sine(t):
+ return -(np.cos(np.pi * t) - 1) / 2
+
+
+def ease_in_quad(t):
+ return t * t
+
+
+def ease_out_quad(t):
+ return 1 - (1 - t) * (1 - t)
+
+
+def ease_in_out_quad(t):
+ return 2 * t * t if t < 0.5 else 1 - pow(-2 * t + 2, 2) / 2
+
+
+def ease_in_cubic(t):
+ return t * t * t
+
+
+def ease_out_cubic(t):
+ return 1 - pow(1 - t, 3)
+
+
+def ease_in_out_cubic(t):
+ return 4 * t * t * t if t < 0.5 else 1 - pow(-2 * t + 2, 3) / 2
+
+
+def ease_in_quart(t):
+ return t * t * t * t
+
+
+def ease_out_quart(t):
+ return 1 - pow(1 - t, 4)
+
+
+def ease_in_out_quart(t):
+ return 8 * t * t * t * t if t < 0.5 else 1 - pow(-2 * t + 2, 4) / 2
+
+
+def ease_in_quint(t):
+ return t * t * t * t * t
+
+
+def ease_out_quint(t):
+ return 1 - pow(1 - t, 5)
+
+
+def ease_in_out_quint(t):
+ return 16 * t * t * t * t * t if t < 0.5 else 1 - pow(-2 * t + 2, 5) / 2
+
+
+def ease_in_expo(t):
+ return 0 if t == 0 else pow(2, 10 * t - 10)
+
+
+def ease_out_expo(t):
+ return 1 if t == 1 else 1 - pow(2, -10 * t)
+
+
+def ease_in_out_expo(t):
+ if t == 0:
+ return 0
+ elif t == 1:
+ return 1
+ elif t < 0.5:
+ return pow(2, 20 * t - 10) / 2
+ else:
+ return 2 - pow(2, -20 * t + 10) / 2
+
+
+def ease_in_circ(t):
+ return 1 - sqrt(1 - pow(t, 2))
+
+
+def ease_out_circ(t):
+ return sqrt(1 - pow(t - 1, 2))
+
+
+def ease_in_out_circ(t):
+ return (
+ (1 - sqrt(1 - pow(2 * t, 2))) / 2
+ if t < 0.5
+ else (sqrt(1 - pow(-2 * t + 2, 2)) + 1) / 2
+ )
+
+
+def ease_in_back(t):
+ c1 = 1.70158
+ c3 = c1 + 1
+ return c3 * t * t * t - c1 * t * t
+
+
+def ease_out_back(t):
+ c1 = 1.70158
+ c3 = c1 + 1
+ return 1 + c3 * pow(t - 1, 3) + c1 * pow(t - 1, 2)
+
+
+def ease_in_out_back(t):
+ c1 = 1.70158
+ c2 = c1 * 1.525
+ return (
+ (pow(2 * t, 2) * ((c2 + 1) * 2 * t - c2)) / 2
+ if t < 0.5
+ else (pow(2 * t - 2, 2) * ((c2 + 1) * (t * 2 - 2) + c2) + 2) / 2
+ )
+
+
+def ease_in_elastic(t):
+ c4 = (2 * np.pi) / 3
+ if t == 0:
+ return 0
+ elif t == 1:
+ return 1
+ else:
+ return -pow(2, 10 * t - 10) * np.sin((t * 10 - 10.75) * c4)
+
+
+def ease_out_elastic(t):
+ c4 = (2 * np.pi) / 3
+ if t == 0:
+ return 0
+ elif t == 1:
+ return 1
+ else:
+ return pow(2, -10 * t) * np.sin((t * 10 - 0.75) * c4) + 1
+
+
+def ease_in_out_elastic(t):
+ c5 = (2 * np.pi) / 4.5
+ if t == 0:
+ return 0
+ elif t == 1:
+ return 1
+ elif t < 0.5:
+ return -(pow(2, 20 * t - 10) * np.sin((20 * t - 11.125) * c5)) / 2
+ else:
+ return (pow(2, -20 * t + 10) * np.sin((20 * t - 11.125) * c5)) / 2 + 1
+
+
+def ease_in_bounce(t):
+ return 1 - ease_out_bounce(1 - t)
+
+
+def ease_out_bounce(t):
+ n1 = 7.5625
+ d1 = 2.75
+
+ if t < 1 / d1:
+ return n1 * t * t
+ elif t < 2 / d1:
+ return n1 * (t - 1.5 / d1) * t + 0.75
+ elif t < 2.5 / d1:
+ return n1 * (t - 2.25 / d1) * t + 0.9375
+ else:
+ return n1 * (t - 2.625 / d1) * t + 0.984375
+
+
+def ease_in_out_bounce(t):
+ c1 = 1.70158
+ c2 = c1 * 1.525
+ return (
+ (pow(2 * t, 2) * ((c2 + 1) * 2 * t - c2)) / 2
+ if t < 0.5
+ else (pow(2 * t - 2, 2) * ((c2 + 1) * (t * 2 - 2) + c2) + 2) / 2
+ )
diff --git a/manim/utils/space_ops.py b/manim/utils/space_ops.py
index e3e6f17a6..97b601705 100644
--- a/manim/utils/space_ops.py
+++ b/manim/utils/space_ops.py
@@ -92,7 +92,7 @@ def rotate_vector(vector, angle, axis=OUT):
product = reduce(quaternion_mult, [quat, np.append(0, vector), quat_inv])
return product[1:]
else:
- raise Exception("vector must be of dimension 2 or 3")
+ raise ValueError("vector must be of dimension 2 or 3")
def thick_diagonal(dim, thickness=2):
@@ -238,7 +238,7 @@ def line_intersection(line1, line2):
div = det(x_diff, y_diff)
if div == 0:
- raise Exception("Lines do not intersect")
+ raise ValueError("Lines do not intersect")
d = (det(*line1), det(*line2))
x = det(d, x_diff) / div
y = det(d, y_diff) / div
diff --git a/manim/utils/tex.py b/manim/utils/tex.py
index 14d596b32..ec87f91f2 100644
--- a/manim/utils/tex.py
+++ b/manim/utils/tex.py
@@ -1,298 +1,285 @@
-"""Utilities for processing custom LaTeX templates."""
+"""Utilities for processing LaTeX templates."""
-__all__ = ["TexTemplateFromFile", "TexTemplate"]
+__all__ = [
+ "TexTemplate",
+ "TexTemplateFromFile",
+]
import os
-from ..utils.config_ops import digest_config
-
-
-class TexTemplateFromFile:
+import re
+
+
+class TexTemplate:
+ """TeX templates are used for creating Tex() and MathTex() objects.
+
+ Parameters
+ ----------
+ tex_compiler : Optional[:class:`str`], optional
+ The TeX compiler to be used, e.g. ``latex``, ``pdflatex`` or ``lualatex``
+ output_format : Optional[:class:`str`], optional
+ The output format resulting from compilation, e.g. ``.dvi`` or ``.pdf``
+ documentclass : Optional[:class:`str`], optional
+ The command defining the documentclass, e.g. ``\\documentclass[preview]{standalone}``
+ preamble : Optional[:class:`str`], optional
+ The document's preample, i.e. the part between ``\\documentclass`` and ``\\begin{document}``
+ placeholder_text : Optional[:class:`str`], optional
+ Text in the document that will be replaced by the expression to be rendered
+ post_doc_commands : Optional[:class:`str`], optional
+ Text (definitions, commands) to be inserted at right after ``\\begin{document}``, e.g. ``\\boldmath``
+
+ Attributes
+ ----------
+ tex_compiler : :class:`str`
+ The TeX compiler to be used, e.g. ``latex``, ``pdflatex`` or ``lualatex``
+ output_format : :class:`str`
+ The output format resulting from compilation, e.g. ``.dvi`` or ``.pdf``
+ documentclass : :class:`str`
+ The command defining the documentclass, e.g. ``\\documentclass[preview]{standalone}``
+ preamble : :class:`str`
+ The document's preample, i.e. the part between ``\\documentclass`` and ``\\begin{document}``
+ placeholder_text : :class:`str`
+ Text in the document that will be replaced by the expression to be rendered
+ post_doc_commands : :class:`str`
+ Text (definitions, commands) to be inserted at right after ``\\begin{document}``, e.g. ``\\boldmath``
"""
- Class representing a TeX template file
- """ # TODO: attributes, dataclasses stuff
-
- CONFIG = {
- "use_ctex": False,
- "filename": "tex_template.tex",
- "text_to_replace": "YourTextHere",
- "tex_compiler": {
- "command": "latex",
- "output_format": ".dvi",
- },
- }
- body = ""
- def __init__(self, **kwargs):
- digest_config(self, kwargs)
- self.rebuild_cache()
+ default_documentclass = r"\documentclass[preview]{standalone}"
+ default_preamble = r"""
+\usepackage[english]{babel}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{dsfont}
+\usepackage{setspace}
+\usepackage{tipa}
+\usepackage{relsize}
+\usepackage{textcomp}
+\usepackage{mathrsfs}
+\usepackage{calligra}
+\usepackage{wasysym}
+\usepackage{ragged2e}
+\usepackage{physics}
+\usepackage{xcolor}
+\usepackage{microtype}
+\DisableLigatures{encoding = *, family = * }
+\linespread{1}
+"""
+ default_placeholder_text = "YourTextHere"
+ default_tex_compiler = "latex"
+ default_output_format = ".dvi"
+ default_post_doc_commands = ""
+
+ def __init__(
+ self,
+ tex_compiler=None,
+ output_format=None,
+ documentclass=None,
+ preamble=None,
+ placeholder_text=None,
+ post_doc_commands=None,
+ **kwargs
+ ):
+ self.tex_compiler = (
+ tex_compiler
+ if tex_compiler is not None
+ else TexTemplate.default_tex_compiler
+ )
+ self.output_format = (
+ output_format
+ if output_format is not None
+ else TexTemplate.default_output_format
+ )
+ self.documentclass = (
+ documentclass
+ if documentclass is not None
+ else TexTemplate.default_documentclass
+ )
+ self.preamble = (
+ preamble if preamble is not None else TexTemplate.default_preamble
+ )
+ self.placeholder_text = (
+ placeholder_text
+ if placeholder_text is not None
+ else TexTemplate.default_placeholder_text
+ )
+ self.post_doc_commands = (
+ post_doc_commands
+ if post_doc_commands is not None
+ else TexTemplate.default_post_doc_commands
+ )
+ self._rebuild()
+
+ def _rebuild(self):
+ """Rebuilds the entire TeX template text from ``\\documentclass`` to ``\\end{document}`` according to all settings and choices."""
+ self.body = (
+ self.documentclass
+ + "\n"
+ + self.preamble
+ + "\n"
+ + r"\begin{document}"
+ + "\n"
+ + self.post_doc_commands
+ + "\n"
+ + self.placeholder_text
+ + "\n"
+ + "\n"
+ + r"\end{document}"
+ + "\n"
+ )
+
+ def add_to_preamble(self, txt, prepend=False):
+ """Adds stuff to the TeX template's preamble (e.g. definitions, packages). Text can be inserted at the beginning or at the end of the preamble.
- def rebuild_cache(self):
- """For faster access, the LaTeX template's code is cached.
- If the base file is modified, the cache needs to be rebuilt.
+ Parameters
+ ----------
+ txt : :class:`string`
+ String containing the text to be added, e.g. ``\\usepackage{hyperref}``
+ prepend : Optional[:class:`bool`], optional
+ Whether the text should be added at the beginning of the preample, i.e. right after ``\\documentclass``. Default is to add it at the end of the preample, i.e. right before ``\\begin{document}``
"""
- with open(self.filename, "r") as infile:
- self.body = infile.read()
+ if prepend:
+ self.preamble = txt + "\n" + self.preamble
+ else:
+ self.preamble += "\n" + txt
+ self._rebuild()
- def get_text_for_text_mode(self, expression):
- """Inserting expression verbatim into TeX template.
+ def add_to_document(self, txt):
+ """Adds txt to the TeX template just after \\begin{document}, e.g. ``\\boldmath``
Parameters
----------
- expression : :class:`str`
- String containing the expression to be typeset, e.g. ``"foo"``
-
- Returns
- -------
- :class:`str`
- LaTeX code based on the template containing the given expression and ready for typesetting.
+ txt : :class:`str`
+ String containing the text to be added.
"""
- return self.body.replace(self.text_to_replace, expression)
+ self.post_doc_commands += "\n" + txt + "\n"
+ self._rebuild()
- def get_text_for_env(self, environment, expression):
- """Inserts an expression wrapped in a given environment into the TeX template.
+ def get_texcode_for_expression(self, expression):
+ """Inserts expression verbatim into TeX template.
Parameters
----------
- environment : :class:`str`
- The environment in which we should wrap the expression.
expression : :class:`str`
The string containing the expression to be typeset, e.g. ``$\\sqrt{2}$``
Returns
-------
:class:`str`
- LaTeX code based on template, containing the given expression and ready for typesetting
+ LaTeX code based on current template, containing the given ``expression`` and ready for typesetting
"""
- begin = r"\begin{" + environment + "}"
- end = r"\end{" + environment + "}"
- return self.body.replace(
- self.text_to_replace, "{0}\n{1}\n{2}".format(begin, expression, end)
- )
+ return self.body.replace(self.placeholder_text, expression)
- def get_text_for_tex_mode(self, expression):
- """Inserts an expression within an ``align*`` environment into the TeX template.
+ def _texcode_for_environment(self, environment):
+ """Processes the tex_environment string to return the correct ``\\begin{environment}[extra]{extra}`` and
+ ``\\end{environment}`` strings
Parameters
----------
- expression : :class:`str`
- The string containing the (math) expression to be typeset,
- e.g. ``$\\sqrt{2}$``
+ environment : :class:`str`
+ The tex_environment as a string. Acceptable formats include:
+ ``{align*}``, ``align*``, ``{tabular}[t]{cccl}``, ``tabular}{cccl``, ``\\begin{tabular}[t]{cccl}``.
Returns
-------
- :class:`str`
- LaTeX code based on template, containing the given expression and ready for typesetting
+ Tuple[:class:`str`, :class:`str`]
+ A pair of strings representing the opening and closing of the tex environment, e.g.
+ ``\\begin{tabular}{cccl}`` and ``\\end{tabular}``
"""
- return self.get_text_for_env("align*", expression)
+ # If the environment starts with \begin, remove it
+ if environment[0:6] == r"\begin":
+ environment = environment[6:]
-class TexTemplate(TexTemplateFromFile):
- """
- Class for dynamically managing a TeX template
- """ # TODO: Add attributes (when dataclasses are implemented)
-
- CONFIG = {
- "documentclass": ["standalone", ["preview"]],
- "common_packages": [
- ["babel", ["english"]],
- "amsmath",
- "amssymb",
- "dsfont",
- "setspace",
- "tipa",
- "relsize",
- "textcomp",
- "mathrsfs",
- "calligra",
- "wasysym",
- "ragged2e",
- "physics",
- "xcolor",
- "microtype",
- ],
- "tex_packages": [["inputenc", ["utf8"]], ["fontenc", ["T1"]]],
- "ctex_packages": [["ctex", ["UTF8"]]],
- "common_preamble_text": r"\linespread{1}" "\n",
- "tex_preamble_text": r"\DisableLigatures{encoding = *, family = *}" "\n",
- "ctex_preamble_text": "",
- "document_prefix": "",
- "document_suffix": "",
- }
+ # If environment begins with { strip it
+ if environment[0] == r"{":
+ environment = environment[1:]
- def __init__(self, **kwargs):
- digest_config(self, kwargs)
- self.rebuild_cache()
-
- def rebuild_cache(self):
- """For faster access, the LaTeX template's code is cached.
- If the base file is modified, the cache needs to be rebuilt."""
- tpl = self.generate_tex_command(
- "documentclass",
- required_params=[self.documentclass[0]],
- optional_params=self.documentclass[1],
- )
- for pkg in self.common_packages:
- tpl += self.generate_usepackage(pkg)
-
- if self.use_ctex:
- for pkg in self.ctex_packages:
- tpl += self.generate_usepackage(pkg)
- else:
- for pkg in self.tex_packages:
- tpl += self.generate_usepackage(pkg)
-
- tpl += self.common_preamble_text
- if self.use_ctex:
- tpl += self.ctex_preamble_text
- else:
- tpl += self.tex_preamble_text
+ # The \begin command takes everything and closes with a brace
+ begin = r"\begin{" + environment
+ if (
+ begin[-1] != r"}" and begin[-1] != r"]"
+ ): # If it doesn't end on } or ], assume missing }
+ begin += r"}"
- tpl += "\n" r"\begin{document}" "\n"
- tpl += f"\n{self.text_to_replace}\n"
- tpl += "\n" r"\end{document}"
-
- self.body = tpl
-
- def prepend_package(self, pkg):
- """Adds a new package (or several new packages)
- before all other packages. Sometimes, the order of
- the ``\\usepackage`` directives is relevant.
-
- Parameters
- ----------
- pkg : :class:`str`
- The package name, e.g. ``"siunitx"``
- """
- self.common_packages.insert(0, pkg)
- self.rebuild_cache()
-
- def append_package(self, pkg):
- """Adds a new package (or several new packages)
- after all other packages. Sometimes, the order of
- the ``\\usepackage`` directives is relevant.
-
- Parameters
- ----------
- pkg : :class:`str`
- The package name, e.g. ``"siunitx"``
- """
- self.common_packages.append(pkg)
- self.rebuild_cache()
+ # While the \end command terminates at the first closing brace
+ split_at_brace = re.split(r"}", environment, 1)
+ end = r"\end{" + split_at_brace[0] + r"}"
- def append_to_preamble(self, text):
- """Adds commands (e.g. macro definitions) at the end of the preamble.
+ return begin, end
- Parameters
- ----------
- text : :class:`str`
- The text to be included, e.g. ``"\\newcommand{\\R}{\\mathbb{Q}}"``.
- """
- if self.use_ctex:
- self.ctex_preamble_text += text
- else:
- self.tex_preamble_text += text
- self.rebuild_cache()
- pass
-
- def clear_preamble(self):
- """Removes custom definitions from the LaTeX preamble.
- This does not affect the imported packages or documentclass."""
- self.common_preamble_text = ""
- self.ctex_preamble_text = ""
- self.tex_preamble_text = ""
- self.rebuild_cache()
- pass
-
- def generate_tex_command(self, command, *, required_params, optional_params=[]):
- """
- Function for creating LaTeX command strings with or without options.
- Internally used to generate ``\\usepackage`` commands.
+ def get_texcode_for_expression_in_env(self, expression, environment):
+ """Inserts expression into TeX template wrapped in \begin{environemnt} and \end{environment}
Parameters
----------
- command : :class:`str`
- The command, e.g. ``"usepackage"``.
- required_params : Iterable[:class:`str`]
- The required parameters of this command, each wrapped in ``{}``.
- optional_params : Iterable[:class:`str`]
- The optional parameters of this command, each separated by a comma inside one ``[]``.
-
- Examples
- --------
- ::
-
- generate_tex_command("usepackage", required_params=["packagename"], optional_params=["option1", "option2"])
+ expression : :class:`str`
+ The string containing the expression to be typeset, e.g. ``$\\sqrt{2}$``
+ environment : :class:`str`
+ The string containing the environment in which the expression should be typeset, e.g. ``align*``
Returns
-------
:class:`str`
- The generated command.
+ LaTeX code based on template, containing the given expression inside its environment, ready for typesetting
"""
- optional_params = list(optional_params) # so we can measure its length
- return r"\{0}{1}{2}".format(
- command,
- f"[{','.join(optional_params)}]" if optional_params else "",
- "".join("{" + param + "}" for param in required_params),
+ begin, end = self._texcode_for_environment(environment)
+ return self.body.replace(
+ self.placeholder_text, "{0}\n{1}\n{2}".format(begin, expression, end)
)
- def generate_usepackage(self, pkg):
- if isinstance(pkg, list):
- return self.generate_tex_command(
- "usepackage", required_params=[pkg[0]], optional_params=pkg[1]
- )
- else:
- return self.generate_tex_command("usepackage", required_params=[pkg])
-
- def get_text_for_text_mode(self, expression):
- """Inserts an expression verbatim into the TeX template.
- Parameters
- ----------
- expression : :class:`str`
- The expression to be typeset, e.g. ``"foo"``.
-
- Returns
- -------
- :class:`str`
- LaTeX code based on the template, containing the given expression and ready for typesetting
- """
- return self.body.replace(self.text_to_replace, expression)
-
- def get_text_for_env(self, environment, expression):
- """Inserts an expression wrapped in a given environment into the TeX template.
+class TexTemplateFromFile(TexTemplate):
+ """A TexTemplate object created from a template file (default: tex_template.tex)
+
+ Parameters
+ ----------
+ tex_compiler : Optional[:class:`str`], optional
+ The TeX compiler to be used, e.g. ``latex``, ``pdflatex`` or ``lualatex``
+ output_format : Optional[:class:`str`], optional
+ The output format resulting from compilation, e.g. ``.dvi`` or ``.pdf``
+ documentclass : Optional[:class:`str`], optional
+ The command defining the documentclass, e.g. ``\\documentclass[preview]{standalone}``
+ preamble : Optional[:class:`str`], optional
+ The document's preample, i.e. the part between ``\\documentclass`` and ``\\begin{document}``
+ placeholder_text : Optional[:class:`str`], optional
+ Text in the document that will be replaced by the expression to be rendered
+ post_doc_commands : Optional[:class:`str`], optional
+ Text (definitions, commands) to be inserted at right after ``\\begin{document}``, e.g. ``\\boldmath``
+ kwargs : :class:`str`
+ The kwargs specified can only be strings.
+
+ Other Parameters
+ ----------------
+ tex_filename : Optional[:class:`str`], optional
+ Path to a valid TeX template file
+
+ Attributes
+ ----------
+ template_file : :class:`str`
+ Path to a valid TeX template file
+ body : :class:`str`
+ Content of the TeX template file
+ tex_compiler : :class:`str`
+ The TeX compiler to be used, e.g. ``latex``, ``pdflatex`` or ``lualatex``
+ output_format : :class:`str`
+ The output format resulting from compilation, e.g. ``.dvi`` or ``.pdf``
+ """
- Parameters
- ----------
- environment : :class:`str`
- The environment in which we should wrap the expression.
- expression : :class:`str`
- The string containing the expression to be typeset, e.g. ``"$\\sqrt{2}$"``
+ def __init__(self, **kwargs):
+ self.template_file = kwargs.pop("filename", "tex_template.tex")
+ super().__init__(**kwargs)
- Returns
- -------
- :class:`str`
- LaTeX code based on template, containing the given expression and ready for typesetting
- """
- begin = r"\begin{" + environment + "}"
- end = r"\end{" + environment + "}"
- return self.body.replace(
- self.text_to_replace, "{0}\n{1}\n{2}".format(begin, expression, end)
- )
+ def _rebuild(self):
+ with open(self.template_file, "r") as infile:
+ self.body = infile.read()
- def get_text_for_tex_mode(self, expression):
- """Inserts an expression within an ``align*`` environment into
- the TeX template.
+ def file_not_mutable(self):
+ raise Exception("Cannot modify TexTemplate when using a template file.")
- Parameters
- ----------
- expression : :class:`str`
- The string containing the (math) expression to be typeset,
- e.g. ``"$\\sqrt{2}$"``
+ def add_to_preamble(self, txt, prepend=False):
+ self.file_not_mutable()
- Returns
- -------
- :class:`str`
- LaTeX code based on template, containing the given expression and ready for typesetting
- """
- return self.get_text_for_env("align*", expression)
+ def add_to_document(self, txt):
+ self.file_not_mutable()
diff --git a/manim/utils/tex_file_writing.py b/manim/utils/tex_file_writing.py
index 924e761d6..71b080c95 100644
--- a/manim/utils/tex_file_writing.py
+++ b/manim/utils/tex_file_writing.py
@@ -21,23 +21,62 @@ def tex_hash(expression):
return hasher.hexdigest()[:16]
-def tex_to_svg_file(expression, source_type, tex_template=None):
+def tex_to_svg_file(expression, environment=None, tex_template=None):
+ """Takes a tex expression and returns the svg version of the compiled tex
+
+ Parameters
+ ----------
+ expression : :class:`str`
+ String containing the TeX expression to be rendered, e.g. ``\\sqrt{2}`` or ``foo``
+ environment : Optional[:class:`str`], optional
+ The string containing the environment in which the expression should be typeset, e.g. ``align*``
+ tex_template : Optional[:class:`~.TexTemplate`], optional
+ Template class used to typesetting. If not set, use default template set via `config["tex_template"]`
+
+ Returns
+ -------
+ :class:`str`
+ Path to generated SVG file.
+ """
if tex_template is None:
tex_template = config["tex_template"]
- tex_file = generate_tex_file(expression, tex_template, source_type)
- dvi_file = tex_to_dvi(tex_file, tex_template.use_ctex, tex_template.tex_compiler)
- return dvi_to_svg(
- dvi_file, use_ctex=tex_template.use_ctex, tex_compiler=tex_template.tex_compiler
+ tex_file = generate_tex_file(expression, environment, tex_template)
+ dvi_file = compile_tex(
+ tex_file, tex_template.tex_compiler, tex_template.output_format
)
+ return convert_to_svg(dvi_file, tex_template.output_format)
+
+
+def generate_tex_file(expression, environment=None, tex_template=None):
+ """Takes a tex expression (and an optional tex environment),
+ and returns a fully formed tex file ready for compilation.
+
+ Parameters
+ ----------
+ expression : :class:`str`
+ String containing the TeX expression to be rendered, e.g. ``\\sqrt{2}`` or ``foo``
+ environment : Optional[:class:`str`], optional
+ The string containing the environment in which the expression should be typeset, e.g. ``align*``
+ tex_template : Optional[:class:`~.TexTemplate`], optional
+ Template class used to typesetting. If not set, use default template set via `config["tex_template"]`
+
+ Returns
+ -------
+ :class:`str`
+ Path to generated TeX file
+ """
+ if tex_template is None:
+ tex_template = config["tex_template"]
+ if environment is not None:
+ output = tex_template.get_texcode_for_expression_in_env(expression, environment)
+ else:
+ output = tex_template.get_texcode_for_expression(expression)
+ tex_dir = config["tex_dir"]
+ if not os.path.exists(tex_dir):
+ os.makedirs(tex_dir)
-def generate_tex_file(expression, tex_template, source_type):
- if source_type == "text":
- output = tex_template.get_text_for_text_mode(expression)
- elif source_type == "tex":
- output = tex_template.get_text_for_tex_mode(expression)
-
- result = os.path.join(config["tex_dir"], tex_hash(output)) + ".tex"
+ result = os.path.join(tex_dir, tex_hash(output)) + ".tex"
if not os.path.exists(result):
logger.info('Writing "%s" to %s' % ("".join(expression), result))
with open(result, "w", encoding="utf-8") as outfile:
@@ -45,22 +84,40 @@ def generate_tex_file(expression, tex_template, source_type):
return result
-def tex_compilation_command(compiler, tex_file, tex_dir):
- if compiler["command"] in {"latex", "pdflatex", "luatex", "lualatex"}:
+def tex_compilation_command(tex_compiler, output_format, tex_file, tex_dir):
+ """Prepares the tex compilation command with all necessary cli flags
+
+ Parameters
+ ----------
+ tex_compiler : :class:`str`
+ String containing the compiler to be used, e.g. ``pdflatex`` or ``lualatex``
+ output_format : :class:`str`
+ String containing the output format generated by the compiler, e.g. ``.dvi`` or ``.pdf``
+ tex_file : :class:`str`
+ File name of TeX file to be typeset.
+ tex_dir : :class:`str`
+ Path to the directory where compiler output will be stored.
+
+ Returns
+ -------
+ :class:`str`
+ Compilation command according to given parameters
+ """
+ if tex_compiler in {"latex", "pdflatex", "luatex", "lualatex"}:
commands = [
- compiler["command"],
+ tex_compiler,
"-interaction=batchmode",
- f'-output-format="{compiler["output_format"][1:]}"',
+ f'-output-format="{output_format[1:]}"',
"-halt-on-error",
f'-output-directory="{tex_dir}"',
f'"{tex_file}"',
">",
os.devnull,
]
- elif compiler["command"] == "xelatex":
- if compiler["output_format"] == ".xdv":
+ elif tex_compiler == "xelatex":
+ if output_format == ".xdv":
outflag = "-no-pdf"
- elif compiler["output_format"] == ".pdf":
+ elif output_format == ".pdf":
outflag = ""
else:
raise ValueError("xelatex output is either pdf or xdv")
@@ -75,53 +132,70 @@ def tex_compilation_command(compiler, tex_file, tex_dir):
os.devnull,
]
else:
- raise ValueError(f"Tex compiler {compiler['command']} unknown.")
+ raise ValueError(f"Tex compiler {tex_compiler} unknown.")
return " ".join(commands)
-def tex_to_dvi(tex_file, use_ctex=False, tex_compiler=None):
- if tex_compiler is None:
- tex_compiler = (
- {"command": "xelatex", "output_format": ".xdv"}
- if use_ctex
- else {"command": "latex", "output_format": ".dvi"}
- )
- result = tex_file.replace(".tex", tex_compiler["output_format"])
+def compile_tex(tex_file, tex_compiler, output_format):
+ """Compiles a tex_file into a .dvi or a .xdv or a .pdf
+
+ Parameters
+ ----------
+ tex_file : :class:`str`
+ File name of TeX file to be typeset.
+ tex_compiler : :class:`str`
+ String containing the compiler to be used, e.g. ``pdflatex`` or ``lualatex``
+ output_format : :class:`str`
+ String containing the output format generated by the compiler, e.g. ``.dvi`` or ``.pdf``
+
+ Returns
+ -------
+ :class:`str`
+ Path to generated output file in desired format (DVI, XDV or PDF).
+ """
+ result = tex_file.replace(".tex", output_format)
result = Path(result).as_posix()
tex_file = Path(tex_file).as_posix()
tex_dir = Path(config["tex_dir"]).as_posix()
if not os.path.exists(result):
- command = tex_compilation_command(tex_compiler, tex_file, tex_dir)
+ command = tex_compilation_command(
+ tex_compiler, output_format, tex_file, tex_dir
+ )
exit_code = os.system(command)
if exit_code != 0:
log_file = tex_file.replace(".tex", ".log")
raise ValueError(
- f"{tex_compiler['command']} error converting to"
- f" {tex_compiler['output_format'][1:]}. See log output above or"
+ f"{tex_compiler} error converting to"
+ f" {output_format[1:]}. See log output above or"
f" the log file: {log_file}"
)
return result
-def dvi_to_svg(
- dvi_file, use_ctex=False, tex_compiler=None, regen_if_exists=False, page=1
-):
- """
- Converts a dvi, xdv, or pdf file into an svg using dvisvgm.
+def convert_to_svg(dvi_file, extension, page=1):
+ """Converts a .dvi, .xdv, or .pdf file into an svg using dvisvgm.
+
+ Parameters
+ ----------
+ dvi_file : :class:`str`
+ File name of the input file to be converted.
+ extension : :class:`str`
+ String containing the file extension and thus indicating the file type, e.g. ``.dvi`` or ``.pdf``
+ page : Optional[:class:`int`], optional
+ Page to be converted if input file is multi-page.
+
+ Returns
+ -------
+ :class:`str`
+ Path to generated SVG file.
"""
- if tex_compiler is None:
- tex_compiler = (
- {"command": "xelatex", "output_format": ".xdv"}
- if use_ctex
- else {"command": "latex", "output_format": ".dvi"}
- )
- result = dvi_file.replace(tex_compiler["output_format"], ".svg")
+ result = dvi_file.replace(extension, ".svg")
result = Path(result).as_posix()
dvi_file = Path(dvi_file).as_posix()
if not os.path.exists(result):
commands = [
"dvisvgm",
- "--pdf" if tex_compiler["output_format"] == ".pdf" else "",
+ "--pdf" if extension == ".pdf" else "",
"-p " + str(page),
'"{}"'.format(dvi_file),
"-n",
@@ -131,4 +205,14 @@ def dvi_to_svg(
os.devnull,
]
os.system(" ".join(commands))
+
+ # if the file does not exist now, this means conversion failed
+ if not os.path.exists(result):
+ raise ValueError(
+ f"Your installation does not support converting {extension} files to SVG."
+ f" Consider updating dvisvgm to at least version 2.4."
+ f" If this does not solve the problem, please refer to our troubleshooting guide at:"
+ f" https://manimce.readthedocs.io/en/latest/installation/troubleshooting.html"
+ )
+
return result
diff --git a/manim/utils/tex_templates.py b/manim/utils/tex_templates.py
new file mode 100644
index 000000000..a824ebff1
--- /dev/null
+++ b/manim/utils/tex_templates.py
@@ -0,0 +1,1024 @@
+# -*- coding: utf-8 -*-
+"""A library of LaTeX templates."""
+__all__ = [
+ "TexTemplateLibrary",
+ "TexFontTemplates",
+]
+
+from .tex import *
+
+
+# This file makes TexTemplateLibrary and TexFontTemplates available for use in manim Tex and MathTex objects.
+
+
+def _new_ams_template():
+ """ Returns a simple Tex Template with only basic AMS packages """
+ preamble = r"""
+\usepackage[english]{babel}
+\usepackage{amsmath}
+\usepackage{amssymb}
+"""
+ return TexTemplate(preamble=preamble)
+
+
+# TexTemplateLibrary
+#
+class TexTemplateLibrary(object):
+ """
+ A collection of basic TeX template objects
+
+ Examples
+ --------
+ Normal usage as a value for the keyword argument tex_template of Tex() and MathTex() mobjects::
+
+ ``Tex("My TeX code", tex_template=TexTemplateLibrary.ctex)``
+
+ """
+
+ default = TexTemplate()
+ """An instance of the default TeX template in manim"""
+
+ threeb1b = TexTemplate()
+ """ An instance of the default TeX template used by 3b1b """
+
+ ctex = TexTemplate(
+ tex_compiler="xelatex",
+ output_format=".xdv",
+ preamble=TexTemplate.default_preamble.replace(
+ r"\DisableLigatures{encoding = *, family = * }", r"\usepackage[UTF8]{ctex}"
+ ),
+ )
+ """An instance of the TeX template used by 3b1b when using the use_ctex flag"""
+
+ simple = _new_ams_template()
+ """An instance of a simple TeX template with only basic AMS packages loaded"""
+
+
+# TexFontTemplates
+#
+# TexFontTemplates takes a font_id and returns the appropriate TexTemplate()
+# Usage:
+# my_tex_template = TexFontTemplates.font_id
+#
+# Note: not all of these will work out-of-the-box.
+# They may require specific fonts to be installed on the local system.
+# For example TexFontTemplates.comic_sans will only work if the Microsoft font 'Comic Sans'
+# is installed on the local system.
+#
+# More information on these templates, along with example output can be found at
+# http://jf.burnol.free.fr/showcase.html"
+#
+#
+# Choices for font_id are:
+#
+# american_typewriter : "American Typewriter"
+# antykwa : "Antykwa Półtawskiego (TX Fonts for Greek and math symbols)"
+# apple_chancery : "Apple Chancery"
+# auriocus_kalligraphicus : "Auriocus Kalligraphicus (Symbol Greek)"
+# baskervald_adf_fourier : "Baskervald ADF with Fourier"
+# baskerville_it : "Baskerville (Italic)"
+# biolinum : "Biolinum"
+# brushscriptx : "BrushScriptX-Italic (PX math and Greek)"
+# chalkboard_se : "Chalkboard SE"
+# chalkduster : "Chalkduster"
+# comfortaa : "Comfortaa"
+# comic_sans : "Comic Sans MS"
+# droid_sans : "Droid Sans"
+# droid_sans_it : "Droid Sans (Italic)"
+# droid_serif : "Droid Serif"
+# droid_serif_px_it : "Droid Serif (PX math symbols) (Italic)"
+# ecf_augie : "ECF Augie (Euler Greek)"
+# ecf_jd : "ECF JD (with TX fonts)"
+# ecf_skeetch : "ECF Skeetch (CM Greek)"
+# ecf_tall_paul : "ECF Tall Paul (with Symbol font)"
+# ecf_webster : "ECF Webster (with TX fonts)"
+# electrum_adf : "Electrum ADF (CM Greek)"
+# epigrafica : Epigrafica
+# fourier_utopia : "Fourier Utopia (Fourier upright Greek)"
+# french_cursive : "French Cursive (Euler Greek)"
+# gfs_bodoni : "GFS Bodoni"
+# gfs_didot : "GFS Didot (Italic)"
+# gfs_neoHellenic : "GFS NeoHellenic"
+# gnu_freesans_tx : "GNU FreeSerif (and TX fonts symbols)"
+# gnu_freeserif_freesans : "GNU FreeSerif and FreeSans"
+# helvetica_fourier_it : "Helvetica with Fourier (Italic)"
+# latin_modern_tw_it : "Latin Modern Typewriter Proportional (CM Greek) (Italic)"
+# latin_modern_tw : "Latin Modern Typewriter Proportional"
+# libertine : "Libertine"
+# libris_adf_fourier : "Libris ADF with Fourier"
+# minion_pro_myriad_pro : "Minion Pro and Myriad Pro (and TX fonts symbols)"
+# minion_pro_tx : "Minion Pro (and TX fonts symbols)"
+# new_century_schoolbook : "New Century Schoolbook (Symbol Greek)"
+# new_century_schoolbook_px : "New Century Schoolbook (Symbol Greek, PX math symbols)"
+# noteworthy_light : "Noteworthy Light"
+# palatino : "Palatino (Symbol Greek)"
+# papyrus : "Papyrus"
+# romande_adf_fourier_it : "Romande ADF with Fourier (Italic)"
+# slitex : "SliTeX (Euler Greek)"
+# times_fourier_it : "Times with Fourier (Italic)"
+# urw_avant_garde : "URW Avant Garde (Symbol Greek)"
+# urw_zapf_chancery : "URW Zapf Chancery (CM Greek)"
+# venturis_adf_fourier_it : "Venturis ADF with Fourier (Italic)"
+# verdana_it : "Verdana (Italic)"
+# vollkorn_fourier_it : "Vollkorn with Fourier (Italic)"
+# vollkorn : "Vollkorn (TX fonts for Greek and math symbols)"
+# zapf_chancery : "Zapf Chancery"
+# -----------------------------------------------------------------------------------------
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+
+# Latin Modern Typewriter Proportional
+lmtp = _new_ams_template()
+lmtp.description = "Latin Modern Typewriter Proportional"
+lmtp.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[variablett]{lmodern}
+\renewcommand{\rmdefault}{\ttdefault}
+\usepackage[LGRgreek]{mathastext}
+\MTgreekfont{lmtt} % no lgr lmvtt, so use lgr lmtt
+\Mathastext
+\let\varepsilon\epsilon % only \varsigma in LGR
+"""
+)
+
+
+# Fourier Utopia (Fourier upright Greek)
+fufug = _new_ams_template()
+fufug.description = "Fourier Utopia (Fourier upright Greek)"
+fufug.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[upright]{fourier}
+\usepackage{mathastext}
+"""
+)
+
+
+# Droid Serif
+droidserif = _new_ams_template()
+droidserif.description = "Droid Serif"
+droidserif.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[default]{droidserif}
+\usepackage[LGRgreek]{mathastext}
+\let\varepsilon\epsilon
+"""
+)
+
+
+# Droid Sans
+droidsans = _new_ams_template()
+droidsans.description = "Droid Sans"
+droidsans.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[default]{droidsans}
+\usepackage[LGRgreek]{mathastext}
+\let\varepsilon\epsilon
+"""
+)
+
+
+# New Century Schoolbook (Symbol Greek)
+ncssg = _new_ams_template()
+ncssg.description = "New Century Schoolbook (Symbol Greek)"
+ncssg.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{newcent}
+\usepackage[symbolgreek]{mathastext}
+\linespread{1.1}
+"""
+)
+
+
+# French Cursive (Euler Greek)
+fceg = _new_ams_template()
+fceg.description = "French Cursive (Euler Greek)"
+fceg.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[default]{frcursive}
+\usepackage[eulergreek,noplusnominus,noequal,nohbar,%
+nolessnomore,noasterisk]{mathastext}
+"""
+)
+
+
+# Auriocus Kalligraphicus (Symbol Greek)
+aksg = _new_ams_template()
+aksg.description = "Auriocus Kalligraphicus (Symbol Greek)"
+aksg.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{aurical}
+\renewcommand{\rmdefault}{AuriocusKalligraphicus}
+\usepackage[symbolgreek]{mathastext}
+"""
+)
+
+
+# Palatino (Symbol Greek)
+palatinosg = _new_ams_template()
+palatinosg.description = "Palatino (Symbol Greek)"
+palatinosg.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{palatino}
+\usepackage[symbolmax,defaultmathsizes]{mathastext}
+"""
+)
+
+
+# Comfortaa
+comfortaa = _new_ams_template()
+comfortaa.description = "Comfortaa"
+comfortaa.add_to_preamble(
+ r"""
+\usepackage[default]{comfortaa}
+\usepackage[LGRgreek,defaultmathsizes,noasterisk]{mathastext}
+\let\varphi\phi
+\linespread{1.06}
+"""
+)
+
+
+# ECF Augie (Euler Greek)
+ecfaugieeg = _new_ams_template()
+ecfaugieeg.description = "ECF Augie (Euler Greek)"
+ecfaugieeg.add_to_preamble(
+ r"""
+\renewcommand\familydefault{fau} % emerald package
+\usepackage[defaultmathsizes,eulergreek]{mathastext}
+"""
+)
+
+
+# Electrum ADF (CM Greek)
+electrumadfcm = _new_ams_template()
+electrumadfcm.description = "Electrum ADF (CM Greek)"
+electrumadfcm.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[LGRgreek,basic,defaultmathsizes]{mathastext}
+\usepackage[lf]{electrum}
+\Mathastext
+\let\varphi\phi
+"""
+)
+
+
+# American Typewriter
+americantypewriter = _new_ams_template()
+americantypewriter.description = "American Typewriter"
+americantypewriter.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{American Typewriter}
+\usepackage[defaultmathsizes]{mathastext}
+"""
+)
+americantypewriter.tex_compiler = "xelatex"
+americantypewriter.output_format = ".xdv"
+
+# Minion Pro and Myriad Pro (and TX fonts symbols)
+mpmptx = _new_ams_template()
+mpmptx.description = "Minion Pro and Myriad Pro (and TX fonts symbols)"
+mpmptx.add_to_preamble(
+ r"""
+\usepackage{txfonts}
+\usepackage[upright]{txgreeks}
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{Minion Pro}
+\setsansfont[Mapping=tex-text,Scale=MatchUppercase]{Myriad Pro}
+\renewcommand\familydefault\sfdefault
+\usepackage[defaultmathsizes]{mathastext}
+\renewcommand\familydefault\rmdefault
+"""
+)
+mpmptx.tex_compiler = "xelatex"
+mpmptx.output_format = ".xdv"
+
+
+# New Century Schoolbook (Symbol Greek, PX math symbols)
+ncssgpxm = _new_ams_template()
+ncssgpxm.description = "New Century Schoolbook (Symbol Greek, PX math symbols)"
+ncssgpxm.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{pxfonts}
+\usepackage{newcent}
+\usepackage[symbolgreek,defaultmathsizes]{mathastext}
+\linespread{1.06}
+"""
+)
+
+
+# Vollkorn (TX fonts for Greek and math symbols)
+vollkorntx = _new_ams_template()
+vollkorntx.description = "Vollkorn (TX fonts for Greek and math symbols)"
+vollkorntx.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{txfonts}
+\usepackage[upright]{txgreeks}
+\usepackage{vollkorn}
+\usepackage[defaultmathsizes]{mathastext}
+"""
+)
+
+
+# Libertine
+libertine = _new_ams_template()
+libertine.description = "Libertine"
+libertine.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{libertine}
+\usepackage[greek=n]{libgreek}
+\usepackage[noasterisk,defaultmathsizes]{mathastext}
+"""
+)
+
+
+# SliTeX (Euler Greek)
+slitexeg = _new_ams_template()
+slitexeg.description = "SliTeX (Euler Greek)"
+slitexeg.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{tpslifonts}
+\usepackage[eulergreek,defaultmathsizes]{mathastext}
+\MTEulerScale{1.06}
+\linespread{1.2}
+"""
+)
+
+
+# ECF Webster (with TX fonts)
+ecfwebstertx = _new_ams_template()
+ecfwebstertx.description = "ECF Webster (with TX fonts)"
+ecfwebstertx.add_to_preamble(
+ r"""
+\usepackage{txfonts}
+\usepackage[upright]{txgreeks}
+\renewcommand\familydefault{fwb} % emerald package
+\usepackage{mathastext}
+\renewcommand{\int}{\intop\limits}
+\linespread{1.5}
+"""
+)
+ecfwebstertx.add_to_document(
+ r"""
+\mathversion{bold}
+"""
+)
+
+
+# Romande ADF with Fourier (Italic)
+italicromandeadff = _new_ams_template()
+italicromandeadff.description = "Romande ADF with Fourier (Italic)"
+italicromandeadff.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{fourier}
+\usepackage{romande}
+\usepackage[italic,defaultmathsizes,noasterisk]{mathastext}
+\renewcommand{\itshape}{\swashstyle}
+"""
+)
+
+
+# Apple Chancery
+applechancery = _new_ams_template()
+applechancery.description = "Apple Chancery"
+applechancery.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{Apple Chancery}
+\usepackage[defaultmathsizes]{mathastext}
+"""
+)
+applechancery.tex_compiler = "xelatex"
+applechancery.output_format = ".xdv"
+
+
+# Zapf Chancery
+zapfchancery = _new_ams_template()
+zapfchancery.description = "Zapf Chancery"
+zapfchancery.add_to_preamble(
+ r"""
+\DeclareFontFamily{T1}{pzc}{}
+\DeclareFontShape{T1}{pzc}{mb}{it}{<->s*[1.2] pzcmi8t}{}
+\DeclareFontShape{T1}{pzc}{m}{it}{<->ssub * pzc/mb/it}{}
+\usepackage{chancery} % = \renewcommand{\rmdefault}{pzc}
+\renewcommand\shapedefault\itdefault
+\renewcommand\bfdefault\mddefault
+\usepackage[defaultmathsizes]{mathastext}
+\linespread{1.05}
+"""
+)
+
+
+# Verdana (Italic)
+italicverdana = _new_ams_template()
+italicverdana.description = "Verdana (Italic)"
+italicverdana.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{Verdana}
+\usepackage[defaultmathsizes,italic]{mathastext}
+"""
+)
+italicverdana.tex_compiler = "xelatex"
+italicverdana.output_format = ".xdv"
+
+
+# URW Zapf Chancery (CM Greek)
+urwzccmg = _new_ams_template()
+urwzccmg.description = "URW Zapf Chancery (CM Greek)"
+urwzccmg.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\DeclareFontFamily{T1}{pzc}{}
+\DeclareFontShape{T1}{pzc}{mb}{it}{<->s*[1.2] pzcmi8t}{}
+\DeclareFontShape{T1}{pzc}{m}{it}{<->ssub * pzc/mb/it}{}
+\DeclareFontShape{T1}{pzc}{mb}{sl}{<->ssub * pzc/mb/it}{}
+\DeclareFontShape{T1}{pzc}{m}{sl}{<->ssub * pzc/mb/sl}{}
+\DeclareFontShape{T1}{pzc}{m}{n}{<->ssub * pzc/mb/it}{}
+\usepackage{chancery}
+\usepackage{mathastext}
+\linespread{1.05}"""
+)
+urwzccmg.add_to_document(
+ r"""
+\boldmath
+"""
+)
+
+
+# Comic Sans MS
+comicsansms = _new_ams_template()
+comicsansms.description = "Comic Sans MS"
+comicsansms.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{Comic Sans MS}
+\usepackage[defaultmathsizes]{mathastext}
+"""
+)
+comicsansms.tex_compiler = "xelatex"
+comicsansms.output_format = ".xdv"
+
+
+# GFS Didot (Italic)
+italicgfsdidot = _new_ams_template()
+italicgfsdidot.description = "GFS Didot (Italic)"
+italicgfsdidot.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\renewcommand\rmdefault{udidot}
+\usepackage[LGRgreek,defaultmathsizes,italic]{mathastext}
+\let\varphi\phi
+"""
+)
+
+
+# Chalkduster
+chalkduster = _new_ams_template()
+chalkduster.description = "Chalkduster"
+chalkduster.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{Chalkduster}
+\usepackage[defaultmathsizes]{mathastext}
+"""
+)
+chalkduster.tex_compiler = "lualatex"
+chalkduster.output_format = ".pdf"
+
+
+# Minion Pro (and TX fonts symbols)
+mptx = _new_ams_template()
+mptx.description = "Minion Pro (and TX fonts symbols)"
+mptx.add_to_preamble(
+ r"""
+\usepackage{txfonts}
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{Minion Pro}
+\usepackage[defaultmathsizes]{mathastext}
+"""
+)
+mptx.tex_compiler = "xelatex"
+mptx.output_format = ".xdv"
+
+
+# GNU FreeSerif and FreeSans
+gnufsfs = _new_ams_template()
+gnufsfs.description = "GNU FreeSerif and FreeSans"
+gnufsfs.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\setmainfont[ExternalLocation,
+ Mapping=tex-text,
+ BoldFont=FreeSerifBold,
+ ItalicFont=FreeSerifItalic,
+ BoldItalicFont=FreeSerifBoldItalic]{FreeSerif}
+\setsansfont[ExternalLocation,
+ Mapping=tex-text,
+ BoldFont=FreeSansBold,
+ ItalicFont=FreeSansOblique,
+ BoldItalicFont=FreeSansBoldOblique,
+ Scale=MatchLowercase]{FreeSans}
+\renewcommand{\familydefault}{lmss}
+\usepackage[LGRgreek,defaultmathsizes,noasterisk]{mathastext}
+\renewcommand{\familydefault}{\sfdefault}
+\Mathastext
+\let\varphi\phi % no `var' phi in LGR encoding
+\renewcommand{\familydefault}{\rmdefault}
+"""
+)
+gnufsfs.tex_compiler = "xelatex"
+gnufsfs.output_format = ".pdf"
+
+# GFS NeoHellenic
+gfsneohellenic = _new_ams_template()
+gfsneohellenic.description = "GFS NeoHellenic"
+gfsneohellenic.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\renewcommand{\rmdefault}{neohellenic}
+\usepackage[LGRgreek]{mathastext}
+\let\varphi\phi
+\linespread{1.06}
+"""
+)
+
+
+# ECF Tall Paul (with Symbol font)
+ecftallpaul = _new_ams_template()
+ecftallpaul.description = "ECF Tall Paul (with Symbol font)"
+ecftallpaul.add_to_preamble(
+ r"""
+\DeclareFontFamily{T1}{ftp}{}
+\DeclareFontShape{T1}{ftp}{m}{n}{
+ <->s*[1.4] ftpmw8t
+}{} % increase size by factor 1.4
+\renewcommand\familydefault{ftp} % emerald package
+\usepackage[symbol]{mathastext}
+\let\infty\inftypsy
+"""
+)
+
+
+# Droid Sans (Italic)
+italicdroidsans = _new_ams_template()
+italicdroidsans.description = "Droid Sans (Italic)"
+italicdroidsans.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[default]{droidsans}
+\usepackage[LGRgreek,defaultmathsizes,italic]{mathastext}
+\let\varphi\phi
+"""
+)
+
+
+# Baskerville (Italic)
+italicbaskerville = _new_ams_template()
+italicbaskerville.description = "Baskerville (Italic)"
+italicbaskerville.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{Baskerville}
+\usepackage[defaultmathsizes,italic]{mathastext}
+"""
+)
+italicbaskerville.tex_compiler = "xelatex"
+italicbaskerville.output_format = ".xdv"
+
+
+# ECF JD (with TX fonts)
+ecfjdtx = _new_ams_template()
+ecfjdtx.description = "ECF JD (with TX fonts)"
+ecfjdtx.add_to_preamble(
+ r"""
+\usepackage{txfonts}
+\usepackage[upright]{txgreeks}
+\renewcommand\familydefault{fjd} % emerald package
+\usepackage{mathastext}
+"""
+)
+ecfjdtx.add_to_document(
+ r"""\mathversion{bold}
+"""
+)
+
+
+# Antykwa Półtawskiego (TX Fonts for Greek and math symbols)
+aptxgm = _new_ams_template()
+aptxgm.description = "Antykwa Półtawskiego (TX Fonts for Greek and math symbols)"
+aptxgm.add_to_preamble(
+ r"""
+\usepackage[OT4,OT1]{fontenc}
+\usepackage{txfonts}
+\usepackage[upright]{txgreeks}
+\usepackage{antpolt}
+\usepackage[defaultmathsizes,nolessnomore]{mathastext}
+"""
+)
+
+
+# Papyrus
+papyrus = _new_ams_template()
+papyrus.description = "Papyrus"
+papyrus.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{Papyrus}
+\usepackage[defaultmathsizes]{mathastext}
+"""
+)
+papyrus.tex_compiler = "xelatex"
+papyrus.output_format = ".xdv"
+
+
+# GNU FreeSerif (and TX fonts symbols)
+gnufstx = _new_ams_template()
+gnufstx.description = "GNU FreeSerif (and TX fonts symbols)"
+gnufstx.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\usepackage{txfonts} %\let\mathbb=\varmathbb
+\setmainfont[ExternalLocation,
+ Mapping=tex-text,
+ BoldFont=FreeSerifBold,
+ ItalicFont=FreeSerifItalic,
+ BoldItalicFont=FreeSerifBoldItalic]{FreeSerif}
+\usepackage[defaultmathsizes]{mathastext}
+"""
+)
+gnufstx.tex_compiler = "xelatex"
+gnufstx.output_format = ".pdf"
+
+
+# ECF Skeetch (CM Greek)
+ecfscmg = _new_ams_template()
+ecfscmg.description = "ECF Skeetch (CM Greek)"
+ecfscmg.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[T1]{fontenc}
+\DeclareFontFamily{T1}{fsk}{}
+\DeclareFontShape{T1}{fsk}{m}{n}{<->s*[1.315] fskmw8t}{}
+\renewcommand\rmdefault{fsk}
+\usepackage[noendash,defaultmathsizes,nohbar,defaultimath]{mathastext}
+"""
+)
+
+
+# Latin Modern Typewriter Proportional (CM Greek) (Italic)
+italiclmtpcm = _new_ams_template()
+italiclmtpcm.description = "Latin Modern Typewriter Proportional (CM Greek) (Italic)"
+italiclmtpcm.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[variablett,nomath]{lmodern}
+\renewcommand{\familydefault}{\ttdefault}
+\usepackage[frenchmath]{mathastext}
+\linespread{1.08}
+"""
+)
+
+
+# Baskervald ADF with Fourier
+baskervaldadff = _new_ams_template()
+baskervaldadff.description = "Baskervald ADF with Fourier"
+baskervaldadff.add_to_preamble(
+ r"""
+\usepackage[upright]{fourier}
+\usepackage{baskervald}
+\usepackage[defaultmathsizes,noasterisk]{mathastext}
+"""
+)
+
+
+# Droid Serif (PX math symbols) (Italic)
+italicdroidserifpx = _new_ams_template()
+italicdroidserifpx.description = "Droid Serif (PX math symbols) (Italic)"
+italicdroidserifpx.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{pxfonts}
+\usepackage[default]{droidserif}
+\usepackage[LGRgreek,defaultmathsizes,italic,basic]{mathastext}
+\let\varphi\phi
+"""
+)
+
+
+# Biolinum
+biolinum = _new_ams_template()
+biolinum.description = "Biolinum"
+biolinum.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{libertine}
+\renewcommand{\familydefault}{\sfdefault}
+\usepackage[greek=n,biolinum]{libgreek}
+\usepackage[noasterisk,defaultmathsizes]{mathastext}
+"""
+)
+
+
+# Vollkorn with Fourier (Italic)
+italicvollkornf = _new_ams_template()
+italicvollkornf.description = "Vollkorn with Fourier (Italic)"
+italicvollkornf.add_to_preamble(
+ r"""
+\usepackage{fourier}
+\usepackage{vollkorn}
+\usepackage[italic,nohbar]{mathastext}
+"""
+)
+
+
+# Chalkboard SE
+chalkboardse = _new_ams_template()
+chalkboardse.description = "Chalkboard SE"
+chalkboardse.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{Chalkboard SE}
+\usepackage[defaultmathsizes]{mathastext}
+"""
+)
+chalkboardse.tex_compiler = "xelatex"
+chalkboardse.output_format = ".xdv"
+
+
+# Noteworthy Light
+noteworthylight = _new_ams_template()
+noteworthylight.description = "Noteworthy Light"
+noteworthylight.add_to_preamble(
+ r"""
+\usepackage[no-math]{fontspec}
+\setmainfont[Mapping=tex-text]{Noteworthy Light}
+\usepackage[defaultmathsizes]{mathastext}
+"""
+)
+
+
+# Epigrafica
+epigrafica = _new_ams_template()
+epigrafica.description = "Epigrafica"
+epigrafica.add_to_preamble(
+ r"""
+\usepackage[LGR,OT1]{fontenc}
+\usepackage{epigrafica}
+\usepackage[basic,LGRgreek,defaultmathsizes]{mathastext}
+\let\varphi\phi
+\linespread{1.2}
+"""
+)
+
+
+# Libris ADF with Fourier
+librisadff = _new_ams_template()
+librisadff.description = "Libris ADF with Fourier"
+librisadff.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[upright]{fourier}
+\usepackage{libris}
+\renewcommand{\familydefault}{\sfdefault}
+\usepackage[noasterisk]{mathastext}
+"""
+)
+
+
+# Venturis ADF with Fourier (Italic)
+italicvanturisadff = _new_ams_template()
+italicvanturisadff.description = "Venturis ADF with Fourier (Italic)"
+italicvanturisadff.add_to_preamble(
+ r"""
+\usepackage{fourier}
+\usepackage[lf]{venturis}
+\usepackage[italic,defaultmathsizes,noasterisk]{mathastext}
+"""
+)
+
+
+# GFS Bodoni
+gfsbodoni = _new_ams_template()
+gfsbodoni.description = "GFS Bodoni"
+gfsbodoni.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\renewcommand{\rmdefault}{bodoni}
+\usepackage[LGRgreek]{mathastext}
+\let\varphi\phi
+\linespread{1.06}
+"""
+)
+
+
+# BrushScriptX-Italic (PX math and Greek)
+brushscriptxpx = _new_ams_template()
+brushscriptxpx.description = "BrushScriptX-Italic (PX math and Greek)"
+brushscriptxpx.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{pxfonts}
+%\usepackage{pbsi}
+\renewcommand{\rmdefault}{pbsi}
+\renewcommand{\mddefault}{xl}
+\renewcommand{\bfdefault}{xl}
+\usepackage[defaultmathsizes,noasterisk]{mathastext}
+"""
+)
+brushscriptxpx.add_to_document(
+ r"""\boldmath
+"""
+)
+brushscriptxpx.tex_compiler = "xelatex"
+brushscriptxpx.output_format = ".xdv"
+
+
+# URW Avant Garde (Symbol Greek)
+urwagsg = _new_ams_template()
+urwagsg.description = "URW Avant Garde (Symbol Greek)"
+urwagsg.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage{avant}
+\renewcommand{\familydefault}{\sfdefault}
+\usepackage[symbolgreek,defaultmathsizes]{mathastext}
+"""
+)
+
+
+# Times with Fourier (Italic)
+italictimesf = _new_ams_template()
+italictimesf.description = "Times with Fourier (Italic)"
+italictimesf.add_to_preamble(
+ r"""
+\usepackage{fourier}
+\renewcommand{\rmdefault}{ptm}
+\usepackage[italic,defaultmathsizes,noasterisk]{mathastext}
+"""
+)
+
+
+# Helvetica with Fourier (Italic)
+italichelveticaf = _new_ams_template()
+italichelveticaf.description = "Helvetica with Fourier (Italic)"
+italichelveticaf.add_to_preamble(
+ r"""
+\usepackage[T1]{fontenc}
+\usepackage[scaled]{helvet}
+\usepackage{fourier}
+\renewcommand{\rmdefault}{phv}
+\usepackage[italic,defaultmathsizes,noasterisk]{mathastext}
+"""
+)
+
+
+class TexFontTemplates(object):
+ """
+ A collection of TeX templates for the fonts described at http://jf.burnol.free.fr/showcase.html
+
+ These templates are specifically designed to allow you to typeset formulae and mathematics using
+ different fonts. They are based on the mathastext LaTeX package.
+
+ Examples
+ ---------
+ Normal usage as a value for the keyword argument tex_template of Tex() and MathTex() mobjects::
+
+ ``Tex("My TeX code", tex_template=TexFontTemplates.comic_sans)``
+
+ Notes
+ ------
+ Many of these templates require that specific fonts
+ are installed on your local machine.
+ For example, choosing the template TexFontTemplates.comic_sans will
+ not compile if the Comic Sans Microsoft font is not installed.
+
+ To experiment, try to render the TexFontTemplateLibrary example scene:
+ ``manim path/to/manim/example_scenes/advanced_tex_fonts.py TexFontTemplateLibrary -p -ql``
+ """
+
+ american_typewriter = americantypewriter
+ """American Typewriter"""
+ antykwa = aptxgm
+ """Antykwa Półtawskiego (TX Fonts for Greek and math symbols)"""
+ apple_chancery = applechancery
+ """Apple Chancery"""
+ auriocus_kalligraphicus = aksg
+ """Auriocus Kalligraphicus (Symbol Greek)"""
+ baskervald_adf_fourier = baskervaldadff
+ """Baskervald ADF with Fourier"""
+ baskerville_it = italicbaskerville
+ """Baskerville (Italic)"""
+ biolinum = biolinum
+ """Biolinum"""
+ brushscriptx = brushscriptxpx
+ """BrushScriptX-Italic (PX math and Greek)"""
+ chalkboard_se = chalkboardse
+ """Chalkboard SE"""
+ chalkduster = chalkduster
+ """Chalkduster"""
+ comfortaa = comfortaa
+ """Comfortaa"""
+ comic_sans = comicsansms
+ """Comic Sans MS"""
+ droid_sans = droidsans
+ """Droid Sans"""
+ droid_sans_it = italicdroidsans
+ """Droid Sans (Italic)"""
+ droid_serif = droidserif
+ """Droid Serif"""
+ droid_serif_px_it = italicdroidserifpx
+ """Droid Serif (PX math symbols) (Italic)"""
+ ecf_augie = ecfaugieeg
+ """ECF Augie (Euler Greek)"""
+ ecf_jd = ecfjdtx
+ """ECF JD (with TX fonts)"""
+ ecf_skeetch = ecfscmg
+ """ECF Skeetch (CM Greek)"""
+ ecf_tall_paul = ecftallpaul
+ """ECF Tall Paul (with Symbol font)"""
+ ecf_webster = ecfwebstertx
+ """ECF Webster (with TX fonts)"""
+ electrum_adf = electrumadfcm
+ """Electrum ADF (CM Greek)"""
+ epigrafica = epigrafica
+ """ Epigrafica """
+ fourier_utopia = fufug
+ """Fourier Utopia (Fourier upright Greek)"""
+ french_cursive = fceg
+ """French Cursive (Euler Greek)"""
+ gfs_bodoni = gfsbodoni
+ """GFS Bodoni"""
+ gfs_didot = italicgfsdidot
+ """GFS Didot (Italic)"""
+ gfs_neoHellenic = gfsneohellenic
+ """GFS NeoHellenic"""
+ gnu_freesans_tx = gnufstx
+ """GNU FreeSerif (and TX fonts symbols)"""
+ gnu_freeserif_freesans = gnufsfs
+ """GNU FreeSerif and FreeSans"""
+ helvetica_fourier_it = italichelveticaf
+ """Helvetica with Fourier (Italic)"""
+ latin_modern_tw_it = italiclmtpcm
+ """Latin Modern Typewriter Proportional (CM Greek) (Italic)"""
+ latin_modern_tw = lmtp
+ """Latin Modern Typewriter Proportional"""
+ libertine = libertine
+ """Libertine"""
+ libris_adf_fourier = librisadff
+ """Libris ADF with Fourier"""
+ minion_pro_myriad_pro = mpmptx
+ """Minion Pro and Myriad Pro (and TX fonts symbols)"""
+ minion_pro_tx = mptx
+ """Minion Pro (and TX fonts symbols)"""
+ new_century_schoolbook = ncssg
+ """New Century Schoolbook (Symbol Greek)"""
+ new_century_schoolbook_px = ncssgpxm
+ """New Century Schoolbook (Symbol Greek, PX math symbols)"""
+ noteworthy_light = noteworthylight
+ """Noteworthy Light"""
+ palatino = palatinosg
+ """Palatino (Symbol Greek)"""
+ papyrus = papyrus
+ """Papyrus"""
+ romande_adf_fourier_it = italicromandeadff
+ """Romande ADF with Fourier (Italic)"""
+ slitex = slitexeg
+ """SliTeX (Euler Greek)"""
+ times_fourier_it = italictimesf
+ """Times with Fourier (Italic)"""
+ urw_avant_garde = urwagsg
+ """URW Avant Garde (Symbol Greek)"""
+ urw_zapf_chancery = urwzccmg
+ """URW Zapf Chancery (CM Greek)"""
+ venturis_adf_fourier_it = italicvanturisadff
+ """Venturis ADF with Fourier (Italic)"""
+ verdana_it = italicverdana
+ """Verdana (Italic)"""
+ vollkorn_fourier_it = italicvollkornf
+ """Vollkorn with Fourier (Italic)"""
+ vollkorn = vollkorntx
+ """Vollkorn (TX fonts for Greek and math symbols)"""
+ zapf_chancery = zapfchancery
+ """Zapf Chancery"""
diff --git a/poetry.lock b/poetry.lock
index bfa0fcc0f..8bb25ecda 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -137,7 +137,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "colorama"
-version = "0.4.3"
+version = "0.4.4"
description = "Cross-platform colored terminal text."
category = "main"
optional = false
@@ -183,7 +183,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "grpcio"
-version = "1.32.0"
+version = "1.33.1"
description = "HTTP/2-based RPC framework"
category = "main"
optional = false
@@ -193,18 +193,18 @@ python-versions = "*"
six = ">=1.5.2"
[package.extras]
-protobuf = ["grpcio-tools (>=1.32.0)"]
+protobuf = ["grpcio-tools (>=1.33.1)"]
[[package]]
name = "grpcio-tools"
-version = "1.32.0"
+version = "1.33.1"
description = "Protobuf code generator for gRPC"
category = "main"
optional = false
python-versions = "*"
[package.dependencies]
-grpcio = ">=1.32.0"
+grpcio = ">=1.33.1"
protobuf = ">=3.5.0.post1,<4.0dev"
[[package]]
@@ -251,7 +251,7 @@ testing = ["packaging", "pep517", "importlib-resources (>=1.3)"]
[[package]]
name = "iniconfig"
-version = "1.0.1"
+version = "1.1.1"
description = "iniconfig: brain-dead simple config-ini parsing"
category = "dev"
optional = false
@@ -259,7 +259,7 @@ python-versions = "*"
[[package]]
name = "isort"
-version = "5.5.4"
+version = "5.6.4"
description = "A Python utility / library to sort Python imports."
category = "dev"
optional = false
@@ -378,11 +378,11 @@ python-versions = "*"
[[package]]
name = "pillow"
-version = "7.2.0"
+version = "8.0.1"
description = "Python Imaging Library (Fork)"
category = "main"
optional = false
-python-versions = ">=3.5"
+python-versions = ">=3.6"
[[package]]
name = "pluggy"
@@ -526,7 +526,7 @@ sphinx = ">=1.3.1"
[[package]]
name = "regex"
-version = "2020.9.27"
+version = "2020.10.23"
description = "Alternative regular expression module, to replace re."
category = "dev"
optional = false
@@ -552,7 +552,7 @@ socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"]
[[package]]
name = "rich"
-version = "8.0.0"
+version = "6.2.0"
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
category = "main"
optional = false
@@ -570,7 +570,7 @@ jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"]
[[package]]
name = "scipy"
-version = "1.5.2"
+version = "1.5.3"
description = "SciPy: Scientific Library for Python"
category = "main"
optional = false
@@ -707,7 +707,7 @@ python-versions = "*"
[[package]]
name = "tqdm"
-version = "4.50.1"
+version = "4.50.2"
description = "Fast, Extensible Progress Meter"
category = "main"
optional = false
@@ -734,7 +734,7 @@ python-versions = "*"
[[package]]
name = "urllib3"
-version = "1.25.10"
+version = "1.25.11"
description = "HTTP library with thread-safe connection pooling, file post, and more."
category = "dev"
optional = false
@@ -742,7 +742,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
[package.extras]
brotli = ["brotlipy (>=0.6.0)"]
-secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)", "ipaddress"]
+secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"]
socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"]
[[package]]
@@ -769,7 +769,7 @@ python-versions = "*"
[[package]]
name = "zipp"
-version = "3.3.0"
+version = "3.3.2"
description = "Backport of pathlib-compatible object wrapper for zip files"
category = "dev"
optional = false
@@ -782,7 +782,7 @@ testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pyt
[metadata]
lock-version = "1.1"
python-versions = "^3.6"
-content-hash = "19fad3a14d174f8365b3941c9d1fc44037855d5eaabff297313d65bbea223c38"
+content-hash = "b0cb1de3aec59c3c45c9d59efcd249f9c003e455e3bb13eb8eed47f673bce0cb"
[metadata.files]
alabaster = [
@@ -866,8 +866,8 @@ click = [
{file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"},
]
colorama = [
- {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"},
- {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"},
+ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"},
+ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"},
]
colour = [
{file = "colour-0.1.5-py2.py3-none-any.whl", hash = "sha256:33f6db9d564fadc16e59921a56999b79571160ce09916303d35346dddc17978c"},
@@ -886,86 +886,96 @@ docutils = [
{file = "docutils-0.16.tar.gz", hash = "sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc"},
]
grpcio = [
- {file = "grpcio-1.32.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3afb058b6929eba07dba9ae6c5b555aa1d88cb140187d78cc510bd72d0329f28"},
- {file = "grpcio-1.32.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:a8004b34f600a8a51785e46859cd88f3386ef67cccd1cfc7598e3d317608c643"},
- {file = "grpcio-1.32.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:e6786f6f7be0937614577edcab886ddce91b7c1ea972a07ef9972e9f9ecbbb78"},
- {file = "grpcio-1.32.0-cp27-cp27m-win32.whl", hash = "sha256:e467af6bb8f5843f5a441e124b43474715cfb3981264e7cd227343e826dcc3ce"},
- {file = "grpcio-1.32.0-cp27-cp27m-win_amd64.whl", hash = "sha256:1376a60f9bfce781b39973f100b5f67e657b5be479f2fd8a7d2a408fc61c085c"},
- {file = "grpcio-1.32.0-cp27-cp27mu-linux_armv7l.whl", hash = "sha256:ce617e1c4a39131f8527964ac9e700eb199484937d7a0b3e52655a3ba50d5fb9"},
- {file = "grpcio-1.32.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:99bac0e2c820bf446662365df65841f0c2a55b0e2c419db86eaf5d162ddae73e"},
- {file = "grpcio-1.32.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:6d869a3e8e62562b48214de95e9231c97c53caa7172802236cd5d60140d7cddd"},
- {file = "grpcio-1.32.0-cp35-cp35m-linux_armv7l.whl", hash = "sha256:182c64ade34c341398bf71ec0975613970feb175090760ab4f51d1e9a5424f05"},
- {file = "grpcio-1.32.0-cp35-cp35m-macosx_10_7_intel.whl", hash = "sha256:9c0d8f2346c842088b8cbe3e14985b36e5191a34bf79279ba321a4bf69bd88b7"},
- {file = "grpcio-1.32.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:4775bc35af9cd3b5033700388deac2e1d611fa45f4a8dcb93667d94cb25f0444"},
- {file = "grpcio-1.32.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:be98e3198ec765d0a1e27f69d760f69374ded8a33b953dcfe790127731f7e690"},
- {file = "grpcio-1.32.0-cp35-cp35m-manylinux2014_i686.whl", hash = "sha256:378fe80ec5d9353548eb2a8a43ea03747a80f2e387c4f177f2b3ff6c7d898753"},
- {file = "grpcio-1.32.0-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:f7d508691301027033215d3662dab7e178f54d5cca2329f26a71ae175d94b83f"},
- {file = "grpcio-1.32.0-cp35-cp35m-win32.whl", hash = "sha256:25959a651420dd4a6fd7d3e8dee53f4f5fd8c56336a64963428e78b276389a59"},
- {file = "grpcio-1.32.0-cp35-cp35m-win_amd64.whl", hash = "sha256:ac7028d363d2395f3d755166d0161556a3f99500a5b44890421ccfaaf2aaeb08"},
- {file = "grpcio-1.32.0-cp36-cp36m-linux_armv7l.whl", hash = "sha256:c31e8a219650ddae1cd02f5a169e1bffe66a429a8255d3ab29e9363c73003b62"},
- {file = "grpcio-1.32.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e28e4c0d4231beda5dee94808e3a224d85cbaba3cfad05f2192e6f4ec5318053"},
- {file = "grpcio-1.32.0-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f03dfefa9075dd1c6c5cc27b1285c521434643b09338d8b29e1d6a27b386aa82"},
- {file = "grpcio-1.32.0-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:c4966d746dccb639ef93f13560acbe9630681c07f2b320b7ec03fe2c8f0a1f15"},
- {file = "grpcio-1.32.0-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:ec10d5f680b8e95a06f1367d73c5ddcc0ed04a3f38d6e4c9346988fb0cea2ffa"},
- {file = "grpcio-1.32.0-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:28677f057e2ef11501860a7bc15de12091d40b95dd0fddab3c37ff1542e6b216"},
- {file = "grpcio-1.32.0-cp36-cp36m-win32.whl", hash = "sha256:0f3f09269ffd3fded430cd89ba2397eabbf7e47be93983b25c187cdfebb302a7"},
- {file = "grpcio-1.32.0-cp36-cp36m-win_amd64.whl", hash = "sha256:4396b1d0f388ae875eaf6dc05cdcb612c950fd9355bc34d38b90aaa0665a0d4b"},
- {file = "grpcio-1.32.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:1ada89326a364a299527c7962e5c362dbae58c67b283fe8383c4d952b26565d5"},
- {file = "grpcio-1.32.0-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:1d384a61f96a1fc6d5d3e0b62b0a859abc8d4c3f6d16daba51ebf253a3e7df5d"},
- {file = "grpcio-1.32.0-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:e811ce5c387256609d56559d944a974cc6934a8eea8c76e7c86ec388dc06192d"},
- {file = "grpcio-1.32.0-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:07b430fa68e5eecd78e2ad529ab80f6a234b55fc1b675fe47335ccbf64c6c6c8"},
- {file = "grpcio-1.32.0-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:0e3edd8cdb71809d2455b9dbff66b4dd3d36c321e64bfa047da5afdfb0db332b"},
- {file = "grpcio-1.32.0-cp37-cp37m-win32.whl", hash = "sha256:6f7947dad606c509d067e5b91a92b250aa0530162ab99e4737090f6b17eb12c4"},
- {file = "grpcio-1.32.0-cp37-cp37m-win_amd64.whl", hash = "sha256:7cda998b7b551503beefc38db9be18c878cfb1596e1418647687575cdefa9273"},
- {file = "grpcio-1.32.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c58825a3d8634cd634d8f869afddd4d5742bdb59d594aea4cea17b8f39269a55"},
- {file = "grpcio-1.32.0-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:ef9bd7fdfc0a063b4ed0efcab7906df5cae9bbcf79d05c583daa2eba56752b00"},
- {file = "grpcio-1.32.0-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:1ce6f5ff4f4a548c502d5237a071fa617115df58ea4b7bd41dac77c1ab126e9c"},
- {file = "grpcio-1.32.0-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:f12900be4c3fd2145ba94ab0d80b7c3d71c9e6414cfee2f31b1c20188b5c281f"},
- {file = "grpcio-1.32.0-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:f53f2dfc8ff9a58a993e414a016c8b21af333955ae83960454ad91798d467c7b"},
- {file = "grpcio-1.32.0-cp38-cp38-win32.whl", hash = "sha256:5bddf9d53c8df70061916c3bfd2f468ccf26c348bb0fb6211531d895ed5e4c72"},
- {file = "grpcio-1.32.0-cp38-cp38-win_amd64.whl", hash = "sha256:14c0f017bfebbc18139551111ac58ecbde11f4bc375b73a53af38927d60308b6"},
- {file = "grpcio-1.32.0.tar.gz", hash = "sha256:01d3046fe980be25796d368f8fc5ff34b7cf5e1444f3789a017a7fe794465639"},
+ {file = "grpcio-1.33.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1205bbe8bb41705dec20dc77c51205d05805d785ddae64dbbbbcc8063b7f1550"},
+ {file = "grpcio-1.33.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:04712ec521907b814445f915a834e090352173ede45c6063dfafa64a1e1eb86f"},
+ {file = "grpcio-1.33.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:b20f555557c12f4c7c32f298b8b8202da49902ce008e4c0bdb0a83f8de2355c9"},
+ {file = "grpcio-1.33.1-cp27-cp27m-win32.whl", hash = "sha256:1664a3dbd34ab91172149526fb8ba18f626edb72448397280ec6f4d30dc34be4"},
+ {file = "grpcio-1.33.1-cp27-cp27m-win_amd64.whl", hash = "sha256:ffc6e264399ac5e48684f33213b086ce7a2163928a41518eca99e1d88c2069b0"},
+ {file = "grpcio-1.33.1-cp27-cp27mu-linux_armv7l.whl", hash = "sha256:d9ac1cf1633ccc561d7d97ee0af3fbe262a6573c08a8f88cfea58caef1c73505"},
+ {file = "grpcio-1.33.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:ccf967e1e3d1f62cd63feeecca567511dd321b5b65abfb6c880264295a0e2df7"},
+ {file = "grpcio-1.33.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:d3d6f614b5e9c58afc45fbe0383bab206392f2901ebb7fe0027d4abadad7e4e6"},
+ {file = "grpcio-1.33.1-cp35-cp35m-linux_armv7l.whl", hash = "sha256:6ffe23e3f845ae7058b32f58b252bc367865d44a8c42838e16b5fe5727b174d4"},
+ {file = "grpcio-1.33.1-cp35-cp35m-macosx_10_7_intel.whl", hash = "sha256:e2555101f42dda5ca43ccef4a397ba9596a5f7c40dcfed6a81984374c6d60411"},
+ {file = "grpcio-1.33.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:f34df047f72ec675b61316e9d56904d069f5f9c4172bfee48e3f40d5c8e07df1"},
+ {file = "grpcio-1.33.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:b380f590f28a51f31eaa1c6991b93f5af39158956a0e6bb7ab6fdd3e830055b6"},
+ {file = "grpcio-1.33.1-cp35-cp35m-manylinux2014_i686.whl", hash = "sha256:60765d070dadfce363c74175ff96dbdf5b15f8bcf999bedafc972b938899fd7a"},
+ {file = "grpcio-1.33.1-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:07ed96a6c320505456be2e95edcdcec3e484beff9edaa46bdb6f9e5b88eebc2b"},
+ {file = "grpcio-1.33.1-cp35-cp35m-win32.whl", hash = "sha256:c7ffff3d6c935bf400d329ad33e2326e4917885f1faa3e985eb6bcf43bea88bc"},
+ {file = "grpcio-1.33.1-cp35-cp35m-win_amd64.whl", hash = "sha256:8872620c946733dbc6336243c98440ef4d1b2956578b682c2f67543aef98e815"},
+ {file = "grpcio-1.33.1-cp36-cp36m-linux_armv7l.whl", hash = "sha256:57fb11dcf7d801ccae146f92a07f70545e8f0042354b856ccb9085f39c15564f"},
+ {file = "grpcio-1.33.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:62d2dbc5ab27fe7a33b30ab0395c1c65bf1033cca17e645279420094c99327a1"},
+ {file = "grpcio-1.33.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:c9dd598f8b96e86f99628fbd615cbab97328557a77f06ad8cd720bc8a2125a8b"},
+ {file = "grpcio-1.33.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:774678e29321fc76bbe01d25e8778fbe96fd2d9fbe774c24a122891b34f53918"},
+ {file = "grpcio-1.33.1-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:254a42e13d945c880a8d35a63c646227e691b7c085e433a505fbbaea362bfe1e"},
+ {file = "grpcio-1.33.1-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:f8816e38fbddd31216683a283b48294d7eabd4bf1e26f8cc0cb7bed896f44f30"},
+ {file = "grpcio-1.33.1-cp36-cp36m-win32.whl", hash = "sha256:21c235f7f8f3a1fb6db387ffc9ceef38bd4b3f5185b4b6b43065a57fd1fcda20"},
+ {file = "grpcio-1.33.1-cp36-cp36m-win_amd64.whl", hash = "sha256:fb7e9029ec99568519f9a13a9da4e5a83020197ffbfb23a28fe4e58a2c3ae11c"},
+ {file = "grpcio-1.33.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d41e2d75f836a0e0e637a7c383d668602063ec655de8bf4b3167b3d1fddabf41"},
+ {file = "grpcio-1.33.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:0222ceec7e8dbddd18c6b027214fb3d55b78a823337f95730d4e157b733c5766"},
+ {file = "grpcio-1.33.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:143028a0421ac0af976a08fbc36de09e14cbdd74d4dc319f914e3511b737c659"},
+ {file = "grpcio-1.33.1-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:e699ddfd287230b8efa6aca3932f7303e587025bdd4122ccbca9134857cca8a2"},
+ {file = "grpcio-1.33.1-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:b9e672396fef071ecd4b0ffca59c05d668ddce19a44ef6c253f7d88bbe2ed246"},
+ {file = "grpcio-1.33.1-cp37-cp37m-win32.whl", hash = "sha256:6a45081ece2279678f104e40a3683772fc1a917aac5c4352bd0769bd390470e5"},
+ {file = "grpcio-1.33.1-cp37-cp37m-win_amd64.whl", hash = "sha256:ec7ded77c8644a791fa09ad4d20b258b4b5aff1e4cc62e15e6c4b3a4e19eb898"},
+ {file = "grpcio-1.33.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a48518e831573c7592064fb67aab61b33c279c944da2632e5922badb422ce175"},
+ {file = "grpcio-1.33.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:ef89d99d5fbdd453e52b4193d5cf74f773fafd682dfd87b4fa297dbf20feff50"},
+ {file = "grpcio-1.33.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:ccefa3fc8a1fbed1beac7de64e6b28fa16c4fd224fad90213f9293dcb3ff1c0e"},
+ {file = "grpcio-1.33.1-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:a498effc32dd57dfde8d75b266d6656ab2bc0b20188ef3422f060244442c4b39"},
+ {file = "grpcio-1.33.1-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:e88210253bda4c92c22d74d122f43e53e204211b22dc5567367f40ce0197e378"},
+ {file = "grpcio-1.33.1-cp38-cp38-win32.whl", hash = "sha256:21077fc89374b3c25377010ca7ddde6287007a6f0a1c515887f43d5ad84dc431"},
+ {file = "grpcio-1.33.1-cp38-cp38-win_amd64.whl", hash = "sha256:47ccf4b6b3ae4fd192500a78af7f191f1c88ee7493744a75657b970b4b17e678"},
+ {file = "grpcio-1.33.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:976f30637bb89b3ca714a3a762c825ef7c4bb38c6b43d7425c02e620ba47ef82"},
+ {file = "grpcio-1.33.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:7e0029ec181c4d3ca76217f8c8b686b96a583d74b893ac86b514f6c37a74889b"},
+ {file = "grpcio-1.33.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:5c232df1cea26f53b763d1fc2d28ddef209de2a7fb20efc8d6a19ea47ac61dbb"},
+ {file = "grpcio-1.33.1-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:66c1850ddd8e032655d947d18b56826c942c002e5e9a50b659389cbbb9d557df"},
+ {file = "grpcio-1.33.1-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:f2c63017125fbffd70f674fc9988290578c836af7e6bb44f7284ff196af207c9"},
+ {file = "grpcio-1.33.1.tar.gz", hash = "sha256:f19782ec5104599382a0f73f2dfea465d0e65f6818bb3c49ca672b97034c64c3"},
]
grpcio-tools = [
- {file = "grpcio-tools-1.32.0.tar.gz", hash = "sha256:28547272c51e1d2d343685b9f531e85bb90ad7bd93e726ba646b5627173cbc47"},
- {file = "grpcio_tools-1.32.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:b6165dc7d424c3c58a54e9e47eacc7cc1513cd09c7c71ff5323e74ead5bb863f"},
- {file = "grpcio_tools-1.32.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:a7432b84d6f2f6260d5461eb2a8904db8cf24b663e0a1236375098c8e15c289c"},
- {file = "grpcio_tools-1.32.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:4f61edfb0c07689a2835f15f4a25a781f058866cb4fea0bea391ae6deb74325f"},
- {file = "grpcio_tools-1.32.0-cp27-cp27m-win32.whl", hash = "sha256:a3524be59d4e6f8b089f7eaa128bc83e2375aac973f1bf0b568cd1c04c4df56e"},
- {file = "grpcio_tools-1.32.0-cp27-cp27m-win_amd64.whl", hash = "sha256:b31e7e909ba9efd8a08eb45665bf2f8326726da288d9e33555473e6b20596dbd"},
- {file = "grpcio_tools-1.32.0-cp27-cp27mu-linux_armv7l.whl", hash = "sha256:4e04d6a7c48adbdca64e9b67cc75e8294b3b37b1284dd2819183e38a4207aa39"},
- {file = "grpcio_tools-1.32.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:37acc75ec1dc836772496ef77170fab585e2517abdf1330c29e682eb50a6ce86"},
- {file = "grpcio_tools-1.32.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:7d5be0d06bf830efbf1867db7b01720e54a136454410270e896441ec56baba00"},
- {file = "grpcio_tools-1.32.0-cp35-cp35m-linux_armv7l.whl", hash = "sha256:6e26e8d0ef73c04dc1118513c06ff56bce36672c8e28410ae4f938c22002ba00"},
- {file = "grpcio_tools-1.32.0-cp35-cp35m-macosx_10_9_intel.whl", hash = "sha256:3971dee0cf57dc3813f6f40724161341ec3b31137b026ae8d4db30c83afeb2a1"},
- {file = "grpcio_tools-1.32.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:83414dd919b692d92876db787b6fda709c226243c9bdb71b5025297a127f3be4"},
- {file = "grpcio_tools-1.32.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:9b5beb49002bb1f1c0641b55ddc2d1d92c7844fb42348e874146bf7667b6ca20"},
- {file = "grpcio_tools-1.32.0-cp35-cp35m-manylinux2014_i686.whl", hash = "sha256:7a18d6375efe075cc274fdfe004bee4530319a2dbb044eb7eb157c313fe88c97"},
- {file = "grpcio_tools-1.32.0-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:8147085f0a044ddc27c870feb8e82a25685f3fdf09184dba0f63fed720f12e93"},
- {file = "grpcio_tools-1.32.0-cp35-cp35m-win32.whl", hash = "sha256:e2a37e716ef6b5e81c44648648aae258b67b9ef19e0a472ec4080f5e384be386"},
- {file = "grpcio_tools-1.32.0-cp35-cp35m-win_amd64.whl", hash = "sha256:130c248d0d94473f3eb80d86bdae35a39eb20ab98fde6d227e7f7e053ccbba88"},
- {file = "grpcio_tools-1.32.0-cp36-cp36m-linux_armv7l.whl", hash = "sha256:11228fb5343c197e1f4376a966f6845ea270c794ec925260b8a27f6df5d90d04"},
- {file = "grpcio_tools-1.32.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:246caf8cdea97ff3710a810c55c9400e3aa7af1a5464a667d62184e38a58a031"},
- {file = "grpcio_tools-1.32.0-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:6aa6dd1d7e746c41803a209565d23e6027b0a5dd9b59596da37f99257cc58e65"},
- {file = "grpcio_tools-1.32.0-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:541a6b992aa417a6305c965bb6896aa1a1ca37d00a82d5438074b18db6a37aad"},
- {file = "grpcio_tools-1.32.0-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:e83146ef8f17e3a35fe77a438794f0a4a50ea11085194bfea1b419c1b342f7b1"},
- {file = "grpcio_tools-1.32.0-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:71c451240e66245125e504abee5acc7ab30da099d5c17596d43ecc66e6034e20"},
- {file = "grpcio_tools-1.32.0-cp36-cp36m-win32.whl", hash = "sha256:6155ed6fed3c9a41fd03156c31adb5012c2399992c929987d3fa8ff1cd3c7cd8"},
- {file = "grpcio_tools-1.32.0-cp36-cp36m-win_amd64.whl", hash = "sha256:a137b6079c96f11f0854a4793910f76aa4a62283947311b6e5131369fa226b48"},
- {file = "grpcio_tools-1.32.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f5f381943081792d82fe34c5a649d98a6b91741c6d62cbca8914943b8d1a4e8b"},
- {file = "grpcio_tools-1.32.0-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:adeae62f3bd1c6839e3822620f7650d30adb7398170e3a0b45a0059f9fe631c8"},
- {file = "grpcio_tools-1.32.0-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:bcc62cb4a3c9a39fb9e349124018e7d7edf0f627592561410e28b590767b831f"},
- {file = "grpcio_tools-1.32.0-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:d11f432ed6fde059b33c514b64fcbf4527f56e03ff94f52f95121547c6945825"},
- {file = "grpcio_tools-1.32.0-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:708077380f458ef831e7da67f574abfb2fc6b6a24225c5976d92809b8930254c"},
- {file = "grpcio_tools-1.32.0-cp37-cp37m-win32.whl", hash = "sha256:de8ca90742bd41a19c1067fba6ffa13befd3ddb505d67eb297d6a418a5937a25"},
- {file = "grpcio_tools-1.32.0-cp37-cp37m-win_amd64.whl", hash = "sha256:632bba5853e955072392aac42fbca16daf65adfc0ec094fa840afbb83c78bee8"},
- {file = "grpcio_tools-1.32.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c2da2a4b2209156d0f88f91bd5d4650a9ed830acb6f685881a26d67d3f671361"},
- {file = "grpcio_tools-1.32.0-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:d3d01ebc1526cc9cdc5e29d2196bae43d56d8ec545dd30fead8b8b3e0b126808"},
- {file = "grpcio_tools-1.32.0-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:fd059d37d9537fa1a89b1139f8cbed7530a5f81c8577560d3f7710fcec95efde"},
- {file = "grpcio_tools-1.32.0-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:524f0460a49a3248d1cb462d0904e783a75bb3cecdcaea520c3688c8bccd9f2f"},
- {file = "grpcio_tools-1.32.0-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:6327f2c6acca4eac1d5a8e1ee92282682b83069d53199ff8ce18906e912086ed"},
- {file = "grpcio_tools-1.32.0-cp38-cp38-win32.whl", hash = "sha256:07c1da5f1dbd4db664d416f68db6a92d5c88b4073ec6be41fcc7aa4d632f60a9"},
- {file = "grpcio_tools-1.32.0-cp38-cp38-win_amd64.whl", hash = "sha256:9b92f998ed1d01925160e47e9546c742aa0de49009f8fa3bb79420252d8a888d"},
+ {file = "grpcio-tools-1.33.1.tar.gz", hash = "sha256:fc56027931694be7a2ea45719ef7fed911e2d1dc24ba69d98a418daa78b35467"},
+ {file = "grpcio_tools-1.33.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b417f2b4041f4805d40d57413654f0302db2cdda1ac6a5745bd0811a8589899"},
+ {file = "grpcio_tools-1.33.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:c484ef6c1416edea005dc9b9857c5d5f3ab94f6a54291cc6521d7316a3a4327e"},
+ {file = "grpcio_tools-1.33.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:b63131d5a84a7d11d85a426025328ce518575f78997d0285c9e8f1507337bb4a"},
+ {file = "grpcio_tools-1.33.1-cp27-cp27m-win32.whl", hash = "sha256:7211f8b31a14974e75657ea5c968ced90d5952505f6cc7af2324477e0c2247c2"},
+ {file = "grpcio_tools-1.33.1-cp27-cp27m-win_amd64.whl", hash = "sha256:18d985a388b8c1598177dbc36865a040e9c77f2d47b450afa2e92f3e63bca3b0"},
+ {file = "grpcio_tools-1.33.1-cp27-cp27mu-linux_armv7l.whl", hash = "sha256:c1ad897aa0e3894d2d2e96e7d8a15c9d1b5ac38742a618e0dd38771d89f89ee5"},
+ {file = "grpcio_tools-1.33.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:2b207e4f013ec1d3afb827de0f319068c916642d41fb66afa92d9144511be836"},
+ {file = "grpcio_tools-1.33.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:e66e44bad421cc7fa63025a9df2f75366f18bfbfe3c6666af7ac324782e23b14"},
+ {file = "grpcio_tools-1.33.1-cp35-cp35m-linux_armv7l.whl", hash = "sha256:474994879abb84de7e13596337321343bfc0e3cc8109c052610a0ad36bb4b877"},
+ {file = "grpcio_tools-1.33.1-cp35-cp35m-macosx_10_9_intel.whl", hash = "sha256:ffb083da3433056db909b5c2bbf901c438e1655643a758c4f12ff29358b47ea4"},
+ {file = "grpcio_tools-1.33.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:f0a3f0e1c707f328a2eaa64a53675b03ca4f8a8772f6732ee6d81ce2e492d223"},
+ {file = "grpcio_tools-1.33.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:9b304efa47b6d6cdf73a849270fd189a49100e456733cb7f6d6ab33ae3dbecac"},
+ {file = "grpcio_tools-1.33.1-cp35-cp35m-manylinux2014_i686.whl", hash = "sha256:96f52b9e9451ecc922e3fa2e740483ad305e74892c26f15cb450e8e6753439fe"},
+ {file = "grpcio_tools-1.33.1-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:ab37d582689f5d4c10e7fe70cd495fc591556292af71ee15c6f6321ba058e0b9"},
+ {file = "grpcio_tools-1.33.1-cp35-cp35m-win32.whl", hash = "sha256:5621f8629a330eddaa239775171228b5cc71781501460ed75709d91e6af2cd77"},
+ {file = "grpcio_tools-1.33.1-cp35-cp35m-win_amd64.whl", hash = "sha256:bbd143d5011dd1c16b158d951dc95b1799c8f86083ada05e2bbe0cec167edd20"},
+ {file = "grpcio_tools-1.33.1-cp36-cp36m-linux_armv7l.whl", hash = "sha256:c4da9df7b67541869a01f582d1f37251ebb791622d9e141c4c1a67d66ea57a31"},
+ {file = "grpcio_tools-1.33.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:1c6a611e9ae6ad5d6aa895888c5dc19d970b77fc59f7596ec1d014e328597ce3"},
+ {file = "grpcio_tools-1.33.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:db3d50b58465c705c3fce5bc9a309ae98e671effb2097eb8318fe9158b65117f"},
+ {file = "grpcio_tools-1.33.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:5377a03a7690de5202b243ad9f8e2c4e9ca43f0a6b3226c0fd9754877a558ce9"},
+ {file = "grpcio_tools-1.33.1-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:6dfa887a5e699ea27960013aeae08a9344a28ff95b62a7e43d8d1e7644962601"},
+ {file = "grpcio_tools-1.33.1-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:5fc46d3b5edd33e78d3d8b549eaa9c0fd6737ff18ad8ac3441f843a97e7676a0"},
+ {file = "grpcio_tools-1.33.1-cp36-cp36m-win32.whl", hash = "sha256:1e8110ea510da931160b76d647d54351664e80c027d35cca2bc44ce48ac4eef7"},
+ {file = "grpcio_tools-1.33.1-cp36-cp36m-win_amd64.whl", hash = "sha256:41eb667bb65adc9d4ff28c83d63aee87a0f52568a5fce021767925137874a9c1"},
+ {file = "grpcio_tools-1.33.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b86a31260b3cfc151d99ba33393984b65e0d1880e946ffb480577860dfe52621"},
+ {file = "grpcio_tools-1.33.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:05e4375bde8a092d45d1675fead6e4a7a4c3d96da973187fe4860a75d5b78ff7"},
+ {file = "grpcio_tools-1.33.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:cbad3696066d6e9d818af561dd4da211b3cc652193ba5c95d256c6f6c93e1369"},
+ {file = "grpcio_tools-1.33.1-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:e569847271bdd1a7fdf72e2fdac794ab299d9eec90ceff430dce42cbc14fde24"},
+ {file = "grpcio_tools-1.33.1-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:e8d908ff4ddec31a78052513b673aa5a236d7a3c0492feac43db8051d20ecb80"},
+ {file = "grpcio_tools-1.33.1-cp37-cp37m-win32.whl", hash = "sha256:ba392f73a6da3f7c51f9abae18755ad001ca8ca125736363ccf96636a51a42b8"},
+ {file = "grpcio_tools-1.33.1-cp37-cp37m-win_amd64.whl", hash = "sha256:ad544798cd5d5b259a2619c2a94abe81bcf44ca8fd373190de36ad1c9170ea34"},
+ {file = "grpcio_tools-1.33.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7c770ca893e2d4794c841fa92877f765a33fb5fe17c8a61c6472b3d30b99eafc"},
+ {file = "grpcio_tools-1.33.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:8addf3ff710d85a0976b5176b4b612e75ac06a42789d114ee9549540a5ddd29a"},
+ {file = "grpcio_tools-1.33.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:27641f00db36b3f009d21dfb28e405163421a6aa89d30e199f02c6bd58b2616d"},
+ {file = "grpcio_tools-1.33.1-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:94e369783afcaa382825632066239139256ec0f860cfb4cc5f329702a7e9c701"},
+ {file = "grpcio_tools-1.33.1-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:1518d42e010953f6b80972d4fc669d529ecdcedf482c7dfbaf876dc6e5eff035"},
+ {file = "grpcio_tools-1.33.1-cp38-cp38-win32.whl", hash = "sha256:6c1d86b547fd9383fe248541d35ae15ddc299e276a0d1312829a3530301b97a5"},
+ {file = "grpcio_tools-1.33.1-cp38-cp38-win_amd64.whl", hash = "sha256:d47820eec86fc40492efa7a85a0869430bbad708be0e0fc0065adb4ebaec8733"},
+ {file = "grpcio_tools-1.33.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5f8fb405b3f9bb320c69b88ee2ce7cbc006827bf85c479c8075a0b617b8aaf2a"},
+ {file = "grpcio_tools-1.33.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4c22ab4db29e31c36ef5bd6ae988bd25fa4b858e440d98763132b7be1c35a4e9"},
+ {file = "grpcio_tools-1.33.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:9ac16eac70d9a75241aa3b0c512d38f54a3018c6d08e6de60d4d162a6be63fbc"},
+ {file = "grpcio_tools-1.33.1-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:76bc561d02f0d74b0a6487841c43b344ecf599b9f34621ebe6e89b52999f3028"},
+ {file = "grpcio_tools-1.33.1-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:35f5da1180fdb633a866d2fc12ceebef1e17c3b055621bf94a74404af4c1824c"},
]
guzzle-sphinx-theme = [
{file = "guzzle_sphinx_theme-0.7.11.tar.gz", hash = "sha256:9b8c1639c343c02c3f3db7df660ddf6f533b5454ee92a5f7b02edaa573fed3e6"},
@@ -983,12 +993,12 @@ importlib-metadata = [
{file = "importlib_metadata-2.0.0.tar.gz", hash = "sha256:77a540690e24b0305878c37ffd421785a6f7e53c8b5720d211b211de8d0e95da"},
]
iniconfig = [
- {file = "iniconfig-1.0.1-py3-none-any.whl", hash = "sha256:80cf40c597eb564e86346103f609d74efce0f6b4d4f30ec8ce9e2c26411ba437"},
- {file = "iniconfig-1.0.1.tar.gz", hash = "sha256:e5f92f89355a67de0595932a6c6c02ab4afddc6fcdc0bfc5becd0d60884d3f69"},
+ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
+ {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
]
isort = [
- {file = "isort-5.5.4-py3-none-any.whl", hash = "sha256:36f0c6659b9000597e92618d05b72d4181104cf59472b1c6a039e3783f930c95"},
- {file = "isort-5.5.4.tar.gz", hash = "sha256:ba040c24d20aa302f78f4747df549573ae1eaf8e1084269199154da9c483f07f"},
+ {file = "isort-5.6.4-py3-none-any.whl", hash = "sha256:dcab1d98b469a12a1a624ead220584391648790275560e1a43e54c5dceae65e7"},
+ {file = "isort-5.6.4.tar.gz", hash = "sha256:dcaeec1b5f0eca77faea2a35ab790b4f3680ff75590bfcb7145986905aab2f58"},
]
jinja2 = [
{file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"},
@@ -1106,34 +1116,34 @@ pathtools = [
{file = "pathtools-0.1.2.tar.gz", hash = "sha256:7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0"},
]
pillow = [
- {file = "Pillow-7.2.0-cp35-cp35m-macosx_10_10_intel.whl", hash = "sha256:1ca594126d3c4def54babee699c055a913efb01e106c309fa6b04405d474d5ae"},
- {file = "Pillow-7.2.0-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:c92302a33138409e8f1ad16731568c55c9053eee71bb05b6b744067e1b62380f"},
- {file = "Pillow-7.2.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:8dad18b69f710bf3a001d2bf3afab7c432785d94fcf819c16b5207b1cfd17d38"},
- {file = "Pillow-7.2.0-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:431b15cffbf949e89df2f7b48528be18b78bfa5177cb3036284a5508159492b5"},
- {file = "Pillow-7.2.0-cp35-cp35m-win32.whl", hash = "sha256:09d7f9e64289cb40c2c8d7ad674b2ed6105f55dc3b09aa8e4918e20a0311e7ad"},
- {file = "Pillow-7.2.0-cp35-cp35m-win_amd64.whl", hash = "sha256:0295442429645fa16d05bd567ef5cff178482439c9aad0411d3f0ce9b88b3a6f"},
- {file = "Pillow-7.2.0-cp36-cp36m-macosx_10_10_x86_64.whl", hash = "sha256:ec29604081f10f16a7aea809ad42e27764188fc258b02259a03a8ff7ded3808d"},
- {file = "Pillow-7.2.0-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:612cfda94e9c8346f239bf1a4b082fdd5c8143cf82d685ba2dba76e7adeeb233"},
- {file = "Pillow-7.2.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0a80dd307a5d8440b0a08bd7b81617e04d870e40a3e46a32d9c246e54705e86f"},
- {file = "Pillow-7.2.0-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:06aba4169e78c439d528fdeb34762c3b61a70813527a2c57f0540541e9f433a8"},
- {file = "Pillow-7.2.0-cp36-cp36m-win32.whl", hash = "sha256:f7e30c27477dffc3e85c2463b3e649f751789e0f6c8456099eea7ddd53be4a8a"},
- {file = "Pillow-7.2.0-cp36-cp36m-win_amd64.whl", hash = "sha256:ffe538682dc19cc542ae7c3e504fdf54ca7f86fb8a135e59dd6bc8627eae6cce"},
- {file = "Pillow-7.2.0-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:94cf49723928eb6070a892cb39d6c156f7b5a2db4e8971cb958f7b6b104fb4c4"},
- {file = "Pillow-7.2.0-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6edb5446f44d901e8683ffb25ebdfc26988ee813da3bf91e12252b57ac163727"},
- {file = "Pillow-7.2.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:52125833b070791fcb5710fabc640fc1df07d087fc0c0f02d3661f76c23c5b8b"},
- {file = "Pillow-7.2.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:9ad7f865eebde135d526bb3163d0b23ffff365cf87e767c649550964ad72785d"},
- {file = "Pillow-7.2.0-cp37-cp37m-win32.whl", hash = "sha256:c79f9c5fb846285f943aafeafda3358992d64f0ef58566e23484132ecd8d7d63"},
- {file = "Pillow-7.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d350f0f2c2421e65fbc62690f26b59b0bcda1b614beb318c81e38647e0f673a1"},
- {file = "Pillow-7.2.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:6d7741e65835716ceea0fd13a7d0192961212fd59e741a46bbed7a473c634ed6"},
- {file = "Pillow-7.2.0-cp38-cp38-manylinux1_i686.whl", hash = "sha256:edf31f1150778abd4322444c393ab9c7bd2af271dd4dafb4208fb613b1f3cdc9"},
- {file = "Pillow-7.2.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:d08b23fdb388c0715990cbc06866db554e1822c4bdcf6d4166cf30ac82df8c41"},
- {file = "Pillow-7.2.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:5e51ee2b8114def244384eda1c82b10e307ad9778dac5c83fb0943775a653cd8"},
- {file = "Pillow-7.2.0-cp38-cp38-win32.whl", hash = "sha256:725aa6cfc66ce2857d585f06e9519a1cc0ef6d13f186ff3447ab6dff0a09bc7f"},
- {file = "Pillow-7.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:a060cf8aa332052df2158e5a119303965be92c3da6f2d93b6878f0ebca80b2f6"},
- {file = "Pillow-7.2.0-pp36-pypy36_pp73-macosx_10_10_x86_64.whl", hash = "sha256:9c87ef410a58dd54b92424ffd7e28fd2ec65d2f7fc02b76f5e9b2067e355ebf6"},
- {file = "Pillow-7.2.0-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:e901964262a56d9ea3c2693df68bc9860b8bdda2b04768821e4c44ae797de117"},
- {file = "Pillow-7.2.0-pp36-pypy36_pp73-win32.whl", hash = "sha256:25930fadde8019f374400f7986e8404c8b781ce519da27792cbe46eabec00c4d"},
- {file = "Pillow-7.2.0.tar.gz", hash = "sha256:97f9e7953a77d5a70f49b9a48da7776dc51e9b738151b22dacf101641594a626"},
+ {file = "Pillow-8.0.1-cp36-cp36m-macosx_10_10_x86_64.whl", hash = "sha256:b63d4ff734263ae4ce6593798bcfee6dbfb00523c82753a3a03cbc05555a9cc3"},
+ {file = "Pillow-8.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:5f9403af9c790cc18411ea398a6950ee2def2a830ad0cfe6dc9122e6d528b302"},
+ {file = "Pillow-8.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:6b4a8fd632b4ebee28282a9fef4c341835a1aa8671e2770b6f89adc8e8c2703c"},
+ {file = "Pillow-8.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:cc3ea6b23954da84dbee8025c616040d9aa5eaf34ea6895a0a762ee9d3e12e11"},
+ {file = "Pillow-8.0.1-cp36-cp36m-win32.whl", hash = "sha256:d8a96747df78cda35980905bf26e72960cba6d355ace4780d4bdde3b217cdf1e"},
+ {file = "Pillow-8.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:7ba0ba61252ab23052e642abdb17fd08fdcfdbbf3b74c969a30c58ac1ade7cd3"},
+ {file = "Pillow-8.0.1-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:795e91a60f291e75de2e20e6bdd67770f793c8605b553cb6e4387ce0cb302e09"},
+ {file = "Pillow-8.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0a2e8d03787ec7ad71dc18aec9367c946ef8ef50e1e78c71f743bc3a770f9fae"},
+ {file = "Pillow-8.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:006de60d7580d81f4a1a7e9f0173dc90a932e3905cc4d47ea909bc946302311a"},
+ {file = "Pillow-8.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:bd7bf289e05470b1bc74889d1466d9ad4a56d201f24397557b6f65c24a6844b8"},
+ {file = "Pillow-8.0.1-cp37-cp37m-win32.whl", hash = "sha256:95edb1ed513e68bddc2aee3de66ceaf743590bf16c023fb9977adc4be15bd3f0"},
+ {file = "Pillow-8.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:e38d58d9138ef972fceb7aeec4be02e3f01d383723965bfcef14d174c8ccd039"},
+ {file = "Pillow-8.0.1-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:d3d07c86d4efa1facdf32aa878bd508c0dc4f87c48125cc16b937baa4e5b5e11"},
+ {file = "Pillow-8.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:fbd922f702582cb0d71ef94442bfca57624352622d75e3be7a1e7e9360b07e72"},
+ {file = "Pillow-8.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:92c882b70a40c79de9f5294dc99390671e07fc0b0113d472cbea3fde15db1792"},
+ {file = "Pillow-8.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:7c9401e68730d6c4245b8e361d3d13e1035cbc94db86b49dc7da8bec235d0015"},
+ {file = "Pillow-8.0.1-cp38-cp38-win32.whl", hash = "sha256:6c1aca8231625115104a06e4389fcd9ec88f0c9befbabd80dc206c35561be271"},
+ {file = "Pillow-8.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:cc9ec588c6ef3a1325fa032ec14d97b7309db493782ea8c304666fb10c3bd9a7"},
+ {file = "Pillow-8.0.1-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:eb472586374dc66b31e36e14720747595c2b265ae962987261f044e5cce644b5"},
+ {file = "Pillow-8.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:0eeeae397e5a79dc088d8297a4c2c6f901f8fb30db47795113a4a605d0f1e5ce"},
+ {file = "Pillow-8.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:81f812d8f5e8a09b246515fac141e9d10113229bc33ea073fec11403b016bcf3"},
+ {file = "Pillow-8.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:895d54c0ddc78a478c80f9c438579ac15f3e27bf442c2a9aa74d41d0e4d12544"},
+ {file = "Pillow-8.0.1-cp39-cp39-win32.whl", hash = "sha256:2fb113757a369a6cdb189f8df3226e995acfed0a8919a72416626af1a0a71140"},
+ {file = "Pillow-8.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:59e903ca800c8cfd1ebe482349ec7c35687b95e98cefae213e271c8c7fffa021"},
+ {file = "Pillow-8.0.1-pp36-pypy36_pp73-macosx_10_10_x86_64.whl", hash = "sha256:5abd653a23c35d980b332bc0431d39663b1709d64142e3652890df4c9b6970f6"},
+ {file = "Pillow-8.0.1-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:4b0ef2470c4979e345e4e0cc1bbac65fda11d0d7b789dbac035e4c6ce3f98adb"},
+ {file = "Pillow-8.0.1-pp37-pypy37_pp73-win32.whl", hash = "sha256:8de332053707c80963b589b22f8e0229f1be1f3ca862a932c1bcd48dafb18dd8"},
+ {file = "Pillow-8.0.1.tar.gz", hash = "sha256:11c5c6e9b02c9dac08af04f093eb5a2f84857df70a7d4a6a6ad461aca803fb9e"},
]
pluggy = [
{file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"},
@@ -1208,59 +1218,62 @@ recommonmark = [
{file = "recommonmark-0.6.0.tar.gz", hash = "sha256:29cd4faeb6c5268c633634f2d69aef9431e0f4d347f90659fd0aab20e541efeb"},
]
regex = [
- {file = "regex-2020.9.27-cp27-cp27m-win32.whl", hash = "sha256:d23a18037313714fb3bb5a94434d3151ee4300bae631894b1ac08111abeaa4a3"},
- {file = "regex-2020.9.27-cp27-cp27m-win_amd64.whl", hash = "sha256:84e9407db1b2eb368b7ecc283121b5e592c9aaedbe8c78b1a2f1102eb2e21d19"},
- {file = "regex-2020.9.27-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:5f18875ac23d9aa2f060838e8b79093e8bb2313dbaaa9f54c6d8e52a5df097be"},
- {file = "regex-2020.9.27-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:ae91972f8ac958039920ef6e8769277c084971a142ce2b660691793ae44aae6b"},
- {file = "regex-2020.9.27-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:9a02d0ae31d35e1ec12a4ea4d4cca990800f66a917d0fb997b20fbc13f5321fc"},
- {file = "regex-2020.9.27-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:ebbe29186a3d9b0c591e71b7393f1ae08c83cb2d8e517d2a822b8f7ec99dfd8b"},
- {file = "regex-2020.9.27-cp36-cp36m-win32.whl", hash = "sha256:4707f3695b34335afdfb09be3802c87fa0bc27030471dbc082f815f23688bc63"},
- {file = "regex-2020.9.27-cp36-cp36m-win_amd64.whl", hash = "sha256:9bc13e0d20b97ffb07821aa3e113f9998e84994fe4d159ffa3d3a9d1b805043b"},
- {file = "regex-2020.9.27-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:f1b3afc574a3db3b25c89161059d857bd4909a1269b0b3cb3c904677c8c4a3f7"},
- {file = "regex-2020.9.27-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5533a959a1748a5c042a6da71fe9267a908e21eded7a4f373efd23a2cbdb0ecc"},
- {file = "regex-2020.9.27-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:1fe0a41437bbd06063aa184c34804efa886bcc128222e9916310c92cd54c3b4c"},
- {file = "regex-2020.9.27-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:c570f6fa14b9c4c8a4924aaad354652366577b4f98213cf76305067144f7b100"},
- {file = "regex-2020.9.27-cp37-cp37m-win32.whl", hash = "sha256:eda4771e0ace7f67f58bc5b560e27fb20f32a148cbc993b0c3835970935c2707"},
- {file = "regex-2020.9.27-cp37-cp37m-win_amd64.whl", hash = "sha256:60b0e9e6dc45683e569ec37c55ac20c582973841927a85f2d8a7d20ee80216ab"},
- {file = "regex-2020.9.27-cp38-cp38-manylinux1_i686.whl", hash = "sha256:088afc8c63e7bd187a3c70a94b9e50ab3f17e1d3f52a32750b5b77dbe99ef5ef"},
- {file = "regex-2020.9.27-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:eaf548d117b6737df379fdd53bdde4f08870e66d7ea653e230477f071f861121"},
- {file = "regex-2020.9.27-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:41bb65f54bba392643557e617316d0d899ed5b4946dccee1cb6696152b29844b"},
- {file = "regex-2020.9.27-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:8d69cef61fa50c8133382e61fd97439de1ae623fe943578e477e76a9d9471637"},
- {file = "regex-2020.9.27-cp38-cp38-win32.whl", hash = "sha256:f2388013e68e750eaa16ccbea62d4130180c26abb1d8e5d584b9baf69672b30f"},
- {file = "regex-2020.9.27-cp38-cp38-win_amd64.whl", hash = "sha256:4318d56bccfe7d43e5addb272406ade7a2274da4b70eb15922a071c58ab0108c"},
- {file = "regex-2020.9.27-cp39-cp39-manylinux1_i686.whl", hash = "sha256:84cada8effefe9a9f53f9b0d2ba9b7b6f5edf8d2155f9fdbe34616e06ececf81"},
- {file = "regex-2020.9.27-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:816064fc915796ea1f26966163f6845de5af78923dfcecf6551e095f00983650"},
- {file = "regex-2020.9.27-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:5d892a4f1c999834eaa3c32bc9e8b976c5825116cde553928c4c8e7e48ebda67"},
- {file = "regex-2020.9.27-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:c9443124c67b1515e4fe0bb0aa18df640965e1030f468a2a5dc2589b26d130ad"},
- {file = "regex-2020.9.27-cp39-cp39-win32.whl", hash = "sha256:49f23ebd5ac073765ecbcf046edc10d63dcab2f4ae2bce160982cb30df0c0302"},
- {file = "regex-2020.9.27-cp39-cp39-win_amd64.whl", hash = "sha256:3d20024a70b97b4f9546696cbf2fd30bae5f42229fbddf8661261b1eaff0deb7"},
- {file = "regex-2020.9.27.tar.gz", hash = "sha256:a6f32aea4260dfe0e55dc9733ea162ea38f0ea86aa7d0f77b15beac5bf7b369d"},
+ {file = "regex-2020.10.23-cp27-cp27m-win32.whl", hash = "sha256:781906e45ef1d10a0ed9ec8ab83a09b5e0d742de70e627b20d61ccb1b1d3964d"},
+ {file = "regex-2020.10.23-cp27-cp27m-win_amd64.whl", hash = "sha256:8cd0d587aaac74194ad3e68029124c06245acaeddaae14cb45844e5c9bebeea4"},
+ {file = "regex-2020.10.23-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:af360e62a9790e0a96bc9ac845d87bfa0e4ee0ee68547ae8b5a9c1030517dbef"},
+ {file = "regex-2020.10.23-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e21340c07090ddc8c16deebfd82eb9c9e1ec5e62f57bb86194a2595fd7b46e0"},
+ {file = "regex-2020.10.23-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:e5f6aa56dda92472e9d6f7b1e6331f4e2d51a67caafff4d4c5121cadac03941e"},
+ {file = "regex-2020.10.23-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:c30d8766a055c22e39dd7e1a4f98f6266169f2de05db737efe509c2fb9c8a3c8"},
+ {file = "regex-2020.10.23-cp36-cp36m-win32.whl", hash = "sha256:1a065e7a6a1b4aa851a0efa1a2579eabc765246b8b3a5fd74000aaa3134b8b4e"},
+ {file = "regex-2020.10.23-cp36-cp36m-win_amd64.whl", hash = "sha256:c95d514093b80e5309bdca5dd99e51bcf82c44043b57c34594d9d7556bd04d05"},
+ {file = "regex-2020.10.23-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:f4b1c65ee86bfbf7d0c3dfd90592a9e3d6e9ecd36c367c884094c050d4c35d04"},
+ {file = "regex-2020.10.23-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d62205f00f461fe8b24ade07499454a3b7adf3def1225e258b994e2215fd15c5"},
+ {file = "regex-2020.10.23-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:b706c70070eea03411b1761fff3a2675da28d042a1ab7d0863b3efe1faa125c9"},
+ {file = "regex-2020.10.23-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:d43cf21df524283daa80ecad551c306b7f52881c8d0fe4e3e76a96b626b6d8d8"},
+ {file = "regex-2020.10.23-cp37-cp37m-win32.whl", hash = "sha256:570e916a44a361d4e85f355aacd90e9113319c78ce3c2d098d2ddf9631b34505"},
+ {file = "regex-2020.10.23-cp37-cp37m-win_amd64.whl", hash = "sha256:1c447b0d108cddc69036b1b3910fac159f2b51fdeec7f13872e059b7bc932be1"},
+ {file = "regex-2020.10.23-cp38-cp38-manylinux1_i686.whl", hash = "sha256:8469377a437dbc31e480993399fd1fd15fe26f382dc04c51c9cb73e42965cc06"},
+ {file = "regex-2020.10.23-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:59d5c6302d22c16d59611a9fd53556554010db1d47e9df5df37be05007bebe75"},
+ {file = "regex-2020.10.23-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:a973d5a7a324e2a5230ad7c43f5e1383cac51ef4903bf274936a5634b724b531"},
+ {file = "regex-2020.10.23-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:97a023f97cddf00831ba04886d1596ef10f59b93df7f855856f037190936e868"},
+ {file = "regex-2020.10.23-cp38-cp38-win32.whl", hash = "sha256:e289a857dca3b35d3615c3a6a438622e20d1bf0abcb82c57d866c8d0be3f44c4"},
+ {file = "regex-2020.10.23-cp38-cp38-win_amd64.whl", hash = "sha256:0cb23ed0e327c18fb7eac61ebbb3180ebafed5b9b86ca2e15438201e5903b5dd"},
+ {file = "regex-2020.10.23-cp39-cp39-manylinux1_i686.whl", hash = "sha256:c53dc8ee3bb7b7e28ee9feb996a0c999137be6c1d3b02cb6b3c4cba4f9e5ed09"},
+ {file = "regex-2020.10.23-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6a46eba253cedcbe8a6469f881f014f0a98819d99d341461630885139850e281"},
+ {file = "regex-2020.10.23-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:240509721a663836b611fa13ca1843079fc52d0b91ef3f92d9bba8da12e768a0"},
+ {file = "regex-2020.10.23-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:6f567df0601e9c7434958143aebea47a9c4b45434ea0ae0286a4ec19e9877169"},
+ {file = "regex-2020.10.23-cp39-cp39-win32.whl", hash = "sha256:bfd7a9fddd11d116a58b62ee6c502fd24cfe22a4792261f258f886aa41c2a899"},
+ {file = "regex-2020.10.23-cp39-cp39-win_amd64.whl", hash = "sha256:1a511470db3aa97432ac8c1bf014fcc6c9fbfd0f4b1313024d342549cf86bcd6"},
+ {file = "regex-2020.10.23.tar.gz", hash = "sha256:2278453c6a76280b38855a263198961938108ea2333ee145c5168c36b8e2b376"},
]
requests = [
{file = "requests-2.24.0-py2.py3-none-any.whl", hash = "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898"},
{file = "requests-2.24.0.tar.gz", hash = "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b"},
]
rich = [
- {file = "rich-8.0.0-py3-none-any.whl", hash = "sha256:3c5e4bb1e48c647bc75bc4ae7c125d399bec5b6ed2a319f0d447361635f02a9a"},
- {file = "rich-8.0.0.tar.gz", hash = "sha256:1b5023d2241e6552a24ddfe830a853fc8e53da4e6a6ed6c7105bb262593edf97"},
+ {file = "rich-6.2.0-py3-none-any.whl", hash = "sha256:fa55d5d6ba9a0df1f1c95518891b57b13f1d45548a9a198a87b093fceee513ec"},
+ {file = "rich-6.2.0.tar.gz", hash = "sha256:f99c877277906e1ff83b135c564920590ba31188f424dcdb5d1cae652a519b4b"},
]
scipy = [
- {file = "scipy-1.5.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cca9fce15109a36a0a9f9cfc64f870f1c140cb235ddf27fe0328e6afb44dfed0"},
- {file = "scipy-1.5.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:1c7564a4810c1cd77fcdee7fa726d7d39d4e2695ad252d7c86c3ea9d85b7fb8f"},
- {file = "scipy-1.5.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:07e52b316b40a4f001667d1ad4eb5f2318738de34597bd91537851365b6c61f1"},
- {file = "scipy-1.5.2-cp36-cp36m-win32.whl", hash = "sha256:d56b10d8ed72ec1be76bf10508446df60954f08a41c2d40778bc29a3a9ad9bce"},
- {file = "scipy-1.5.2-cp36-cp36m-win_amd64.whl", hash = "sha256:8e28e74b97fc8d6aa0454989db3b5d36fc27e69cef39a7ee5eaf8174ca1123cb"},
- {file = "scipy-1.5.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6e86c873fe1335d88b7a4bfa09d021f27a9e753758fd75f3f92d714aa4093768"},
- {file = "scipy-1.5.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:a0afbb967fd2c98efad5f4c24439a640d39463282040a88e8e928db647d8ac3d"},
- {file = "scipy-1.5.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:eecf40fa87eeda53e8e11d265ff2254729d04000cd40bae648e76ff268885d66"},
- {file = "scipy-1.5.2-cp37-cp37m-win32.whl", hash = "sha256:315aa2165aca31375f4e26c230188db192ed901761390be908c9b21d8b07df62"},
- {file = "scipy-1.5.2-cp37-cp37m-win_amd64.whl", hash = "sha256:ec5fe57e46828d034775b00cd625c4a7b5c7d2e354c3b258d820c6c72212a6ec"},
- {file = "scipy-1.5.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:fc98f3eac993b9bfdd392e675dfe19850cc8c7246a8fd2b42443e506344be7d9"},
- {file = "scipy-1.5.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:a785409c0fa51764766840185a34f96a0a93527a0ff0230484d33a8ed085c8f8"},
- {file = "scipy-1.5.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:0a0e9a4e58a4734c2eba917f834b25b7e3b6dc333901ce7784fd31aefbd37b2f"},
- {file = "scipy-1.5.2-cp38-cp38-win32.whl", hash = "sha256:dac09281a0eacd59974e24525a3bc90fa39b4e95177e638a31b14db60d3fa806"},
- {file = "scipy-1.5.2-cp38-cp38-win_amd64.whl", hash = "sha256:92eb04041d371fea828858e4fff182453c25ae3eaa8782d9b6c32b25857d23bc"},
- {file = "scipy-1.5.2.tar.gz", hash = "sha256:066c513d90eb3fd7567a9e150828d39111ebd88d3e924cdfc9f8ce19ab6f90c9"},
+ {file = "scipy-1.5.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f574558f1b774864516f3c3fe072ebc90a29186f49b720f60ed339294b7f32ac"},
+ {file = "scipy-1.5.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:e527c9221b6494bcd06a17f9f16874406b32121385f9ab353b8a9545be458f0b"},
+ {file = "scipy-1.5.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:b9751b39c52a3fa59312bd2e1f40144ee26b51404db5d2f0d5259c511ff6f614"},
+ {file = "scipy-1.5.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:d5e3cc60868f396b78fc881d2c76460febccfe90f6d2f082b9952265c79a8788"},
+ {file = "scipy-1.5.3-cp36-cp36m-win32.whl", hash = "sha256:1fee28b6641ecbff6e80fe7788e50f50c5576157d278fa40f36c851940eb0aff"},
+ {file = "scipy-1.5.3-cp36-cp36m-win_amd64.whl", hash = "sha256:ffcbd331f1ffa82e22f1d408e93c37463c9a83088243158635baec61983aaacf"},
+ {file = "scipy-1.5.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:07b083128beae040f1129bd8a82b01804f5e716a7fd2962c1053fa683433e4ab"},
+ {file = "scipy-1.5.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:e2602f79c85924e4486f684aa9bbab74afff90606100db88d0785a0088be7edb"},
+ {file = "scipy-1.5.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:aebb69bcdec209d874fc4b0c7ac36f509d50418a431c1422465fa34c2c0143ea"},
+ {file = "scipy-1.5.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:bc0e63daf43bf052aefbbd6c5424bc03f629d115ece828e87303a0bcc04a37e4"},
+ {file = "scipy-1.5.3-cp37-cp37m-win32.whl", hash = "sha256:8cc5c39ed287a8b52a5509cd6680af078a40b0e010e2657eca01ffbfec929468"},
+ {file = "scipy-1.5.3-cp37-cp37m-win_amd64.whl", hash = "sha256:0edd67e8a00903aaf7a29c968555a2e27c5a69fea9d1dcfffda80614281a884f"},
+ {file = "scipy-1.5.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:66ec29348444ed6e8a14c9adc2de65e74a8fc526dc2c770741725464488ede1f"},
+ {file = "scipy-1.5.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:12fdcbfa56cac926a0a9364a30cbf4ad03c2c7b59f75b14234656a5e4fd52bf3"},
+ {file = "scipy-1.5.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:a1a13858b10d41beb0413c4378462b43eafef88a1948d286cb357eadc0aec024"},
+ {file = "scipy-1.5.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:5163200ab14fd2b83aba8f0c4ddcc1fa982a43192867264ab0f4c8065fd10d17"},
+ {file = "scipy-1.5.3-cp38-cp38-win32.whl", hash = "sha256:33e6a7439f43f37d4c1135bc95bcd490ffeac6ef4b374892c7005ce2c729cf4a"},
+ {file = "scipy-1.5.3-cp38-cp38-win_amd64.whl", hash = "sha256:a3db1fe7c6cb29ca02b14c9141151ebafd11e06ffb6da8ecd330eee5c8283a8a"},
+ {file = "scipy-1.5.3.tar.gz", hash = "sha256:ddae76784574cc4c172f3d5edd7308be16078dd3b977e8746860c76c195fa707"},
]
six = [
{file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"},
@@ -1303,8 +1316,8 @@ toml = [
{file = "toml-0.10.1.tar.gz", hash = "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f"},
]
tqdm = [
- {file = "tqdm-4.50.1-py2.py3-none-any.whl", hash = "sha256:5313148c57fcca7df562187903cf9cfa30fe1df2fe0641ea6ddb8ef9e841a137"},
- {file = "tqdm-4.50.1.tar.gz", hash = "sha256:b04bbbc52a7f1e3665eaa310f34c6ebbdf058bd3f6251fd64c6ab831817121ea"},
+ {file = "tqdm-4.50.2-py2.py3-none-any.whl", hash = "sha256:43ca183da3367578ebf2f1c2e3111d51ea161ed1dc4e6345b86e27c2a93beff7"},
+ {file = "tqdm-4.50.2.tar.gz", hash = "sha256:69dfa6714dee976e2425a9aab84b622675b7b1742873041e3db8a8e86132a4af"},
]
typed-ast = [
{file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3"},
@@ -1335,8 +1348,8 @@ typing-extensions = [
{file = "typing_extensions-3.7.4.3.tar.gz", hash = "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c"},
]
urllib3 = [
- {file = "urllib3-1.25.10-py2.py3-none-any.whl", hash = "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461"},
- {file = "urllib3-1.25.10.tar.gz", hash = "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a"},
+ {file = "urllib3-1.25.11-py2.py3-none-any.whl", hash = "sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e"},
+ {file = "urllib3-1.25.11.tar.gz", hash = "sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2"},
]
watchdog = [
{file = "watchdog-0.10.3.tar.gz", hash = "sha256:4214e1379d128b0588021880ccaf40317ee156d4603ac388b9adcf29165e0c04"},
@@ -1345,6 +1358,6 @@ wrapt = [
{file = "wrapt-1.12.1.tar.gz", hash = "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"},
]
zipp = [
- {file = "zipp-3.3.0-py3-none-any.whl", hash = "sha256:eed8ec0b8d1416b2ca33516a37a08892442f3954dee131e92cfd92d8fe3e7066"},
- {file = "zipp-3.3.0.tar.gz", hash = "sha256:64ad89efee774d1897a58607895d80789c59778ea02185dd846ac38394a8642b"},
+ {file = "zipp-3.3.2-py3-none-any.whl", hash = "sha256:50a4ef266c31c9409627b46012e206382eb8d23f46fbd358065a8335cfbf7d8f"},
+ {file = "zipp-3.3.2.tar.gz", hash = "sha256:adf8f2ed8f614ced567d849cae9d183cef6cfd27c77a5cae7a28029be0c2b7a7"},
]
diff --git a/pyproject.toml b/pyproject.toml
index e59af4ade..3ebb11782 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "manimce"
-version = "0.2.0"
+version = "0.1.0"
description = "Animation engine for explanatory math videos."
authors = ["The Manim Community Developers","3b1b <[email protected]>"]
license="MIT"
@@ -33,7 +33,7 @@ scipy = "*"
tqdm = "*"
pydub = "*"
pygments = "*"
-rich = ">=4.2.1"
+rich = "^6.0"
pycairo = "^1.20"
grpcio = "*"
grpcio-tools = "*"
@@ -60,7 +60,7 @@ markers = "slow: Mark the test as slow. Can be skipped with --skip_slow"
[tool.poetry.plugins]
[tool.poetry.plugins."console_scripts"]
"manim" = "manim.__main__:main"
-"manimcm" = "manim.__main__:main"
+"manimce" = "manim.__main__:main"
[build-system]
requires = ["poetry>=0.12"]
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 5a587531b..000000000
--- a/requirements.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-colour
-numpy
-Pillow
-scipy
-tqdm
-pycairo
-pydub
-pygments
-pyreadline; sys_platform == 'win32'
-rich>=4.2.1
-grpcio
-grpcio-tools
-watchdog
-
-# for development only:
-# pytest
-# black
-# guzzle-sphinx-theme
-# recommonmark>=0.5.0
diff --git a/tests/control_data/graphical_units_data/creation/DrawBorderThenFillTest.npy b/tests/control_data/graphical_units_data/creation/DrawBorderThenFillTest.npy
deleted file mode 100644
index ccfc7f8aa..000000000
Binary files a/tests/control_data/graphical_units_data/creation/DrawBorderThenFillTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeInFromDownTest.npy b/tests/control_data/graphical_units_data/creation/FadeInFromDownTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/creation/FadeInFromDownTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeInFromLargeTest.npy b/tests/control_data/graphical_units_data/creation/FadeInFromLargeTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/creation/FadeInFromLargeTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeInFromTest.npy b/tests/control_data/graphical_units_data/creation/FadeInFromTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/creation/FadeInFromTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeInTest.npy b/tests/control_data/graphical_units_data/creation/FadeInTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/creation/FadeInTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeOutAndShiftTest.npy b/tests/control_data/graphical_units_data/creation/FadeOutAndShiftTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/creation/FadeOutAndShiftTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeOutTest.npy b/tests/control_data/graphical_units_data/creation/FadeOutTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/creation/FadeOutTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/GrowFromCenterTest.npy b/tests/control_data/graphical_units_data/creation/GrowFromCenterTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/creation/GrowFromCenterTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/GrowFromEdgeTest.npy b/tests/control_data/graphical_units_data/creation/GrowFromEdgeTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/creation/GrowFromEdgeTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/GrowFromPointTest.npy b/tests/control_data/graphical_units_data/creation/GrowFromPointTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/creation/GrowFromPointTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/ShowCreationTest.npy b/tests/control_data/graphical_units_data/creation/ShowCreationTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/creation/ShowCreationTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/ShrinkToCenterTest.npy b/tests/control_data/graphical_units_data/creation/ShrinkToCenterTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/creation/ShrinkToCenterTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/SpinInFromNothingTest.npy b/tests/control_data/graphical_units_data/creation/SpinInFromNothingTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/creation/SpinInFromNothingTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/UncreateTest.npy b/tests/control_data/graphical_units_data/creation/UncreateTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/creation/UncreateTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/WriteTest.npy b/tests/control_data/graphical_units_data/creation/WriteTest.npy
deleted file mode 100644
index e835795e1..000000000
Binary files a/tests/control_data/graphical_units_data/creation/WriteTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/AnnularSectorTest.npy b/tests/control_data/graphical_units_data/geometry/AnnularSectorTest.npy
deleted file mode 100644
index a15aa1244..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/AnnularSectorTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/AnnulusTest.npy b/tests/control_data/graphical_units_data/geometry/AnnulusTest.npy
deleted file mode 100644
index 7cb120b27..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/AnnulusTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/ArcBetweenPointsTest.npy b/tests/control_data/graphical_units_data/geometry/ArcBetweenPointsTest.npy
deleted file mode 100644
index cc3ae5217..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/ArcBetweenPointsTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/ArcTest.npy b/tests/control_data/graphical_units_data/geometry/ArcTest.npy
deleted file mode 100644
index 7541b40f3..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/ArcTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/CircleTest.npy b/tests/control_data/graphical_units_data/geometry/CircleTest.npy
deleted file mode 100644
index 78f0f70f9..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/CircleTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/CoordinatesTest.npy b/tests/control_data/graphical_units_data/geometry/CoordinatesTest.npy
deleted file mode 100644
index b4632579e..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/CoordinatesTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/CurvedArrowTest.npy b/tests/control_data/graphical_units_data/geometry/CurvedArrowTest.npy
deleted file mode 100644
index 4ce741372..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/CurvedArrowTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/CustomDoubleArrowTest.npy b/tests/control_data/graphical_units_data/geometry/CustomDoubleArrowTest.npy
deleted file mode 100644
index e6f24e423..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/CustomDoubleArrowTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/DotTest.npy b/tests/control_data/graphical_units_data/geometry/DotTest.npy
deleted file mode 100644
index 5151b856c..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/DotTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/DoubleArrowTest.npy b/tests/control_data/graphical_units_data/geometry/DoubleArrowTest.npy
deleted file mode 100644
index 68ddf5591..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/DoubleArrowTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Elbowtest.npy b/tests/control_data/graphical_units_data/geometry/Elbowtest.npy
deleted file mode 100644
index 2fb455aa4..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/Elbowtest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/EllipseTest.npy b/tests/control_data/graphical_units_data/geometry/EllipseTest.npy
deleted file mode 100644
index ad08e2d8b..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/EllipseTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/LineTest.npy b/tests/control_data/graphical_units_data/geometry/LineTest.npy
deleted file mode 100644
index 2dcd9b595..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/LineTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/PolygonTest.npy b/tests/control_data/graphical_units_data/geometry/PolygonTest.npy
deleted file mode 100644
index a7bb8e92c..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/PolygonTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/RectangleTest.npy b/tests/control_data/graphical_units_data/geometry/RectangleTest.npy
deleted file mode 100644
index 650779206..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/RectangleTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/RoundedRectangleTest.npy b/tests/control_data/graphical_units_data/geometry/RoundedRectangleTest.npy
deleted file mode 100644
index 4c73433bf..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/RoundedRectangleTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/SectorTest.npy b/tests/control_data/graphical_units_data/geometry/SectorTest.npy
deleted file mode 100644
index c5ea54e63..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/SectorTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/VectorTest.npy b/tests/control_data/graphical_units_data/geometry/VectorTest.npy
deleted file mode 100644
index 70c3ab7eb..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/VectorTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/graph/PlotFunctions.npy b/tests/control_data/graphical_units_data/graph/PlotFunctions.npy
deleted file mode 100644
index 9b1079088..000000000
Binary files a/tests/control_data/graphical_units_data/graph/PlotFunctions.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/ApplyWaveTest.npy b/tests/control_data/graphical_units_data/indication/ApplyWaveTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/indication/ApplyWaveTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/CircleIndicateTest.npy b/tests/control_data/graphical_units_data/indication/CircleIndicateTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/indication/CircleIndicateTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/FlashTest.npy b/tests/control_data/graphical_units_data/indication/FlashTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/indication/FlashTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/FocusOnTest.npy b/tests/control_data/graphical_units_data/indication/FocusOnTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/indication/FocusOnTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/IndicateTest.npy b/tests/control_data/graphical_units_data/indication/IndicateTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/indication/IndicateTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/ShowCreationThenDestructionTest.npy b/tests/control_data/graphical_units_data/indication/ShowCreationThenDestructionTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/indication/ShowCreationThenDestructionTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/ShowCreationThenFadeOutTest.npy b/tests/control_data/graphical_units_data/indication/ShowCreationThenFadeOutTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/indication/ShowCreationThenFadeOutTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/ShowPassingFlashAroundTest.npy b/tests/control_data/graphical_units_data/indication/ShowPassingFlashAroundTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/indication/ShowPassingFlashAroundTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/ShowPassingFlashTest.npy b/tests/control_data/graphical_units_data/indication/ShowPassingFlashTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/indication/ShowPassingFlashTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/TurnInsideOutTest.npy b/tests/control_data/graphical_units_data/indication/TurnInsideOutTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/indication/TurnInsideOutTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/WiggleOutThenInTest.npy b/tests/control_data/graphical_units_data/indication/WiggleOutThenInTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/indication/WiggleOutThenInTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/HomotopyTest.npy b/tests/control_data/graphical_units_data/movements/HomotopyTest.npy
deleted file mode 100644
index 60af6c7b6..000000000
Binary files a/tests/control_data/graphical_units_data/movements/HomotopyTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/MoveAlongPathTest.npy b/tests/control_data/graphical_units_data/movements/MoveAlongPathTest.npy
deleted file mode 100644
index a531aa13b..000000000
Binary files a/tests/control_data/graphical_units_data/movements/MoveAlongPathTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/MoveToTest.npy b/tests/control_data/graphical_units_data/movements/MoveToTest.npy
deleted file mode 100644
index 4f22b1523..000000000
Binary files a/tests/control_data/graphical_units_data/movements/MoveToTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/PhaseFlowTest.npy b/tests/control_data/graphical_units_data/movements/PhaseFlowTest.npy
deleted file mode 100644
index cbc3eb597..000000000
Binary files a/tests/control_data/graphical_units_data/movements/PhaseFlowTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/RotateTest.npy b/tests/control_data/graphical_units_data/movements/RotateTest.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/movements/RotateTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/ShiftTest.npy b/tests/control_data/graphical_units_data/movements/ShiftTest.npy
deleted file mode 100644
index 67bb448cb..000000000
Binary files a/tests/control_data/graphical_units_data/movements/ShiftTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/sample_scenes/BasicScene.npy b/tests/control_data/graphical_units_data/sample_scenes/BasicScene.npy
deleted file mode 100644
index 2d2fb7cc2..000000000
Binary files a/tests/control_data/graphical_units_data/sample_scenes/BasicScene.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/sample_scenes/BasicTex.npy b/tests/control_data/graphical_units_data/sample_scenes/BasicTex.npy
deleted file mode 100644
index 188dd5e2d..000000000
Binary files a/tests/control_data/graphical_units_data/sample_scenes/BasicTex.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/sample_scenes/GeometryScene.npy b/tests/control_data/graphical_units_data/sample_scenes/GeometryScene.npy
deleted file mode 100644
index 1f0353683..000000000
Binary files a/tests/control_data/graphical_units_data/sample_scenes/GeometryScene.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/AmbientCameraMoveTest.npy b/tests/control_data/graphical_units_data/threed/AmbientCameraMoveTest.npy
deleted file mode 100644
index 001d7c56f..000000000
Binary files a/tests/control_data/graphical_units_data/threed/AmbientCameraMoveTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/AxesTest.npy b/tests/control_data/graphical_units_data/threed/AxesTest.npy
deleted file mode 100644
index 0cb1f4e3e..000000000
Binary files a/tests/control_data/graphical_units_data/threed/AxesTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/CameraMoveTest.npy b/tests/control_data/graphical_units_data/threed/CameraMoveTest.npy
deleted file mode 100644
index 515e608e0..000000000
Binary files a/tests/control_data/graphical_units_data/threed/CameraMoveTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/CubeTest.npy b/tests/control_data/graphical_units_data/threed/CubeTest.npy
deleted file mode 100644
index 31df75ae6..000000000
Binary files a/tests/control_data/graphical_units_data/threed/CubeTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/SphereTest.npy b/tests/control_data/graphical_units_data/threed/SphereTest.npy
deleted file mode 100644
index afb6a1d98..000000000
Binary files a/tests/control_data/graphical_units_data/threed/SphereTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyComplexFunctionTest.npy b/tests/control_data/graphical_units_data/transform/ApplyComplexFunctionTest.npy
deleted file mode 100644
index ebd795960..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ApplyComplexFunctionTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyFunctionTest.npy b/tests/control_data/graphical_units_data/transform/ApplyFunctionTest.npy
deleted file mode 100644
index a22156c7d..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ApplyFunctionTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyMatrixTest.npy b/tests/control_data/graphical_units_data/transform/ApplyMatrixTest.npy
deleted file mode 100644
index e3f12518a..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ApplyMatrixTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyPointwiseFunctionTest.npy b/tests/control_data/graphical_units_data/transform/ApplyPointwiseFunctionTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ApplyPointwiseFunctionTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ClockwiseTransformTest.npy b/tests/control_data/graphical_units_data/transform/ClockwiseTransformTest.npy
deleted file mode 100644
index 78f0f70f9..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ClockwiseTransformTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/CounterclockwiseTransformTest.npy b/tests/control_data/graphical_units_data/transform/CounterclockwiseTransformTest.npy
deleted file mode 100644
index 78f0f70f9..000000000
Binary files a/tests/control_data/graphical_units_data/transform/CounterclockwiseTransformTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/CyclicReplaceTest.npy b/tests/control_data/graphical_units_data/transform/CyclicReplaceTest.npy
deleted file mode 100644
index 0cab724b1..000000000
Binary files a/tests/control_data/graphical_units_data/transform/CyclicReplaceTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/FadeToColortTest.npy b/tests/control_data/graphical_units_data/transform/FadeToColortTest.npy
deleted file mode 100644
index f303647c0..000000000
Binary files a/tests/control_data/graphical_units_data/transform/FadeToColortTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/MoveToTargetTest.npy b/tests/control_data/graphical_units_data/transform/MoveToTargetTest.npy
deleted file mode 100644
index e16b35b0a..000000000
Binary files a/tests/control_data/graphical_units_data/transform/MoveToTargetTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/RestoreTest.npy b/tests/control_data/graphical_units_data/transform/RestoreTest.npy
deleted file mode 100644
index 78f0f70f9..000000000
Binary files a/tests/control_data/graphical_units_data/transform/RestoreTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ScaleInPlaceTest.npy b/tests/control_data/graphical_units_data/transform/ScaleInPlaceTest.npy
deleted file mode 100644
index 50da222f5..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ScaleInPlaceTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ShrinkToCenterTest.npy b/tests/control_data/graphical_units_data/transform/ShrinkToCenterTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ShrinkToCenterTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/TransformFromCopyTest.npy b/tests/control_data/graphical_units_data/transform/TransformFromCopyTest.npy
deleted file mode 100644
index 78f0f70f9..000000000
Binary files a/tests/control_data/graphical_units_data/transform/TransformFromCopyTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/TransformTest.npy b/tests/control_data/graphical_units_data/transform/TransformTest.npy
deleted file mode 100644
index 78f0f70f9..000000000
Binary files a/tests/control_data/graphical_units_data/transform/TransformTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/updaters/UpdaterTest.npy b/tests/control_data/graphical_units_data/updaters/UpdaterTest.npy
deleted file mode 100644
index b0b48565c..000000000
Binary files a/tests/control_data/graphical_units_data/updaters/UpdaterTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/updaters/ValueTrackerTest.npy b/tests/control_data/graphical_units_data/updaters/ValueTrackerTest.npy
deleted file mode 100644
index de3abcab7..000000000
Binary files a/tests/control_data/graphical_units_data/updaters/ValueTrackerTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/DarwinTexMobjectTest.npy b/tests/control_data/graphical_units_data/writing/DarwinTexMobjectTest.npy
deleted file mode 100644
index 83cde8237..000000000
Binary files a/tests/control_data/graphical_units_data/writing/DarwinTexMobjectTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/DarwinTextMobjectTest.npy b/tests/control_data/graphical_units_data/writing/DarwinTextMobjectTest.npy
deleted file mode 100644
index f9215108c..000000000
Binary files a/tests/control_data/graphical_units_data/writing/DarwinTextMobjectTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/DarwinTextTest.npy b/tests/control_data/graphical_units_data/writing/DarwinTextTest.npy
deleted file mode 100644
index b8104af03..000000000
Binary files a/tests/control_data/graphical_units_data/writing/DarwinTextTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/LinuxTexMobjectTest.npy b/tests/control_data/graphical_units_data/writing/LinuxTexMobjectTest.npy
deleted file mode 100644
index 804bc2135..000000000
Binary files a/tests/control_data/graphical_units_data/writing/LinuxTexMobjectTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/LinuxTextMobjectTest.npy b/tests/control_data/graphical_units_data/writing/LinuxTextMobjectTest.npy
deleted file mode 100644
index 6ef740e76..000000000
Binary files a/tests/control_data/graphical_units_data/writing/LinuxTextMobjectTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/LinuxTextTest.npy b/tests/control_data/graphical_units_data/writing/LinuxTextTest.npy
deleted file mode 100644
index ef3a4015c..000000000
Binary files a/tests/control_data/graphical_units_data/writing/LinuxTextTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/WindowsTexMobjectTest.npy b/tests/control_data/graphical_units_data/writing/WindowsTexMobjectTest.npy
deleted file mode 100644
index 83cde8237..000000000
Binary files a/tests/control_data/graphical_units_data/writing/WindowsTexMobjectTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/WindowsTextMobjectTest.npy b/tests/control_data/graphical_units_data/writing/WindowsTextMobjectTest.npy
deleted file mode 100644
index f9215108c..000000000
Binary files a/tests/control_data/graphical_units_data/writing/WindowsTextMobjectTest.npy and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/WindowsTextTest.npy b/tests/control_data/graphical_units_data/writing/WindowsTextTest.npy
deleted file mode 100644
index b3e2559e2..000000000
Binary files a/tests/control_data/graphical_units_data/writing/WindowsTextTest.npy and /dev/null differ
diff --git a/tests/control_data/logs_data/BasicSceneLoggingTest.txt b/tests/control_data/logs_data/BasicSceneLoggingTest.txt
index c4131e12a..c30063bd1 100644
--- a/tests/control_data/logs_data/BasicSceneLoggingTest.txt
+++ b/tests/control_data/logs_data/BasicSceneLoggingTest.txt
@@ -2,7 +2,7 @@
{"levelname": "DEBUG", "module": "hashing", "message": "Hashing ..."}
{"levelname": "DEBUG", "module": "hashing", "message": "Hashing done in <> s."}
{"levelname": "DEBUG", "module": "hashing", "message": "Hash generated : <>"}
-{"levelname": "DEBUG", "module": "scene", "message": "List of the first few animation hashes of the scene: <>"}
+{"levelname": "DEBUG", "module": "caching", "message": "List of the first few animation hashes of the scene: <>"}
{"levelname": "INFO", "module": "scene_file_writer", "message": "Animation 0 : Partial movie file written in <>"}
{"levelname": "DEBUG", "module": "scene_file_writer", "message": "Partial movie files to combine (1 files): <>"}
{"levelname": "INFO", "module": "scene_file_writer", "message": "\nFile ready at <>\n"}
diff --git a/tests/helpers/graphical_units.py b/tests/helpers/graphical_units.py
index 42b5e8e4d..773518748 100644
--- a/tests/helpers/graphical_units.py
+++ b/tests/helpers/graphical_units.py
@@ -15,10 +15,10 @@ def set_test_scene(scene_object, module_name):
Parameters
----------
scene_object : :class:`~.Scene`
- The scene with wich we want to set up a new test.
+ The scene with which we want to set up a new test.
module_name : :class:`str`
- The name of the module in which the functionnality tested is contained. For example, 'Write' is contained in the module 'creation'. This will be used in the folder architecture
- of '/tests_data'.
+ The name of the module in which the functionality tested is contained. For example, ``Write`` is contained in the module ``creation``. This will be used in the folder architecture
+ of ``/tests_data``.
Examples
--------
@@ -39,15 +39,19 @@ def set_test_scene(scene_object, module_name):
config["text_dir"] = os.path.join(tmpdir, "text")
config["tex_dir"] = os.path.join(tmpdir, "tex")
scene = scene_object()
- data = scene.get_frame()
+ scene.render()
+ data = scene.renderer.get_frame()
+ assert not np.all(
+ data == np.array([0, 0, 0, 255])
+ ), f"Control data generated for {str(scene)} only contains empty pixels."
+ assert data.shape == (480, 854, 4)
tests_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
path_control_data = os.path.join(
tests_directory, "control_data", "graphical_units_data"
)
- print(path_control_data)
path = os.path.join(path_control_data, module_name)
if not os.path.isdir(path):
os.makedirs(path)
- np.save(os.path.join(path, str(scene)), data)
+ np.savez_compressed(os.path.join(path, str(scene)), frame_data=data)
logger.info(f"Test data for {str(scene)} saved in {path}\n")
diff --git a/tests/test_camera.py b/tests/test_camera.py
deleted file mode 100644
index dd8f00f5b..000000000
--- a/tests/test_camera.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import pytest
-from manim import Camera, tempconfig, config
-
-
-def test_camera():
- """Test that Camera instances initialize to the correct config."""
- # by default, use the config
- assert Camera().frame_width == config["frame_width"]
- # init args override config
- assert Camera(frame_width=10).frame_width == 10
-
- # if config changes, reflect those changes
- with tempconfig({"frame_width": 100}):
- assert Camera().frame_width == 100
- # ..init args still override new config
- assert Camera(frame_width=10).frame_width == 10
diff --git a/tests/test_copy.py b/tests/test_copy.py
index 2210dda1e..4edd5e00a 100644
--- a/tests/test_copy.py
+++ b/tests/test_copy.py
@@ -1,4 +1,4 @@
-import os
+from pathlib import Path
from manim import Mobject, BraceLabel, config
@@ -20,11 +20,11 @@ def test_bracelabel_copy(tmp_path):
# For this test to work, we need to tweak some folders temporarily
original_text_dir = config["text_dir"]
original_tex_dir = config["tex_dir"]
- mediadir = os.path.join(tmp_path, "deepcopy")
- config["text_dir"] = os.path.join(mediadir, "Text")
- config["tex_dir"] = os.path.join(mediadir, "Tex")
+ mediadir = Path(tmp_path) / "deepcopy"
+ config["text_dir"] = str(mediadir.joinpath("Text"))
+ config["tex_dir"] = str(mediadir.joinpath("Tex"))
for el in ["text_dir", "tex_dir"]:
- os.makedirs(config[el])
+ Path(config[el]).mkdir(parents=True)
# Before the refactoring of Mobject.copy(), the class BraceLabel was the
# only one to have a non-trivial definition of copy. Here we test that it
diff --git a/tests/test_pango.py b/tests/test_pango.py
index c1ff76b36..9d0f5e96c 100644
--- a/tests/test_pango.py
+++ b/tests/test_pango.py
@@ -1,4 +1,4 @@
-"""Tests :class:`PangoText` by comparing SVG files created.
+"""Tests :class:`Text` by comparing SVG files created.
"""
import os
import re
@@ -6,7 +6,7 @@ import re
import cairocffi
import pangocairocffi
import pangocffi
-from manim import START_X, START_Y, PangoText, SVGMobject
+from manim import START_X, START_Y, Text, SVGMobject
RTL_TEXT: str = """صباح الخير
مرحبا جميعا"""
@@ -27,9 +27,9 @@ def remove_last_M(file_path: str) -> None: # pylint: disable=invalid-name
def compare_SVGObject_with_PangoText( # pylint: disable=invalid-name
- text: PangoText, svg_path: str
+ text: Text, svg_path: str
) -> bool:
- """Checks for the path_string formed by PangoText and Formed SVG file.
+ """Checks for the path_string formed by Text and Formed SVG file.
Uses SVGMobject as it parses the SVG and returns the path_string
"""
remove_last_M(svg_path) # to prevent issue displaying
@@ -53,7 +53,7 @@ def test_general_text_svgobject() -> None:
"""
text = "hello"
size = 1
- temp_pango_text = PangoText(text, size=size)
+ temp_pango_text = Text(text, size=size)
surface = cairocffi.SVGSurface(filename, WIDTH, HEIGTH)
context = cairocffi.Context(surface)
context.move_to(START_X, START_Y)
@@ -73,7 +73,7 @@ def test_rtl_text_to_svgobject() -> None:
called using ``SVGMobject``"""
size = 1
text = RTL_TEXT.replace("\n", "")
- temp_pango_text = PangoText(text, size=1)
+ temp_pango_text = Text(text, size=1)
surface = cairocffi.SVGSurface(filename, WIDTH, HEIGTH)
context = cairocffi.Context(surface)
context.move_to(START_X, START_Y)
@@ -93,7 +93,7 @@ def test_font_face() -> None:
size = 1
text = RTL_TEXT.replace("\n", "")
font_face = "sans"
- temp_pango_text = PangoText(text, size=1, font=font_face)
+ temp_pango_text = Text(text, size=1, font=font_face)
surface = cairocffi.SVGSurface(filename, WIDTH, HEIGTH)
context = cairocffi.Context(surface)
context.move_to(START_X, START_Y)
@@ -111,7 +111,7 @@ def test_font_face() -> None:
def test_whether_svg_file_created() -> None:
"""Checks Whether SVG file is created in desired location"""
- temp_pango_text = PangoText("hello", size=1)
+ temp_pango_text = Text("hello", size=1)
theo_path = os.path.abspath(
os.path.join(folder, temp_pango_text.text2hash() + ".svg")
)
@@ -123,7 +123,7 @@ def test_tabs_replace() -> None:
"""Checks whether are there in end svg image.
Pango should handle tabs and line breaks."""
size = 1
- temp_pango_text = PangoText("hello\thi\nf")
+ temp_pango_text = Text("hello\thi\nf")
assert temp_pango_text.text == "hellohif"
surface = cairocffi.SVGSurface(filename, WIDTH, HEIGTH)
context = cairocffi.Context(surface)
diff --git a/tests/test_scene_rendering/conftest.py b/tests/test_scene_rendering/conftest.py
index 055555063..a322ba1b6 100644
--- a/tests/test_scene_rendering/conftest.py
+++ b/tests/test_scene_rendering/conftest.py
@@ -1,12 +1,12 @@
import pytest
-import os
+from pathlib import Path
@pytest.fixture
def manim_cfg_file():
- return os.path.join(os.path.dirname(__file__), "manim.cfg")
+ return str(Path(__file__).parent / "manim.cfg")
@pytest.fixture
def simple_scenes_path():
- return os.path.join(os.path.dirname(__file__), "simple_scenes.py")
+ return str(Path(__file__).parent / "simple_scenes.py")
diff --git a/tests/utils/GraphicalUnitTester.py b/tests/utils/GraphicalUnitTester.py
index 8eeec5c73..9c7682c52 100644
--- a/tests/utils/GraphicalUnitTester.py
+++ b/tests/utils/GraphicalUnitTester.py
@@ -1,11 +1,6 @@
-import numpy as np
import os
-import sys
-import inspect
import logging
-import pytest
-import warnings
-from platform import system
+import numpy as np
from manim import config
@@ -71,7 +66,6 @@ class GraphicalUnitTester:
]:
os.makedirs(dir_temp)
- # By invoking this, the scene is rendered.
self.scene = scene_object()
self.scene.render()
@@ -84,9 +78,9 @@ class GraphicalUnitTester:
The pre-rendered frame.
"""
frame_data_path = os.path.join(
- os.path.join(self.path_control_data, "{}.npy".format(str(self.scene)))
+ os.path.join(self.path_control_data, "{}.npz".format(str(self.scene)))
)
- return np.load(frame_data_path)
+ return np.load(frame_data_path)["frame_data"]
def _show_diff_helper(self, frame_data, expected_frame_data):
"""Will visually display with matplotlib differences between frame generared and the one expected."""
@@ -124,7 +118,7 @@ class GraphicalUnitTester:
def test(self, show_diff=False):
"""Compare pre-rendered frame to the frame rendered during the test."""
- frame_data = self.scene.get_frame()
+ frame_data = self.scene.renderer.get_frame()
expected_frame_data = self._load_data()
assert frame_data.shape == expected_frame_data.shape, (