A community-maintained Python framework for creating mathematical animations.
Grammatical error corrections in documentation (#1360)
Nikhil Garuda7c8c1cb1d931
diff --git a/docs/source/contributing.rst b/docs/source/contributing.rstindex 208d58e83..f285b2fd9 100644--- a/docs/source/contributing.rst+++ b/docs/source/contributing.rst@@ -24,7 +24,7 @@ some are detailed below:-Contributing can be confusing, so here's a few guides:+Contributing can be confusing, so here are a few guides:.. toctree:::maxdepth: 2diff --git a/docs/source/contributing/development.rst b/docs/source/contributing/development.rstindex 91563cfc2..e2c509d7e 100644--- a/docs/source/contributing/development.rst+++ b/docs/source/contributing/development.rst@@ -10,8 +10,8 @@ For first-time contributors#. Fork the project. Go to https://github.com/ManimCommunity/manim and- click the "fork" button to create your own copy of the project. You will- need a GitHub account. This will allow you to make a "pull request" (PR)+ click the "fork" button to create a copy of the project for you to work on. You will+ need a GitHub account. This will allow you to make a "Pull Request" (PR)to the ManimCommunity repo later on.#. Clone your fork to your local computer:@@ -57,7 +57,7 @@ For first-time contributorspoetry run pre-commit install- This will ensure during development that each of your commits are properly+ This will ensure during development that each of your commits is properlyformatted against our linter and formatters, ``black``, ``flake8``, and``isort``.@@ -87,7 +87,7 @@ Develop your contribution#. Write some awesome code!You're ready to make changes in your local repository's branch.- You can add local files you've changed with in the current directory with+ You can add local files you've changed within the current directory with``git add .``, or add specific files with.. code-block:: shell@@ -137,12 +137,12 @@ Polishing Changes and Submitting a Pull RequestAs soon as you are ready to share your local changes with the communityso that they can be discussed, go through the following steps to open apull request. A pull request signifies to the ManimCommunity organization,-"Here's some changes I wrote; I think it's worthwhile for you to maintain+"Here are some changes I wrote; I think it's worthwhile for you to maintainthem.".. NOTE::- You do not need to have everything (code / documentation / tests) complete+ You do not need to have everything (code/documentation/tests) completeto open a pull request (PR). If the PR is still under development, pleasemark it as a draft. Community developers will still be able to review thechanges, discuss yet-to-be-implemented changes, and offer advice; however,@@ -211,7 +211,7 @@ sticks to our coding conventions.- *Documentation*: We also build a version of the documentation correspondingto your pull request. Make sure not to introduce any Sphinx errors, and havea look at the built HTML files to see whether the formatting of the documentation- you added looks like you intended. You can build the documentation locally+ you added looks as you intended. You can build the documentation locallyby running ``make html`` from the ``docs`` directory.Finally, if the pipeline passes and you are satisfied with your changes: wait for@@ -223,8 +223,7 @@ wants to merge your changes! Once approved, your changes may be merged!Further useful guidelines=========================-#. When submitting a PR, please make special note of whether your proposed- changes will result in breaking changes.+#. When submitting a PR, please mention explicitly if it includes breaking changes.#. When submitting a PR, make sure that your proposed changes are as general aspossible, and ready to be taken advantage of by all of manim's users. In@@ -234,8 +233,8 @@ Further useful guidelines#. If you are a maintainer, please label issues and PRs appropriately andfrequently.-#. When opening a new issue, if there are old issues that are related, link- them in your new issue (even if the old ones are closed).+#. When opening a new issue, if there are old issues that are related, add a link+ to them in your new issue (even if the old ones are closed).#. When submitting a code review, it is highly recommended that you adhere to`these general guidelines <https://conventionalcomments.org/>`_.diff --git a/docs/source/contributing/documentation.rst b/docs/source/contributing/documentation.rstindex 90c20c779..3f28060fd 100644--- a/docs/source/contributing/documentation.rst+++ b/docs/source/contributing/documentation.rst@@ -35,12 +35,12 @@ https://numpydoc.readthedocs.io/en/latest/format.html.This includes:1. The usage of ``Attributes`` to specify ALL ATTRIBUTES that a- class can have, their respective types and a brief (or long, if+ class can have, their respective types, and a brief (or long, ifneeded) description. (See more on :ref:`_types`)Also, ``__init__`` parameters should be specified as ``Parameters`` **onthe class docstring**, *rather than under* ``__init__``. Note that this-can be omitted if the parameters and the attributes are the exact same+can be omitted if the parameters and the attributes are the same(i.e., dataclass) - priority should be given to the ``Attributes``section, in this case, which must **always be present**, unless theclass specifies no attributes at all. (See more on Parameters in number@@ -80,7 +80,7 @@ Example:): # in-code typehints are optional for now...-2. The usage of ``Parameters`` on functions in order to specify how+2. The usage of ``Parameters`` on functions to specify howevery parameter works and what it does. This should be excluded ifthe function has no parameters. Note that you **should not** specifythe default value of the parameter on the type. On the documentation@@ -220,7 +220,7 @@ different class in the same file.name (e.g. ``~manim.animations.Animation``) or simply use theshortened way (``~.Animation``). Note that, if there is ambiguity,then the full dotted name must be used where the actual class can't- be deduced. Also note the ``~`` before the path - this is so that it+ be deduced. Also, note the ``~`` before the path - this is so that itdisplays just ``Animation`` instead of the full location in therendering. It can be removed for disambiguation purposes only.@@ -235,11 +235,11 @@ Example: ``:class:`numpy.ndarray``` for a numpy ndarray.Reference type specifications~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-**The following instructions refer to types of attributes, parameters+**The following instructions refer to types of attributes, parameters,and return values.** When specifying a type mid-text, it does notnecessarily have to be typeset. However, if it's a class name, a method,or an enum's attribute/variant, then it is recommended to be typeset at-least on the first occurrence of the name, so that the users can quickly+least on the first occurrence of the name so that the users can quicklyjump to the related documentation.1. Class names should be wrapped in ``:class:`path_goes_here```. See@@ -309,7 +309,7 @@ dictionary that maps a string to either an int or an instance ofa list, ``Tuple[type_a, type_b, (...), type_n]`` for a tuple (if theelements are all different) or ``Tuple[type, ...]`` (if all elementshave the same type). Each ``type_n`` on those representations- correspond to elements in the returned list/tuple, and must follow+ corresponds to elements in the returned list/tuple and must followthe guidelines in the current section.Example: ``List[Optional[:class:`str`]]`` for a list that returnsdiff --git a/docs/source/contributing/testing.rst b/docs/source/contributing/testing.rstindex eca7e5ceb..e4e176d5c 100644--- a/docs/source/contributing/testing.rst+++ b/docs/source/contributing/testing.rst@@ -26,7 +26,7 @@ Some useful pytest flags:How it Works~~~~~~~~~~~~-At the moment there are three type of tests:+At the moment there are three types of tests:#. Unit Tests:@@ -44,7 +44,7 @@ At the moment there are three type of tests:As Manim is a video library, we have to test videos as well. Unfortunately,we cannot directly test video content as rendered videos can- differ slightly depending on system (for reasons related to+ differ slightly depending on the system (for reasons related toffmpeg). Therefore, we only compare video configuration values, exported in.json.@@ -155,7 +155,7 @@ Unit TestsPytest determines which functions are tests by searching for files whosenames begin with "test\_", and then within those files for functions-beginning with "test" and classes beginning with "Test". These kind of+beginning with "test" and classes beginning with "Test". These kinds oftests must be in ``tests/`` (e.g. ``tests/test_container.py``).Graphical Unit Test@@ -222,7 +222,7 @@ It will look something like this:set_test_scene(CircleTest, "geometry")``set_test_scene`` takes two parameters: the scene to test, and the-module name. You can generate the test data by running the file (it suffices to type the name of the file in terminal; you do not have to run+module name. You can generate the test data by running the file (it suffices to type the name of the file in the terminal; you do not have to runit like how you would normally run manim files). It will automatically generate the control data in theright directory (in this case,``tests/control_data/graphical_units_data/geometry/CircleTest.npz``).diff --git a/docs/source/examples.rst b/docs/source/examples.rstindex 4ef888b6f..2175a6905 100644--- a/docs/source/examples.rst+++ b/docs/source/examples.rst@@ -5,7 +5,7 @@ Example GalleryThis gallery contains a collection of best practice code snippetstogether with their corresponding video/image output, illustratingdifferent functionalities all across the library.-These are all under the MIT licence, so feel free to copy & paste them to your projects.+These are all under the MIT license, so feel free to copy & paste them to your projects.Enjoy this taste of Manim!.. tip::diff --git a/docs/source/installation/for_dev.rst b/docs/source/installation/for_dev.rstindex a1de70c54..92c408e26 100644--- a/docs/source/installation/for_dev.rst+++ b/docs/source/installation/for_dev.rst@@ -12,8 +12,8 @@ steps to clone your fork.If you have installed a non-developer version of manim, please uninstallit. This is to avoid any accidental usage of the non-developer version- when developing and testing on your local copy of the repository. This- warning doesn't apply for users who use `poetry+ when developing and testing your local copy of the repository. This+ warning doesn't apply to users who use `poetry<https://python-poetry.org>`_ (chapter below.)For Developers with Poetry (Recommended)@@ -57,7 +57,7 @@ Please follow the instructions under :ref:`installing-manim` to install alldependencies (e.g. ``LaTeX``, ``ffmpeg``, etc.). Afterwards, proceed with theinstallation with Poetry.-.. important:: Windows Users can skip the steps to install Pycairo.+.. important:: Windows users can skip the steps to install Pycairo... _install-manim-poetry:@@ -72,9 +72,9 @@ Installing Manim using Poetrypoetry install.. note:: The first time running this command, poetry will create and- enter a virtual environment rooted at the current directory.+ enter a virtual environment rooted in the current directory.- For more information you can visit the `poetry documentation+ For more information, you can visit the `poetry documentation<https://python-poetry.org/docs/managing-environments/>`_.#. If you exit the virtual environment, you can reactivate the@@ -113,7 +113,8 @@ command ``pytest`` to run the tests.Code Formatting and Linting Using Poetry****************************************-Once you are done with :ref:`install-manim-poetry`, you can run the code formatter ``black`` by activating entering the virtual environment:+Once you are done with :ref:`install-manim-poetry`, you can run the code formatter ``black``+by activating entering the virtual environment:.. code-block:: bash@@ -126,13 +127,15 @@ Or alternatively, without entering the virtual environment:poetry run black manim-For example, if you have written some new example and want to format it and see lint information use the commands below.+For example, if you have written some new example and want to format it and see+lint information use the commands below... code-block:: bashpoetry run black example_scenes-Similarly, you can see linting information for a given file, or directory, by the ``black`` command with ``pylint``.+Similarly, you can see linting information for a given file, or directory,+by the ``black`` command with ``pylint``.For Developers with pipdiff --git a/docs/source/installation/linux.rst b/docs/source/installation/linux.rstindex 8e53f8ac9..6ee9e42b3 100644--- a/docs/source/installation/linux.rst+++ b/docs/source/installation/linux.rst@@ -1,7 +1,7 @@Linux=====-The following instructions are given for different linux distributions that use+The following instructions are given for different Linux distributions that usedifferent package managers. After executing the instructions corresponding toyour distribution, go to `Certifying a clean install`_ to check whether thedependencies are installed correctly. All distributions will follow the samediff --git a/docs/source/installation/troubleshooting.rst b/docs/source/installation/troubleshooting.rstindex f679909dd..0862d8962 100644--- a/docs/source/installation/troubleshooting.rst+++ b/docs/source/installation/troubleshooting.rst@@ -52,7 +52,7 @@ First, make sure your ``dvisvgm`` version is at least 2.4: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.+Second, check whether your ``dvisvgm`` supports PostScript specials. This is needed to convert from PDF to SVG... code-block:: bash@@ -86,7 +86,7 @@ or (on Windows)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.+You should now see ``ps dvips PostScript specials`` in the output. Refer to your operating system's documentation 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@@ -96,6 +96,6 @@ As a last check, you can runwhile 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 do not have the necessary library on your system, please refer to your operating system's documentation 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/versions.rst b/docs/source/installation/versions.rstindex 1357a8a20..6a7e38591 100644--- a/docs/source/installation/versions.rst+++ b/docs/source/installation/versions.rst@@ -2,22 +2,22 @@ Differences between Manim Versions==================================While originally a single library, there are now three main versions of manim,-each with their own advantages, disadvantages and ideal use cases.+each with their own advantages, disadvantages, and ideal use cases.It is important to understand these differences in order to select the best versionfor your use case and avoid confusion arising from version mismatches.A brief history of Manim************************-Manim was originally created by Grant Sanderson as a personal project and-for use in his YouTube channel, `3Blue1Brown <https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw>`_. As his channel gained popularity,+Manim was originally created by Grant Sanderson as a personal project and for use in his YouTube channel,+`3Blue1Brown <https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw>`_. As his channel gained popularity,many grew to like the style of his animations and wanted to use manim for their own projects.However, as manim was only intended for personal use,it was very difficult for other users to install and use it.In late 2019, Grant started working on faster OpenGL rendering in a new branch,-known as the shaders branch. In mid 2020, a group of developers forked it into what is now the community edition;-this is the version which is documented by this website.+known as the shaders branch. In mid-2020, a group of developers forked it into what is now the community edition;+this is the version documented on this website.In early 2021, Grant merged the shaders branch back into master, making it the default branch in his repository.The old version is still available as the branch ``cairo-backend``.@@ -34,13 +34,13 @@ Which version to use********************We recommend using the community edition for most purposes, as it has been developed to be more stable,better tested, quicker to respond to community contributions, and easier for beginners to use.-It also has partial experimental OpenGL support, and should have full support shortly (as of April, 2021).+It also has partial experimental OpenGL support and should have full support shortly (as of April 2021).If you would like to use a version with full OpenGL support or render recent 3Blue1Brown videos (2020 onwards), you should use ManimGL.If you would like to render old 3Blue1Brown projects (2019 and before), you should use ManimCairo.-Notes on installation, documentation and use+Notes on installation, documentation, and use********************************************If you are a beginner, it is very important that you only use the documentation for your desired version.Trying to install or learn manim using documentation or guides made for different versions will likely fail and only lead to more confusion.diff --git a/docs/source/reporting_bugs.rst b/docs/source/reporting_bugs.rstindex 38db80a00..92a507760 100644--- a/docs/source/reporting_bugs.rst+++ b/docs/source/reporting_bugs.rst@@ -10,7 +10,7 @@ steps:2. Search for other users who may have had similar issues in thepast. Search the repository's `issues page <https://github.com/ManimCommunity/manim/issues>`_ (don't forget to search closed- issues), bring it up on out `Discord server <https://discord.gg/mMRrZQW>`_, use sites like StackOverflow, and exercise+ issues), bring it up on our `Discord server <https://discord.gg/mMRrZQW>`_, use sites like StackOverflow, and exerciseyour best Google practices. If you can't find anything helpful, then go tothe next step.@@ -25,7 +25,7 @@ steps:operating system, python version, and any stack traces that the code mayhave generated (if applicable).-4. Please open an issue only after you have gathered this information. When+4. Please open an issue only after you have gathered this information. Whensubmitting an issue, make sure to follow the template (this is the defaulttext you are shown when first opening the 'New Issue' page). A communitymember will (hopefully) respond and start a conversation to address thediff --git a/docs/source/tutorials/a_deeper_look.rst b/docs/source/tutorials/a_deeper_look.rstindex 91c1a023c..b2015cf57 100644--- a/docs/source/tutorials/a_deeper_look.rst+++ b/docs/source/tutorials/a_deeper_look.rst@@ -2,7 +2,7 @@ A deeper look=============This document will focus on understanding manim's output files and some of the-main command line flags available.+main command-line flags available... note:: This tutorial picks up where :doc:`quickstart` left off, so pleaseread that document before starting this one.@@ -18,7 +18,7 @@ At this point, you have just executed the following command.Let's dissect what just happened step by step. First, this command executesmanim on the file ``scene.py``, which contains our animation code. Further,-this command tells manim exactly which ``Scene`` to be rendered, in this case+this command tells manim exactly which ``Scene`` is to be rendered, in this case,it is ``SquareToCircle``. This is necessary because a single scene file maycontain more than one scene. Next, the flag `-p` tells manim to play the sceneonce it's rendered, and the `-ql` flag tells manim to render the scene in low@@ -162,8 +162,8 @@ can use the ``-f`` flag. You can also omit these two flags.Finally, by default manim will output .mp4 files. If you want your animationsin .gif format instead, use the ``-i`` flag. The output files will be in the-same folder as the .mp4 files, and with the same name, but different file+same folder as the .mp4 files, and with the same name, but a different fileextension.-This was a quick review of some of the most frequent command line flags. For a+This was a quick review of some of the most frequent command-line flags. For athorough review of all flags available, see :doc:`configuration`.diff --git a/docs/source/tutorials/building_blocks.rst b/docs/source/tutorials/building_blocks.rstindex 26a5436f4..090a64c22 100644--- a/docs/source/tutorials/building_blocks.rst+++ b/docs/source/tutorials/building_blocks.rst@@ -22,15 +22,15 @@ MobjectsMobjects are the basic building block for all manim animations. Each classthat derives from :class:`.Mobject` represents an object that can be displayed-on screen. For example, simple shapes such as :class:`.Circle`,+on the screen. For example, simple shapes such as :class:`.Circle`,:class:`.Arrow`, and :class:`.Rectangle` are all mobjects. More complicatedconstructs such as :class:`.Axes`, :class:`.FunctionGraph`, or:class:`.BarChart` are mobjects as well.-If you try to display on screen an instance of :class:`.Mobject`, you will only+If you try to display an instance of :class:`.Mobject` on the screen, you will onlysee an empty frame. The reason is that the :class:`.Mobject` class is anabstract base class of all other mobjects, i.e. it does not have any-pre-determined visual shape that can be displayed on screen. It is only the+pre-determined visual shape that can be displayed on the screen. It is only theskeleton of a thing that *could* be displayed. Therefore, you will rarely needto use plain instances of :class:`.Mobject`; instead you will most likelycreate instances of its derived classes. One of these derived classes is@@ -41,7 +41,7 @@ the time, you will be dealing with vmobjects, though we will continue to usethe term "mobject" to refer to the class of shapes that can be displayed onscreen, as it is more general.-.. note:: Any object that can be displayed on screen is a ``mobject``, even if+.. note:: Any object that can be displayed on the screen is a ``mobject``, even ifit is not necessarily *mathematical* in nature... tip:: To see examples of classes derived from :class:`.Mobject`, see the@@ -212,7 +212,7 @@ mobjects are added to the scene. In ``MobjectStyling``, we added them as``add(triangle, square, circle)``.As you can see, the order of the arguments of :meth:`~.Scene.add` determines-the order that the mobjects are displayed on screen, with the left-most+the order that the mobjects are displayed on the screen, with the left-mostarguments being put in the back.diff --git a/docs/source/tutorials/configuration.rst b/docs/source/tutorials/configuration.rstindex 9e7ffbc37..8c3b01cf3 100644--- a/docs/source/tutorials/configuration.rst+++ b/docs/source/tutorials/configuration.rst@@ -5,7 +5,7 @@ Manim provides an extensive configuration system that allows it to adapt tomany different use cases. There are many configuration options that can beconfigured at different times during the scene rendering process. Each optioncan be configured programmatically via `the ManimConfig class`_, or at the time-of command invocation via `command line arguments`_, or at the time the library+of command invocation via `command-line arguments`_, or at the time the libraryis first imported via `the config files`_.@@ -74,10 +74,10 @@ rendered in our documentation with a reference frame.self.add(Text(str(pixel_height)).next_to(d2, RIGHT))-Command line arguments+Command-line arguments**********************-Usually, manim is ran from the command line by executing+Usually, manim is run from the command-line by executing.. code-block:: bash@@ -99,7 +99,7 @@ Another frequent flag is ``-p`` ("preview"), which makes manim show the renderedright after it's done rendering... note:: The ``-p`` flag does not change any properties of the global- ``config`` dict. The ``-p`` flag is only a command line convenience.+ ``config`` dict. The ``-p`` flag is only a command-line convenience.Examples@@ -122,7 +122,7 @@ open the file after it is rendered.$ manim -o myscene -i -n 0,10 -c WHITE <file.py> SceneName-.. tip:: There are many more command line flags that manim accepts. All the+.. tip:: There are many more command-line flags that manim accepts. All thepossible flags are shown by executing ``manim -h``. A complete listof CLI flags is at the end of this document.@@ -130,7 +130,7 @@ open the file after it is rendered.The config files****************-As the last example shows, executing manim from the command line may involve+As the last example shows, executing manim from the command-line may involveusing many flags at the same time. This may become a nuisance if you mustexecute the same script many times in a short time period, for example whenmaking small incremental tweaks to your scene script. For this purpose, manim@@ -262,7 +262,7 @@ using any config files and executingmanim -o myscene -c WHITE <file.py> SceneName-Any command line flags have precedence over any config file. For example,+Any command-line flags have precedence over any config file. For example,using the previous two config files and executing :code:`manim -c RED<file.py> SceneName` is equivalent to not using any config files andexecuting@@ -272,7 +272,7 @@ executingmanim -o myscene -c RED <file.py> SceneNameThere is also a **library-wide** config file that determines manim's default-behavior, and applies to every user of the library. It has the least+behavior and applies to every user of the library. It has the leastprecedence, so any config options in the user-wide and any folder-wide fileswill override the library-wide file. This is referred to as the *cascading*config file system.@@ -312,7 +312,7 @@ these steps::meth:`ManimConfig.digest_parser`.7. Both ``logger`` and ``config`` are exposed to the user.-If manim is being invoked from the command line, all of the previous steps+If manim is being invoked from the command-line, all of the previous stepshappen, and are complemented by:8. The CLI flags are parsed and fed into ``config`` via@@ -325,7 +325,7 @@ happen, and are complemented by:11. The rest of the CLI flags are processed.To summarize, the order of precedence for configuration options, from lowest to-highest precedence, is:+highest precedence is:1. Library-wide config file,2. user-wide config file, if it exists,@@ -378,7 +378,7 @@ A list of all CLI flagsMade with <3 by Manim Community developers.-Each of the subcommands has their own help page which can be+Each of the subcommands has its own help page which can be.. code::diff --git a/docs/source/tutorials/quickstart.rst b/docs/source/tutorials/quickstart.rstindex 6db80b64a..5233a66e6 100644--- a/docs/source/tutorials/quickstart.rst+++ b/docs/source/tutorials/quickstart.rst@@ -120,7 +120,7 @@ The next two lines create a circle and set its color and opacity.circle.set_fill(PINK, opacity=0.5) # set the color and transparencyFinally, the last line uses the animation :class:`.Create` to display the-circle on screen.+circle on the screen... code-block:: python@@ -180,7 +180,7 @@ The output should look as follows.self.play(FadeOut(square)) # fade out animationThis example shows one of the most basic features of manim: the ability to-implement complicated and mathematically-intensive animations (such as cleanly+implement complicated and mathematically intensive animations (such as cleanlyinterpolating between two geometric shapes) in very few lines of code.@@ -188,7 +188,7 @@ interpolating between two geometric shapes) in very few lines of code.You're done!************-With a working installation of manim, and the bare basics under your belt, it+With a working installation of manim and the bare basics under your belt, itis now time to start creating awesome mathematical animations. For a lookunder the hood at what manim is doing when rendering the ``SquareToCircle``scene, see the next tutorial :doc:`a_deeper_look`. For an extensive review of