diff --git a/.gitignore b/.gitignore index 7b5c88463b..e1490a2b56 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ docs/source/_build/ target/ # Jupyter Notebook +jupyter/ .ipynb_checkpoints # IPython diff --git a/README.md b/README.md index 6ca5cfac9b..1a7919f641 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
PyPI Latest Release Docker image - + MIT License Reddit Twitter @@ -19,7 +19,6 @@


- Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as demonstrated in the videos of [3Blue1Brown](https://www.3blue1brown.com/). > NOTE: This repository is maintained by the Manim Community, and is not associated with Grant Sanderson or 3Blue1Brown in any way (although we are definitely indebted to him for providing his work to the world). If you would like to study how Grant makes his videos, head over to his repository ([3b1b/manim](https://github.com/3b1b/manim)). This fork is updated more frequently than his, and it's recommended to use this fork if you'd like to use Manim for your own projects. @@ -80,8 +79,9 @@ You should see your native video player program pop up and play a simple scene i [GitHub repository](master/example_scenes). You can also visit the [official gallery](https://docs.manim.community/en/stable/examples.html) for more advanced examples. Manim also ships with a `%%manim` IPython magic which allows to use it conveniently in JupyterLab (as well as classic Jupyter) notebooks. See the + [corresponding documentation](https://docs.manim.community/en/stable/reference/manim.utils.ipython_magic.ManimMagic.html) for some guidance and -[try it out online](https://mybinder.org/v2/gist/behackl/725d956ec80969226b7bf9b4aef40b78/HEAD?filepath=basic%20example%20scenes.ipynb). +[try it out online](https://mybinder.org/v2/gh/ManimCommunity/jupyter_examples/HEAD?filepath=basic_example_scenes.ipynb). ## Command line arguments diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 5f0270f885..e8bf4b3362 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -7,12 +7,20 @@ you are done installing the dependencies, come back to this page to install manim itself. .. NOTE:: + Before installing manim, you should understand that there are a few main versions of manim today that are generally incompatible with each other. This documentation **only** covers the installation of the *community edition*; trying to use instructions intended for other versions of manim or vice versa will likely result in failure. In particular, most video tutorials are outdated. For more information, please read :doc:`Differences between Manim Versions `. + +.. tip:: + + In case that you want to try manim online without installation, open it in + `Binder `_. + + Installing dependencies *********************** diff --git a/example_scenes/manim_jupyter_example.ipynb b/example_scenes/manim_jupyter_example.ipynb new file mode 100644 index 0000000000..45cde48345 --- /dev/null +++ b/example_scenes/manim_jupyter_example.ipynb @@ -0,0 +1,66 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from manim import *" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%manim -v WARNING --disable_caching -ql -s Example1\n", + "\n", + "class Example1(Scene):\n", + " def construct(self):\n", + " self.add(Circle())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%manim -v WARNING --disable_caching -qm HelloManim\n", + "\n", + "# set the maximum width for video outputs to a predefined value\n", + "config.media_width = \"20vw\"\n", + "\n", + "class HelloManim(Scene):\n", + " def construct(self):\n", + " self.camera.background_color = \"#ece6e2\"\n", + " banner_large = ManimBanner(dark_theme=False).scale(0.7)\n", + " self.play(banner_large.create())\n", + " self.play(banner_large.expand())" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.1" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +}