================================================ FILE: README.md ================================================



PyPI Latest Release Docker image MIT License Reddit Twitter Discord Code style: black Documentation Status Downloads CI

An animation engine for explanatory math videos


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] > The community edition of Manim (ManimCE) is a version maintained and developed by the community. It was forked from 3b1b/manim, a tool originally created and open-sourced by Grant Sanderson, also creator of the 3Blue1Brown educational math videos. While Grant Sanderson continues to maintain his own repository, we recommend this version for its continued development, improved features, enhanced documentation, and more active community-driven maintenance. If you would like to study how Grant makes his videos, head over to his repository ([3b1b/manim](https://github.com/3b1b/manim)). ## Table of Contents: - [Installation](#installation) - [Usage](#usage) - [Documentation](#documentation) - [Docker](#docker) - [Help with Manim](#help-with-manim) - [Contributing](#contributing) - [License](#license) ## Installation > [!CAUTION] > These instructions are for the community version _only_. Trying to use these instructions to install [3b1b/manim](https://github.com/3b1b/manim) or instructions there to install this version will cause problems. Read [this](https://docs.manim.community/en/stable/faq/installation.html#why-are-there-different-versions-of-manim) and decide which version you wish to install, then only follow the instructions for your desired version. Manim requires a few dependencies that must be installed prior to using it. If you want to try it out first before installing it locally, you can do so [in our online Jupyter environment](https://try.manim.community/). For local installation, please visit the [Documentation](https://docs.manim.community/en/stable/installation.html) and follow the appropriate instructions for your operating system. ## Usage Manim is an extremely versatile package. The following is an example `Scene` you can construct: ```python from manim import * class SquareToCircle(Scene): def construct(self): circle = Circle() square = Square() square.flip(RIGHT) square.rotate(-3 * TAU / 8) circle.set_fill(PINK, opacity=0.5) self.play(Create(square)) self.play(Transform(square, circle)) self.play(FadeOut(square)) ``` In order to view the output of this scene, save the code in a file called `example.py`. Then, run the following in a terminal window: ```sh manim -p -ql example.py SquareToCircle ``` You should see your native video player program pop up and play a simple scene in which a square is transformed into a circle. You may find some more simple examples within this [GitHub repository](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/gh/ManimCommunity/jupyter_examples/HEAD?filepath=basic_example_scenes.ipynb). ## Command line arguments The general usage of Manim is as follows: ![manim-illustration](https://raw.githubusercontent.com/ManimCommunity/manim/main/docs/source/_static/command.png) The `-p` flag in the command above is for previewing, meaning the video file will automatically open when it is done rendering. The `-ql` flag is for a faster rendering at a lower quality. Some other useful flags include: - `-s` to skip to the end and just show the final frame. - `-n ` 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://docs.manim.community/en/stable/guides/configuration.html). ## Documentation Documentation is in progress at [ReadTheDocs](https://docs.manim.community/). ## Docker The community also maintains a docker image (`manimcommunity/manim`), which can be found [on DockerHub](https://hub.docker.com/r/manimcommunity/manim). Instructions on how to install and use it can be found in our [documentation](https://docs.manim.community/en/stable/installation/docker.html). ## Help with Manim If you need help installing or using Manim, feel free to reach out to our [Discord Server](https://www.manim.community/discord/) or [Reddit Community](https://www.reddit.com/r/manim). If you would like to submit a bug report or feature request, please open an issue. ## Contributing Contributions to Manim are always welcome. In particular, there is a dire need for tests and documentation. For contribution guidelines, please see the [documentation](https://docs.manim.community/en/stable/contributing.html). However, please note that Manim is currently undergoing a major refactor. In general, contributions implementing new features will not be accepted in this period. The contribution guide may become outdated quickly; we highly recommend joining our [Discord server](https://www.manim.community/discord/) to discuss any potential contributions and keep up to date with the latest developments. Most developers on the project use `uv` for management. You'll want to have uv installed and available in your environment. Learn more about `uv` at its [documentation](https://docs.astral.sh/uv/) and find out how to install manim with uv at the [manim dev-installation guide](https://docs.manim.community/en/latest/contributing/development.html) in the manim documentation. ## How to Cite Manim We acknowledge the importance of good software to support research, and we note that research becomes more valuable when it is communicated effectively. To demonstrate the value of Manim, we ask that you cite Manim in your work. Currently, the best way to cite Manim is to go to our [repository page](https://github.com/ManimCommunity/manim) (if you aren't already) and click the "cite this repository" button on the right sidebar. This will generate a citation in your preferred format, and will also integrate well with citation managers. ## Code of Conduct Our full code of conduct, and how we enforce it, can be read on [our website](https://docs.manim.community/en/stable/conduct.html). ## License The software is double-licensed under the MIT license, with copyright by 3blue1brown LLC (see LICENSE), and copyright by Manim Community Developers (see LICENSE.community). ================================================ FILE: CITATION.cff ================================================ # YAML 1.2 --- authors: - name: "The Manim Community Developers" cff-version: "1.2.0" date-released: 2025-01-20 license: MIT message: "We acknowledge the importance of good software to support research, and we note that research becomes more valuable when it is communicated effectively. To demonstrate the value of Manim, we ask that you cite Manim in your work." title: Manim – Mathematical Animation Framework url: "https://www.manim.community/" version: "v0.19.0" ... ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Code of Conduct > TL;DR Be excellent to each other; we're a community after all. If you run into issues with others in our community, please [contact](https://www.manim.community/discord/) a Manim Community Dev, or Moderator. ## Purpose The Manim Community includes members of varying skills, languages, personalities, cultural backgrounds, and experiences from around the globe. Through these differences, we continue to grow and collectively improve upon an open-source animation engine. When working in a community, it is important to remember that you are interacting with humans on the other end of your screen. This code of conduct will guide your interactions and keep Manim a positive environment for our developers, users, and fundamentally our growing community. ## Our Community Members of Manim Community are respectful, open, and considerate. Behaviors that reinforce these values contribute to our positive environment, and include: - **Being respectful.** Respectful of others, their positions, experiences, viewpoints, skills, commitments, time, and efforts. - **Being open.** Open to collaboration, whether it's on problems, Pull Requests, issues, or otherwise. - **Being considerate.** Considerate of their peers -- other Manim users and developers. - **Focusing on what is best for the community.** We're respectful of the processes set forth in the community, and we work within them. - **Showing empathy towards other community members.** We're attentive in our communications, whether in person or online, and we're tactful when approaching differing views. - **Gracefully accepting constructive criticism.** When we disagree, we are courteous in raising our issues. - **Using welcoming and inclusive language.** We're accepting of all who wish to take part in our activities, fostering an environment where anyone can participate and everyone can make a difference. ## Our Standards Every member of our community has the right to have their identity respected. Manim Community is dedicated to providing a positive environment for everyone, regardless of age, gender identity and expression, sexual orientation, disability, physical appearance, body size, ethnicity, nationality, race, religion (or lack thereof), education, or socioeconomic status. ## Inappropriate Behavior Examples of unacceptable behavior by participants include: * Harassment of any participants in any form * Deliberate intimidation, stalking, or following * Logging or taking screenshots of online activity for harassment purposes * Publishing others' private information, such as a physical or electronic address, without explicit permission * Violent threats or language directed against another person * Incitement of violence or harassment towards any individual, including encouraging a person to commit suicide or to engage in self-harm * Creating additional online accounts in order to harass another person or circumvent a ban * Sexual language and imagery in online communities or any conference venue, including talks * Insults, put-downs, or jokes that are based upon stereotypes, that are exclusionary, or that hold others up for ridicule * Excessive swearing * Unwelcome sexual attention or advances * Unwelcome physical contact, including simulated physical contact (eg, textual descriptions like "hug" or "backrub") without consent or after a request to stop * Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others * Sustained disruption of online community discussions, in-person presentations, or other in-person events * Continued one-on-one communication after requests to cease * Other conduct that is inappropriate for a professional audience including people of many different backgrounds Community members asked to stop any inappropriate behavior are expected to comply immediately. ## Manim Community Online Spaces This Code of Conduct applies to the following online spaces: - The [ManimCommunity GitHub Organization](https://github.com/ManimCommunity) and all of its repositories - The Manim [Discord](https://www.manim.community/discord/) - The Manim [Reddit](https://www.reddit.com/r/manim/) - The Manim [Twitter](https://twitter.com/manim\_community/) This Code of Conduct applies to every member in official Manim Community online spaces, including: - Moderators - Maintainers - Developers - Reviewers - Contributors - Users - All community members ## Consequences If a member's behavior violates this code of conduct, the Manim Community Code of Conduct team may take any action they deem appropriate, including, but not limited to: warning the offender, temporary bans, deletion of offending messages, and expulsion from the community and its online spaces. The full list of consequences for inappropriate behavior is listed below in the Enforcement Procedures. Thank you for helping make this a welcoming, friendly community for everyone. ## Contact Information If you believe someone is violating the code of conduct, or have any other concerns, please contact a Manim Community Dev, or Moderator immediately. They can be reached on Manim's Community [Discord](https://www.manim.community/discord/).

## Enforcement Procedures This document summarizes the procedures the Manim Community Code of Conduct team uses to enforce the Code of Conduct. ### Summary of processes When the team receives a report of a possible Code of Conduct violation, it will: 1. Acknowledge the receipt of the report. 1. Evaluate conflicts of interest. 1. Call a meeting of code of conduct team members without a conflict of interest. 1. Evaluate the reported incident. 1. Propose a behavioral modification plan. 1. Propose consequences for the reported behavior. 1. Vote on behavioral modification plan and consequences for the reported person. 1. Contact Manim Community moderators to approve the behavioral modification plan and consequences. 1. Follow up with the reported person. 1. Decide further responses. 1. Follow up with the reporter. ### Acknowledge the report Reporters should receive an acknowledgment of the receipt of their report within 48 hours. ### Conflict of interest policy Examples of conflicts of interest include: * You have a romantic or platonic relationship with either the reporter or the reported person. It's fine to participate if they are an acquaintance. * The reporter or reported person is someone you work closely with. This could be someone on your team or someone who works on the same project as you. * The reporter or reported person is a maintainer who regularly reviews your contributions * The reporter or reported person is your metamour. * The reporter or reported person is your family member Committee members do not need to state why they have a conflict of interest, only that one exists. Other team members should not ask why the person has a conflict of interest. Anyone who has a conflict of interest will remove themselves from the discussion of the incident, and recluse themselves from voting on a response to the report. ### Evaluating a report #### Jurisdiction * *Is this a Code of Conduct violation?* Is this behavior on our list of inappropriate behavior? Is it borderline inappropriate behavior? Does it violate our community norms? * *Did this occur in a space that is within our Code of Conduct's scope?* If the incident occurred outside the community, but a community member's mental health or physical safety may be negatively impacted if no action is taken, the incident may be in scope. Private conversations in community spaces are also in scope. #### Impact * *Did this incident occur in a private conversation or a public space?* Incidents that all community members can see will have a more negative impact. * *Does this behavior negatively impact a marginalized group in our community?* Is the reporter a person from a marginalized group in our community? How is the reporter being negatively impacted by the reported person's behavior? Are members of the marginalized group likely to disengage with the community if no action was taken on this report? * *Does this incident involve a community leader?* Community members often look up to community leaders to set the standard of acceptable behavior #### Risk * *Does this incident include sexual harassment?* * *Does this pose a safety risk?* Does the behavior put a person's physical safety at risk? Will this incident severely negatively impact someone's mental health? * *Is there a risk of this behavior being repeated?* Does the reported person understand why their behavior was inappropriate? Is there an established pattern of behavior from past reports? Reports which involve higher risk or higher impact may face more severe consequences than reports which involve lower risk or lower impact. ### Propose consequences What follows are examples of possible consequences of an incident report. This list of consequences is not exhaustive, and the Manim Community Code of Conduct team reserves the right to take any action it deems necessary. Possible private responses to an incident include: * Nothing, if the behavior was determined to not be a Code of Conduct violation * A warning * A final warning * Temporarily removing the reported person from the community's online space(s) * Permanently removing the reported person from the community's online space(s) * Publishing an account of the incident ### Team vote Some team members may have a conflict of interest and may be excluded from discussions of a particular incident report. Excluding those members, decisions on the behavioral modification plans and consequences will be determined by a two-thirds majority vote of the Manim Community Code of Conduct team. ### Moderators approval Once the team has approved the behavioral modification plans and consequences, they will communicate the recommended response to the Manim Community moderators. The team should not state who reported this incident. They should attempt to anonymize any identifying information from the report. Moderators are required to respond with whether they accept the recommended response to the report. If they disagree with the recommended response, they should provide a detailed response or additional context as to why they disagree. Moderators are encouraged to respond within a week. In cases where the moderators disagree on the suggested resolution for a report, the Manim Community Code of Conduct team may choose to notify the Manim Community Moderators. ### Follow up with the reported person The Manim Community Code of Conduct team will work with Manim Community moderators to draft a response to the reported person. The response should contain: * A description of the person's behavior in neutral language * The negative impact of that behavior * A concrete behavioral modification plan * Any consequences of their behavior The team should not state who reported this incident. They should attempt to anonymize any identifying information from the report. The reported person should be discouraged from contacting the reporter to discuss the report. If they wish to apologize to the reporter, the team can accept the apology on behalf of the reporter. ### Decide further responses If the reported person provides additional context, the Manim Community Code of Conduct team may need to re-evaluate the behavioral modification plan and consequences. ### Follow up with the reporter A person who makes a report should receive a follow-up response stating what action was taken in response to the report. If the team decided no response was needed, they should provide an explanation why it was not a Code of Conduct violation. Reports that are not made in good faith (such as "reverse sexism" or "reverse racism") may receive no response. The follow-up should be sent no later than one week after the receipt of the report. If deliberation or follow-up with the reported person takes longer than one week, the team should send a status update to the reporter. ### Changes to Code of Conduct When discussing a change to the Manim Community code of conduct or enforcement procedures, the Manim Community Code of Conduct team will follow this decision-making process: * **Brainstorm options.** Team members should discuss any relevant context and brainstorm a set of possible options. It is important to provide constructive feedback without getting side-tracked from the main question. * **Vote.** Proposed changes to the code of conduct will be decided by a two-thirds majority of all voting members of the Code of Conduct team. Team members are listed in the charter. Currently active voting members are listed in the following section. * **Board Vote.** Once a working draft is in place for the Code of Conduct and procedures, the Code of Conduct team shall provide the Manim Community Moderators with a draft of the changes. The Manim Community Moderators will vote on the changes at a board meeting. ### Current list of voting members - All available Community Developers (i.e. those with "write" permissions, or above, on the Manim Community GitHub organization). ## License This Code of Conduct is licensed under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](https://creativecommons.org/licenses/by-sa/3.0/). ## Attributions This Code of Conduct was forked from the code of conduct from the [Python Software Foundation](https://www.python.org/psf/conduct/) and adapted by Manim Community. ================================================ FILE: CONTRIBUTING.md ================================================ # Thanks for your interest in contributing! Please read our contributing guidelines which are hosted at https://docs.manim.community/en/latest/contributing.html ================================================ FILE: crowdin.yml ================================================ files: - source: /docs/i18n/gettext/**/*.pot translation: /docs/i18n/%two_letters_code%/LC_MESSAGES/**/%file_name%.po ================================================ FILE: lgtm.yml ================================================ queries: - exclude: py/init-calls-subclass - exclude: py/unexpected-raise-in-special-method - exclude: py/modification-of-locals - exclude: py/multiple-calls-to-init - exclude: py/missing-call-to-init ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2018 3Blue1Brown LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: LICENSE.community ================================================ MIT License Copyright (c) 2024, the Manim Community Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: mypy.ini ================================================ [mypy] strict = False files = manim python_version = 3.10 ; plugins = numpy.typing.mypy_plugin ignore_errors = False cache_fine_grained = True # Apparently mypy cannot understand the difference between methods and callable attributes. # See https://github.com/python/mypy/issues/2427#issuecomment-929688736 # and https://github.com/python/mypy/issues/2427#issuecomment-1419206807 disable_error_code = method-assign # Disallow Dynamic Typing # disallow_any_unimported = True # disallow_any_expr = False # disallow_any_decorated = True # disallow_any_explicit = True # disallow_any_generics = True # disallow_subclassing_any = True # # # Disallow Untyped Defs and Calls disallow_untyped_calls = True disallow_untyped_defs = True disallow_incomplete_defs = True # check_untyped_defs = False # disallow_untyped_decorators = True # # # None and Optional Handling # implicit_optional = False # strict_optional = True # # # Configuring Warnings # warn_redundant_casts = True warn_unused_ignores = True warn_return_any = True # warn_unreachable = True # # # Strictness Flags # allow_untyped_globals = False # allow_redefinition = False # local_partial_types = False # strict_equality = True # # # Configuring Error Messages # show_error_context = True # show_column_numbers = True # show_error_codes = True # pretty = True # color_output = True # error_summary = True # # disable_recursive_aliases = True [mypy-manim._config.utils] ignore_errors = True [mypy-manim.animation.animation] ignore_errors = True [mypy-manim.animation.creation] ignore_errors = True [mypy-manim.animation.rotation] ignore_errors = True [mypy-manim.animation.speedmodifier] ignore_errors = True [mypy-manim.animation.transform_matching_parts] ignore_errors = True [mypy-manim.animation.transform] ignore_errors = True [mypy-manim.animation.updaters.mobject_update_utils] ignore_errors = True [mypy-manim.camera.mapping_camera] ignore_errors = True [mypy-manim.mobject.graphing.coordinate_systems] ignore_errors = True [mypy-manim.mobject.graph] ignore_errors = True [mypy-manim.mobject.logo] ignore_errors = True [mypy-manim.mobject.mobject] ignore_errors = True [mypy-manim.mobject.opengl.opengl_compatibility] ignore_errors = True [mypy-manim.mobject.opengl.opengl_image_mobject] ignore_errors = True [mypy-manim.mobject.opengl.opengl_point_cloud_mobject] ignore_errors = True [mypy-manim.mobject.opengl.opengl_surface] ignore_errors = True [mypy-manim.mobject.opengl.opengl_vectorized_mobject] ignore_errors = True [mypy-manim.mobject.table] ignore_errors = True [mypy-manim.mobject.three_d.three_dimensions] ignore_errors = True [mypy-manim.mobject.types.image_mobject] ignore_errors = True [mypy-manim.mobject.types.point_cloud_mobject] ignore_errors = True [mypy-manim.mobject.types.vectorized_mobject] ignore_errors = True [mypy-manim.mobject.vector_field] ignore_errors = True [mypy-manim.renderer.cairo_renderer] ignore_errors = True [mypy-manim.renderer.opengl_renderer] ignore_errors = True [mypy-manim.renderer.shader_wrapper] ignore_errors = True [mypy-manim.scene.three_d_scene] ignore_errors = True [mypy-manim.utils.hashing] ignore_errors = True # ---------------- Stubless imported Modules -------------------------- # We should be able to create stubs for this or type hint it [mypy-manimpango] ignore_missing_imports = True # Has stubs in 3.8 [mypy-pydub] ignore_missing_imports = True [mypy-matplotlib] ignore_missing_imports = True [mypy-scipy.*] ignore_missing_imports = True [mypy-networkx] ignore_missing_imports = True [mypy-git] ignore_missing_imports = True [mypy-moderngl.*] ignore_missing_imports = True [mypy-moderngl_window.*] ignore_missing_imports = True [mypy-dearpygui.*] ignore_missing_imports = True [mypy-screeninfo] ignore_missing_imports = True [mypy-IPython.*] ignore_missing_imports = True [mypy-watchdog.*] ignore_missing_imports = True [mypy-tqdm] ignore_missing_imports = True [mypy-mapbox_earcut] ignore_missing_imports = True [mypy-click_default_group] ignore_missing_imports = True ================================================ FILE: pyproject.toml ================================================ [project] name = "manim" version = "0.19.0" description = "Animation engine for explanatory math videos." authors = [ {name = "The Manim Community Developers", email = "contact@manim.community"}, {name = "Grant '3Blue1Brown' Sanderson", email = "grant@3blue1brown.com"}, ] license = "MIT" readme = "README.md" classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Topic :: Scientific/Engineering", "Topic :: Multimedia :: Video", "Topic :: Multimedia :: Graphics", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Natural Language :: English", ] requires-python = ">=3.9" dependencies = [ "audioop-lts>=0.2.1 ; python_full_version >= '3.13'", "av>=9.0.0,<14.0.0", "beautifulsoup4>=4.12", "click>=8.0", "cloup>=2.0.0", "decorator>=4.3.2", "importlib-metadata>=8.6.1 ; python_full_version < '3.10'", "isosurfaces>=0.1.0", "manimpango>=0.5.0,<1.0.0", "mapbox-earcut>=1.0.0", "moderngl-window>=2.0.0", "moderngl>=5.0.0,<6.0.0", "networkx>=2.6", "numpy>=2.0", "numpy>=2.1 ; python_full_version >= '3.10'", "pillow>=9.1", "pycairo>=1.13,<2.0.0", "pydub>=0.20.0", "pygments>=2.0.0", "rich>=12.0.0", "scipy>=1.13.0", "scipy>=1.14.0 ; python_full_version >= '3.13'", "screeninfo>=0.7", "skia-pathops>=0.7.0", "srt>=3.0.0", "svgelements>=1.8.0", "tqdm>=4.0.0", "typing-extensions>=4.12.0", "watchdog>=2.0.0", ] [project.scripts] "manim" = "manim.__main__:main" "manimce" = "manim.__main__:main" [project.urls] repository = "https://github.com/manimcommunity/manim" documentation = "https://docs.manim.community/" homepage = "https://www.manim.community/" "Bug Tracker" = "https://github.com/ManimCommunity/manim/issues" "Changelog" = "https://docs.manim.community/en/stable/changelog.html" "X / Twitter" = "https://x.com/manim_community" "Bluesky" = "https://bsky.app/profile/manim.community" "Discord" = "https://www.manim.community/discord/" [project.optional-dependencies] gui = [ "dearpygui>=1.0.0", ] jupyterlab = [ "jupyterlab>=4.3.4", "notebook>=7.3.2", ] [dependency-groups] dev = [ "furo>=2024.8.6", "gitpython>=3.1.44", "matplotlib>=3.9.4", "myst-parser>=3.0.1", "pre-commit>=4.1.0", "pygithub>=2.5.0", "pytest>=8.3.4", "pytest-cov>=6.0.0", "pytest-xdist>=2.2,<3.0", "ruff>=0.9.3", "sphinx>=7.4.7", "sphinx-copybutton>=0.5.2", "sphinx-design>=0.6.1", "sphinx-reredirects>=0.1.5", "sphinxcontrib-programoutput>=0.18", "sphinxext-opengraph>=0.9.1", "types-decorator>=5.1.8.20250121", "types-pillow>=10.2.0.20240822", "types-pygments>=2.19.0.20250107", "psutil>=6.1.1", "requests>=2.32.3", ] [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build] include = [ "/manim" ] exclude = [ "/docker", "/logo", "/scripts", ] [tool.pytest.ini_options] markers = "slow: Mark the test as slow. Can be skipped with --skip_slow" addopts = "--no-cov-on-fail --cov=manim --cov-report xml --cov-report term -n auto --dist=loadfile --durations=0" [tool.isort] profile = "black" [tool.coverage.run] omit = ["*tests*"] [tool.coverage.report] exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"] [tool.ruff] line-length = 88 target-version = "py39" extend-exclude = [ ".github", ".hg", ".env", "env", "build", "buck-out", "media", ] fix = true [tool.ruff.lint] select = [ "A", "B", "C4", "D", "E", "W", "F", "I", "PGH", "PT", "SIM", "UP", ] ignore = [ # (sub)module shadows standard library module "A005", # mutable argument defaults (too many changes) "B006", # No function calls in defaults # ignored because np.array() and straight_path() "B008", # docstring ignores - mostly stylistic "D1", "D203", "D205", "D212", "D4", # due to the import * used in manim "F403", "F405", # Exception too broad (this would require lots of changes + re.escape) for little benefit "PT011", # as recommended by https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "D206", "D300", "E111", "E114", "E117", "E501", ] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" [tool.ruff.lint.per-file-ignores] "tests/*" = [ # flake8-builtins "A", # unused expression "B018", # unused variable "F841", # from __future__ import annotations "I002", ] "example_scenes/*" = [ "I002", ] "__init__.py" = [ "F401", "F403", ] [tool.ruff.lint.isort] required-imports = ["from __future__ import annotations"] [tool.ruff.lint.flake8-pytest-style] fixture-parentheses = false mark-parentheses = false [tool.ruff.lint.pydocstyle] convention = "numpy" [tool.ruff.format] docstring-code-format = true ================================================ FILE: .codecov.yml ================================================ codecov: notify: require_ci_to_pass: no after_n_builds: 1 coverage: status: project: default: # Require 1% coverage, i.e., always succeed target: 1 patch: true changes: false comment: off ================================================ FILE: .codespell_ignorewords ================================================ nam sherif falsy medias strager ================================================ FILE: .codespellrc ================================================ [codespell] check-hidden = True skip = .git,*.js,*.js.map,*.css,*.css.map,*.html,*.po,*.pot,uv.lock,*.log,*.svg ignore-words = .codespell_ignorewords ================================================ FILE: .dockerignore ================================================ .git ================================================ FILE: .flake8 ================================================ [flake8] # Exclude the grpc generated code exclude = ./manim/grpc/gen/*, __pycache__,.git, per-file-ignores = __init__.py:F401 max-complexity = 29 max-line-length = 88 statistics = True # Prevents some flake8-rst-docstrings errors rst-roles = attr,class,func,meth,mod,obj,ref,doc,exc rst-directives = manim, SEEALSO, seealso docstring-convention=numpy select = A,A00,B,B9,C4,C90,D,E,F,F,PT,RST,SIM,W,F401 # General Compatibility extend-ignore = E203, W503, D202, D212, D213, D404 # Misc F401, F403, F405, F841, E501, E731, E402, F811, F821, # multiple statements on one line (overload) E704, # Plug-in: flake8-builtins A001, A002, A003, # Plug-in: flake8-bugbear B006, B007, B008, B009, B010, B903, B950, # Plug-in: flake8-simplify SIM105, SIM106, SIM119, # Plug-in: flake8-pytest-style PT001, PT004, PT006, PT011, PT018, PT022, PT023, # Plug-in: flake8-docstrings D100, D101, D102, D103, D104, D105, D106, D107, D200, D202, D204, D205, D209, D301, D400, D401, D402, D403, D405, D406, D407, D409, D411, D412, D414, # Plug-in: flake8-rst-docstrings RST201, RST203, RST210, RST212, RST213, RST215, RST301, RST303, RST499 ================================================ FILE: .git-blame-ignore-revs ================================================ # Switched to ruff format: 24025b60d57301b0a59754c38d77bccd8ed69feb ================================================ FILE: .pre-commit-config.yaml ================================================ default_stages: [pre-commit, pre-push] fail_fast: false exclude: ^(manim/grpc/gen/|docs/i18n/) repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: check-ast name: Validate Python - id: trailing-whitespace - id: mixed-line-ending - id: end-of-file-fixer - id: check-toml name: Validate pyproject.toml - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.12.9 hooks: - id: ruff name: ruff lint types: [python] args: [--exit-non-zero-on-fix] - id: ruff-format types: [python] - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.17.1 hooks: - id: mypy additional_dependencies: [ types-backports, types-decorator, types-docutils, types-requests, types-setuptools, ] files: ^manim/ - repo: https://github.com/codespell-project/codespell rev: v2.4.1 hooks: - id: codespell files: ^.*\.(py|md|rst)$ args: ["-L", "medias,nam"] ================================================ FILE: .pylintrc ================================================ [MASTER] # A comma-separated list of package or module names from where C extensions may # be loaded. Extensions are loading into the active Python interpreter and may # run arbitrary code. extension-pkg-whitelist= # Specify a score threshold to be exceeded before program exits with error. fail-under=10.0 # Add files or directories to the blacklist. They should be base names, not # paths. ignore=CVS # Add files or directories matching the regex patterns to the blacklist. The # regex matches against base names, not paths. ignore-patterns= # Python code to execute, usually for sys.path manipulation such as # pygtk.require(). #init-hook= # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the # number of processors available to use. jobs=1 # Control the amount of potential inferred values when inferring a single # object. This can help the performance when dealing with large functions or # complex, nested conditions. limit-inference-results=100 # List of plugins (as comma separated values of python module names) to load, # usually to register additional checkers. load-plugins= # Pickle collected data for later comparisons. persistent=yes # When enabled, pylint would attempt to guess common misconfiguration and emit # user-friendly hints instead of false-positive error messages. suggestion-mode=yes # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no [MESSAGES CONTROL] # Only show warnings with the listed confidence levels. Leave empty to show # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED. confidence= # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifiers separated by comma (,) or put this # option multiple times (only on the command line, not in the configuration # file where it should appear only once). You can also use "--disable=all" to # disable everything first and then re-enable specific checks. For example, if # you want to run only the similarities checker, you can use "--disable=all # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". disable=print-statement, parameter-unpacking, unpacking-in-except, old-raise-syntax, backtick, long-suffix, old-ne-operator, old-octal-literal, import-star-module-level, non-ascii-bytes-literal, raw-checker-failed, bad-inline-option, locally-disabled, file-ignored, suppressed-message, useless-suppression, deprecated-pragma, use-symbolic-message-instead, apply-builtin, basestring-builtin, buffer-builtin, cmp-builtin, coerce-builtin, execfile-builtin, file-builtin, long-builtin, raw_input-builtin, reduce-builtin, standarderror-builtin, unicode-builtin, xrange-builtin, coerce-method, delslice-method, getslice-method, setslice-method, no-absolute-import, old-division, dict-iter-method, dict-view-method, next-method-called, metaclass-assignment, indexing-exception, raising-string, reload-builtin, oct-method, hex-method, nonzero-method, cmp-method, input-builtin, round-builtin, intern-builtin, unichr-builtin, map-builtin-not-iterating, zip-builtin-not-iterating, range-builtin-not-iterating, filter-builtin-not-iterating, using-cmp-argument, eq-without-hash, div-method, idiv-method, rdiv-method, exception-message-attribute, invalid-str-codec, sys-max-int, bad-python3-import, deprecated-string-function, deprecated-str-translate-call, deprecated-itertools-function, deprecated-types-field, next-method-defined, dict-items-not-iterating, dict-keys-not-iterating, dict-values-not-iterating, deprecated-operator-function, deprecated-urllib-function, xreadlines-attribute, deprecated-sys-function, exception-escape, comprehension-escape, fixme, missing-function-docstring # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. enable=c-extension-no-member [REPORTS] # Python expression which should return a score less than or equal to 10. You # have access to the variables 'error', 'warning', 'refactor', and 'convention' # which contain the number of messages in each category, as well as 'statement' # which is the total number of statements analyzed. This score is used by the # global evaluation report (RP0004). evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) # Template used to display messages. This is a python new-style format string # used to format the message information. See doc for all details. #msg-template= # Set the output format. Available formats are text, parseable, colorized, json # and msvs (visual studio). You can also give a reporter class, e.g. # mypackage.mymodule.MyReporterClass. output-format=text # Tells whether to display a full report or only the messages. reports=no # Activate the evaluation score. score=yes [REFACTORING] # Maximum number of nested blocks for function / method body max-nested-blocks=5 # Complete name of functions that never returns. When checking for # inconsistent-return-statements if a never returning function is called then # it will be considered as an explicit return statement and no message will be # printed. never-returning-functions=sys.exit [BASIC] # Naming style matching correct argument names. argument-naming-style=snake_case # Regular expression matching correct argument names. Overrides argument- # naming-style. #argument-rgx= # Naming style matching correct attribute names. attr-naming-style=snake_case # Regular expression matching correct attribute names. Overrides attr-naming- # style. #attr-rgx= # Bad variable names which should always be refused, separated by a comma. bad-names=foo, bar, baz, toto, tutu, tata # Bad variable names regexes, separated by a comma. If names match any regex, # they will always be refused bad-names-rgxs= # Naming style matching correct class attribute names. class-attribute-naming-style=any # Regular expression matching correct class attribute names. Overrides class- # attribute-naming-style. #class-attribute-rgx= # Naming style matching correct class names. class-naming-style=PascalCase # Regular expression matching correct class names. Overrides class-naming- # style. #class-rgx= # Naming style matching correct constant names. const-naming-style=UPPER_CASE # Regular expression matching correct constant names. Overrides const-naming- # style. #const-rgx= # Minimum line length for functions/classes that require docstrings, shorter # ones are exempt. docstring-min-length=-1 # Naming style matching correct function names. function-naming-style=snake_case # Regular expression matching correct function names. Overrides function- # naming-style. #function-rgx= # Good variable names which should always be accepted, separated by a comma. good-names=i, j, k, e, Run, _ # Good variable names regexes, separated by a comma. If names match any regex, # they will always be accepted good-names-rgxs= # Include a hint for the correct naming format with invalid-name. include-naming-hint=no # Naming style matching correct inline iteration names. inlinevar-naming-style=any # Regular expression matching correct inline iteration names. Overrides # inlinevar-naming-style. #inlinevar-rgx= # Naming style matching correct method names. method-naming-style=snake_case # Regular expression matching correct method names. Overrides method-naming- # style. #method-rgx= # Naming style matching correct module names. module-naming-style=snake_case # Regular expression matching correct module names. Overrides module-naming- # style. #module-rgx= # Colon-delimited sets of names that determine each other's naming style when # the name regexes allow several styles. name-group= # Regular expression which should only match function or class names that do # not require a docstring. no-docstring-rgx=^_ # List of decorators that produce properties, such as abc.abstractproperty. Add # to this list to register other decorators that produce valid properties. # These decorators are taken in consideration only for invalid-name. property-classes=abc.abstractproperty # Naming style matching correct variable names. variable-naming-style=snake_case # Regular expression matching correct variable names. Overrides variable- # naming-style. #variable-rgx= [STRING] # This flag controls whether inconsistent-quotes generates a warning when the # character used as a quote delimiter is used inconsistently within a module. check-quote-consistency=no # This flag controls whether the implicit-str-concat should generate a warning # on implicit string concatenation in sequences defined over several lines. check-str-concat-over-line-jumps=no [FORMAT] # Expected format of line ending, e.g. empty (any line ending), LF or CRLF. expected-line-ending-format= # Regexp for a line that is allowed to be longer than the limit. ignore-long-lines=^\s*(# )??$ # Number of spaces of indent required inside a hanging or continued line. indent-after-paren=4 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 # tab). indent-string=' ' # Maximum number of characters on a single line. max-line-length=88 # Maximum number of lines in a module. max-module-lines=1000 # Allow the body of a class to be on the same line as the declaration if body # contains single statement. single-line-class-stmt=no # Allow the body of an if to be on the same line as the test if there is no # else. single-line-if-stmt=no [SPELLING] # Limits count of emitted suggestions for spelling mistakes. max-spelling-suggestions=4 # Spelling dictionary name. Available dictionaries: none. To make it work, # install the python-enchant package. spelling-dict= # List of comma separated words that should not be checked. spelling-ignore-words= # A path to a file that contains the private dictionary; one word per line. spelling-private-dict-file= # Tells whether to store unknown words to the private dictionary (see the # --spelling-private-dict-file option) instead of raising a message. spelling-store-unknown-words=no [TYPECHECK] # List of decorators that produce context managers, such as # contextlib.contextmanager. Add to this list to register other decorators that # produce valid context managers. contextmanager-decorators=contextlib.contextmanager # List of members which are set dynamically and missed by pylint inference # system, and so shouldn't trigger E1101 when accessed. Python regular # expressions are accepted. generated-members= # Tells whether missing members accessed in mixin class should be ignored. A # mixin class is detected if its name ends with "mixin" (case insensitive). ignore-mixin-members=yes # Tells whether to warn about missing members when the owner of the attribute # is inferred to be None. ignore-none=yes # This flag controls whether pylint should warn about no-member and similar # checks whenever an opaque object is returned when inferring. The inference # can return multiple potential results while evaluating a Python object, but # some branches might not be evaluated, which results in partial inference. In # that case, it might be useful to still emit no-member and other checks for # the rest of the inferred objects. ignore-on-opaque-inference=yes # List of class names for which member attributes should not be checked (useful # for classes with dynamically set attributes). This supports the use of # qualified names. ignored-classes=optparse.Values,thread._local,_thread._local # List of module names for which member attributes should not be checked # (useful for modules/projects where namespaces are manipulated during runtime # and thus existing member attributes cannot be deduced by static analysis). It # supports qualified module names, as well as Unix pattern matching. ignored-modules= # Show a hint with possible names when a member name was not found. The aspect # of finding the hint is based on edit distance. missing-member-hint=yes # The minimum edit distance a name should have in order to be considered a # similar match for a missing member name. missing-member-hint-distance=1 # The total number of similar names that should be taken in consideration when # showing a hint for a missing member. missing-member-max-choices=1 # List of decorators that change the signature of a decorated function. signature-mutators= [VARIABLES] # List of additional names supposed to be defined in builtins. Remember that # you should avoid defining new builtins when possible. additional-builtins= # Tells whether unused global variables should be treated as a violation. allow-global-unused-variables=yes # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. callbacks=cb_, _cb # A regular expression matching the name of dummy variables (i.e. expected to # not be used). dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ # Argument names that match this expression will be ignored. Default to name # with leading underscore. ignored-argument-names=_.*|^ignored_|^unused_ # Tells whether we should check for unused import in __init__ files. init-import=no # List of qualified module names which can have objects that can redefine # builtins. redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io [SIMILARITIES] # Ignore comments when computing similarities. ignore-comments=yes # Ignore docstrings when computing similarities. ignore-docstrings=yes # Ignore imports when computing similarities. ignore-imports=no # Minimum lines number of a similarity. min-similarity-lines=4 [MISCELLANEOUS] # List of note tags to take in consideration, separated by a comma. notes=FIXME, XXX, TODO # Regular expression of note tags to take in consideration. #notes-rgx= [LOGGING] # The type of string formatting that logging methods do. `old` means using % # formatting, `new` is for `{}` formatting. logging-format-style=old # Logging modules to check that the string format arguments are in logging # function parameter format. logging-modules=logging [DESIGN] # Maximum number of arguments for function / method. max-args=5 # Maximum number of attributes for a class (see R0902). max-attributes=7 # Maximum number of boolean expressions in an if statement (see R0916). max-bool-expr=5 # Maximum number of branch for function / method body. max-branches=12 # Maximum number of locals for function / method body. max-locals=15 # Maximum number of parents for a class (see R0901). max-parents=7 # Maximum number of public methods for a class (see R0904). max-public-methods=20 # Maximum number of return / yield for function / method body. max-returns=6 # Maximum number of statements in function / method body. max-statements=50 # Minimum number of public methods for a class (see R0903). min-public-methods=2 [IMPORTS] # List of modules that can be imported at any level, not just the top level # one. allow-any-import-level= # Allow wildcard imports from modules that define __all__. allow-wildcard-with-all=no # Analyse import fallback blocks. This can be used to support both Python 2 and # 3 compatible code, which means that the block might have code that exists # only in one or another interpreter, leading to false positives when analysed. analyse-fallback-blocks=no # Deprecated modules which should not be used, separated by a comma. deprecated-modules=optparse,tkinter.tix # Create a graph of external dependencies in the given file (report RP0402 must # not be disabled). ext-import-graph= # Create a graph of every (i.e. internal and external) dependencies in the # given file (report RP0402 must not be disabled). import-graph= # Create a graph of internal dependencies in the given file (report RP0402 must # not be disabled). int-import-graph= # Force import order to recognize a module as part of the standard # compatibility libraries. known-standard-library= # Force import order to recognize a module as part of a third party library. known-third-party=enchant # Couples of modules and preferred modules, separated by a comma. preferred-modules= [CLASSES] # List of method names used to declare (i.e. assign) instance attributes. defining-attr-methods=__init__, __new__, setUp, __post_init__ # List of member names, which should be excluded from the protected access # warning. exclude-protected=_asdict, _fields, _replace, _source, _make # List of valid names for the first argument in a class method. valid-classmethod-first-arg=cls # List of valid names for the first argument in a metaclass class method. valid-metaclass-classmethod-first-arg=cls [EXCEPTIONS] # Exceptions that will emit a warning when being caught. Defaults to # "BaseException, Exception". overgeneral-exceptions=BaseException, Exception ================================================ FILE: .readthedocs.yml ================================================ version: 2 sphinx: configuration: docs/source/conf.py build: os: ubuntu-22.04 tools: python: "3.13" apt_packages: - libpango1.0-dev - graphviz python: install: - requirements: docs/rtd-requirements.txt - requirements: docs/requirements.txt - method: pip path: . ================================================ FILE: docker/readme.md ================================================ See the [main README](https://github.com/ManimCommunity/manim/blob/main/README.md) for some instructions on how to use this image. # Building the image The docker image corresponding to the checked out version of the git repository can be built by running ``` docker build -t manimcommunity/manim:TAG -f docker/Dockerfile . ``` from the root directory of the repository. Multi-platform builds are possible by running ``` docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag manimcommunity/manim:TAG -f docker/Dockerfile . ``` from the root directory of the repository. ================================================ FILE: docker/Dockerfile ================================================ FROM python:3.11-slim RUN apt-get update -qq \ && apt-get install --no-install-recommends -y \ build-essential \ gcc \ cmake \ libcairo2-dev \ libffi-dev \ libpango1.0-dev \ freeglut3-dev \ ffmpeg \ pkg-config \ make \ wget \ ghostscript \ fonts-noto RUN fc-cache -fv # setup a minimal texlive installation COPY docker/texlive-profile.txt /tmp/ ENV PATH=/usr/local/texlive/bin/armhf-linux:/usr/local/texlive/bin/aarch64-linux:/usr/local/texlive/bin/x86_64-linux:$PATH RUN wget -O /tmp/install-tl-unx.tar.gz http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \ mkdir /tmp/install-tl && \ tar -xzf /tmp/install-tl-unx.tar.gz -C /tmp/install-tl --strip-components=1 && \ /tmp/install-tl/install-tl --profile=/tmp/texlive-profile.txt \ && tlmgr install \ amsmath babel-english cbfonts-fd cm-super count1to ctex doublestroke dvisvgm everysel \ fontspec frcursive fundus-calligra gnu-freefont jknapltx latex-bin \ mathastext microtype multitoc physics prelim2e preview ragged2e relsize rsfs \ setspace standalone tipa wasy wasysym xcolor xetex xkeyval # clone and build manim COPY . /opt/manim WORKDIR /opt/manim RUN pip install --no-cache .[jupyterlab] RUN pip install -r docs/requirements.txt ARG NB_USER=manimuser ARG NB_UID=1000 ENV USER=${NB_USER} ENV NB_UID=${NB_UID} ENV HOME=/manim RUN adduser --disabled-password \ --gecos "Default user" \ --uid ${NB_UID} \ ${NB_USER} # create working directory for user to mount local directory into WORKDIR ${HOME} USER root RUN chown -R ${NB_USER}:${NB_USER} ${HOME} RUN chmod 777 ${HOME} USER ${NB_USER} CMD [ "/bin/bash" ] ================================================ FILE: docker/texlive-profile.txt ================================================ selected_scheme scheme-minimal TEXDIR /usr/local/texlive TEXMFCONFIG ~/.texlive/texmf-config TEXMFHOME ~/texmf TEXMFLOCAL /usr/local/texlive/texmf-local TEXMFSYSCONFIG /usr/local/texlive/texmf-config TEXMFSYSVAR /usr/local/texlive/texmf-var TEXMFVAR ~/.texlive/texmf-var option_doc 0 option_src 0 ================================================ FILE: docs/html ================================================ [Empty file] ================================================ FILE: docs/make.bat ================================================ @ECHO OFF pushd %~dp0\source REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) REM The paths are taken from the source directory set SOURCEDIR=. set BUILDDIR=..\build if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% :end popd ================================================ FILE: docs/Makefile ================================================ # Minimal makefile for Sphinx documentation # # You can set these variables from the command line, and also # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build # Path base is the source directory SOURCEDIR = . BUILDDIR = ../build # Put it first so that "make" without argument is like "make help". help: @(cd source; $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)) .PHONY: help Makefile i18n # All the code is executed as if everything was launched in one shell. .ONESHELL: # Like make clean but also remove files generated by autosummary and # rendered videos. cleanall: clean @rm source/reference/* @rm -rf source/media @rm -f rendering_times.csv i18n: @(cd source; $(SPHINXBUILD) -M gettext "$(SOURCEDIR)" ../i18n/ -t skip-manim $(SPHINXOPTS) $(O);cd ../i18n;bash stripUntranslatable.sh) # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @(cd source; $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)) ================================================ FILE: docs/requirements.txt ================================================ furo myst-parser sphinx>=7.3 sphinx-copybutton sphinxext-opengraph sphinx-design sphinx-reredirects ================================================ FILE: docs/rtd-requirements.txt ================================================ jupyterlab sphinxcontrib-programoutput ================================================ FILE: docs/skip-manim ================================================ [Empty file] ================================================ FILE: docs/i18n/readyForTranslation ================================================ changelog.po index.po contributing.po installation/linux.po installation/troubleshooting.po reporting_bugs.po installation.po examples.po reference.po tutorials.po tutorials/building_blocks.po tutorials/quickstart.po guides/output_and_config.po guides/configuration.po guides/deep_dive.po guides/using_text.po faq/general.po faq/help.po faq/installation.po faq/opengl.po ================================================ FILE: docs/i18n/stripUntranslatable.awk ================================================ BEGIN { # The current state of the parser: # -1 -> haven't read the first line of the new block # 0 -> reading the pre-comment # 1 -> reading the msgid # 2 -> reading the msgstr state=-1 # The comment preceding the block precomment="" # The same string, but with a space after the sharp to avoid a comment sharpedprecomment="" # The msgid section, containing the string to be translated msgidstr="" # The same string, but with a sharp before every newline (commented out) sharpedmsgidstr="" # The msgstr section, containing the destination string msgstrstr="" # The same string, but with a sharp before every newline (commented out) sharpedmsgstrstr="" # Whether the block being read should be kept # -1 -> should keep, overridable # 0 -> should not keep, overridable # 1 -> should keep, not overridable acceptable=1 # The file location of where to put everything # that has been stripped out untranslatablefile="./untranslatable.po" # Whether we are still reading the licence text licencetext=1 } # Detecting the end of licence $0~/^#, fuzzy$/ {licencetext=0; next; next} # If we are reading the licence, skip text and dont print it. $0~// {if (licencetext==1) {next}} # We pass on the wrong metadata $0~/"Report-Msgid-Bugs-To:/ {next} $0~/"PO-Revision-Date:/ {next} $0~/"Last-Translator:/ {next} $0~/"Language-Team:/ {next} # This pattern matches empty lines # The code flushes the data stored, and save # it only if acceptable!=1 $0~/^$/ { if (state<=0){ if(acceptable!=1){ print precomment }else{ #print "# Detected untranslatable text:" #print sharpedprecomment } precomment="" }else{ if(acceptable==1){ print precomment print msgidstr print msgstrstr print "" }else{ #print "# Detected untranslatable text:" #print sharpedprecomment #print sharpedmsgidstr #print sharpedmsgstrstr print precomment>>untranslatablefile print msgidstr>>untranslatablefile print msgstrstr>>untranslatablefile } # Add the newline currently parsed # Re-initialisation of the variables. state=-1 acceptable=-1 precomment="" msgidstr="" msgstrstr="" } } # If the line is commented out $0~/^#/ { precomment=(state==-1)?$0:precomment"\n"$0 sharpedprecomment=(state==-1)?"# "$0:sharpedprecomment"\n# "$0 state=0 } # If the line starts with "msgid" $0~/^msgid/ { state=1 msgidstr=$0 sharpedmsgidstr="# "$0 } # If the line starts with msgstr $0~/^msgstr/ { state=2 msgstrstr=$0 sharpedmsgstrstr="# "$0 } # If the line starts with a '"' $0~/^\"/ { if(state==1){ msgidstr=msgidstr"\n"$0 sharpedmsgidstr=sharpedmsgidstr"\n# "$0 }else{ msgstrstr=msgstrstr"\n"$0 sharpedmsgstrstr=sharpedmsgstrstr"\n# "$0 } } # ---------------------------------------------------------------- # This code is now the part that actually selects lines to be stripped out. state==1 { acceptable=1 } $0~/^msgid ":ref:`[a-zA-Z]*`"/ { acceptable=0 } $0~/^msgid ":obj:/ { acceptable=0 } $0~/^msgid "manim.([a-z._\\]+)"$/ { acceptable=0 } $0~/^(msgid )?"((:(mod|class|func):`~\.[a-zA-Z0-9.]+)`| )+"/ { acceptable=0 } $0~/^msgid ":py:obj:`[a-zA-Z0-9_.<> ]+`(\\\\)?"/ { acceptable=0 } $0~/^msgid "(:(mod|class|meth|func|attr):`[~A-Za-z_.()]+`(, )?)+"/ { acceptable=0 } # When the parsing is ended, print the last missing endline END { print "" } ================================================ FILE: docs/i18n/stripUntranslatable.sh ================================================ #!/bin/bash rm -f translatable.po rm -f untranslatable.po pot_dir_prefix="gettext/" echo "" for srcFile in `find $pot_dir_prefix -name "*.pot" -type f` do printf "\r\033[KCleaning file \e[32m$srcFile\e[0m" dstFile="$srcFile.bld" awk -f stripUntranslatable.awk $srcFile | sed '/POT-Creation-Date/d'> $dstFile cat $dstFile >> translatable.po mv $dstFile $srcFile done echo "" ================================================ FILE: docs/i18n/fr/LC_MESSAGES/index.po ================================================ [Binary file] ================================================ FILE: docs/i18n/fr/LC_MESSAGES/installation.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: fr\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/installation.pot\n" "X-Crowdin-File-ID: 5165\n" "Language-Team: French\n" "Language: fr_FR\n" "PO-Revision-Date: 2021-11-06 12:29\n" #: ../../source/installation.rst:2 msgid "Installation" msgstr "Installation" #: ../../source/installation.rst:4 msgid "Depending on your use case, different installation options are recommended: if you just want to play around with Manim for a bit, interactive in-browser notebooks are a really simple way of exploring the library as they require no local installation. Head over to https://try.manim.community to give our interactive tutorial a try." msgstr "Suivant comment vous souhaitez utiliser Manim, différentes options d'installation s'offrent à vous : Si vous voulez simplement vous amuser avec, les bloc-notes interactifs sur votre navigateur sont un moyen simple d'explorer les possibilités offertes par la bibliothèque, puisqu'ils ne nécessitent pas d'installer quoi que ce soit sur votre ordinateur. Allez donc voir à l'adresse https://try.manim.community pour tester notre tutoriel interactif." #: ../../source/installation.rst:10 msgid "Otherwise, if you intend to use Manim to work on an animation project, we recommend installing the library locally (either to your system's Python, or via Docker)." msgstr "Sinon, si vous souhaitez utiliser Manim pour travailler sur un projet d'animation, il vaut mieux installer la bibliothèque sur votre ordinateur (sur le Python de votre sytème, ou via Docker)." #: ../../source/installation.rst:16 msgid "Note that there are several different versions of Manim. The instructions on this website are **only** for the *community edition*. Find out more about the :doc:`differences between Manim versions ` if you are unsure which version you should install." msgstr "Prenez garde, il y a plusieurs différentes versions de Manim. Les instructions sur ce site sont **seulement** pour la *version communautaire* (*community edition*). Découvrez en plus sur les :doc:`différences entre les versions de manim ` si vous n'êtes pas sûrs de quelle version installer." #: ../../source/installation.rst:22 msgid ":ref:`Installing Manim to your system's Python `" msgstr ":ref:`Installer Manim sur le Python de votre système `" #: ../../source/installation.rst:23 msgid ":ref:`Using Manim via Docker `" msgstr ":ref:`Utiliser Manim via Docker `" #: ../../source/installation.rst:24 msgid ":ref:`Interactive Jupyter notebooks via Binder / Google Colab `" msgstr ":ref:`Blocs-notes interactifs Jupyter via Binder / Google Colab `" #: ../../source/installation.rst:31 msgid "Installing Manim locally" msgstr "Installation de Manim sur l'ordinateur" #: ../../source/installation.rst:33 msgid "Manim is a Python library, and it can be `installed via pip `__. However, in order for Manim to work properly, some additional system dependencies need to be installed first. The following pages have operating system specific instructions for you to follow." msgstr "Manim est une bibliothèque Python, et peut donc être `installée avec pip `__. Par contre, pour que Manim fonctionne correctement, quelques dépendances doivent être installées avant. Les pages suivantes offrent les instructions à suivre selon votre système d'exploitation." #: ../../source/installation.rst:41 msgid "Depending on your particular setup, the installation process might be slightly different. Make sure that you have tried to follow the steps on the following pages carefully, but in case you hit a wall we are happy to help: either `join our Discord `__, or start a new Discussion `directly on GitHub `__." msgstr "Suivant la configuration particulière de votre ordinateur, le processus d'installation peut varier légèrement. Assurez-vous d'avoir essayé de suivre avec attention les étapes sur les pages ci-dessous, mais si vous faites face à un problème, nous serons heureux de vous aider : vous pouvez `rejoindre notre serveur Discord `__, ou vous pouvez lancer une nouvelle Discussion `directement sur GitHub `__." #: ../../source/installation.rst:57 msgid "Once Manim is installed locally, you can proceed to our :doc:`quickstart guide ` which walks you through rendering a first simple scene." msgstr "Une fois que Manim est installé sur votre ordinateur, vous pouvez allez lire notre :doc:`guide de démarage rapide ` qui va vous apprendre à rendre une première scène simpliste." #: ../../source/installation.rst:61 msgid "As mentioned above, do not worry if there are errors or other problems: consult our :doc:`troubleshooting guide ` for help, or get in touch with the community via `GitHub discussions `__ or `Discord `__." msgstr "Comme indiqué ci-dessus, ne vous inquétez pas si vous rencontrez des erreurs ou autres problèmes : consultez notre :doc:`guide de dépannage ` pour obtenir de l'aide, sinon, prenez contact avec la communauté via `les discussions GitHub `__ ou via `Discord `__." #: ../../source/installation.rst:73 msgid "Using Manim via Docker" msgstr "Utiliser Manim via Docker" #: ../../source/installation.rst:75 msgid "`Docker `__ is a virtualization tool that allows the distribution of encapsulated software environments (containers)." msgstr "`Docker `__ est un outil de virtualisation qui permet la distribution de logiciels en environnement confiné (*containers*)." #: ../../source/installation.rst:78 msgid "The following pages contain more information about the docker image maintained by the community, ``manimcommunity/manim``:" msgstr "Les pages suivantes contiennent plus d'informations à propos de l'image docker maintenue par la communauté, ``manimcommunity/manim`` :" #: ../../source/installation.rst:89 msgid "Interactive Jupyter notebooks for your browser" msgstr "Bloc-notes interactifs Jupyter sur votre navigateur" #: ../../source/installation.rst:91 msgid "Manim ships with a built-in ``%%manim`` IPython magic command designed for the use within `Jupyter notebooks `__. Our interactive tutorial over at https://try.manim.community illustrates how Manim can be used from within a Jupyter notebook." msgstr "Le projet Manim contient une commande IPython ``%%manim`` prévue pour être utilisée dans des `blocs-notes Jupyter `__. Notre tutoriel interactif à l'adresse https://try.manim.community illustre la façon d'utiliser Manim dans un bloc-notes Jupyter." #: ../../source/installation.rst:96 msgid "The following pages explain how you can setup interactive environments like that yourself:" msgstr "Les pages suivantes expliquent comment mettre en place de tels environnements interactifs vous-même :" #: ../../source/installation.rst:105 msgid "Installation for developers" msgstr "Installation pour les développeurs" ================================================ FILE: docs/i18n/gettext/changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" ================================================ FILE: docs/i18n/gettext/conduct.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/conduct.md:3 msgid "Code of Conduct" msgstr "" #: ../../source/conduct.md:7 msgid "TL;DR Be excellent to each other; we're a community after all. If you run into issues with others in our community, please [contact](https://www.manim.community/discord/) a Manim Community Dev, or Moderator." msgstr "" #: ../../source/conduct.md:9 msgid "Purpose" msgstr "" #: ../../source/conduct.md:11 msgid "The Manim Community includes members of varying skills, languages, personalities, cultural backgrounds, and experiences from around the globe. Through these differences, we continue to grow and collectively improve upon an open-source animation engine. When working in a community, it is important to remember that you are interacting with humans on the other end of your screen. This code of conduct will guide your interactions and keep Manim a positive environment for our developers, users, and fundamentally our growing community." msgstr "" #: ../../source/conduct.md:15 msgid "Our Community" msgstr "" #: ../../source/conduct.md:17 msgid "Members of Manim Community are respectful, open, and considerate. Behaviors that reinforce these values contribute to our positive environment, and include:" msgstr "" #: ../../source/conduct.md:19 msgid "**Being respectful.** Respectful of others, their positions, experiences, viewpoints, skills, commitments, time, and efforts." msgstr "" #: ../../source/conduct.md:21 msgid "**Being open.** Open to collaboration, whether it's on problems, Pull Requests, issues, or otherwise." msgstr "" #: ../../source/conduct.md:23 msgid "**Being considerate.** Considerate of their peers -- other Manim users and developers." msgstr "" #: ../../source/conduct.md:25 msgid "**Focusing on what is best for the community.** We're respectful of the processes set forth in the community, and we work within them." msgstr "" #: ../../source/conduct.md:27 msgid "**Showing empathy towards other community members.** We're attentive in our communications, whether in person or online, and we're tactful when approaching differing views." msgstr "" #: ../../source/conduct.md:29 msgid "**Gracefully accepting constructive criticism.** When we disagree, we are courteous in raising our issues." msgstr "" #: ../../source/conduct.md:31 msgid "**Using welcoming and inclusive language.** We're accepting of all who wish to take part in our activities, fostering an environment where anyone can participate and everyone can make a difference." msgstr "" #: ../../source/conduct.md:35 msgid "Our Standards" msgstr "" #: ../../source/conduct.md:37 msgid "Every member of our community has the right to have their identity respected. Manim Community is dedicated to providing a positive environment for everyone, regardless of age, gender identity and expression, sexual orientation, disability, physical appearance, body size, ethnicity, nationality, race, religion (or lack thereof), education, or socioeconomic status." msgstr "" #: ../../source/conduct.md:41 msgid "Inappropriate Behavior" msgstr "" #: ../../source/conduct.md:43 msgid "Examples of unacceptable behavior by participants include:" msgstr "" #: ../../source/conduct.md:45 msgid "Harassment of any participants in any form" msgstr "" #: ../../source/conduct.md:46 msgid "Deliberate intimidation, stalking, or following" msgstr "" #: ../../source/conduct.md:47 msgid "Logging or taking screenshots of online activity for harassment purposes" msgstr "" #: ../../source/conduct.md:48 msgid "Publishing others' private information, such as a physical or electronic address, without explicit permission" msgstr "" #: ../../source/conduct.md:49 msgid "Violent threats or language directed against another person" msgstr "" #: ../../source/conduct.md:50 msgid "Incitement of violence or harassment towards any individual, including encouraging a person to commit suicide or to engage in self-harm" msgstr "" #: ../../source/conduct.md:51 msgid "Creating additional online accounts in order to harass another person or circumvent a ban" msgstr "" #: ../../source/conduct.md:52 msgid "Sexual language and imagery in online communities or any conference venue, including talks" msgstr "" #: ../../source/conduct.md:53 msgid "Insults, put-downs, or jokes that are based upon stereotypes, that are exclusionary, or that hold others up for ridicule" msgstr "" #: ../../source/conduct.md:54 msgid "Excessive swearing" msgstr "" #: ../../source/conduct.md:55 msgid "Unwelcome sexual attention or advances" msgstr "" #: ../../source/conduct.md:56 msgid "Unwelcome physical contact, including simulated physical contact (eg, textual descriptions like \"hug\" or \"backrub\") without consent or after a request to stop" msgstr "" #: ../../source/conduct.md:57 msgid "Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others" msgstr "" #: ../../source/conduct.md:58 msgid "Sustained disruption of online community discussions, in-person presentations, or other in-person events" msgstr "" #: ../../source/conduct.md:59 msgid "Continued one-on-one communication after requests to cease" msgstr "" #: ../../source/conduct.md:60 msgid "Other conduct that is inappropriate for a professional audience including people of many different backgrounds Community members asked to stop any inappropriate behavior are expected to comply immediately." msgstr "" #: ../../source/conduct.md:65 msgid "Manim Community Online Spaces" msgstr "" #: ../../source/conduct.md:67 msgid "This Code of Conduct applies to the following online spaces:" msgstr "" #: ../../source/conduct.md:69 msgid "The [ManimCommunity GitHub Organization](https://github.com/ManimCommunity) and all of its repositories" msgstr "" #: ../../source/conduct.md:71 msgid "The Manim [Discord](https://www.manim.community/discord/)" msgstr "" #: ../../source/conduct.md:73 msgid "The Manim [Reddit](https://www.reddit.com/r/manim/)" msgstr "" #: ../../source/conduct.md:75 msgid "The Manim [Twitter](https://twitter.com/manim\\_community/)" msgstr "" #: ../../source/conduct.md:77 msgid "This Code of Conduct applies to every member in official Manim Community online spaces, including:" msgstr "" #: ../../source/conduct.md:79 msgid "Moderators" msgstr "" #: ../../source/conduct.md:81 msgid "Maintainers" msgstr "" #: ../../source/conduct.md:83 msgid "Developers" msgstr "" #: ../../source/conduct.md:85 msgid "Reviewers" msgstr "" #: ../../source/conduct.md:87 msgid "Contributors" msgstr "" #: ../../source/conduct.md:89 msgid "Users" msgstr "" #: ../../source/conduct.md:91 msgid "All community members" msgstr "" #: ../../source/conduct.md:95 msgid "Consequences" msgstr "" #: ../../source/conduct.md:97 msgid "If a member's behavior violates this code of conduct, the Manim Community Code of Conduct team may take any action they deem appropriate, including, but not limited to: warning the offender, temporary bans, deletion of offending messages, and expulsion from the community and its online spaces. The full list of consequences for inappropriate behavior is listed below in the Enforcement Procedures." msgstr "" #: ../../source/conduct.md:101 msgid "Thank you for helping make this a welcoming, friendly community for everyone." msgstr "" #: ../../source/conduct.md:105 msgid "Contact Information" msgstr "" #: ../../source/conduct.md:107 msgid "If you believe someone is violating the code of conduct, or have any other concerns, please contact a Manim Community Dev, or Moderator immediately. They can be reached on Manim's Community [Discord](https://www.manim.community/discord/)." msgstr "" #: ../../source/conduct.md:117 msgid "Enforcement Procedures" msgstr "" #: ../../source/conduct.md:119 msgid "This document summarizes the procedures the Manim Community Code of Conduct team uses to enforce the Code of Conduct." msgstr "" #: ../../source/conduct.md:123 msgid "Summary of processes" msgstr "" #: ../../source/conduct.md:125 msgid "When the team receives a report of a possible Code of Conduct violation, it will:" msgstr "" #: ../../source/conduct.md:127 msgid "Acknowledge the receipt of the report." msgstr "" #: ../../source/conduct.md:128 msgid "Evaluate conflicts of interest." msgstr "" #: ../../source/conduct.md:129 msgid "Call a meeting of code of conduct team members without a conflict of interest." msgstr "" #: ../../source/conduct.md:130 msgid "Evaluate the reported incident." msgstr "" #: ../../source/conduct.md:131 msgid "Propose a behavioral modification plan." msgstr "" #: ../../source/conduct.md:132 msgid "Propose consequences for the reported behavior." msgstr "" #: ../../source/conduct.md:133 msgid "Vote on behavioral modification plan and consequences for the reported person." msgstr "" #: ../../source/conduct.md:134 msgid "Contact Manim Community moderators to approve the behavioral modification plan and consequences." msgstr "" #: ../../source/conduct.md:135 msgid "Follow up with the reported person." msgstr "" #: ../../source/conduct.md:136 msgid "Decide further responses." msgstr "" #: ../../source/conduct.md:137 msgid "Follow up with the reporter." msgstr "" #: ../../source/conduct.md:140 msgid "Acknowledge the report" msgstr "" #: ../../source/conduct.md:142 msgid "Reporters should receive an acknowledgment of the receipt of their report within 48 hours." msgstr "" #: ../../source/conduct.md:146 msgid "Conflict of interest policy" msgstr "" #: ../../source/conduct.md:148 msgid "Examples of conflicts of interest include:" msgstr "" #: ../../source/conduct.md:150 msgid "You have a romantic or platonic relationship with either the reporter or the reported person. It's fine to participate if they are an acquaintance." msgstr "" #: ../../source/conduct.md:151 msgid "The reporter or reported person is someone you work closely with. This could be someone on your team or someone who works on the same project as you." msgstr "" #: ../../source/conduct.md:152 msgid "The reporter or reported person is a maintainer who regularly reviews your contributions" msgstr "" #: ../../source/conduct.md:153 msgid "The reporter or reported person is your metamour." msgstr "" #: ../../source/conduct.md:154 msgid "The reporter or reported person is your family member Committee members do not need to state why they have a conflict of interest, only that one exists. Other team members should not ask why the person has a conflict of interest." msgstr "" #: ../../source/conduct.md:157 msgid "Anyone who has a conflict of interest will remove themselves from the discussion of the incident, and recluse themselves from voting on a response to the report." msgstr "" #: ../../source/conduct.md:161 msgid "Evaluating a report" msgstr "" #: ../../source/conduct.md:163 msgid "Jurisdiction" msgstr "" #: ../../source/conduct.md:165 msgid "*Is this a Code of Conduct violation?* Is this behavior on our list of inappropriate behavior? Is it borderline inappropriate behavior? Does it violate our community norms?" msgstr "" #: ../../source/conduct.md:166 msgid "*Did this occur in a space that is within our Code of Conduct's scope?* If the incident occurred outside the community, but a community member's mental health or physical safety may be negatively impacted if no action is taken, the incident may be in scope. Private conversations in community spaces are also in scope." msgstr "" #: ../../source/conduct.md:167 msgid "Impact" msgstr "" #: ../../source/conduct.md:169 msgid "*Did this incident occur in a private conversation or a public space?* Incidents that all community members can see will have a more negative impact." msgstr "" #: ../../source/conduct.md:170 msgid "*Does this behavior negatively impact a marginalized group in our community?* Is the reporter a person from a marginalized group in our community? How is the reporter being negatively impacted by the reported person's behavior? Are members of the marginalized group likely to disengage with the community if no action was taken on this report?" msgstr "" #: ../../source/conduct.md:171 msgid "*Does this incident involve a community leader?* Community members often look up to community leaders to set the standard of acceptable behavior" msgstr "" #: ../../source/conduct.md:172 msgid "Risk" msgstr "" #: ../../source/conduct.md:174 msgid "*Does this incident include sexual harassment?*" msgstr "" #: ../../source/conduct.md:175 msgid "*Does this pose a safety risk?* Does the behavior put a person's physical safety at risk? Will this incident severely negatively impact someone's mental health?" msgstr "" #: ../../source/conduct.md:176 msgid "*Is there a risk of this behavior being repeated?* Does the reported person understand why their behavior was inappropriate? Is there an established pattern of behavior from past reports?" msgstr "" #: ../../source/conduct.md:179 msgid "Reports which involve higher risk or higher impact may face more severe consequences than reports which involve lower risk or lower impact." msgstr "" #: ../../source/conduct.md:183 msgid "Propose consequences" msgstr "" #: ../../source/conduct.md:185 msgid "What follows are examples of possible consequences of an incident report. This list of consequences is not exhaustive, and the Manim Community Code of Conduct team reserves the right to take any action it deems necessary." msgstr "" #: ../../source/conduct.md:187 msgid "Possible private responses to an incident include:" msgstr "" #: ../../source/conduct.md:189 msgid "Nothing, if the behavior was determined to not be a Code of Conduct violation" msgstr "" #: ../../source/conduct.md:190 msgid "A warning" msgstr "" #: ../../source/conduct.md:191 msgid "A final warning" msgstr "" #: ../../source/conduct.md:192 msgid "Temporarily removing the reported person from the community's online space(s)" msgstr "" #: ../../source/conduct.md:193 msgid "Permanently removing the reported person from the community's online space(s)" msgstr "" #: ../../source/conduct.md:194 msgid "Publishing an account of the incident" msgstr "" #: ../../source/conduct.md:197 msgid "Team vote" msgstr "" #: ../../source/conduct.md:199 msgid "Some team members may have a conflict of interest and may be excluded from discussions of a particular incident report. Excluding those members, decisions on the behavioral modification plans and consequences will be determined by a two-thirds majority vote of the Manim Community Code of Conduct team." msgstr "" #: ../../source/conduct.md:203 msgid "Moderators approval" msgstr "" #: ../../source/conduct.md:205 msgid "Once the team has approved the behavioral modification plans and consequences, they will communicate the recommended response to the Manim Community moderators. The team should not state who reported this incident. They should attempt to anonymize any identifying information from the report." msgstr "" #: ../../source/conduct.md:207 msgid "Moderators are required to respond with whether they accept the recommended response to the report. If they disagree with the recommended response, they should provide a detailed response or additional context as to why they disagree. Moderators are encouraged to respond within a week." msgstr "" #: ../../source/conduct.md:209 msgid "In cases where the moderators disagree on the suggested resolution for a report, the Manim Community Code of Conduct team may choose to notify the Manim Community Moderators." msgstr "" #: ../../source/conduct.md:213 msgid "Follow up with the reported person" msgstr "" #: ../../source/conduct.md:215 msgid "The Manim Community Code of Conduct team will work with Manim Community moderators to draft a response to the reported person. The response should contain:" msgstr "" #: ../../source/conduct.md:217 msgid "A description of the person's behavior in neutral language" msgstr "" #: ../../source/conduct.md:218 msgid "The negative impact of that behavior" msgstr "" #: ../../source/conduct.md:219 msgid "A concrete behavioral modification plan" msgstr "" #: ../../source/conduct.md:220 msgid "Any consequences of their behavior The team should not state who reported this incident. They should attempt to anonymize any identifying information from the report. The reported person should be discouraged from contacting the reporter to discuss the report. If they wish to apologize to the reporter, the team can accept the apology on behalf of the reporter." msgstr "" #: ../../source/conduct.md:225 msgid "Decide further responses" msgstr "" #: ../../source/conduct.md:227 msgid "If the reported person provides additional context, the Manim Community Code of Conduct team may need to re-evaluate the behavioral modification plan and consequences." msgstr "" #: ../../source/conduct.md:229 msgid "Follow up with the reporter" msgstr "" #: ../../source/conduct.md:231 msgid "A person who makes a report should receive a follow-up response stating what action was taken in response to the report. If the team decided no response was needed, they should provide an explanation why it was not a Code of Conduct violation. Reports that are not made in good faith (such as \"reverse sexism\" or \"reverse racism\") may receive no response." msgstr "" #: ../../source/conduct.md:233 msgid "The follow-up should be sent no later than one week after the receipt of the report. If deliberation or follow-up with the reported person takes longer than one week, the team should send a status update to the reporter." msgstr "" #: ../../source/conduct.md:237 msgid "Changes to Code of Conduct" msgstr "" #: ../../source/conduct.md:239 msgid "When discussing a change to the Manim Community code of conduct or enforcement procedures, the Manim Community Code of Conduct team will follow this decision-making process:" msgstr "" #: ../../source/conduct.md:241 msgid "**Brainstorm options.** Team members should discuss any relevant context and brainstorm a set of possible options. It is important to provide constructive feedback without getting side-tracked from the main question." msgstr "" #: ../../source/conduct.md:242 msgid "**Vote.** Proposed changes to the code of conduct will be decided by a two-thirds majority of all voting members of the Code of Conduct team. Team members are listed in the charter. Currently active voting members are listed in the following section." msgstr "" #: ../../source/conduct.md:243 msgid "**Board Vote.** Once a working draft is in place for the Code of Conduct and procedures, the Code of Conduct team shall provide the Manim Community Moderators with a draft of the changes. The Manim Community Moderators will vote on the changes at a board meeting." msgstr "" #: ../../source/conduct.md:246 msgid "Current list of voting members" msgstr "" #: ../../source/conduct.md:248 msgid "All available Community Developers (i.e. those with \"write\" permissions, or above, on the Manim Community GitHub organization)." msgstr "" #: ../../source/conduct.md:252 msgid "License" msgstr "" #: ../../source/conduct.md:254 msgid "This Code of Conduct is licensed under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](https://creativecommons.org/licenses/by-sa/3.0/)." msgstr "" #: ../../source/conduct.md:258 msgid "Attributions" msgstr "" ================================================ FILE: docs/i18n/gettext/contributing.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/contributing.rst:3 msgid "Contributing" msgstr "" #: ../../source/contributing.rst:5 msgid "Manim is currently undergoing a major refactor. In general, contributions implementing new features will not be accepted in this period. Other contributions unrelated to cleaning up the codebase may also take a longer period of time to be reviewed. This guide may quickly become outdated quickly; we highly recommend joining our `Discord server `__ to discuss any potential contributions and keep up to date with the latest developments." msgstr "" #: ../../source/contributing.rst:12 msgid "Thank you for your interest in contributing to Manim! However you have decided to contribute or interact with the community, please always be civil and respect other members of the community. If you haven't read our :doc:`code of conduct`, do so here. Manim is Free and Open Source Software (FOSS) for mathematical animations. As such, **we welcome everyone** who is interested in mathematics, pedagogy, computer animations, open-source, software development, and beyond. Manim accepts many kinds of contributions, some are detailed below:" msgstr "" #: ../../source/contributing.rst:21 msgid "Code maintenance and development" msgstr "" #: ../../source/contributing.rst:22 msgid "DevOps" msgstr "" #: ../../source/contributing.rst:23 msgid "Documentation" msgstr "" #: ../../source/contributing.rst:24 msgid "Developing educational content & narrative documentation" msgstr "" #: ../../source/contributing.rst:25 msgid "Plugins to extend Manim functionality" msgstr "" #: ../../source/contributing.rst:26 msgid "Testing (graphical, unit & video)" msgstr "" #: ../../source/contributing.rst:27 msgid "Website design and development" msgstr "" #: ../../source/contributing.rst:28 msgid "Translating documentation and docstrings" msgstr "" #: ../../source/contributing.rst:30 msgid "To get an overview of what our community is currently working on, check out `our development project board `__." msgstr "" #: ../../source/contributing.rst:34 msgid "Please ensure that you are reading the latest version of this guide by ensuring that \"latest\" is selected in the version switcher." msgstr "" ================================================ FILE: docs/i18n/gettext/examples.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/examples.rst:3 msgid "Example Gallery" msgstr "" #: ../../source/examples.rst:5 msgid "This gallery contains a collection of best practice code snippets together with their corresponding video/image output, illustrating different functionalities all across the library. These are all under the MIT license, so feel free to copy & paste them to your projects. Enjoy this taste of Manim!" msgstr "" #: ../../source/examples.rst:13 msgid "This gallery is not the only place in our documentation where you can see explicit code and video examples: there are many more in our :doc:`reference manual ` -- see, for example, our documentation for the modules :mod:`~.tex_mobject`, :mod:`~.geometry`, :mod:`~.moving_camera_scene`, and many more." msgstr "" #: ../../source/examples.rst:19 msgid "Check out our `interactive Jupyter environment `_ which allows running the examples online, without requiring a local installation." msgstr "" #: ../../source/examples.rst:23 msgid "Also, visit our `Twitter `_ for more *manimations*!" msgstr "" #: ../../source/examples.rst:29 msgid "Basic Concepts" msgstr "" #: ../../source/examples.rst:134 msgid "Animations" msgstr "" #: ../../source/examples.rst:216 msgid "You can use multiple ValueTrackers simultaneously." msgstr "" #: ../../source/examples.rst:310 msgid "Plotting with Manim" msgstr "" #: ../../source/examples.rst:496 msgid "Special Camera Settings" msgstr "" ================================================ FILE: docs/i18n/gettext/index.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/index.rst:7 msgid "Manim Community Edition" msgstr "" #: ../../source/index.rst:9 msgid "Animating technical concepts is traditionally pretty tedious since it can be difficult to make the animations precise enough to convey them accurately. Manim relies on Python's simplicity to generate animations programmatically, making it convenient to specify exactly how each one should run. Take a look at the :doc:`Example Gallery <../examples>` for some inspiration on how to create beautiful images and videos with Manim." msgstr "" #: ../../source/index.rst:17 msgid "First Steps" msgstr "" #: ../../source/index.rst:19 msgid "Are you new to Manim and are looking for where to get started? Then you are in the right place!" msgstr "" #: ../../source/index.rst:24 msgid "Please be aware that there are different, incompatible versions of Manim available. Check our :ref:`installation FAQ ` to learn more!" msgstr "" #: ../../source/index.rst:28 msgid "The :doc:`Installation ` section has the latest and up-to-date installation instructions for Windows, MacOS, and Linux. You can also find information on Manim's docker images and (online) notebook environments there." msgstr "" #: ../../source/index.rst:32 msgid "Want to try the library before installing it? Take a look at our interactive online playground at https://try.manim.community in form of a Jupyter notebook." msgstr "" #: ../../source/index.rst:35 msgid "In our :doc:`Tutorials ` section you will find a collection of resources that will teach you how to use Manim. In particular, the :doc:`tutorials/quickstart` tutorial teaches you Manim's basics, and in :doc:`tutorials/building_blocks` the classes used to compose your animations are described in more detail." msgstr "" #: ../../source/index.rst:43 msgid "Finding Help" msgstr "" #: ../../source/index.rst:45 msgid "Are you struggling with installing or using Manim? Don't worry, we've all been there. Here are some good resources to help you out:" msgstr "" #: ../../source/index.rst:48 msgid "Perhaps your problem is one that occurs frequently, then chances are it is addressed in our :doc:`collection of FAQs `." msgstr "" #: ../../source/index.rst:50 msgid "If you are looking for information on some specific class, look for it in the :doc:`reference manual ` and/or use the search feature of the documentation." msgstr "" #: ../../source/index.rst:53 msgid "Still no luck? Then you are welcome to ask the community for help, together we usually manage to find a solution for your problem! Consult the :doc:`FAQ page on getting help ` for instructions." msgstr "" #: ../../source/index.rst:59 msgid "Navigating the Documentation" msgstr "" #: ../../source/index.rst:61 msgid "Here are some short summaries for all of the sections in this documentation:" msgstr "" #: ../../source/index.rst:63 msgid "The :doc:`Example Gallery ` is a collection of examples (rendered videos and images together with the code they were generated from) that show a few different, simple things that you can do with Manim." msgstr "" #: ../../source/index.rst:66 msgid "The :doc:`Installation ` section has information on installing Manim." msgstr "" #: ../../source/index.rst:67 msgid "In :doc:`Tutorials & Guides ` you can find learning resources: proper tutorials that guide you through the process of creating a video are in the :doc:`Tutorial ` section; guides on specific topics are in the :doc:`Guides ` section, and the answers to frequently asked questions can be found in the :doc:`FAQ ` section." msgstr "" #: ../../source/index.rst:72 msgid "The :doc:`Reference Manual ` contains a comprehensive list of all of Manim's (documented) modules, classes, and functions. If you are somewhat familiar with Manim's module structure feel free to browse the manual directly. If you are searching for something specific, feel free to use the documentation's search feature in the sidebar. Many classes and methods come with their own illustrated examples too!" msgstr "" #: ../../source/index.rst:77 msgid "The :doc:`Plugins ` page documents how to install, write, and distribute plugins (that is, separate Python packages that extend the feature set of the core library)." msgstr "" #: ../../source/index.rst:79 msgid "Changes between versions are documented in our :doc:`Changelog `." msgstr "" #: ../../source/index.rst:80 msgid "If you are looking into contributing to the development of Manim, you can find information on how to get involved in our :doc:`Contributing ` section." msgstr "" #: ../../source/index.rst:82 msgid "And finally, the :doc:`Code of Conduct ` page has a formal description of the rules you should abide by when interacting within our community." msgstr "" #: ../../source/index.rst:86 msgid "Sharing Your Work" msgstr "" #: ../../source/index.rst:88 msgid "We'd love to hear from you and see your manimations `on Twitter `_, `Reddit `_, or `Discord `_. If you're using Manim in a scientific context, instructions on how to cite a particular release can be found `in our README `_." msgstr "" #: ../../source/index.rst:95 msgid "Index" msgstr "" ================================================ FILE: docs/i18n/gettext/installation.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/installation.rst:2 msgid "Installation" msgstr "" #: ../../source/installation.rst:4 msgid "Depending on your use case, different installation options are recommended: if you just want to play around with Manim for a bit, interactive in-browser notebooks are a really simple way of exploring the library as they require no local installation. Head over to https://try.manim.community to give our interactive tutorial a try." msgstr "" #: ../../source/installation.rst:10 msgid "Otherwise, if you intend to use Manim to work on an animation project, we recommend installing the library locally (either to your system's Python, or via Docker)." msgstr "" #: ../../source/installation.rst:16 msgid "Note that there are several different versions of Manim. The instructions on this website are **only** for the *community edition*. Find out more about the :ref:`differences between Manim versions ` if you are unsure which version you should install." msgstr "" #: ../../source/installation.rst:22 msgid ":ref:`Installing Manim to your system's Python `" msgstr "" #: ../../source/installation.rst:23 msgid ":ref:`Using Manim via Docker `" msgstr "" #: ../../source/installation.rst:24 msgid ":ref:`Interactive Jupyter notebooks via Binder / Google Colab `" msgstr "" #: ../../source/installation.rst:31 msgid "Installing Manim locally" msgstr "" #: ../../source/installation.rst:33 msgid "Manim is a Python library, and it can be `installed via pip `__. However, in order for Manim to work properly, some additional system dependencies need to be installed first. The following pages have operating system specific instructions for you to follow." msgstr "" #: ../../source/installation.rst:39 msgid "Manim requires Python version ``3.7`` or above to run." msgstr "" #: ../../source/installation.rst:43 msgid "Depending on your particular setup, the installation process might be slightly different. Make sure that you have tried to follow the steps on the following pages carefully, but in case you hit a wall we are happy to help: either `join our Discord `__, or start a new Discussion `directly on GitHub `__." msgstr "" #: ../../source/installation.rst:58 msgid "Once Manim is installed locally, you can proceed to our :doc:`quickstart guide ` which walks you through rendering a first simple scene." msgstr "" #: ../../source/installation.rst:62 msgid "As mentioned above, do not worry if there are errors or other problems: consult our :doc:`FAQ section ` for help (including instructions for how to ask Manim's community for help)." msgstr "" #: ../../source/installation.rst:71 msgid "Using Manim via Docker" msgstr "" #: ../../source/installation.rst:73 msgid "`Docker `__ is a virtualization tool that allows the distribution of encapsulated software environments (containers)." msgstr "" #: ../../source/installation.rst:76 msgid "The following pages contain more information about the docker image maintained by the community, ``manimcommunity/manim``:" msgstr "" #: ../../source/installation.rst:87 msgid "Interactive Jupyter notebooks for your browser" msgstr "" #: ../../source/installation.rst:89 msgid "Manim ships with a built-in ``%%manim`` IPython magic command designed for the use within `Jupyter notebooks `__. Our interactive tutorial over at https://try.manim.community illustrates how Manim can be used from within a Jupyter notebook." msgstr "" #: ../../source/installation.rst:94 msgid "The following pages explain how you can setup interactive environments like that yourself:" msgstr "" #: ../../source/installation.rst:104 msgid "Editors" msgstr "" #: ../../source/installation.rst:106 msgid "If you're using Visual Studio Code you can install an extension called *Manim Sideview* which provides automated rendering and an integrated preview of the animation inside the editor. The extension can be installed through the `marketplace of VS Code `__." msgstr "" #: ../../source/installation.rst:113 msgid "Installation for developers" msgstr "" ================================================ FILE: docs/i18n/gettext/internals.pot ================================================ ================================================ FILE: docs/i18n/gettext/plugins.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/plugins.rst:5 msgid "Plugins" msgstr "" #: ../../source/plugins.rst:7 msgid "Plugins are features that extend Manim's core functionality. Since Manim is extensible and not everything belongs in its core, we'll go over how to install, use, and create your own plugins." msgstr "" #: ../../source/plugins.rst:13 msgid "The standard naming convention for plugins is to prefix the plugin with ``manim-``. This makes them easy for users to find on package repositories such as PyPI." msgstr "" #: ../../source/plugins.rst:19 msgid "The plugin feature is new and under active development. Expect updates for the best practices on installing, using, and creating plugins; as well as new subcommands/flags for ``manim plugins``" msgstr "" #: ../../source/plugins.rst:25 msgid "See https://plugins.manim.community/ for the list of plugins available." msgstr "" #: ../../source/plugins.rst:28 msgid "Installing Plugins" msgstr "" #: ../../source/plugins.rst:29 msgid "Plugins can be easily installed via the ``pip`` command:" msgstr "" #: ../../source/plugins.rst:36 msgid "After installing a plugin, you may use the ``manim plugins`` command to list your available plugins, see the following help output:" msgstr "" #: ../../source/plugins.rst:52 msgid "You can list plugins as such:" msgstr "" #: ../../source/plugins.rst:61 msgid "Using Plugins in Projects" msgstr "" #: ../../source/plugins.rst:62 msgid "For enabling a plugin ``manim.cfg`` or command line parameters should be used." msgstr "" #: ../../source/plugins.rst:66 msgid "The plugins should be module name of the plugin and not PyPi name." msgstr "" #: ../../source/plugins.rst:68 msgid "Enabling plugins through ``manim.cfg``" msgstr "" #: ../../source/plugins.rst:75 msgid "For specifying multiple plugins, comma-separated values must be used." msgstr "" #: ../../source/plugins.rst:83 msgid "Creating Plugins" msgstr "" #: ../../source/plugins.rst:84 msgid "Plugins are intended to extend Manim's core functionality. If you aren't sure whether a feature should be included in Manim's core, feel free to ask over on the `Discord server `_. Visit `manim-plugintemplate `_ on PyPI.org which serves as an in-depth tutorial for creating plugins." msgstr "" #: ../../source/plugins.rst:94 msgid "The only requirement of manim plugins is that they specify an entry point with the group, ``\"manim.plugins\"``. This allows Manim to discover plugins available in the user's environment. Everything regarding the plugin's directory structure, build system, and naming are completely up to your discretion as an author. The aforementioned template plugin is only a model using Poetry since this is the build system Manim uses. The plugin's `entry point `_ can be specified in poetry as:" msgstr "" #: ../../source/plugins.rst:108 msgid "Here ``name`` is the name of the module of the plugin." msgstr "" #: ../../source/plugins.rst:110 msgid "Here ``object_reference`` can point to either a function in a module or a module itself. For example," msgstr "" #: ../../source/plugins.rst:118 msgid "Here a module is used as ``object_reference``, and when this plugin is enabled, Manim will look for ``__all__`` keyword defined in ``manim_plugintemplate`` and everything as a global variable one by one." msgstr "" #: ../../source/plugins.rst:122 msgid "If ``object_reference`` is a function, Manim calls the function and expects the function to return a list of modules or functions that need to be defined globally." msgstr "" #: ../../source/plugins.rst:125 msgid "For example," msgstr "" ================================================ FILE: docs/i18n/gettext/reference.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference.rst:2 msgid "Reference Manual" msgstr "" #: ../../source/reference.rst:4 msgid "This reference manual details modules, functions, and variables included in Manim, describing what they are and what they do. For learning how to use Manim, see :doc:`tutorials/index`. For a list of changes since the last release, see the :doc:`changelog`." msgstr "" #: ../../source/reference.rst:9 msgid "The pages linked to here are currently a work in progress." msgstr "" #: ../../source/reference.rst:12 msgid "Inheritance Graphs" msgstr "" #: ../../source/reference.rst:15 msgid "Animations" msgstr "" #: ../../source/reference.rst:38 msgid "Cameras" msgstr "" #: ../../source/reference.rst:50 msgid "Mobjects" msgstr "" #: ../../source/reference.rst:88 msgid "Scenes" msgstr "" ================================================ FILE: docs/i18n/gettext/reporting_bugs.pot ================================================ ================================================ FILE: docs/i18n/gettext/tutorials.pot ================================================ ================================================ FILE: docs/i18n/gettext/tutorials_guides.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/tutorials_guides.rst:4 #: ../../source/tutorials_guides.rst:4 msgid "Table of Contents" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.1.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.1.0-changelog.rst:3 msgid "v0.1.0" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:5 msgid "October 21, 2020" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:7 msgid "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." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:13 msgid "New Features" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:16 msgid "Command line" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:18 msgid "Output of 'manim --help' has been improved" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:19 msgid "Implement logging with the :code:`rich` library and a :code:`logger` object instead of plain ol' prints" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:20 msgid "Added a flag :code:`--dry_run`, which doesn't write any media" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:21 msgid "Allow for running manim with :code:`python3 -m manim`" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:22 msgid "Refactored Tex Template management. You can now use custom templates with command line args using :code:`--tex_template`!" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:23 msgid "Re-add :code:`--save_frames` flag, which will save each frame as a png" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:24 msgid "Re-introduce manim feature that allows you to type manim code in :code:`stdin` if you pass a minus sign :code:`(-)` as filename" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:25 msgid "Added the :code:`--custom_folders` flag which yields a simpler output folder structure" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:26 msgid "Re-implement GIF export with the :code:`-i` flag (using this flag outputs ONLY a .gif file, and no .mp4 file)" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:27 msgid "Added a :code:`--verbose` flag" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:28 msgid "You can save the logs to a file by using :code:`--log_to_file`" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:29 msgid "Read :code:`tex_template` from config file if not specified by :code:`--tex_template`." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:30 msgid "Add experimental javascript rendering with :code:`--use_js_renderer`" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:31 msgid "Add :code:`-q/--quality [k|p|h|m|l]` flag and removed :code:`-m/-l` flags." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:32 msgid "Removed :code:`--sound` flag" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:36 msgid "Config system" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:38 msgid "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`" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:39 msgid "Added utilities for manipulating Manim’s :code:`.cfg` files." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:40 msgid "Added a subcommand structure for easier use of utilities managing :code:`.cfg` files" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:41 msgid "Also some variables have been moved from ``constants.py`` to the new config system:" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:43 msgid "``FRAME_HEIGHT`` to ``config[\"frame_width\"]``" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:44 msgid "``TOP`` to ``config[\"frame_height\"] / 2 * UP``" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:45 msgid "``BOTTOM`` to ``config[\"frame_height\"] / 2 * DOWN``" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:46 msgid "``LEFT_SIDE`` to ``config[\"frame_width\"] / 2 * LEFT``" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:47 msgid "``RIGHT_SIDE`` to ``config[\"frame_width\"] / 2 * RIGHT``" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:48 msgid "``self.camera.frame_rate`` to ``config[\"frame_rate\"]``" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:54 msgid "Mobjects, Scenes, and Animations" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:56 msgid "Add customizable left and right bracket for :code:`Matrix` mobject and :code:`set_row_colors` method for matrix mobject" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:57 msgid "Add :code:`AddTeXLetterByLetter` animation" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:58 msgid "Enhanced GraphScene" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:60 msgid "You can now add arrow tips to axes" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:61 msgid "extend axes a bit at the start and/or end" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:62 msgid "have invisible axes" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:63 msgid "highlight the area between two curves" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:64 msgid "ThreeDScene now supports 3dillusion_camera_rotation" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:65 msgid "Add :code:`z_index` for manipulating depth of Objects on scene." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:66 msgid "Add a :code:`VDict` class: a :code:`VDict` is to a :code:`VGroup` what a :code:`dict` is to a :code:`list`" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:67 msgid "Added Scene-caching feature. Now, if a partial movie file is unchanged in your code, it isn’t rendered again! [HIGHLY UNSTABLE We're working on it ;)]" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:68 msgid "Most :code:`get_` and :code:`set_` methods have been removed in favor of instance attributes and properties" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:69 msgid "The :code:`Container` class has been made into an AbstractBaseClass, i.e. in cannot be instantiated. Instead, use one of its children classes" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:70 msgid "The ``TextMobject`` and ``TexMobject`` objects have been deprecated, due to their confusing names, in favour of ``Tex`` and ``MathTex``. You can still, however, continue to use ``TextMobject`` and ``TexMobject``, albeit with Deprecation Warnings constantly reminding you to switch." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:71 msgid "Add a :code:`Variable` class for displaying text that continuously updates to reflect the value of a python variable." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:72 msgid "The ``Tex`` and ``MathTex`` objects allow you to specify a custom TexTemplate using the ``template`` keyword argument." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:73 msgid ":code:`VGroup` now supports printing the class names of contained mobjects and :code:`VDict` supports printing the internal dict of mobjects" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:74 msgid "Add all the standard easing functions" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:75 msgid ":code:`Scene` now renders when :code:`Scene.render()` is called rather than upon instantiation." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:76 msgid ":code:`ValueTracker` now supports increment using the `+=` operator (in addition to the already existing `increment_value` method)" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:77 msgid "Add :class:`PangoText` for rendering texts using Pango." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:81 msgid "Documentation" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:83 msgid "Added clearer installation instructions, tutorials, examples, and API reference [WIP]" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:87 msgid "Fixes" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:89 msgid "Initialization of directories has been moved to :code:`config.py`, and a bunch of bugs associated to file structure generation have been fixed" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:90 msgid "Nonfunctional file :code:`media_dir.txt` has been removed" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:91 msgid "Nonfunctional :code:`if` statements in :code:`scene_file_writer.py` have been removed" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:92 msgid "Fix a bug where trying to render the example scenes without specifying the scene would show all scene objects in the library" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:93 msgid "Many :code:`Exceptions` have been replaced for more specific exception subclasses" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:94 msgid "Fixed a couple of subtle bugs in :code:`ArcBetweenPoints`" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:98 msgid "Of interest to developers" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:100 msgid "Python code formatting is now enforced by using the :code:`black` tool" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:101 msgid "PRs now require two approving code reviews from community devs before they can be merged" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:102 msgid "Added tests to ensure stuff doesn't break between commits (For developers) [Uses Github CI, and Pytest]" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:103 msgid "Add contribution guidelines (for developers)" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:104 msgid "Added autogenerated documentation with sphinx and autodoc/autosummary [WIP]" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:105 msgid "Made manim internally use relative imports" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:106 msgid "Since the introduction of the :code:`TexTemplate` class, the files :code:`tex_template.tex` and :code:`ctex_template.tex` have been removed" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:107 msgid "Added logging tests tools." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:108 msgid "Added ability to save logs in json" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:109 msgid "Move to Poetry." msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:110 msgid "Colors have moved to an Enum" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:113 msgid "Other Changes" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:115 msgid "Cleanup 3b1b Specific Files" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:116 msgid "Rename package from manimlib to manim" msgstr "" #: ../../source/changelog/0.1.0-changelog.rst:117 msgid "Move all imports to :code:`__init__`, so :code:`from manim import *` replaces :code:`from manimlib.imports import *`" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.1.1-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.1.1-changelog.rst:3 msgid "v0.1.1" msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:5 msgid "December 1, 2020" msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:7 msgid "Changes since Manim Community release v0.1.0" msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:10 msgid "Plugins" msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:12 msgid "Provided a standardized method for plugin discoverability, creation, installation, and usage. See the :ref:`documentation `." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:16 msgid "Fixes" msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:18 msgid "JsRender is optional to install. (via :pr:`697`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:19 msgid "Allow importing modules from the same directory as the input file when using ``manim`` from the command line (via :pr:`724`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:21 msgid "Remove some unnecessary or unpythonic methods from :class:`~.Scene` (``get_mobjects``, ``add_mobjects_among``, ``get_mobject_copies``), via :pr:`758`." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:24 msgid "Fix formatting of :class:`~.Code` (via :pr:`798`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:27 msgid "Configuration" msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:29 msgid "Removed the ``skip_animations`` config option and added the ``Renderer.skip_animations`` attribute instead (via :pr:`696`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:31 msgid "The global ``config`` dict has been replaced by a global ``config`` instance of the new class :class:`~.ManimConfig`. This class has a dict-like API, so this should not break user code, only make it more robust. See the Configuration tutorial for details." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:35 msgid "Added the option to configure a directory for external assets (via :pr:`649`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:39 msgid "Documentation" msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:41 msgid "Add ``:issue:`` and ``:pr:`` directives for simplifying linking to issues and pull requests on GitHub (via :pr:`685`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:43 msgid "Add a ``skip-manim`` tag for skipping the ``.. manim::`` directive when building the documentation locally (via :pr:`796`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:48 msgid "Mobjects, Scenes, and Animations" msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:50 msgid "The ``alignment`` attribute to Tex and MathTex has been removed in favour of ``tex_environment``." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:51 msgid ":class:`~.Text` now uses Pango for rendering. ``PangoText`` has been removed. The old implementation is still available as a fallback as :class:`~.CairoText`." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:52 msgid "Variations of :class:`~.Dot` have been added as :class:`~.AnnotationDot` (a bigger dot with bolder stroke) and :class:`~.LabeledDot` (a dot containing a label)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:55 msgid "Scene.set_variables_as_attrs has been removed (via :pr:`692`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:56 msgid "Ensure that the axes for graphs (:class:`GraphScene`) always intersect (:pr:`580`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:57 msgid "Now Mobject.add_updater does not call the newly-added updater by default (use ``call_updater=True`` instead) (via :pr:`710`)" msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:59 msgid "VMobject now has methods to determine and change the direction of the points (via :pr:`647`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:60 msgid "Added BraceBetweenPoints (via :pr:`693`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:61 msgid "Added ArcPolygon and ArcPolygonFromArcs (via :pr:`707`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:62 msgid "Added Cutout (via :pr:`760`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:63 msgid "Added Mobject raise not implemented errors for dunder methods and implementations for VGroup dunder methods (via :pr:`790`)." msgstr "" #: ../../source/changelog/0.1.1-changelog.rst:64 msgid "Added :class:`~.ManimBanner` for a animated version of our logo and banner (via :pr:`729`)" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.10.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.10.0-changelog.rst:3 msgid "v0.10.0" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:5 msgid "September 01, 2021" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:10 msgid "A total of 40 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:14 msgid "Animfysyk +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:15 #: ../../source/changelog/0.10.0-changelog.rst:48 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:16 msgid "Christian Clauss" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:17 msgid "Daniel Adelodun +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:18 msgid "Darigov Research" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:19 #: ../../source/changelog/0.10.0-changelog.rst:49 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:20 msgid "Eric Biedert +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:21 #: ../../source/changelog/0.10.0-changelog.rst:53 msgid "Harivinay" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:22 #: ../../source/changelog/0.10.0-changelog.rst:55 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:23 msgid "Jephian Lin +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:24 msgid "Joy Bhalla +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:25 #: ../../source/changelog/0.10.0-changelog.rst:60 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:26 msgid "Lalourche +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:27 msgid "Max Stoumen" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:28 #: ../../source/changelog/0.10.0-changelog.rst:61 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:29 #: ../../source/changelog/0.10.0-changelog.rst:62 msgid "Oliver" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:30 msgid "Partha Das +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:31 msgid "Raj Dandekar +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:32 msgid "Rohan Sharma +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:33 #: ../../source/changelog/0.10.0-changelog.rst:65 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:34 msgid "Václav Hlaváč +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:35 msgid "asjadaugust +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:36 #: ../../source/changelog/0.10.0-changelog.rst:66 msgid "ccn" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:37 #: ../../source/changelog/0.10.0-changelog.rst:67 msgid "icedcoffeeee" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:38 #: ../../source/changelog/0.10.0-changelog.rst:69 msgid "sparshg" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:39 msgid "vinnniii15 +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:40 msgid "vladislav doster +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:41 msgid "xia0long +" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:44 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:47 msgid "Aathish Sivasubrahmanian" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:50 msgid "Devin Neal" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:51 msgid "Eric Biedert" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:52 msgid "GameDungeon" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:54 msgid "Hugues Devimeux" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:56 msgid "Jason Villanueva" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:57 msgid "Jephian Lin" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:58 msgid "Joy Bhalla" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:59 msgid "KingWampy" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:63 msgid "Raghav Goel" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:64 msgid "Raj Dandekar" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:68 msgid "ralphieraccoon" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:72 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:74 msgid "A total of 59 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:77 msgid "Breaking changes" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:81 msgid ":pr:`1843`: Dropped redundant OpenGL files and add metaclass support for :class:`~.Surface`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:80 msgid "``OpenGL`` classes from ``opengl_geometry.py``, ``opengl_text_mobject.py``, ``opengl_tex_mobject.py``, ``opengl_svg_path.py``, ``opengl_svg_mobject.py`` and most of ``opengl_three_dimensions.py`` have been removed." msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:81 msgid "``ParametricSurface`` has been renamed to :class:`~.Surface`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:84 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:86 msgid ":pr:`1941`: Added examples, tests and improved documentation for :mod:`~.coordinate_systems`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:89 msgid ":pr:`1694`: Added ``font_size`` parameter for :class:`~.Tex` and :class:`~.Text`, replaced ``scale`` parameters with ``font_size``" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:92 msgid ":pr:`1860`: Removed :class:`~.GraphScene`, :class:`~.NumberLineOld` and parameters for :class:`~.ChangingDecimal`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:96 msgid "New features" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:99 msgid ":pr:`1929`: Implementing a ``zoom`` parameter for :meth:`.ThreeDScene.move_camera`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:99 msgid "Zooming into a :class:`~.ThreeDScene` can now be done by calling, for example, ``self.move_camera(zoom=2)`` in the ``construct`` method." msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:101 msgid ":pr:`1980`: Added a ``dissipating_time`` keyword argument to :class:`~.TracedPath` to allow animating a dissipating path" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:105 msgid ":pr:`1899`: Allow switching the renderer to OpenGL at runtime" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:105 msgid "Previously, the metaclass approach only changed the inheritance chain to switch between OpenGL and cairo mobjects when the class objects are initialized, i.e., at import time. This PR also triggers the changes to the inheritance chain when the value of ``config.renderer`` is changed." msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:107 msgid ":pr:`1828`: Added configuration option ``zero_pad`` for zero padding PNG file names" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:111 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:113 msgid ":pr:`1882`: Added OpenGL support for :class:`~.PMobject` and its subclasses" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:116 msgid ":pr:`1881`: Added methods :meth:`.Angle.get_lines` and :meth:`.Angle.get_value` to :class:`~.Angle`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:119 msgid ":pr:`1952`: Added the option to save last frame for OpenGL" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:122 msgid ":pr:`1922`: Fixed IPython interface to exit cleanly when OpenGL renderer raises an error" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:125 msgid ":pr:`1923`: Fixed CLI help text for ``manim init`` subcommand so that it is not truncated" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:129 msgid ":pr:`1868`: Added OpenGL support to IPython magic" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:129 msgid "The OpenGL renderer can now be used in jupyter notebooks when using the ``%%manim`` magic command." msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:131 msgid ":pr:`1841`: Reduced default resolution of :class:`~.Dot3D`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:134 msgid ":pr:`1866`: Allow passing keyword argument ``corner_radius`` to :class:`~.SurroundingRectangle`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:137 msgid ":pr:`1847`: Allow :class:`~.Cross` to be created without requiring a mobject" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:141 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:143 msgid ":pr:`1985`: Use ``height`` to determine ``font_size`` instead of the ``_font_size`` attribute" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:146 msgid ":pr:`1758`: Fixed scene selection being ignored when using the OpenGL renderer" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:149 msgid ":pr:`1871`: Fixed broken :meth:`.VectorScene.vector_to_coords`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:152 msgid ":pr:`1973`: Fixed indexing of :meth:`.Table.get_entries` to respect row length" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:155 msgid ":pr:`1950`: Fixed passing custom arrow shapes to :class:`~.CurvedArrow`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:158 msgid ":pr:`1967`: Fixed :attr:`.Axes.coordinate_labels` referring to the entire axis, not just its labels" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:161 msgid ":pr:`1951`: Fixed :meth:`.Axes.get_line_graph` returning a graph rendered below the axes" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:164 msgid ":pr:`1943`: Added ``buff`` keyword argument to :class:`~.BraceLabel`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:167 msgid ":pr:`1938`: Fixed :class:`~.Rotate` for angles that are multiples of :math:`2\\pi`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:170 msgid ":pr:`1924`: Made arrow tips rotate ``IN`` and ``OUT`` properly" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:173 msgid ":pr:`1931`: Fixed ``row_heights`` in :meth:`.Mobject.arrange_in_grid`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:176 msgid ":pr:`1893`: Fixed CLI error when rendering a file containing a single scene without specifying the scene name" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:179 msgid ":pr:`1744`: Fixed bug in :class:`~.NumberPlane` with strictly positive or strictly negative values for ``x_range`` and ``y_range``" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:182 msgid ":pr:`1887`: Fixed ``custom_config`` not working in ``frames_comparison``" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:185 msgid ":pr:`1879`: Fixed how the installed version is determined by Poetry" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:189 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:191 msgid ":pr:`1979`: Corrected Japanese phrases in documentation" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:194 msgid ":pr:`1976`: Fixed labelling of languages in documentation example" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:197 msgid ":pr:`1949`: Rewrite installation instructions from scratch" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:200 msgid ":pr:`1963`: Added sitemap to ``robots.txt``" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:203 msgid ":pr:`1939`: Fixed formatting of parameter description of :class:`~.NumberPlane`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:206 msgid ":pr:`1918`: Fixed a typo in the text tutorial" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:209 msgid ":pr:`1915`: Improved the wording of the installation instructions for Google Colab" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:212 msgid ":pr:`1906`: Improved language and overall consistency in ``README``" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:215 msgid ":pr:`1880`: Updated tutorials to use ``.animate`` instead of :class:`~.ApplyMethod`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:218 msgid ":pr:`1877`: Remove duplicated imports in some documentation examples" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:221 msgid ":pr:`1869`: Fixed duplicated Parameters section in :meth:`.Mobject.arrange_in_grid`" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:225 msgid "Changes concerning the testing system" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:227 msgid ":pr:`1894`: Fixed an OpenGL test" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:231 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:233 msgid ":pr:`1987`: Added support for using OpenGL in subprocess in Windows pipeline" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:236 msgid ":pr:`1964`: Added ``CITATION.cff`` and a method to automatically update this citation with new releases" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:239 msgid ":pr:`1856`: Modified Dockerfile to support multi-platform builds via ``docker buildx``" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:242 msgid ":pr:`1955`: Partially support OpenGL rendering with Docker" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:245 msgid ":pr:`1896`: Made RTD apt install FFMPEG instead of installing a Python binding" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:248 msgid ":pr:`1864`: Shortened and simplified PR template" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:251 msgid ":pr:`1853`: Updated Sphinx to 4.1.2" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:255 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:257 msgid ":pr:`1960`: Ignore fewer flake8 errors" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:260 msgid ":pr:`1947`: Set flake8 not to ignore undefined names in Python code" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:263 msgid ":pr:`1948`: flake8: Set max-line-length instead of ignoring long lines" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:268 msgid ":pr:`1956`: Upgrade to modern Python syntax" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:267 msgid "This pull request was created `with the command `__ ``pyupgrade --py36-plus **/*.py``" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:268 msgid "Python f-strings simplify the code and `should speed up execution `__." msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:271 msgid ":pr:`1898`: Replaced ``self.data[\"attr\"]`` and ``self.uniforms[\"attr\"]`` with ``self.attr``" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:271 msgid "In particular, ``OpenGLVMobject.points`` can now be accessed directly." msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:273 msgid ":pr:`1934`: Improved code quality by implementing suggestions from LGTM" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:276 msgid ":pr:`1861`: Updated ``dearpygui`` version to 0.8.x" msgstr "" #: ../../source/changelog/0.10.0-changelog.rst:280 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.11.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.11.0-changelog.rst:3 msgid "v0.11.0" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:5 msgid "October 02, 2021" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:10 msgid "A total of 31 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:14 #: ../../source/changelog/0.11.0-changelog.rst:40 msgid "Aathish Sivasubrahmanian" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:15 #: ../../source/changelog/0.11.0-changelog.rst:41 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:16 msgid "Charlie +" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:17 msgid "Christopher Besch +" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:18 #: ../../source/changelog/0.11.0-changelog.rst:43 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:19 msgid "Evan Boehs +" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:20 #: ../../source/changelog/0.11.0-changelog.rst:45 msgid "GameDungeon" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:21 #: ../../source/changelog/0.11.0-changelog.rst:46 msgid "Hugues Devimeux" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:22 msgid "Jerónimo Squartini" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:23 #: ../../source/changelog/0.11.0-changelog.rst:49 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:24 msgid "Meredith Espinosa +" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:25 #: ../../source/changelog/0.11.0-changelog.rst:51 msgid "Mysaa" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:26 #: ../../source/changelog/0.11.0-changelog.rst:52 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:27 msgid "Nicolai Weitkemper +" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:28 #: ../../source/changelog/0.11.0-changelog.rst:54 msgid "Oliver" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:29 #: ../../source/changelog/0.11.0-changelog.rst:56 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:30 msgid "Tim +" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:31 #: ../../source/changelog/0.11.0-changelog.rst:59 msgid "icedcoffeeee" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:32 msgid "imadjamil +" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:33 msgid "leleogere +" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:34 msgid "Максим Заякин +" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:37 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:42 msgid "Charlie" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:44 msgid "Evan Boehs" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:47 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:48 msgid "Jason Villanueva" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:50 msgid "Mark Miller" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:53 msgid "Nicolai Weitkemper" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:55 msgid "Raghav Goel" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:57 msgid "Skaft" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:58 msgid "friedkeenan" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:60 msgid "leleogere" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:63 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:65 msgid "A total of 55 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:68 msgid "Breaking changes" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:71 msgid ":pr:`1990`: Changed and improved the implementation of :meth:`.CoordinateSystem.get_area` to work without Riemann rectangles" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:71 msgid "This changes how :meth:`.CoordinateSystem.get_area` is implemented. To mimic the old behavior (tiny Riemann rectangles), use :meth:`.CoordinateSystem.get_riemann_rectangles` with a small value for ``dx``." msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:74 msgid ":pr:`2095`: Changed angles for polar coordinates to use math convention" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:74 msgid "This PR switches the parameter names ``phi`` and ``theta`` in :func:`cartesian_to_spherical` and :func:`spherical_to_cartesian` to align with the `usual definition in mathematics `__." msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:77 msgid "Highlights" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:80 msgid ":pr:`2094`: Implemented :class:`~.ImplicitFunction` and :meth:`.CoordinateSystem.get_implicit_curve` for plotting implicit curves" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:80 msgid "An :class:`~.ImplicitFunction` that plots the points :math:`(x, y)` which satisfy some equation :math:`f(x,y) = 0`." msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:82 msgid ":pr:`2075`: Implemented :meth:`.Mobject.set_default`, a mechanism for changing default values of keyword arguments" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:87 msgid ":pr:`1998`: Added support for Boolean Operations on VMobjects" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:86 msgid "This PR introduces boolean operations for :class:`~.VMobject`; see details and examples at :class:`~.Union`, :class:`~.Difference`, :class:`~.Intersection` and :class:`~.Exclusion`." msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:90 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:92 msgid ":pr:`2123`: Renamed ``distance`` parameter of :class:`.ThreeDScene` and :class:`.ThreeDCamera` to ``focal_distance``" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:95 msgid ":pr:`2102`: Deprecated :class:`~.SampleSpaceScene` and :class:`~.ReconfigurableScene`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:98 msgid ":pr:`2061`: Removed deprecated ``u_min``, ``u_max``, ``v_min``, ``v_max`` in :class:`~.Surface`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:101 msgid ":pr:`2024`: Deprecated redundant methods :meth:`.Mobject.rotate_in_place`, :meth:`.Mobject.scale_in_place`, :meth:`.Mobject.scale_about_point`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:104 msgid ":pr:`1991`: Deprecated :meth:`.VMobject.get_points`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:108 msgid "New features" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:110 msgid ":pr:`2118`: Added 3D support for :class:`~.ArrowVectorField` and :class:`~.StreamLines`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:113 msgid ":pr:`1469`: Added :meth:`.VMobject.proportion_from_point` to measure the proportion of points along a Bezier curve" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:117 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:119 msgid ":pr:`2111`: Improved setting of OpenGL colors" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:122 msgid ":pr:`2113`: Added OpenGL compatibility to :meth:`.ThreeDScene.begin_ambient_camera_rotation` and :meth:`.ThreeDScene.move_camera`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:125 msgid ":pr:`2016`: Added OpenGL support for :mod:`~.mobject.boolean_ops`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:128 msgid ":pr:`2084`: Added :meth:`~Table.get_highlighted_cell` and fixed :meth:`~Table.add_highlighted_cell`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:131 msgid ":pr:`2013`: Removed unnecessary check in :class:`~.TransformMatchingAbstractBase`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:134 msgid ":pr:`1971`: Added OpenGL support for :class:`~.StreamLines`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:137 msgid ":pr:`2041`: Added config option to enable OpenGL wireframe for debugging" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:141 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:143 msgid ":pr:`2070`: Fixed :meth:`~OpenGLRenderer.get_frame` when window is created" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:146 msgid ":pr:`2071`: Fixed :class:`~AnimationGroup` OpenGL compatibility" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:149 msgid ":pr:`2108`: Fixed swapped axis step values in :class:`~.NumberPlane`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:152 msgid ":pr:`2072`: Added OpenGL compatibility for :class:`~.Cube`." msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:155 msgid ":pr:`2060`: Fixed OpenGL compatibility issue for meth:`~Line.set_opacity`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:158 msgid ":pr:`2037`: Fixed return value of :meth:`~.OpenGLMobject.apply_complex_function`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:161 msgid ":pr:`2039`: Added OpenGL compatibility for :meth:`~Cylinder.add_bases`." msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:164 msgid ":pr:`2066`: Fixed error raised by logging when cache is full" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:167 msgid ":pr:`2026`: Fixed OpenGL shift animation for :class:`~.Text`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:170 msgid ":pr:`2028`: Fixed OpenGL overriding SVG fill color" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:173 msgid ":pr:`2043`: Fixed bug where :meth:`.NumberLine.add_labels` cannot accept non-mobject labels" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:176 msgid ":pr:`2011`: Fixed ``-a`` flag for OpenGL rendering" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:179 msgid ":pr:`1994`: Fix :meth:`~.input_to_graph_point` when passing a line graph (from :meth:`.Axes.get_line_graph`)" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:182 msgid ":pr:`2017`: Avoided using deprecated ``get_points`` method and fixed :class:`~.OpenGLPMPoint` color" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:186 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:188 msgid ":pr:`2131`: Copyedited the configuration tutorial in the documentation" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:191 msgid ":pr:`2120`: Changed ``manim_directive`` to use a clean configuration via ``tempconfig``" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:194 msgid ":pr:`2122`: Fixed broken links in inheritance graphs by moving them to ``reference.rst``" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:197 msgid ":pr:`2115`: Improved docstring of :meth:`.PMobject.add_points`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:200 msgid ":pr:`2116`: Made type hint for ``line_spacing`` argument of :class:`~.Paragraph` more accurate" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:203 msgid ":pr:`2117`: Changed the way the background color was set in a documentation example to avoid leaking the setting to other examples" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:206 msgid ":pr:`2101`: Added note that translation process is not ready" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:209 msgid ":pr:`2055`: Fixed parameter types of :meth:`.Graph.add_edges` and :meth:`.Graph.add_vertices`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:212 msgid ":pr:`862`: Prepared documentation for translation (still work in progress)" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:215 msgid ":pr:`2035`: Fixed broken link in README" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:218 msgid ":pr:`2020`: Corrected paths to user-wide configuration files for MacOS and Linux" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:222 msgid "Changes concerning the testing system" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:224 msgid ":pr:`2008`: Reuse CLI flag tests for OpenGL" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:227 msgid ":pr:`2080`: Reused :class:`~.Mobject` tests for :class:`~.OpenGLMobject`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:231 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:233 msgid ":pr:`2004`: Cancel previous workflows in the same branch in Github Actions" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:237 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:239 msgid ":pr:`2050`: Make colour aliases IDE-friendly" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:242 msgid ":pr:`2126`: Fixed whitespace in info message issued by :meth:`.SceneFileWriter.clean_cache`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:245 msgid ":pr:`2124`: Upgraded several dependencies (in particular: ``skia-pathops``)" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:248 msgid ":pr:`2001`: Fixed several warnings issued by LGTM" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:251 msgid ":pr:`2064`: Removed duplicate insert shader directory" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:254 msgid ":pr:`2027`: Improved wording in info message issued by :meth:`.SceneFileWriter.clean_cache`" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:257 msgid ":pr:`1968`: Sharpened Flake8 configuration and fixed resulting warnings" msgstr "" #: ../../source/changelog/0.11.0-changelog.rst:261 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.12.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.12.0-changelog.rst:3 msgid "v0.12.0" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:5 msgid "November 02, 2021" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:10 msgid "A total of 40 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:14 msgid "Anima. +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:15 msgid "Arcstur +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:16 #: ../../source/changelog/0.12.0-changelog.rst:47 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:17 #: ../../source/changelog/0.12.0-changelog.rst:48 msgid "Christopher Besch" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:18 #: ../../source/changelog/0.12.0-changelog.rst:49 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:19 msgid "David Yang +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:20 msgid "Dhananjay Goratela +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:21 msgid "Ethan Rooke +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:22 msgid "Eugene Chung +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:23 msgid "GameDungeon" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:24 msgid "Gustav-Rixon +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:25 #: ../../source/changelog/0.12.0-changelog.rst:56 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:26 msgid "Josiah Winslow +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:27 #: ../../source/changelog/0.12.0-changelog.rst:58 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:28 msgid "Martmists +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:29 msgid "Michael Hill +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:30 #: ../../source/changelog/0.12.0-changelog.rst:60 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:31 msgid "Nick +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:32 msgid "NotWearingPants +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:33 msgid "Peeter Joot +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:34 #: ../../source/changelog/0.12.0-changelog.rst:63 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:35 msgid "Viicos +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:36 msgid "heitor +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:37 #: ../../source/changelog/0.12.0-changelog.rst:65 msgid "icedcoffeeee" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:38 msgid "kieran-pringle +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:39 msgid "Виктор Виктор +" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:42 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:45 msgid "Alex Lembcke" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:46 msgid "Anima." msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:50 msgid "David Yang" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:51 msgid "Dhananjay Goratela" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:52 msgid "Ethan Rooke" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:53 msgid "Eugene Chung" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:54 msgid "Gustav-Rixon" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:55 msgid "Hugues Devimeux" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:57 msgid "Jason Villanueva" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:59 msgid "Mysaa" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:61 msgid "Nick" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:62 msgid "Oliver" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:64 msgid "Viicos" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:66 msgid "kieran-pringle" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:69 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:71 msgid "A total of 52 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:74 msgid "Highlights" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:79 msgid ":pr:`1812`: Implemented logarithmic scaling for :class:`~.NumberLine` / :class:`~.Axes`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:77 msgid "This implements scaling bases that can be passed to the ``scaling`` keyword argument of :class:`.NumberLine`. See :class:`.LogBase` (for a logarithmic scale) and :class:`.LinearBase` (for the default scale) for more details and examples." msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:85 msgid ":pr:`2152`: Introduced API for scene sections via :meth:`.Scene.next_section`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:82 msgid "Sections divide a scene into multiple parts, resulting in multiple output videos (when using the ``--save_sections`` flag). The cuts between two sections are defined by the user in the :meth:`~.Scene.construct` method. Each section has an optional name and type, which can be used by a plugin (`see an example `__). You can skip rendering specific sections with the ``skip_animations`` keyword argument." msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:88 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:90 msgid ":pr:`1926`: OpenGL: changed ``submobjects`` to be a property" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:93 msgid ":pr:`2245`: Removed deprecated method ``get_center_point`` and parameters ``azimuth_label_scale``, ``number_scale_value``, ``label_scale``, ``scale_factor``, ``size``, ``x_min``, ``x_max``, ``delta_x``, ``y_min``, ``y_max``, ``delta_y``" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:96 msgid ":pr:`2187`: Renamed ``get_graph`` and its variants to :meth:`~.CoordinateSystem.plot`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:99 msgid ":pr:`2065`: Deprecated :class:`~.FullScreenFadeRectangle` and :class:`~.PictureInPictureFrame`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:103 msgid "New features" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:105 msgid ":pr:`2025`: Implemented :meth:`.CoordinateSystem.input_to_graph_coords` and fixed :meth:`.CoordinateSystem.angle_of_tangent`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:108 msgid ":pr:`2151`: Added option to set the input file from a config file" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:111 msgid ":pr:`2128`: Added keyword arguments ``match_center``, ``match_width`` etc. to :meth:`.Mobject.become`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:114 msgid ":pr:`2162`: Implemented :meth:`.MovingCamera.auto_zoom` for automatically zooming onto specified mobjects" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:117 msgid ":pr:`2236`: Added ``skip_animations`` argument to :meth:`.Scene.next_section`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:120 msgid ":pr:`2196`: Implemented :meth:`.Line3D.parallel_to` and :meth:`.Line3D.perpendicular_to`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:124 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:128 msgid ":pr:`2138`: Fixed example for :meth:`~.Vector.coordinate_label` and added more customization for :class:`~.Matrix`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:127 msgid "Additional keyword arguments for :meth:`~.Vector.coordinate_label` are passed to the constructed matrix." msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:128 msgid ":class:`~.Matrix` now accepts a ``bracket_config`` keyword argument." msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:130 msgid ":pr:`2139`: Changed the color of :class:`~.NumberLine` from ``LIGHT_GREY`` to ``WHITE``" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:133 msgid ":pr:`2157`: Added :meth:`.CoordinateSystem.plot_polar_graph`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:136 msgid ":pr:`2243`: Fixed wasteful recursion in :meth:`.Mobject.get_merged_array`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:139 msgid ":pr:`2205`: Improved last frame output handling for the OpenGL renderer" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:142 msgid ":pr:`2172`: Added ``should_render`` attribute to disable rendering mobjects" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:145 msgid ":pr:`2182`: Changed the default width of videos in Jupyter notebooks to 60%" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:149 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:151 msgid ":pr:`2244`: Fixed :meth:`.CoordinateSystem.get_area` when using few plot points and a boundary graph" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:154 msgid ":pr:`2232`: Fixed :class:`.Graph` stopping to update after animating additions/deletions of vertices or edges" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:157 msgid ":pr:`2142`: Fixed issue with duplicates in OpenGL family and added tests" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:160 msgid ":pr:`2168`: Fixed order of return values of :func:`.space_ops.cartesian_to_spherical`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:163 msgid ":pr:`2160`: Made projection shaders compatible with :class:`.StreamLines`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:166 msgid ":pr:`2140`: Fixed passing color lists to :meth:`.Mobject.set_color` for the OpenGL renderer" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:169 msgid ":pr:`2211`: Fixed animations not respecting the specified rate function" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:172 msgid ":pr:`2161`: Fixed ``IndexOutOfBoundsError`` in TeX logging" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:175 msgid ":pr:`2148`: Fixed :class:`~.Arrow` tip disorientation with :meth:`.Line.put_start_and_end_on`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:178 msgid ":pr:`2192`: Fixed :func:`.svg_path.string_to_numbers` sometimes returning strings" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:181 msgid ":pr:`2185`: Fixed type mismatch for height and width parameters of :class:`~.Text`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:185 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:187 msgid ":pr:`2228`: Added a new boolean operation example to the gallery" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:190 msgid ":pr:`2239`: Removed erroneous raw string from text tutorial" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:193 msgid ":pr:`2184`: Moved comments in :class:`~.VMobject` to documentation" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:196 msgid ":pr:`2217`: Removed superfluous dots in documentation of :class:`.Section`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:199 msgid ":pr:`2215`: Fixed typo in docstring of :meth:`.ThreeDAxes.get_z_axis_label`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:202 msgid ":pr:`2212`: Fixed Documentation for Sections" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:205 msgid ":pr:`2201`: Fixed a typo in the documentation" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:208 msgid ":pr:`2165`: Added Crowdin configuration and changed source files to ``.pot`` format" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:211 msgid ":pr:`2130`: Transferred troubleshooting installation related snippets from Discord to the documentation" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:214 msgid ":pr:`2176`: Modified :meth:`.Mobject.set_default` example to prevent leaking across the docs" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:218 msgid "Changes concerning the testing system" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:220 msgid ":pr:`2197`: Added tests for resolution flag" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:223 msgid ":pr:`2146`: Increased test coverage for OpenGL renderer" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:227 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:229 msgid ":pr:`2191`: Removed ``add-trailing-comma`` pre-commit hook" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:233 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:235 msgid ":pr:`2136`: Added type hints to all colors" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:238 msgid ":pr:`2220`: Cleanup: let ``Scene.renderer.time`` return something that makes sense" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:241 msgid ":pr:`2222`: Updated Classifiers in ``pyproject.toml``: removed Python 3.6, added Python 3.9" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:244 msgid ":pr:`2213`: Removed redundant ``partial_movie_files`` parameter in :meth:`.SceneFileWriter.combine_to_movie`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:251 msgid ":pr:`2200`: Addressed some maintenance TODOs" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:248 msgid "Changed an `Exception` to `ValueError`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:249 msgid "Fixed :meth:`.MappingCamera.points_to_pixel_coords` by adding the ``mobject`` argument of the parent" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:250 msgid "Rounded up width in :class:`.SplitScreenCamera`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:251 msgid "Added docstring to :meth:`.Camera.capture_mobject`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:253 msgid ":pr:`2194`: Added type hints to :mod:`.utils.images`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:256 msgid ":pr:`2171`: Added type hints to :mod:`.utils.ipython_magic`" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:259 msgid ":pr:`2164`: Improved readability of regular expression" msgstr "" #: ../../source/changelog/0.12.0-changelog.rst:263 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.13.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.13.0-changelog.rst:3 msgid "v0.13.0" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:5 msgid "December 04, 2021" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:10 msgid "A total of 27 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:14 #: ../../source/changelog/0.13.0-changelog.rst:38 msgid "Alex Lembcke" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:15 #: ../../source/changelog/0.13.0-changelog.rst:39 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:16 #: ../../source/changelog/0.13.0-changelog.rst:40 msgid "Christopher Besch" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:17 #: ../../source/changelog/0.13.0-changelog.rst:41 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:18 msgid "Filip +" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:19 msgid "John Ingles +" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:20 #: ../../source/changelog/0.13.0-changelog.rst:45 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:21 msgid "Lucas Ricci +" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:22 msgid "Marcin Serwin +" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:23 msgid "Mysaa" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:24 #: ../../source/changelog/0.13.0-changelog.rst:47 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:25 msgid "Ricky +" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:26 #: ../../source/changelog/0.13.0-changelog.rst:50 msgid "Viicos" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:27 msgid "ask09ok +" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:28 msgid "citrusmunch +" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:29 #: ../../source/changelog/0.13.0-changelog.rst:52 msgid "icedcoffeeee" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:30 msgid "mostlyaman +" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:31 msgid "vmiezys +" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:32 msgid "zhujisheng +" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:35 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:42 msgid "Filip" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:43 msgid "Hugues Devimeux" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:44 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:46 msgid "Lucas Ricci" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:48 msgid "Oliver" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:49 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:51 msgid "ask09ok" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:53 msgid "mostlyaman" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:56 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:58 msgid "A total of 39 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:61 msgid "Highlights" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:63 msgid ":pr:`2313`: Finalized translation process and documentation" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:67 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:75 msgid ":pr:`2331`: Removed deprecations up to ``v0.12.0``" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:70 msgid "Removed ``distance`` parameters from :class:`~.ThreeDCamera` (replacement: ``focal_distance``)" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:71 msgid "Removed ``min_distance_to_new_point`` parameter from :class:`~.TracedPath`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:72 msgid "Removed ``positive_space_ratio`` and ``dash_spacing`` parameters from :class:`~.DashedVMobject`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:73 msgid "Removed ``_in_place`` methods from :mod:`.mobject`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:74 msgid "Removed ``ReconfigurableScene``" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:75 msgid "Removed ``SampleSpaceScene``" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:77 msgid ":pr:`2312`: Replaced all occurrences of ``set_submobjects``" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:81 msgid "New features" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:85 msgid ":pr:`2314`: Added basic support for adding subcaptions via :meth:`.Scene.add_subcaption`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:84 msgid "New method :meth:`.Scene.add_subcaption`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:85 msgid "New keyword arguments ``subcaption``, ``subcaption_duration``, ``subcaption_offset`` for :meth:`.Scene.play`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:87 msgid ":pr:`2267`: Implemented :meth:`.CoordinateSystem.plot_antiderivative_graph`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:91 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:93 msgid ":pr:`2347`: Moved ``manim_directive.py`` to ``manim.utils.docbuild``" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:96 msgid ":pr:`2340`: Added documentation for :mod:`.animation.growing` and improved :class:`.SpinInFromNothing`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:99 msgid ":pr:`2343`: Replaced current tree layout algorithm with SageMath's for improved layout of large trees" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:102 msgid ":pr:`2351`: Added missing ``**kwargs`` parameter to :meth:`.Table.add_highlighted_cell`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:105 msgid ":pr:`2344`: Resized SVG logos, fit content to canvas" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:109 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:111 msgid ":pr:`2359`: Resolved ``ValueError`` when calling ``manim cfg write``" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:114 msgid ":pr:`2276`: Fixed bug with alignment of z-axis in :class:`~.ThreeDAxes`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:117 msgid ":pr:`2325`: Several improvements to handling of ``quality`` argument" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:120 msgid ":pr:`2335`: Fixed bug with zooming camera and :class:`~.PointCloud`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:123 msgid ":pr:`2328`: Fixed bug causing incorrect RGBA values to be passed to cairo" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:126 msgid ":pr:`2292`: Fixed positioning of :class:`~.Flash`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:129 msgid ":pr:`2262`: Fixed wrong cell coordinates with :meth:`.Table.get_cell` after scaling" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:132 msgid ":pr:`2280`: Fixed :class:`~.DecimalNumber` color when number of displayed digits changes" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:136 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:138 msgid ":pr:`2354`: Port over docs and typings from ``mobject.py`` and ``vectorized_mobject.py`` to their OpenGL counterparts" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:141 msgid ":pr:`2350`: Added mention of Manim sideview extension for VS Code" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:144 msgid ":pr:`2342`: Removed :meth:`~.CoordinateSystem.get_graph` usage from :class:`~.Axes` example" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:147 msgid ":pr:`2216`: Edited and added new sections to the quickstart tutorial" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:150 msgid ":pr:`2279`: Added documentation for discontinuous functions" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:153 msgid ":pr:`2319`: Swapped ``dotL`` and ``dotR`` in :meth:`.Mobject.interpolate` example" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:156 msgid ":pr:`2230`: Copyedited building blocks tutorial" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:159 msgid ":pr:`2310`: Clarified that Manim does not support Python 3.10 yet in the documentation" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:162 msgid ":pr:`2294`: Made documentation front page more concise and rearranged order of tutorials" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:165 msgid ":pr:`2287`: Replace link to old interactive notebook" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:169 msgid "Changes concerning the testing system" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:171 msgid ":pr:`2346`: Made ``frames_comparsion`` decorator for frame testing a proper module of the library" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:174 msgid ":pr:`2318`: Added tests for ``remover`` keyword argument of :class:`~.AnimationGroup`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:177 msgid ":pr:`2301`: Added a test for :meth:`.ThreeDScene.add_fixed_in_frame_mobjects`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:180 msgid ":pr:`2274`: Optimized some tests to reduce duration" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:183 msgid ":pr:`2272`: Added test for :class:`~.Broadcast`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:187 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:189 msgid ":pr:`2327`: Corrected type hint for ``labels`` keyword argument of :class:`~.Graph`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:192 msgid ":pr:`2329`: Remove unintended line break in README" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:195 msgid ":pr:`2305`: Corrected type hint ``discontinuities`` argument for :class:`~.ParametricFunction`" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:198 msgid ":pr:`2300`: Add contact email for PyPi" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:202 msgid "New releases" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:204 msgid ":pr:`2353`: Prepare new release: ``v0.13.0``" msgstr "" #: ../../source/changelog/0.13.0-changelog.rst:208 msgid "Unclassified changes" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.13.1-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.13.1-changelog.rst:3 msgid "v0.13.1" msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:5 msgid "December 05, 2021" msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:10 msgid "A total of 2 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:14 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:17 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:20 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:23 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:25 msgid "A total of 2 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:28 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:30 msgid ":pr:`2363`: Fixed broken IPython magic command" msgstr "" #: ../../source/changelog/0.13.1-changelog.rst:34 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.14.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.14.0-changelog.rst:3 msgid "v0.14.0" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:5 msgid "January 07, 2022" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:10 msgid "A total of 29 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:14 #: ../../source/changelog/0.14.0-changelog.rst:38 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:15 msgid "BorisTheBrave +" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:16 #: ../../source/changelog/0.14.0-changelog.rst:41 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:17 #: ../../source/changelog/0.14.0-changelog.rst:42 msgid "GameDungeon" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:18 msgid "Gergely Bencsik +" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:19 #: ../../source/changelog/0.14.0-changelog.rst:45 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:20 msgid "Jihoon +" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:21 msgid "Kian Kasad +" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:22 msgid "Kiran-Raj-Dev +" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:23 #: ../../source/changelog/0.14.0-changelog.rst:47 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:24 msgid "Leo Xu +" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:25 #: ../../source/changelog/0.14.0-changelog.rst:50 msgid "Marcin Serwin" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:26 msgid "Matt Gleich +" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:27 #: ../../source/changelog/0.14.0-changelog.rst:51 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:28 msgid "Steven nguyen +" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:29 msgid "Vectozavr +" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:30 #: ../../source/changelog/0.14.0-changelog.rst:54 msgid "Viicos" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:31 msgid "citrusmunch" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:32 msgid "netwizard22 +" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:35 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:39 msgid "BorisTheBrave" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:40 msgid "Christopher Besch" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:43 msgid "Gergely Bencsik" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:44 msgid "Hugues Devimeux" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:46 msgid "Kiran-Raj-Dev" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:48 msgid "Leo Xu" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:49 msgid "Lucas Ricci" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:52 msgid "Raghav Goel" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:53 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:55 msgid "icedcoffeeee" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:58 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:60 msgid "A total of 29 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:63 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:69 msgid ":pr:`2390`: Removed deprecations up to `v0.13.0`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:66 msgid "Removed ``get_graph``, ``get_implicit_curve``, ``get_derivative_graph``, ``get_line_graph`` and ``get_parametric_curve`` in favour of their ``plot`` variants" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:67 msgid "Removed ``FullScreenFadeRectangle`` and ``PictureInPictureFrame``" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:68 msgid "Removed ``path_arc`` parameter from :class:`~.SpinInFromNothing`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:69 msgid "Removed ``set_submobjects`` method from ``opengl_mobject.py``" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:72 msgid "New features" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:75 msgid ":pr:`2341`: Update :class:`~.Text` to use new ``ManimPango`` color setting" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:75 msgid ":class:`~.Text` class now uses color setting introduced in ``ManimPango 0.4.0`` for color and gradient." msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:78 msgid ":pr:`2397`: Added ``label_constructor`` parameter for :class:`~.NumberLine`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:78 msgid "Allows changing the class that will be used to construct :class:`~.Axes` and :class:`~.NumberLine` labels by default. Makes it possible to easily use :class:`~.Text` for labels if needed." msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:81 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:83 msgid ":pr:`2383`: Made :meth:`.Surface.set_fill_by_value` support gradients along different axes" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:86 msgid ":pr:`2388`: Added ``about_point`` keyword argument to :class:`~.ApplyMatrix`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:89 msgid ":pr:`2395`: Add documentation for paths functions" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:94 msgid ":pr:`2372`: Improved :class:`~.DashedVMobject`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:93 msgid ":class:`~.DashedVMobject` used to create stretched and uneven dashes on most plotted curves. Now the dash lengths are equalized. An option is reserved to use the old method. New keyword argument: ``dash_offset``. This parameter shifts the starting point." msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:97 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:99 msgid ":pr:`2409`: Fixed performance degradation by trimming empty curves from paths when calling :meth:`.VMobject.align_points`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:102 msgid ":pr:`2392`: Fixed ``ZeroDivisionError`` in :mod:`~.mobject.three_dimensions`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:105 msgid ":pr:`2362`: Fixed phi updater in :meth:`.ThreeDScene.begin_3dillusion_camera_rotation`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:109 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:111 msgid ":pr:`2415`: Removed instructions on using and installing Docker in README" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:114 msgid ":pr:`2414`: Made improvements to the :doc:`/guides/configuration` tutorial" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:117 msgid ":pr:`2423`: Changed recommendation to ``mactex-no-gui`` from ``mactex`` for macOS install" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:120 msgid ":pr:`2407`: Clarified docstrings of :meth:`.Mobject.animate`, :meth:`.Mobject.set` and :class:`~.Variable`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:123 msgid ":pr:`2352`: Added Crowdin badge" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:126 msgid ":pr:`2371`: Added ``dvips`` to list of required LaTeX packages on Linux" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:129 msgid ":pr:`2403`: Improved docstring of :class:`~.ApplyMethod` and removed propagated ``__init__`` docstring" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:132 msgid ":pr:`2391`: Fixed typo in parameter name in documentation of :class:`~.NumberLine`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:135 msgid ":pr:`2368`: Added note in Internationalization" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:139 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:141 msgid ":pr:`2408`: Removed various return annotations that were stifling type inference" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:144 msgid ":pr:`2424`: Removed ``strings.py``" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:147 msgid ":pr:`1972`: Added support for MyPy" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:150 msgid ":pr:`2410`: Fixed Flake8" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:153 msgid ":pr:`2401`: Fixed type annotations in :mod:`.mobject.three_dimensions`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:156 msgid ":pr:`2405`: Removed some unused OpenGL files" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:159 msgid ":pr:`2399`: Fixed type annotations in :mod:`~.mobject.table`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:162 msgid ":pr:`2385`: Made comments in quickstart tutorial more precise" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:165 msgid ":pr:`2377`: Fixed type hint for an argument of :class:`~.MoveAlongPath`" msgstr "" #: ../../source/changelog/0.14.0-changelog.rst:169 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.15.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.15.0-changelog.rst:3 msgid "v0.15.0" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:5 msgid "February 26, 2022" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:10 msgid "A total of 34 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:14 msgid "Alex Lembcke" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:15 msgid "AnonymoZ +" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:16 #: ../../source/changelog/0.15.0-changelog.rst:44 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:17 #: ../../source/changelog/0.15.0-changelog.rst:46 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:18 msgid "Eshaan Naga Venkata +" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:19 msgid "Faruk D. +" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:20 #: ../../source/changelog/0.15.0-changelog.rst:48 msgid "GameDungeon" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:21 msgid "Kevin Cen +" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:22 #: ../../source/changelog/0.15.0-changelog.rst:50 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:23 msgid "Leo Xu" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:24 msgid "Lucas Ricci" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:25 #: ../../source/changelog/0.15.0-changelog.rst:52 msgid "Marcin Serwin" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:26 msgid "Michael McNeil Forbes +" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:27 msgid "Mysaa" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:28 #: ../../source/changelog/0.15.0-changelog.rst:53 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:29 msgid "Pierre Couy +" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:30 msgid "Simon Ellmann +" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:31 msgid "Tommy Chu +" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:32 msgid "Viicos" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:33 #: ../../source/changelog/0.15.0-changelog.rst:58 msgid "ad_chaos" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:34 msgid "betafcc +" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:35 msgid "friedkeenan" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:36 #: ../../source/changelog/0.15.0-changelog.rst:60 msgid "icedcoffeeee" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:37 msgid "vmoros +" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:38 msgid "鹤翔万里" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:41 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:45 msgid "Christopher Besch" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:47 msgid "Eshaan Naga Venkata" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:49 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:51 msgid "Marcin Kurczewski" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:54 msgid "Raghav Goel" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:55 msgid "RomainJMend" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:56 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:57 msgid "Tommy Chu" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:59 msgid "betafcc" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:63 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:65 msgid "A total of 71 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:68 msgid "Breaking changes" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:71 msgid ":pr:`2476`: Improved structure of the :mod:`.mobject` module" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:71 msgid "Arrow tips now have to be imported from ``manim.mobject.geometry.tips`` instead of ``manim.mobject.geometry``." msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:75 msgid ":pr:`2387`: Refactored :class:`~.BarChart` and made it inherit from :class:`~.Axes`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:74 msgid ":class:`~.BarChart` now inherits from :class:`~.Axes`, allowing it to use :class:`~.Axes`' methods. Also improves :class:`~.BarChart`'s configuration and ease of use." msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:75 msgid "Added :meth:`~.BarChart.get_bar_labels` to annotate the value of each bar of a :class:`~.BarChart`." msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:78 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:81 msgid ":pr:`2568`: Removed Deprecated Methods" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:81 msgid "Removed methods and classes that were deprecated since v0.10.0 and v0.11.0" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:83 msgid ":pr:`2457`: Deprecated :class:`.ShowCreationThenFadeOut`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:87 msgid "New features" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:89 msgid ":pr:`2442`: Added ``media_embed`` config option to control whether media in Jupyter notebooks is embedded" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:96 msgid ":pr:`2504`: Added finer control over :meth:`.Scene.wait` being static (i.e., no updaters) or not" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:93 msgid "Added keyword argument ``frozen_frame`` to :class:`.Wait` and :meth:`.Scene.wait`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:94 msgid "New convenience method: :meth:`.Scene.pause` (alias for ``Scene.wait(frozen_frame=True)``)" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:95 msgid "Changed default behavior for OpenGL updaters: updater functions are now not called by default when they are added" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:96 msgid "Changed default behavior of :meth:`.Scene.should_mobjects_update`: made it respect the set value of ``Wait.frozen_frame``, changed automatic determination of frozen frame state to also consider Scene updaters" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:99 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:101 msgid ":pr:`2478`: Alternative scaling for tree graph layout" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:104 msgid ":pr:`2565`: Allowed passing vertex configuration keyword arguments to :meth:`.Graph.add_edges`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:107 msgid ":pr:`2467`: :class:`~.MathTex`, :class:`~.Tex`, :class:`~.Text` and :class:`~.MarkupText` inherit color from their parent mobjects" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:110 msgid ":pr:`2537`: Added support for PySide coordinate system" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:113 msgid ":pr:`2158`: Added OpenGL compatibility to :meth:`.ThreeDScene.add_fixed_orientation_mobjects` and :meth:`.ThreeDScene.add_fixed_in_frame_mobjects`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:116 msgid ":pr:`2535`: Implemented performance enhancement for :meth:`.VMobject.insert_n_curves_to_point_list`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:119 msgid ":pr:`2516`: Cached view matrix for :class:`~.OpenGLCamera`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:122 msgid ":pr:`2508`: Improve performance for :meth:`.Mobject.become`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:125 msgid ":pr:`2332`: Changed ``color``, ``stroke_color`` and ``fill_color`` attributes to properties" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:131 msgid ":pr:`2396`: Fixed animations introducing or removing objects" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:129 msgid ":class:`.ShowPassingFlash` now removes objects when the animation is finished" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:130 msgid "Added ``introducer`` keyword argument to :class:`.Animation` analogous to ``remover``" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:131 msgid "Updated :class:`.Graph` vertex addition handling" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:134 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:136 msgid ":pr:`2574`: Improved Error in :mod:`.utils.tex_file_writing`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:139 msgid ":pr:`2580`: Fixed :func:`.find_intersection` in :mod:`.space_ops`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:142 msgid ":pr:`2576`: Fixed a bug with animation of removal of edges from a :class:`.Graph`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:145 msgid ":pr:`2556`: Fixed showing highlighted cells when creating :class:`.Table`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:148 msgid ":pr:`2559`: Fix setting line numbers in :class:`.Text` when using ManimPango settings" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:151 msgid ":pr:`2557`: Fixed logger bug in :meth:`.Camera.make_background_from_func`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:154 msgid ":pr:`2548`: Fixed :class:`.Axes` plotting bug with logarithmic x-axis" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:157 msgid ":pr:`1547`: Fixed certain unicode characters in users' paths causing issues on Windows" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:160 msgid ":pr:`2526`: Fixed segfault when using ``--enable_gui``" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:163 msgid ":pr:`2538`: Fixed flickering OpenGL preview when using ``frozen_frame``" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:166 msgid ":pr:`2528`: Fixed custom naming of gifs and added some tests" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:169 msgid ":pr:`2487`: Fixed :meth:`.ThreeDCamera.remove_fixed_orientation_mobjects`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:172 msgid ":pr:`2530`: Use single source of truth for default text values" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:175 msgid ":pr:`2494`: Fixed an issue related to previewing gifs" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:178 msgid ":pr:`2490`: Fixed order of transformation application in :class:`~.SVGMobject`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:181 msgid ":pr:`2357`: Fixed ``screeninfo.get_monitors`` for MacOS" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:184 msgid ":pr:`2444`: Fixed :meth:`.VectorScene.add_axes`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:188 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:190 msgid ":pr:`2560`: Refactored more docstrings in :mod:`.geometry`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:193 msgid ":pr:`2571`: Refactored docstrings in :mod:`.graphing`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:196 msgid ":pr:`2569`: Refactored docstrings in :mod:`.geometry`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:198 msgid ":pr:`2549`: Added a page for internals which links to our GitHub wiki" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:201 msgid ":pr:`2458`: Improved documentation for :class:`.Rotate`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:204 msgid ":pr:`2459`: Added examples to some transform animations" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:207 msgid ":pr:`2517`: Added guide on profiling and improving performance" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:210 msgid ":pr:`2518`: Added imports to examples for ``deprecation`` decorator" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:213 msgid ":pr:`2499`: Improved help text for ``--write_to_movie``" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:216 msgid ":pr:`2465`: Added documentation for :func:`.index_labels`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:219 msgid ":pr:`2495`: Updated minimal LaTeX installation instructions" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:222 msgid ":pr:`2500`: Added note about contributions during refactor period" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:225 msgid ":pr:`2431`: Changed example in :meth:`.Surface.set_fill_by_value`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:228 msgid ":pr:`2485`: Fixed some typos in documentation" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:231 msgid ":pr:`2493`: Fixed typo in documentation for parameters of :class:`.Square`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:234 msgid ":pr:`2482`: Updated Python version requirement in installation guide" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:237 msgid ":pr:`2438`: Removed unnecessary rotation from example" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:240 msgid ":pr:`2468`: Hid more private methods from the docs" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:243 msgid ":pr:`2466`: Fixed a typo in the documentation for plugins" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:246 msgid ":pr:`2448`: Improvements to the ``.pot`` files cleaning system" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:249 msgid ":pr:`2436`: Fixed typo and improved example in building blocks tutorial" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:253 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:255 msgid ":pr:`2554`: Removed ``Remove-Item`` calls for MSYS2 Python" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:258 msgid ":pr:`2531`: Added a GitHub Action for automatic validation of citation metadata" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:261 msgid ":pr:`2536`: Upgraded version of setup-ffmpeg CI action" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:264 msgid ":pr:`2484`: Updated tinytex download URL" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:268 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:270 msgid ":pr:`2573`: Moved :mod:`.value_tracker` back inside :mod:`.mobject`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:273 msgid ":pr:`2566`: Removed unused livestream-related imports and functions from :mod:`.scene_file_writer`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:276 msgid ":pr:`2524`: Reworked :mod:`.space_ops`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:279 msgid ":pr:`2519`: Removed outdated comment" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:282 msgid ":pr:`2503`: Removed unused imports" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:285 msgid ":pr:`2475`: Removed setuptools dependency" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:288 msgid ":pr:`2472`: Removed unnecessary comment in :mod:`.simple_functions`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:291 msgid ":pr:`2429`: Upgraded to future-style type annotations" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:294 msgid ":pr:`2464`: Bump pillow from 8.4.0 to 9.0.0" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:297 msgid ":pr:`2376`: Updated dependencies for Python 3.10" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:305 msgid ":pr:`2437`: Cleaned up :mod:`.simple_functions`" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:301 msgid "Removed ``fdiv`` as in all cases where it was used, it was just doing the same thing as numpy array division." msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:302 msgid "Replaced old implementation of the choose function with scipy's implementation" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:303 msgid "Use ``lru_cache`` (least recently used cache) for caching the choose function. Since it's only used for beziers, only 2 choose k and 3 choose k will be used, hence a size of 10 should be enough." msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:304 msgid "Removed ``clip_in_place`` in favor of ``np.clip``" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:305 msgid "Removed one use of ``clip_in_place`` that wasn't actually doing anything" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:307 msgid ":pr:`2439`: Removed twitter template from scripts" msgstr "" #: ../../source/changelog/0.15.0-changelog.rst:311 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.15.1-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.15.1-changelog.rst:3 msgid "v0.15.1" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:5 msgid "March 08, 2022" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:10 msgid "A total of 9 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:14 #: ../../source/changelog/0.15.1-changelog.rst:24 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:15 msgid "Nicolai Weitkemper" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:16 msgid "Yuchen +" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:17 #: ../../source/changelog/0.15.1-changelog.rst:28 msgid "ad_chaos" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:20 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:23 msgid "Alex Lembcke" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:25 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:26 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:27 msgid "Raghav Goel" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:29 msgid "icedcoffeeee" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:32 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:34 msgid "A total of 9 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:37 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:39 msgid ":pr:`2602`: Support groups in :class:`.TransformMatchingTex`" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:43 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:45 msgid ":pr:`2594`: Fixed render flow issues with introducer animations" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:48 msgid ":pr:`2584`: Fixed bug with invalid color type ``None``" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:51 msgid ":pr:`2587`: Fixed bug with rendering Tex string that contain ``%``" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:54 msgid ":pr:`2593`: Fixed bug with displaying images in Jupyter Notebooks when ``config.media_embed`` is set to ``False``" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:58 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:60 msgid ":pr:`2570`: Refactored docstrings in :mod:`.coordinate_systems`" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:63 msgid ":pr:`2603`: Reduced the number of warnings during documentation build" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:67 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:69 msgid ":pr:`2578`: Fixed incorrect type hint for color property of :class:`.Text`" msgstr "" #: ../../source/changelog/0.15.1-changelog.rst:73 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.15.2-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.15.2-changelog.rst:3 msgid "v0.15.2" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:5 msgid "April 25, 2022" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:10 msgid "A total of 33 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:14 msgid "Bailey Powers +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:15 #: ../../source/changelog/0.15.2-changelog.rst:44 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:16 msgid "Dan Walsh +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:17 msgid "Darigov Research" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:18 #: ../../source/changelog/0.15.2-changelog.rst:46 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:19 msgid "David Millard +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:20 msgid "Hamidreza Hashemi +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:21 #: ../../source/changelog/0.15.2-changelog.rst:49 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:22 #: ../../source/changelog/0.15.2-changelog.rst:50 msgid "Jason Villanueva" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:23 msgid "Jonathan Alpert +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:24 msgid "Joy Bhalla" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:25 msgid "Kian Cross +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:26 msgid "Luca +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:27 msgid "Mohsin Shaikh +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:28 #: ../../source/changelog/0.15.2-changelog.rst:53 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:29 msgid "Prismo +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:30 #: ../../source/changelog/0.15.2-changelog.rst:55 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:31 msgid "WillSoltas +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:32 #: ../../source/changelog/0.15.2-changelog.rst:56 msgid "ad_chaos" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:33 msgid "darkways +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:34 msgid "dawn*squirryl +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:35 #: ../../source/changelog/0.15.2-changelog.rst:59 msgid "icedcoffeeee" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:36 #: ../../source/changelog/0.15.2-changelog.rst:60 msgid "peaceheis" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:37 msgid "sparshg" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:38 msgid "trickypr +" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:41 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:45 msgid "Dan Walsh" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:47 msgid "GameDungeon" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:48 msgid "Hugues Devimeux" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:51 msgid "Jonathan Alpert" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:52 msgid "Luca" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:54 msgid "Prismo" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:57 msgid "darkways" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:58 msgid "hickmott99" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:63 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:65 msgid "A total of 39 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:68 msgid "New features" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:74 msgid ":pr:`1975`: Improved CLI help page styling" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:71 msgid "Updates dependencies on Click and Cloup libraries for CLI help page styling." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:72 msgid "Removed the dependency on click-default-group." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:73 msgid "Added ``no_args_is_help`` parameter for ``manim render`` to allow easy access to help page." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:74 msgid "Added note to ``manim`` help page epilog on how to access other command help pages." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:77 msgid ":pr:`2404`: Add :class:`.SpiralIn` Animation" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:77 msgid "Make :class:`.ManimBanner` to use :class:`.SpiralIn`." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:79 msgid ":pr:`2534`: Implement :class:`~.OpenGLImageMobject`" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:82 msgid ":pr:`2684`: Created a more accessible way to create Angles with line.py angle function - :meth:`.Angle.from_three_points`" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:86 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:88 msgid ":pr:`2062`: Reuse shader wrappers and shader data" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:92 msgid ":pr:`2642`: Migrated ``file_ops.py`` and ``scene_file_writer.py`` from os.path to Pathlib" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:92 msgid "In ``file_ops.py`` and ``scene_file_writer.py``: Uses of str type file names have been mostly (see further information) converted to pathlib's Path objects. Uses of ``os.path`` methods have been converted to equivalent pathlib methods." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:94 msgid ":pr:`2655`: Fix :func:`.assert_is_mobject_method` when using OpenGL" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:97 msgid ":pr:`2665`: Improved handling of attributes when using the ``.animate`` syntax" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:102 msgid ":pr:`2674`: Document and type ``simple_functions.py``" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:101 msgid "Add documentation for ``simple_functions.py``." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:102 msgid "Small additions with some extra clarity for these functions." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:105 msgid ":pr:`2693`: Allow using :meth:`.MovingCamera.auto_zoom` without animation" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:105 msgid "Allows auto zooming camera without having to play an animation by passing an ``animation=False`` argument" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:108 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:110 msgid ":pr:`2546`: Fixed a file logging bug and some maintenance" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:116 msgid ":pr:`2597`: Fix Bug in :class:`.Uncreate` with ``rate_func`` via introducing new parameter ``reversed`` to :class:`.Animation`" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:114 msgid "Refractor the :class:`.Uncreate`. The new implementation uses a flag member ``reversed``. Set it to ``True`` and its superclass handles the reverse." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:115 msgid "Introduce a bool parameter ``reversed`` to :class:`.Animation`. It decides whether the animation needs to be played backwards. Default to be False." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:116 msgid "Add conditional branches in :meth:`.Animation.get_sub_alpha`. If the parameter ``reversed`` is True, it would set ``rate_func(t)`` to ``rate_func(1 - t)``." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:118 msgid ":pr:`2613`: Fixed bug in :meth:`.Circle.point_at_angle` when the angle is not in the interval :math:`[0, 2\\pi]`" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:121 msgid ":pr:`2634`: Fix background lines drawn twice in :class:`.NumberPlane`" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:124 msgid ":pr:`2648`: Handle user-defined centers for Wiggle animation" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:128 msgid ":pr:`2658`: Fix arguments of overridden ``set_style`` for :class:`.BackgroundRectangle`" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:128 msgid "Using :class:`.Write` animation on a :class:`.Text` object with ``.add_background_rectangle()`` applied no longer generates a ``TypeError``." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:130 msgid ":pr:`2668`: (Re)set background color of :class:`.OpenGLRenderer` when initializing scene" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:133 msgid ":pr:`2676`: Fixed propagation of custom attributes in animations for the OpenGL renderer" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:136 msgid ":pr:`2688`: Fixed two minor issues of :class:`.SpiralIn` and :class:`.ManimBanner`" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:140 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:142 msgid ":pr:`2609`: Copyedit troubleshooting.rst" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:145 msgid ":pr:`2610`: Add example PolygonOnAxes" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:148 msgid ":pr:`2617`: Re-added :mod:`.value_tracker` documentation" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:151 msgid ":pr:`2619`: Improve Example for arrange_in_grid" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:154 msgid ":pr:`2620`: Fixed typo in :meth:`.Animation.is_introducer`" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:158 msgid ":pr:`2640`: Copyedited Documentation" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:158 msgid "Reviewed ``tutorials/configurations.rst``. Edited simple mistakes such as Manim not being capitalized and commas." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:160 msgid ":pr:`2649`: Document and type utils/iterables.py" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:163 msgid ":pr:`2651`: Update copyright year in documentation to 2020-2022" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:165 msgid ":pr:`2663`: Added documentation for scene updater functions" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:168 msgid ":pr:`2686`: Add instructions to install extra dependencies with poetry" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:172 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:174 msgid ":pr:`2561`: Run tests on Linux-aarch64" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:177 msgid ":pr:`2656`: Fixed incompatibility with black version" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:181 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:184 msgid ":pr:`2630`: Remove WebGL renderer" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:184 msgid "The WebGL renderer is broken and unmaintained. The support for it in Manim is removed." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:186 msgid ":pr:`2652`: Update ``cloup`` version to 0.13.0 from 0.7.0" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:189 msgid ":pr:`2678`: Require ``backports-cached-property`` only for Python < 3.8" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:193 msgid ":pr:`2685`: Migrate from ``os.path`` to ``pathlib`` in testing scripts" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:193 msgid "This pull request changes a number of instances of ``os.path`` to Pathlib objects and functions. In addition, this PR modifies the SVGMobject constructor to accept both a Pathlib object or a string variable pathname its constructor." msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:195 msgid ":pr:`2691`: Removed :class:`CameraFrame`" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:198 msgid ":pr:`2696`: Made changelog generation run in parallel plus further improvements to ``scripts/dev_changelog.py``" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:201 msgid ":pr:`2697`: Sort PRs by number in changelog sections before writing" msgstr "" #: ../../source/changelog/0.15.2-changelog.rst:205 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.16.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.16.0-changelog.rst:3 msgid "v0.16.0" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:5 msgid "July 13, 2022" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:10 msgid "A total of 44 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:14 #: ../../source/changelog/0.16.0-changelog.rst:51 msgid "Alex Lembcke" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:15 msgid "Baroudi Aymen +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:16 #: ../../source/changelog/0.16.0-changelog.rst:52 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:17 msgid "Charalampos Georgiou +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:18 msgid "Cindy Park +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:19 msgid "Ejar +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:20 msgid "Francesco Frassinelli +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:21 msgid "Francisco Manríquez Novoa +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:22 msgid "Jacob Evan Shreve +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:23 msgid "Jaime Santos +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:24 #: ../../source/changelog/0.16.0-changelog.rst:58 msgid "Jonathan Alpert" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:25 msgid "Joshua Mankelow +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:26 msgid "Kevin Lubick +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:27 #: ../../source/changelog/0.16.0-changelog.rst:60 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:28 msgid "Lingren Kong +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:29 msgid "Logen +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:30 #: ../../source/changelog/0.16.0-changelog.rst:61 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:31 msgid "Noam Zaks" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:32 msgid "Pedro Lamkowski +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:33 #: ../../source/changelog/0.16.0-changelog.rst:64 msgid "Raghav Goel" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:34 msgid "Simeon Widdis" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:35 #: ../../source/changelog/0.16.0-changelog.rst:66 msgid "Sparsh Goenka" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:36 msgid "TornaxO7 +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:37 msgid "Tristan Schulz +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:38 msgid "WillSoltas" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:39 #: ../../source/changelog/0.16.0-changelog.rst:69 msgid "ad_chaos" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:40 msgid "conor-oneill-2 +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:41 msgid "fcrozatier +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:42 msgid "mooncaker816 +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:43 msgid "niklebedenko +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:44 msgid "nyabkun +" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:45 msgid "quark67" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:48 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:53 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:54 msgid "Francesco Frassinelli" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:55 msgid "Francisco Manríquez Novoa" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:56 msgid "Gianluca Gippetto" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:57 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:59 msgid "Kevin Lubick" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:62 msgid "Pedro Lamkowski" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:63 msgid "Philipp Imhof" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:65 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:67 msgid "TornaxO7" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:68 msgid "Tristan Schulz" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:70 msgid "hickmott99" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:73 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:75 msgid "A total of 56 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:78 msgid "Highlights" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:82 msgid ":pr:`2550`: New thematic guide: a deep dive into the internals of the library" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:81 msgid "This new :doc:`thematic guide ` aims to be a comprehensive walkthrough describing all the things that Manim does when you run it to produce a video." msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:84 msgid ":pr:`2732`: Improved overall structure of deployed documentation; added a dedicated :doc:`FAQ section `" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:90 msgid ":pr:`2749`: Added :class:`.ChangeSpeed`, an animation wrapper that allows to smoothly change the speed at which an animation is played" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:88 msgid "The speed of any animation can be changed by wrapping the animation with :class:`.ChangeSpeed` and passing a dictionary as ``speedinfo`` whose keys are the relative animation run time stamps and whose values are the absolute speed factors; e.g., ``{0.5: 2, 0.75: 0.25}`` smoothly speeds up the animation by a factor of 2 once it has been completed to 50%, and then it is smoothly slowed down to 1/4 of the default run speed after 75% of the animation are completed. The ``run_time`` of the animation will be adjusted to match the changed play speed." msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:90 msgid "It is also possible to add time-based updaters that respect the change in speed, use the auxiliary :meth:`.ChangeSpeed.add_updater` method to do so." msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:93 msgid "New features" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:95 msgid ":pr:`2667`: Made FFmpeg executable path configurable" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:98 msgid ":pr:`2739`: Added vectorized plotting functionality via keyword argument ``use_vectorized`` to improve performance" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:102 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:104 msgid ":pr:`2186`: Enabled filling color by value for :class:`.OpenGLSurface`, replaced ``colors`` keyword argument of :meth:`.Surface.set_fill_by_value` with ``colorscale``" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:107 msgid ":pr:`2288`: Added warning when attempting to add same mobject as child twice" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:112 msgid ":pr:`2707`: Fixed missing ``get_nth_curve_length_pieces`` method of :class:`.OpenGLVMobject`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:111 msgid "Removed duplicate definition of ``get_curve_functions_with_lengths`` in ``OpenGLVMobject``" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:112 msgid "Added definition of ``get_nth_curve_length_pieces`` to ``OpenGLVMobject``" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:114 msgid ":pr:`2709`: Improved the look of the brackets of :class:`.Matrix`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:117 msgid ":pr:`2714`: Fixed :meth:`.OpenGLVMobject.pointwise_become_partial` to improve stroke rendering" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:120 msgid ":pr:`2727`: Slight performance improvement for :class:`.ArrowVectorField` and Bézier curve computation" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:123 msgid ":pr:`2728`: Added :meth:`.VectorField.fit_to_coordinate_system` to fit a vector field to a given coordinate system" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:126 msgid ":pr:`2730`: Added note to let users find documentation of default CLI subcommand easier" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:129 msgid ":pr:`2746`: Installed ghostscript in the docker image" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:132 msgid ":pr:`2841`: Added :func:`.split_quadratic_bezier` and :func:`.subdivide_quadratic_bezier`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:135 msgid ":pr:`2842`: CLI: Moved functionality from ``manim new`` to ``manim init`` and added deprecation warning for ``manim new``" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:138 msgid ":pr:`2866`: Reorganize test files to match library module structure" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:142 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:144 msgid ":pr:`2567`: Use tempconfig for every scene render" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:147 msgid ":pr:`2638`: Fixed :meth:`BarChart.change_bar_values` not updating when height is 0" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:150 msgid ":pr:`2661`: Fixed tip resize functionality for :class:`.Axes` to match documentation" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:153 msgid ":pr:`2703`: Default to utf-8 when reading files in :class:`.Code`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:156 msgid ":pr:`2721`: Fixed bad text slicing for lines in :class:`.Paragraph`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:159 msgid ":pr:`2725`: Fixed wrong indentation in :class:`.Code`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:162 msgid ":pr:`2734`: Fixed OpenGL segfaults when running :meth:`.Scene.play` or :meth:`.Scene.wait` in interactive mode" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:165 msgid ":pr:`2753`: Fixed multiplatform builds for docker images in pipeline" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:168 msgid ":pr:`2757`: Added missing ``__init__.py`` file in :mod:`.docbuild` module" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:171 msgid ":pr:`2770`: Fixed bug in :meth:`.VMobject.proportion_from_point` that caused proportions greater than 1 to be returned" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:174 msgid ":pr:`2826`: Fixed leaked mobjects coming from :class:`.TransformMatchingAbstractBase`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:177 msgid ":pr:`2870`: Fixed issue with ``manim init scene SCENE_NAME filename.py`` and removed necessity of ``main.py`` to be present in working directory" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:181 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:183 msgid ":pr:`2704`: Updated URL to Pango Markup formatting page" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:186 msgid ":pr:`2716`: Improved the order of the reference manuals" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:189 msgid ":pr:`2720`: Fixed typo in docstring of :class:`.Angle`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:192 msgid ":pr:`2722`: Fixed typos in docstrings of classes in :mod:`.mobject.table`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:195 msgid ":pr:`2726`: Edited note on :class:`.NumberPlane` length and added another example" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:198 msgid ":pr:`2740`: Fixed documentation of :meth:`.Cylinder.get_direction`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:201 msgid ":pr:`2755`: Fixed docstring of :meth:`.VMobject.get_end_anchors`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:204 msgid ":pr:`2760`: Removed ``cmake`` from the MacOS installation section" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:207 msgid ":pr:`2767`: Added more questions and answers to FAQ section, new :doc:`OpenGL FAQ `" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:210 msgid ":pr:`2771`: Added documentation and testing for ``path_func`` keyword argument of :class:`.Transform`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:213 msgid ":pr:`2828`: Removed suggestion issue template, added FAQ answer regarding proposing new features" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:216 msgid ":pr:`2849`: Added example for ``path_arc`` keyword argument of :class:`.Transform`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:219 msgid ":pr:`2851`: Added an example on constructing a (neural) network using a partite :class:`.Graph`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:222 msgid ":pr:`2855`: Added implicit ``docker.io/`` URL base in reference to docker images" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:225 msgid ":pr:`2861`: Added docstring for :meth:`.CoordinateSystem.plot_parametric_curve`" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:229 msgid "Changes concerning the testing system" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:231 msgid ":pr:`2743`: Replaced ``assert`` statements with with assertion functions from ``np.testing``" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:235 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:237 msgid ":pr:`2700`: CI: updated Python versions" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:240 msgid ":pr:`2701`: CI: added a workflow to publish docker image after releases and commits to main branch" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:244 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:246 msgid ":pr:`2680`: Increased minimum required version of ``numpy`` to 1.19" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:249 msgid ":pr:`2687`: Migrated from ``os.path`` to ``pathlib`` in :class:`.SVGMobject` and other locations" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:252 msgid ":pr:`2715`: Updated deprecated ``pillow`` constants" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:255 msgid ":pr:`2735`: Bump pyjwt from 2.3.0 to 2.4.0" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:258 msgid ":pr:`2748`: Bump pillow from 9.1.0 to 9.1.1" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:261 msgid ":pr:`2751`: Fixed flake C417 and improved a comment" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:264 msgid ":pr:`2825`: Bump notebook from 6.4.11 to 6.4.12" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:267 msgid ":pr:`2864`: Updated lockfile" msgstr "" #: ../../source/changelog/0.16.0-changelog.rst:271 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.2.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.2.0-changelog.rst:3 msgid "v0.2.0" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:5 msgid "January 1, 2021" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:7 msgid "The changes since Manim Community release v0.1.1 are listed below." msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:10 msgid "Breaking Changes" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:12 msgid "Remove all CONFIG dictionaries and all calls to ``digest_config`` and allow passing options directly to the constructor of the corresponding classes (:pr:`783`)." msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:15 msgid "Practically, this means that old constructions using ``CONFIG`` like::" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:22 msgid "where corresponding objects were then instantiated as ``my_mobject = SomeMobject()`` should now be created simply using ``my_mobject = SomeMobject(my_awesome_property=42)``." msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:25 msgid "Remove old syntax for animating mobject methods by passing the methods and arguments to ``self.play``, and use a new syntax featuring the ``animate`` property (:pr:`881`)." msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:28 msgid "For example: the old-style ``play`` call ::" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:33 msgid "should be replaced with the new following call using the ``animate`` property::" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:38 msgid "New Features" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:40 msgid "Added creation animation for :class:`~.ManimBanner` (:pr:`814`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:41 msgid "Added some documentation to :meth:`~.Scene.construct` (:pr:`753`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:42 msgid "Added a black and white monochromatic version of Manim's logo (:pr:`826`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:43 msgid "Added support for a plugin system (``manim plugin`` subcommand + documentation) (:pr:`784`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:44 msgid "Implemented ``__add__``, ``__iadd__``, ``__sub__``, and ``__isub__`` for :class:`~.Mobject` (allowing for notation like ``some_vgroup + some_mobject``) (:pr:`790`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:45 msgid "Added type hints to several files in the library (:pr:`835`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:46 msgid "Added some examples to :mod:`~.animation.creation` (:pr:`820`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:47 msgid "Added some examples to :class:`~.DashedLine` and :class:`~.CurvesAsSubmobjects` (:pr:`833`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:48 msgid "Added new implementation for text rendered with Pango, :class:`~.MarkupText`, which can be formatted with an HTML-like syntax (:pr:`855`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:49 msgid "Added Fading in and out examples and deprecation of ``FadeInFromDown`` and ``FadeOutAndShiftDown`` (:pr:`827`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:50 msgid "Added example for :class:`~.MoveAlongPath` to the docs (:pr:`873`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:51 msgid "Added ambient rotate for other angles - theta, phi, gamma (:pr:`660`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:52 msgid "Use custom bindings for Pango (:pr:`878`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:53 msgid "Added :class:`~.Graph`, a basic implementation for (graph theory) graphs (:pr:`861`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:54 msgid "Allow for chaining methods when using the new ``.animate`` syntax in :meth:`~.Scene.play` (:pr:`889`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:57 msgid "Bugfixes" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:59 msgid "Fix doctests in .rst files (:pr:`797`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:60 msgid "Fix failing doctest after adding ``manim plugin`` subcommand (:pr:`831`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:61 msgid "Normalize the direction vector in :meth:`~.mobject_update_utils.always_shift` (:pr:`839`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:62 msgid "Add ``disable_ligatures`` to :class:`~.Text` (via :pr:`804`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:63 msgid "Make scene caching aware of order of Mobjects (:pr:`845`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:64 msgid "Fix :class:`~.CairoText` to work with new config structure (:pr:`858`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:65 msgid "Added missing argument to classes inheriting from :class:`~.Matrix` (:pr:`859`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:66 msgid "Fixed: ``z_index`` of mobjects contained in others as submobjects is now properly respected (:pr:`872`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:67 msgid "Let :meth:`~.ParametricSurface.set_fill_by_checkboard` return the modified surface to allow method chaining (:pr:`883`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:68 msgid "Mobjects added during an updater are added to ``Scene.moving_mobjects`` (:pr:`838`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:69 msgid "Pass background color to JS renderer (:pr:`876`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:70 msgid "Small fixes to docstrings. Tiny cleanups. Remove ``digest_mobject_attrs``. (:pr:`834`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:71 msgid "Added closed shape detection in :class:`~.DashedVMobject` in order to achieve an even dash pattern (:pr:`884`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:72 msgid "Fix Spelling in docstrings and variables across the library (:pr:`890`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:75 msgid "Other changes" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:77 msgid "Change library name to manim (:pr:`811`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:78 msgid "Docker: use local files when building an image (:pr:`803`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:79 msgid "Let ffmpeg render partial movie files directly instead of temp files (:pr:`817`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:80 msgid "``manimce`` to ``manim`` & capitalizing Manim in readme (:pr:`794`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:81 msgid "Added flowchart for different docstring categories (:pr:`828`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:82 msgid "Improve example in module docstring of :mod:`~.animation.creation` + explicitly document buff parameter in :meth:`~.Mobject.arrange` (:pr:`825`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:83 msgid "Disable CI pipeline for Python 3.6 (:pr:`823`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:84 msgid "Update URLs in docs (:pr:`832`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:85 msgid "Move upcoming changelog to GitHub-wiki (:pr:`822`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:86 msgid "Change badges in readme (:pr:`854`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:87 msgid "Exclude generated gRPC files from source control (:pr:`868`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:88 msgid "Added linguist-generated attribute to ``.gitattributes`` (:pr:`877`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:89 msgid "Cleanup: removed inheritance from ``object`` for some classes, refactor some imports (:pr:`795`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:90 msgid "Change several ``str.format()`` to ``f``-strings (:pr:`867`)" msgstr "" #: ../../source/changelog/0.2.0-changelog.rst:91 msgid "Update javascript renderer (:pr:`830`)" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.3.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.3.0-changelog.rst:3 msgid "v0.3.0" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:5 msgid "February 1, 2021" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:7 msgid "The changes since Manim Community release v0.2.0 are listed below." msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:11 msgid "New Features" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:13 msgid ":pr:`945`: :meth:`~.Graph.change_layout` method for :class:`~.Graph` mobject" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:14 msgid ":pr:`943`: IPython %%manim magic" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:15 msgid ":pr:`970`: Added ``--version`` command line flag" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:16 msgid ":pr:`948`: Allow passing a code string to :class:`~.Code`" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:17 msgid ":pr:`917`: Allow overriding new-style method animations" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:18 msgid ":pr:`756`: Allow setting frame_height and frame_width via config file" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:19 msgid ":pr:`939`: Added custom font files support" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:20 msgid ":pr:`892`: Added ManimCommunity colors" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:21 msgid ":pr:`922`: Tree layout for Graph mobject" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:22 msgid ":pr:`935`: Added code of conduct" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:23 msgid ":pr:`916`: Multi-column layout for partite graphs" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:24 msgid ":pr:`742`: Units: Pixels, Munits, Percent in :mod:`~.utils.unit`" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:25 msgid ":pr:`893`: Convenience method :meth:`~.Graph.from_networkx` for creating a graph from a networkx graph" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:28 msgid "Bugfixes and Enhancements" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:30 msgid ":pr:`988`: Fix Windows CI pipeline by adding missing LaTeX package" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:31 msgid ":pr:`961`: Added typings and docs for vectorized mobjects and bezier related functions" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:32 msgid ":pr:`977`: JupyterLab docker image and documentation for manim and IPython" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:33 msgid ":pr:`985`: Fix variable name for webgl renderer" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:34 msgid ":pr:`954`: Fix edges lagging behind vertices in animations of graphs" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:35 msgid ":pr:`980`: Allow usage of custom Pygments styles in Code" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:36 msgid ":pr:`952`: Allow passing tween information to the WebGL frontend" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:37 msgid ":pr:`978`: Fix ``possible_paths`` not printing in ``code_mobject``" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:38 msgid ":pr:`976`: Update ``ManimPango``" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:39 msgid ":pr:`967`: Automatically import plugins" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:40 msgid ":pr:`971`: Make ManimCommunity look consistent" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:41 msgid ":pr:`957`: Raise ``NotImplementedError`` when trying to chain overridden method animations" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:42 msgid ":pr:`947`: Several fixes and improvements for :class:`~.PointCloundDot`" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:43 msgid ":pr:`923`: Documentation: move installation instructions for developers to page for developers" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:44 msgid ":pr:`964`: Added unit test for :class:`~.NumberLine`'s unit vector" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:45 msgid ":pr:`960`: Magnitude of :class:`~.NumberLine`'s unit vector should be ``unit_size``, not 1" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:46 msgid ":pr:`958`: Fix code formatting in ``utils/debug.py``" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:47 msgid ":pr:`953`: Update license year" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:48 msgid ":pr:`944`: Interpolate stroke opacity in :class:`~.FadeIn` and update ``stroke_opacity`` and ``fill_opacity`` in :meth:`~.VMobject.set_stroke` and :meth:`~.VMobject.set_fill`" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:49 msgid ":pr:`865`: Rename ``get_submobject_index_labels`` to ``index_labels``" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:50 msgid ":pr:`941`: Added keyword arguments ``x_min``, ``x_max``, ``y_min``, ``y_max`` to :class:`~.ThreeDAxes`" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:51 msgid ":pr:`886`: Let the render progress bar show details about the rendered animation again" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:52 msgid ":pr:`936`: Fix :class:`~.BulletedList` TeX environment problem and add a typing to ``get_module``" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:53 msgid ":pr:`938`: Remove dependency on progressbar" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:54 msgid ":pr:`937`: Change 'brew cask install' to 'brew install --cask' for CI pipeline" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:55 msgid ":pr:`933`: Make matrix work with lists again" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:56 msgid ":pr:`932`: Correctly parse ``log_dir`` option" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:57 msgid ":pr:`920`: Raise error if markup in :class:`~.MarkupText` is invalid" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:58 msgid ":pr:`929`: Raise an error if a :class:`~.Matrix` object is created with < 2-dimensional input" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:59 msgid ":pr:`907`: Make Scene.add_sound work again (when running with ``--disable_caching``)" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:60 msgid ":pr:`906`: Allow new-style method animation to be used in animation groups" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:61 msgid ":pr:`908`: Removed deprecated command line arguments from documentation" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:62 msgid ":pr:`903`: Tiny grammar improvements" msgstr "" #: ../../source/changelog/0.3.0-changelog.rst:63 msgid ":pr:`904`: Added blank line between imports and class example" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.4.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.4.0-changelog.rst:3 msgid "v0.4.0" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:5 msgid "March 3, 2021" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:7 msgid "The changes since Manim Community release v0.3.0 are listed below." msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:10 msgid "Breaking Changes" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:12 msgid ":pr:`915`: Manim's SVG engine has been reworked and is able to handle a wider variations of SVG files. In particular: fill and stroke properties are now retained from the original files. Breaking change: ``VMobjectFromSVGPathstring`` is deprecated and has been renamed to ``SVGPathMobject``." msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:16 msgid "New Features" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:18 msgid ":pr:`1026`: Add 3D Mobjects: :class:`~.Cone`, :class:`~.Cylinder`, :class:`~.Line3D`, :class:`~.Arrow3D` and :class:`~.Torus`" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:19 msgid ":pr:`1047`: Add documentation and examples for :class:`~.Matrix`" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:20 msgid ":pr:`1044`: ``register_font`` is available for macOS" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:21 msgid ":pr:`995`: Add generic :func:`~.Mobject.set` method and compatibility layer between properties and ``get_*``/``set_*`` methods" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:24 msgid "Bugfixes and Enhancements" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:26 msgid ":pr:`981`: Fixed hot reload functionality for the WebGL renderer on Windows" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:27 msgid ":pr:`1053`: Repair links to source code in stable version of documentation" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:28 msgid ":pr:`1067`: Add ManimPango to ReadTheDocs requirements" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:29 msgid ":pr:`1058`: Replace ```` syntax by Pango's ```` for coloring parts of :class:`~.MarkupText` and allow using colors for underline, overline and strikethrough in MarkupText" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:30 msgid ":pr:`1063`: Fix documentation related to ``.animate``" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:31 msgid ":pr:`1065`: Remove duplicate word 'vector'" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:32 msgid ":pr:`1060`: Update Linux installation instructions to mention the installation of Pango" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:33 msgid ":pr:`1050`: Ensure that the user-supplied stroke color and width gets applied to :class:`~.Cross`" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:34 msgid ":pr:`1059`: More descriptive error when accessing an unhandled mobject attribute" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:35 msgid ":pr:`1048`: Use absolute path in ``make_and_open_docs.py``" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:36 msgid ":pr:`1000`: Remove ``MovingCameraScene.setup`` and ``MovingCameraScene.camera_frame``" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:37 msgid ":pr:`1051`: Corrections for setting stroke related attributes on :class:`~.VMobject`" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:38 msgid ":pr:`1043`: Make :class:`~.CubicBezier` explicitly accept four points" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:39 msgid ":pr:`1046`: Use any version of ``importlib-metadata``" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:40 msgid ":pr:`1030`: Parse ``.log`` file and try to print LaTeX errors if compilation fails" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:41 msgid ":pr:`1015`: Documentation: Add more explicit instructions related to ``tlmgr``" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:42 msgid ":pr:`1028`: Documentation: Update installation guide on mac with Apple Silicon" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:43 msgid ":pr:`1032`: Remove ``Square.side_length`` property" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:44 msgid ":pr:`1031`: Fix link to wikipedia vector graphics page" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:45 msgid ":pr:`1021`: Documentation: Added example to :class:`~.CubicBezier`" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:46 msgid ":pr:`1017`: Added ``progress_bar`` to ``digest_args`` to fix the ``--progress_bar`` CLI flag" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:47 msgid ":pr:`1018`: Remove redundancy in :class:`~.FunctionGraph` arguments" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:48 msgid ":pr:`1024`: Migrate ``width`` / ``height`` / ``depth`` to properties" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:49 msgid ":pr:`1022`: Fix ``-p`` flag when passing ``-s``" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:50 msgid ":pr:`1008`: CI pipeline: fix release asset upload" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:51 msgid ":pr:`983`: Make sure last frame for animations with updaters is correct" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:52 msgid ":pr:`984`: Add manim version to CLI output, append version name for generated ``.gif`` and ``.png`` files, add version to metadata of rendered videos, change dark blue terminal text to default green" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:53 msgid ":pr:`993`: Fix setting Mobject color to a gradient by passing a list of colors in :meth:`~.VMobject.set_color`" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:54 msgid ":pr:`1003`: Fix animation :class:`~.GrowArrow`" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:55 msgid ":pr:`1010`: Disable STDIN interaction for ffmpeg concat." msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:56 msgid ":pr:`969`: Fix the ``--tex_template`` CLI flag" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:57 msgid ":pr:`989`: Fix the ``manim cfg export`` subcommand" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:58 msgid ":pr:`1005`: Fix the feature where ``-`` is used as the filename" msgstr "" #: ../../source/changelog/0.4.0-changelog.rst:59 msgid ":pr:`998`: Allow using hexadecimal color codes with 3 characters" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.5.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.5.0-changelog.rst:3 msgid "v0.5.0" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:5 msgid "April 02, 2021" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:10 msgid "A total of 35 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:14 msgid "Abel Aebker +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:15 #: ../../source/changelog/0.5.0-changelog.rst:47 msgid "Abhijith Muthyala" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:16 msgid "AntonBallmaier +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:17 msgid "Aron" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:18 #: ../../source/changelog/0.5.0-changelog.rst:48 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:19 msgid "Bogdan Stăncescu +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:20 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:21 #: ../../source/changelog/0.5.0-changelog.rst:50 msgid "Devin Neal" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:22 msgid "GameDungeon +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:23 #: ../../source/changelog/0.5.0-changelog.rst:51 msgid "Hugues Devimeux" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:24 #: ../../source/changelog/0.5.0-changelog.rst:52 msgid "Jason Villanueva" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:25 #: ../../source/changelog/0.5.0-changelog.rst:53 msgid "Kapil Sachdeva" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:26 #: ../../source/changelog/0.5.0-changelog.rst:54 msgid "KingWampy" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:27 msgid "Lionel Ray +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:28 #: ../../source/changelog/0.5.0-changelog.rst:57 msgid "Mark Miller" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:29 msgid "Mohammad Al-Fetyani +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:30 #: ../../source/changelog/0.5.0-changelog.rst:59 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:31 msgid "Niklas Dewally +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:32 msgid "Oliver +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:33 msgid "Roopesh +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:34 msgid "Seb Pearce +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:35 msgid "aebkea +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:36 msgid "friedkeenan" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:37 msgid "hydrobeam +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:38 msgid "kolibril13" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:39 msgid "sparshg" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:40 msgid "tfglynn +" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:43 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:46 msgid "Abel Aebker" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:49 msgid "Bogdan Stăncescu" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:55 msgid "Leo Torres" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:56 msgid "Lionel Ray" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:58 msgid "Mohammad Al-Fetyani" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:60 msgid "Oliver" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:61 msgid "Ricky Chon" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:62 msgid "vector67" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:65 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:67 msgid "A total of 64 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:70 msgid "Highlights" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:73 msgid ":pr:`1075`: Add OpenGL Renderer" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:73 msgid "Adds an OpenGLRenderer, OpenGLCamera, OpenGL-enabled Mobjects, and a ``--use_opengl_renderer`` flag. When this flag is passed, you can pass the ``-p`` flag to preview animations, the ``-w`` flag to generate video, and the ``-q`` flag to specify render quality. If you don't pass either the ``-p`` or the ``-w`` flag, nothing will happen. Scenes rendered with the OpenGL renderer must *only* use OpenGL-enabled Mobjects." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:76 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:80 msgid ":pr:`1124`: Deprecated :class:`ShowCreation` in favor of :class:`Create`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:79 msgid "Deprecated :class:`ShowCreation` in favor of :class:`Create` across the library with the exception of the `show_creation` boolean variable `vector_space_scene.py`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:80 msgid "Added a deprecation warning in the original :class:`ShowCreation` class." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:83 msgid ":pr:`1110`: Deprecated SmallDot + OpenGLSmallDot" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:83 msgid "`SmallDot` isn't necessary and a deprecation warning will be raised. This will be removed in a future release." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:86 msgid "New features" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:91 msgid ":pr:`1037`: Added new fade and transform animations (:class:`~.TransformMatchingShapes`, :class:`~.TransformMatchingTex`, :class:`~.FadeTransform`) from 3b1b/manim" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:89 msgid "Added new Fade animation: :class:`~FadeOutToPoint` Added :class:`~FadeTransform` and :class:`~FadeTransformPieces` for transforming mobjects and submobjects with a fade Added :class:`~TransformMatchingShapes` and :class:`~TransformMatchingTex` for transforming mobjects and tex that have matching parts" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:93 msgid ":pr:`1097`: Added 3D Mobject :class:`~.Dot3D`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:96 msgid ":pr:`1074`: Added jupyter media_width option to the config" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:100 msgid ":pr:`1107`: Added :class:`~.Unwrite` animation class to complement :class:`~.Write`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:100 msgid "Added :class:`Unwrite` which inherits from :class:`~.Write`. It automatically reverses the animation of :class:`~.Write` by passing the reversed rate function, but it also takes an additional boolean parameter `reverse` which, if `False`, renders the animation from left to right (assuming text oriented in the usual way), but if `True`, it renders right to left." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:103 msgid ":pr:`1085`: Added :class:`~.Angle` and :class:`~.RightAngle` for intersecting lines" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:103 msgid ":class:`~.Angle` and :class:`~.RightAngle` both take two lines as input. If they intersect, or share a common vertex, an angle is drawn between them. Users can customize the look of the angle and also use a dotted right angle." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:106 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:108 msgid ":pr:`1144`: Improved quality of GIFs" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:114 msgid ":pr:`1157`: Refresh triangulation on call to :meth:`~.OpenGLVMobject.apply_points_function`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:112 msgid "Rotate called apply_points_function, which was previous not subclassed by OpenGLMobject - now it is. Then, the vertex normals can be updated too." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:114 msgid "Additionally, the old_points matrix would change after rotating, making the old points / new points test irrelevant. This is addressed with a .copy call." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:116 msgid ":pr:`1151`: Added parametric function support to :class:`OpenGLSurface`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:119 msgid ":pr:`1139`: In-Code `config[\"preview\"]` Support" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:123 msgid ":pr:`1123`: Added caching, skipping, and user-specified background colors to the OpenGL renderer" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:123 msgid "OpenGL play logic has been improved to support caching and skipping with `-n` argument ( it is now similar to Cairo play logic). A random bug was fixed in OpenGLSurface and OpenGL background color can now be changed via `background_color` argument." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:128 msgid ":pr:`1118`: Allow passing animation arguments with .animate syntax" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:126 msgid "Users will now be able to do things like `obj.animate(run_time=2).method(arg)` if they want to specify animation arguments for an individual `.animate` call, and can still not specify any arguments like `obj.animate.method(arg)`." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:128 msgid "Passing animation arguments is only allowed directly after `.animate` is accessed, if passed elsewhere then a `ValueError` is raised." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:132 msgid ":pr:`718`: Rotating the numbers in y axis" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:131 msgid "In Axes, the y axis will be rotated 90deg but the numbers are also rotated and shouldn't be. Fixes this issue." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:135 msgid ":pr:`1070`: Raise FileNotFoundError when unable to locate the .cfg file specified via ``--config_file``" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:135 msgid "Raising the error will stop script execution and let the user know that there are problems with the `--config_file` location instead of reverting back to the default configuration." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:138 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:140 msgid ":pr:`1224`: Fixed :class:`~.ShowIncreasingSubsets`, :class:`~.ShowSubmobjectsOneByOne`, and :class:`~.AddTextLetterByLetter`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:143 msgid ":pr:`1201`: Prevent crash on :meth:`~.Scene.embed` for empty scenes" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:146 msgid ":pr:`1192`: Fixed issue when an animation is cached, manim can't merge the partial movie files." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:150 msgid ":pr:`1193`: Fixed using :class:`~.Animation` without a child :class:`~.Mobject` in :class:`~.AnimationGroup`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:150 msgid "`AnimationGroup` may now take `Animation` objects which do not have a child `Mobject`, such as `Wait`." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:152 msgid ":pr:`1170`: Fixed minor SVG parsing bugs" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:155 msgid ":pr:`1159`: Added support for multiple transforms in the same SVG element" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:159 msgid ":pr:`1156`: Fixed :class:`~.DrawBorderThenFill` to support OpenGL and improved type hints for some functions" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:159 msgid "Fixed a bug in :class:`~.DrawBorderThenFill` that prevented :class:`~.Write` animations from working with :class:`~.OpenGLVMobjects` and slightly improved type hints for some animation functions to include :class:`~.OpenGLVMobject`." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:162 msgid ":pr:`1134`: Fixed the `-a` flag." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:162 msgid "The ``-a`` / ``--write-all`` flag was broken. When used, it would cause Manim to crash just after beginning to render the second scene." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:165 msgid ":pr:`1115`: Fixed bugs in :class:`~.OpenGLMobject` and added :class:`ApplyMethod` support" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:165 msgid "Fixed undefined variables and converted :class:`Mobject` to :class:`OpenGLMobject`. Also, fixed assert statement in :class:`ApplyMethod`." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:171 msgid ":pr:`1092`: Refactored coordinate_systems.py, fixed bugs, added :class:`~.NumberPlane` test" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:168 msgid "The default behavior of :meth:`~.Mobject.rotate` is to rotate about the center of :class:`~.Mobject`. :class:`~.NumberLine` is symmetric about the point at the number 0 only when ``|x_min|`` == ``|x_max|``. Ideally, the rotation should coincide with the point at number 0 on the line." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:171 msgid "Added a regression test and additionally fixed some bugs introduced in :pr:`718`." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:174 msgid ":pr:`1078`: Removed stray print statements from `__main__.py`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:174 msgid "Uses rich's print traceback instead and fixes an issue in printing the version twice when `manim --version` is called." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:177 msgid ":pr:`1086`: Fixed broken line spacing in :class:`~.Text`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:177 msgid "The `line_spacing` kwarg was missing when creating :class:`Text` Mobjects; this adds it." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:180 msgid ":pr:`1083`: Corrected the shape of :class:`~.Torus`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:180 msgid ":class:`Torus` draws a surface with an elliptical cross-section when `minor_radius` is different from 1. This PR ensures the cross-section is always a circle." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:183 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:185 msgid ":pr:`1217`: Copyedited the document on testing in our documentation" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:188 msgid ":pr:`1206`: Added Docstrings to :class:`~.Mobject`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:191 msgid ":pr:`1218`: Removed BezierSpline from the example gallery" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:194 msgid ":pr:`1219`: Updated Dockerfile (include dependencies for building documentation), moved documentation to main README" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:198 msgid ":pr:`1209`: Added :ref_methods: to the manim directive" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:198 msgid "This allows class methods to be linked in the documentation. Checkout the `example references `_ below the code to see how this is used!" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:200 msgid ":pr:`1204`: Added rotation example to example gallery" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:203 msgid ":pr:`1137`: Added GitHub Wiki pages on adding testing/documentation to Sphinx Docs" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:206 msgid ":pr:`1114`: Added examples for :class:`~.Ellipse`, :class:`~.Polygon`, :class:`~.RegularPolygon`, :class:`~.Triangle` and :class:`~.RoundedRectangle`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:209 msgid ":pr:`1195`: Removed SmallDot from example" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:212 msgid ":pr:`1130`: Added pre-commit to run black and flake8, updated contributing documentation accordingly" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:216 msgid ":pr:`1138`: Moved previous version changelogs to separate files; Added a Script to generate future changelogs" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:216 msgid "This script quickly generates a changelog for whoever is making the release." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:218 msgid ":pr:`1190`: Added note in contributing guide to read the latest version of the documentation" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:221 msgid ":pr:`1188`: Added sounds example to docs" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:224 msgid ":pr:`1165`: Added documentation for installing Manim on Colab" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:227 msgid ":pr:`1128`: Added examples for :class:`~.DashedLine`, :class:`~.TangentLine`, :class:`~.Elbow`, :class:`~.Arrow`, :class:`~.Vector`, :class:`~.DoubleArrow`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:230 msgid ":pr:`1177`: Replace links to the latest version of the documentation to the stable version" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:233 msgid ":pr:`1077`: Added details to :func:`~.Mobject.get_critical_point`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:236 msgid ":pr:`1154`: Fixed some typing hints. (ints to floats)" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:239 msgid ":pr:`1036`: Added :class:`~.SurroundingRectangle` to the example gallery" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:242 msgid ":pr:`1103`: Added documentation and examples for Square, Dot, Circle and Rectangle" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:245 msgid ":pr:`1101`: Added documentation to :class:`~.Mobject`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:249 msgid ":pr:`1088`: Added new svg files to documentation and imports" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:249 msgid "In particular, SVGPathMobject, VMobjectFromPathstring, and the style_utils functions to manim's namespace." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:252 msgid ":pr:`1076`: Improve documentation for GraphScene" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:252 msgid "Updated `coords_to_point` and `point_to_coords` under `manim/scene/graph_scene.py` as the dosctring of each function confusingly described the opposite of what it is supposed to do." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:255 msgid "Changes concerning the testing system" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:257 msgid ":pr:`1160`: Enable CI testing for OpenGL" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:261 msgid ":pr:`1100`: Rewrote test cases to use sys.executable in the command instead of \"python\"" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:261 msgid "Tests would fail due to `capture()` not spawning a subshell in the correct environment, so when python was called, the test would be unable to find necessary packages." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:263 msgid ":pr:`1079`: Removed the hardcoded value, `manim`, in `test_version.py`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:267 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:269 msgid ":pr:`1213`: Updated TinyTex dependencies" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:272 msgid ":pr:`1187`: Add CodeCov to Github Workflow" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:275 msgid ":pr:`1166`: CI: Use poetry's cache dir rather than pip" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:281 msgid ":pr:`1071`: Enable pytest-cov based code coverage" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:279 msgid "Include pytest-cov as a python module as part of developer dependencies" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:280 msgid "In updating poetry to include pytest-cov, manimpango moved from version 0.2.3 to 0.2.4, and libpango1.0-dev needed to be installed in Ubuntu." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:281 msgid "Add to the CI workflow (`ci.yml`) to create and upload test coverage." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:283 msgid ":pr:`1073`: Removed \"one line summary\" from PULL_REQUEST_TEMPLATE.md" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:287 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:289 msgid ":pr:`1167`: Merge :class:`~.OpenGLMobject` and :class:`~.Mobject`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:292 msgid ":pr:`1164`: Fixed single PEP8 style in `cairo_renderer.py`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:295 msgid ":pr:`1140`: Flake8 Compat & Code Cleanup" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:305 msgid ":pr:`1019`: Refactored :meth:`~.Scene.play`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:299 msgid "Removed the _**three**_ decorators of :meth:`~.Scene.play`, in particular: caching logic and file writer logic are now included within :meth:`~.Scene.play` (it wasn't possible before, because `scene.wait` and `scene.play` were two different things)." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:300 msgid "Added `is_static_wait` attributes to Wait. (<=> if wait is a frozen frame)." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:301 msgid "Renamed and moved `scene.add_static_frame` to `renderer.freeze_current_frame`." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:302 msgid "Now when calling play without animation, it raises `ValueError` instead of just a warning." msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:303 msgid "Fixed :pr:`874` by modifying `renderer.update_skipping_status`" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:304 msgid "`renderer` starts the animation with `scene.begin_animations` (`scene.compile_animation_data` used to do this)" msgstr "" #: ../../source/changelog/0.5.0-changelog.rst:305 msgid "The run time and the time progression generation is now done in `scene.play_internal` although it'd make more sense that renderer processes it later." msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.6.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.6.0-changelog.rst:3 msgid "v0.6.0" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:5 msgid "May 02, 2021" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:10 msgid "A total of 40 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:14 #: ../../source/changelog/0.6.0-changelog.rst:47 msgid "Abel Aebker" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:15 #: ../../source/changelog/0.6.0-changelog.rst:48 msgid "Abhijith Muthyala" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:16 msgid "Adam Ryczkowski +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:17 msgid "Alex Lembcke +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:18 #: ../../source/changelog/0.6.0-changelog.rst:51 msgid "Anton Ballmaier" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:19 #: ../../source/changelog/0.6.0-changelog.rst:52 msgid "Aron" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:20 #: ../../source/changelog/0.6.0-changelog.rst:53 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:21 #: ../../source/changelog/0.6.0-changelog.rst:54 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:22 msgid "Deniz Hasler +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:23 #: ../../source/changelog/0.6.0-changelog.rst:56 msgid "Devin Neal" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:24 msgid "Elisha Hollander +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:25 msgid "Erik Tastepe +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:26 #: ../../source/changelog/0.6.0-changelog.rst:60 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:27 #: ../../source/changelog/0.6.0-changelog.rst:61 msgid "Jason Villanueva" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:28 #: ../../source/changelog/0.6.0-changelog.rst:63 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:29 #: ../../source/changelog/0.6.0-changelog.rst:64 msgid "Mark Miller" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:30 #: ../../source/changelog/0.6.0-changelog.rst:65 msgid "Mohammad Al-Fetyani" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:31 #: ../../source/changelog/0.6.0-changelog.rst:66 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:32 msgid "Newell Jensen +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:33 msgid "Nidhal Baccouri +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:34 msgid "Nikhil Garuda +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:35 msgid "Peilonrayz +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:36 #: ../../source/changelog/0.6.0-changelog.rst:71 msgid "Raghav Goel" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:37 msgid "Ricky Chon +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:38 #: ../../source/changelog/0.6.0-changelog.rst:73 msgid "friedkeenan" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:39 msgid "kamilczerwinski22 +" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:40 #: ../../source/changelog/0.6.0-changelog.rst:74 msgid "sparshg" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:43 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:46 msgid "Aathish Sivasubrahmanian" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:49 msgid "Adam Ryczkowski" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:50 msgid "Alex Lembcke" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:55 msgid "Deniz Hasler" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:57 msgid "Elisha Hollander" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:58 msgid "GameDungeon" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:59 msgid "Hugues Devimeux" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:62 msgid "KingWampy" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:67 msgid "Nidhal Baccouri" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:68 msgid "Nikhil Garuda" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:69 msgid "Oliver" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:70 msgid "Philipp Imhof" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:72 msgid "Ricky Chon" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:77 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:79 msgid "A total of 112 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:82 msgid "Breaking changes" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:85 msgid ":pr:`1347`: Restructure vector_field module and add documentation" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:85 msgid ":class`~.VectorField` is renamed to :class:`~.ArrowVectorField` and a new class :class:`~.VectorField` is added as a superclass for :class:`~.ArrowVectorField` and :class:`~.StreamLines`. :class:`~.AnimatedStreamLines` is removed. It's functionality is moved to :class:`~.StreamLines`. Added a lot of new options when working with vector fields. :class:`~.ShowPassingFlashWithThinningStrokeWidth` was moved to the indication module." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:91 msgid ":pr:`1161`: Upgrades to CoordinateSystem and graphing." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:88 msgid "Breaking changes were introduced to :class:`~.Axes`, :class:`~.ThreeDAxes`, :class:`~.NumberPlane` and :class:`~.NumberLine` All the above now use lists to construct their ranges as opposed to explicitly defining these values. `x_range` has replaced `x_min`, `x_max` and defining the step is much easier with `x_step` --> ``x_range`` : ``[x_min, x_max, x_step]``. There were also many upgrades to these classes which improve their functionality and appearance." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:91 msgid "``NumberLineOld`` was introduced to continue support for :class:`~.GraphScene`, although we are moving away from GraphScene and intend to deprecate it in a future release." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:107 msgid ":pr:`1013`: Refactored the Command Line Interface to use Click instead of Argparse" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:94 msgid "This change breaks the CLI API to organize the structure of Manim Community's commands, options, and arguments." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:96 msgid "To be more in line with POSIX compliant CLI conventions, options for commands are given *BEFORE* their arguments. In Argparse: ``manim basic.py -p -ql`` With Click: ``manim -p -ql basic.py``" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:100 msgid "Although this is primarily a refactor and most of the common options are still there, some options have been added/removed. Use the ``manim`` command's ``--help`` option, or simply run the command without providing options/arguments to view the help page with the full list of subcommands/options/arguments." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:102 msgid "Added a ``--fps``/``--frame_rate`` option which allows for custom fps that don't have to be integer (i.e. 29.97, 23.98, etc.). Users no longer have to specify the FPS from within a config file. Additionally, the ``--webgl_renderer_fps`` option has been removed. Use ``--fps`` or ``--frame_rate`` instead." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:103 msgid "Added a ``--renderer`` option which you can use to select your choice of renderer (e.g. ``--renderer=opengl``). There are currently *THREE* renderers to choose from!" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:104 msgid "Removed the ``--background_color`` option. Reassigned the ``--background_color`` option's shorthand ``-c`` to ``--config_file``." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:105 msgid "Removed the ``--leave_progress_bars`` option. Use ``--progress_bars=leave`` instead." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:106 msgid "Removed the deprecated render quality flags, in particular: ``-l``, ``-m``, ``-h``, ``-k``." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:107 msgid "Removed the ``--sound`` option. It lost support long ago with the removal of SoX." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:110 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:116 msgid ":pr:`1431`: Fix CLI bugs" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:113 msgid "Fixed conflict with ``-f`` which was previously assigned to both ``--show_in_file_browser`` and ``--format`` by removing ``-f`` from ``--format``. A warning is issued that ``-f`` will soon move to ``--format``." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:114 msgid "Added back in flags to render the files as gif/last frame. Deprecated them in favor of ``--format``." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:115 msgid "Fixed the broken ``--output_file``/``-o`` option." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:116 msgid "Fixed an issue where the ``-qh`` quality option was interpreted as ``-q`` ``-h``, prompting the help page." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:118 msgid ":pr:`1354`: Refactored a few functions in space_ops.py, deprecated :func:`~.angle_between`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:122 msgid ":pr:`1370`: Remove TexMobject and TextMobject" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:122 msgid "TexMobject and TextMobject have been deprecated for a while, they are now fully removed. Use Tex or MathTex instead." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:124 msgid ":pr:`1349`: Removed the deprecated ``SmallDot`` mobject" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:127 msgid ":pr:`1259`: Removed deprecated CairoText class" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:130 msgid "New features" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:132 msgid ":pr:`1386`: Implement utility methods for adding/removing vertices and edges of graphs; allow custom mobjects as vertices" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:136 msgid ":pr:`1385`: Added :meth:`~.Axes.get_line_graph` for plotting a line graph" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:136 msgid "Added :meth:`~.Axes.get_line_graph` that returns a line graph from lists of points along x, y and z (optional) axes." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:139 msgid ":pr:`1381`: Hot reloading for the OpenGL renderer" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:139 msgid "Rerun scene when the input file is modified" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:148 msgid ":pr:`1383`: Overhaul of the :mod:`~.animation.indication` module interfaces" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:142 msgid "Added class `Circumscribe` combining functionality of `CircleIndicate`, `AnimationOnSurroundingRectangle`, `ShowPassingFlashAround`, `ShowCreationThenDestructionAround`, `ShowCreationThenFadeAround`, which have all been deprecated." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:143 msgid "Changes to `Flash`: `flash_radius` parameter now defines inner radius of the animation. Added new parameter `time_width`." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:144 msgid "`ShowCreationThenDestruction` has been deprecated in favor of `ShowPassingFlash`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:145 msgid "Changes to `ApplyWave`: New implementation giving more flexibility with new parameters `wave_func`, `time_width` and`ripples`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:146 msgid "Renamed `WiggleOutThenIn` to `Wiggle` (`WiggleOutThenIn` has been deprecated)" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:147 msgid "Added documentation and examples to all the above" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:148 msgid "Other minor enhancements and bug-fixes" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:150 msgid ":pr:`1348`: Added :class:`~.Polyhedron`, and platonic solids :class:`~.Tetrahedron`, :class:`~.Octahedron`, :class:`~.Icosahedron` and :class:`~.Dodecahedron`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:154 msgid ":pr:`1285`: Add :meth:`~.Scene.interactive_embed` for OpenGL rendering" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:154 msgid ":meth:`~.Scene.interactive_embed` allows interaction with Scene via mouse and keyboard as well as dynamic commands via an iPython terminal." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:157 msgid ":pr:`1261`: Render image automatically if no animation is played in a scene" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:157 msgid "If no animations in scene and asked to preview/render a video, preview/render an image instead of raising a confusing error." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:160 msgid ":pr:`1200`: Add text and SVG mobjects to OpenGL" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:160 msgid "Added OpenGL-compatible text and SVG mobjects" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:163 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:166 msgid ":pr:`1398`: Fix and enhance `Mobject.arrange_in_grid`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:166 msgid "`arrange_in_grid` now actually arranges submobjects in a grid. Added new parameters `buff`, `cell_alignment`, `row_alignments`, `col_alignments`, `row_heights`, `col_widths`, `flow_order`." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:168 msgid ":pr:`1407`: Fix bug and rename :meth:`vector_coordinate_label` to :meth:`~.Vector.coordinate_label` and move it to :class:`geometry.py`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:171 msgid ":pr:`1380`: Allow image objects as background images" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:175 msgid ":pr:`1391`: Add `path_arc` support to `.animate` syntax" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:175 msgid "The parameter `path_arc` of :class:`~.Transform` now works with the `.animate` syntax" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:178 msgid ":pr:`1364`: Added :meth:`~.Mobject.match_points`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:178 msgid "Added :func:`~.Mobject.match_points`, which transforms the points, positions and submobjects of a Mobject to match that of the other while keeping style unchanged." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:180 msgid ":pr:`1363`: Change of TeX compiler and output file format" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:184 msgid ":pr:`1359`: Make FILE a required argument" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:184 msgid "Make `FILE` a required argument, `manim/cli/render/commands.py`:L30" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:186 msgid ":pr:`1304`: Improve Tex string splitting at double braces: only split for double brace groups" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:190 msgid ":pr:`1340`: Add OpenGL support to the new transform animations" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:190 msgid "Made `FadeTransform`, `FadeTransformPieces`, `TransformMatchingShapes` and `TransformMatchingTex` compatible with OpenGL rendering." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:193 msgid ":pr:`1343`: Make TexTemplate() simple, but keep Tex()'s default template" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:193 msgid "TexTemplate() now returns a simple tex template." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:195 msgid ":pr:`1321`: Add OpenGL support to :class:`~.AnimationGroup`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:200 msgid ":pr:`1302`: Raise appropriate errors in :meth:`~.VMobject.point_from_proportion`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:199 msgid "Raise an error if the ``alpha`` argument is not between 0 and 1." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:200 msgid "Raise an error if the :class:`~.VMobject` has no points." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:202 msgid ":pr:`1315`: Fix performance issues with :meth:`~.VMobject.get_arc_length`, stemming from :pr:`1274`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:205 msgid ":pr:`1320`: Add `jpeg` extension to the default image extensions" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:209 msgid ":pr:`1234`: Added new method :meth:`~.Mobject.get_midpoint`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:209 msgid "Implemented :meth:`~.Mobject.get_midpoint` to return the point that is the middle of the stroke line of an mobject." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:211 msgid ":pr:`1237`: Notify user if they are using an outdated version of Manim" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:214 msgid ":pr:`1308`: Improved :class:`~.ManimBanner` animations" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:217 msgid ":pr:`1275`: Add SVG element support to :class:`~.SVGMobject`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:220 msgid ":pr:`1238`: Add parameter ``about_point`` for :meth:`~.Mobject.rotate`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:223 msgid ":pr:`1260`: Change Brace from Tex to SVG (#1258)" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:226 msgid ":pr:`1122`: Support for specifying the interpolation algorithms for individual ImageMobjects" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:229 msgid ":pr:`1283`: Set default value of keyword ``random_seed`` in :class:`~.Scene` to ``None`` (was 0 and fixed before)" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:236 msgid ":pr:`1220`: Added sanity checks to :meth:`~.Mobject.add_to_back` for Mobjects" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:233 msgid "Add Mobject `add_to_back` sanity checks: - Raises ValueError when Mobject tries to add itself - Raises TypeError when a non-Mobject is added - Filters out incoming duplicate submobjects if at least one instance of that submobject exists in the list" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:239 msgid ":pr:`1249`: Set corners of :class:`~.Rectangle` in counterclockwise direction" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:239 msgid "This improves the look of transformations between rectangles and other simple mobjects." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:241 msgid ":pr:`1248`: Add Copy function to TexTemplate" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:245 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:247 msgid ":pr:`1368`: Added a check to ensure checking for the latest version was successful" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:251 msgid ":pr:`1413`: Prevent duplication of the same mobject when adding to submobjects via :meth:`~.Mobject.add_to_back`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:251 msgid "Fixes #1412" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:253 msgid ":pr:`1395`: SVG transforms now handle exponent notation (6.02e23)" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:256 msgid ":pr:`1355`: Rewrite `put_start_and_end_on` to work in 3D" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:259 msgid ":pr:`1346`: Fixed errors introduced by stray print in :class:`~.MathTex`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:262 msgid ":pr:`1305`: Automatically remove long tick marks not within the range of the :class:`~NumberLine`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:265 msgid ":pr:`1296`: Fix random pipeline TeX failures" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:270 msgid ":pr:`1274`: Fix :meth:`~.VMobject.point_from_proportion` to account for the length of curves." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:269 msgid "Add :meth:`~.VMobject.get_nth_curve_function_with_length` and associated functions." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:270 msgid "Change :meth:`~.VMobject.point_from_proportion` to use these functions to account for curve length." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:273 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:277 msgid ":pr:`1430`: Un-deprecated GraphScene (will be deprecated later), fixed an old-style call to NumberPlane" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:276 msgid "More work is required in order to fully replace `GraphScene` via `Axes`, thus `GraphScene` is not deprecated yet." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:277 msgid "Fixed one example in which the old `NumberPlane` syntax was used." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:279 msgid ":pr:`1425`: Added a \"How to Cite Manim\" section to the Readme" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:283 msgid ":pr:`1387`: Added Guide to Contribute Examples from GitHub Wiki to Documentation" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:283 msgid "Added a Guide" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:285 msgid ":pr:`1424`: Fixed all current docbuild warnings" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:288 msgid ":pr:`1389`: Adding Admonitions Tutorial to docs" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:291 msgid ":pr:`1341`: Reduce complexity of ThreeDSurfacePlot example" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:294 msgid ":pr:`1362`: Quick reference to modules" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:298 msgid ":pr:`1376`: Add flake8 and isort in docs" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:298 msgid "added 'flake8' and 'isort' usages to docs" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:301 msgid ":pr:`1360`: Grammatical error corrections in documentation" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:301 msgid "changed a few sentences in docs/source" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:303 msgid ":pr:`1351`: Some more typehints" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:306 msgid ":pr:`1358`: Fixed link to installation instructions for developers" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:309 msgid ":pr:`1338`: Added documentation guidelines for type hints" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:312 msgid ":pr:`1342`: Multiple ValueTracker example for docs" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:315 msgid ":pr:`1210`: Added tutorial chapter on coordinates of an mobject" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:318 msgid ":pr:`1335`: Added import statements to examples in documentation" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:321 msgid ":pr:`1245`: Added filled angle Example" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:324 msgid ":pr:`1328`: Docs: Update Brace example" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:327 msgid ":pr:`1326`: Improve documentation of :class:`~.ManimMagic` (in particular: fix documented order of CLI flags)" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:330 msgid ":pr:`1323`: Blacken Docs Strings" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:333 msgid ":pr:`1300`: Added typehints for :class:`~.ValueTracker`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:336 msgid ":pr:`1301`: Added further docstrings and typehints to :class:`~.Mobject`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:339 msgid ":pr:`1298`: Add double backquotes for rst code samples (value_tracker.py)" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:343 msgid ":pr:`1297`: Change docs to use viewcode extension instead of linkcode" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:343 msgid "Switched ``sphinx.ext.linkcode`` to ``sphinx.ext.viewcode`` and removed ``linkcode_resolve`` in ``conf.py``." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:345 msgid ":pr:`1246`: Added docstrings for :class:`~.ValueTracker`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:348 msgid ":pr:`1251`: Switch documentation from guzzle-sphinx-theme to furo" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:351 msgid ":pr:`1232`: Further docstrings and examples for :class:`~.Mobject`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:354 msgid ":pr:`1291`: Grammar improvements in README.md" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:357 msgid ":pr:`1269`: Add documentation about :meth:`~.set_color_by_tex`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:360 msgid ":pr:`1284`: Updated readme by providing the correct link to the example_scenes" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:363 msgid ":pr:`1029`: Added example jupyter notebook into the examples folders" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:367 msgid ":pr:`1279`: Added sphinx requirements to pyproject.toml" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:367 msgid "New contributors who wanted to build the sphinx documentation had an extra step that could be removed by making use of ``poetry install``. This removes the developer's need for ``pip install -r requirements.txt``." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:369 msgid ":pr:`1268`: Added documentation explaining the differences between manim versions" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:372 msgid ":pr:`1247`: Added warning for the usage of `animate`" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:375 msgid ":pr:`1242`: Added an example for the manim colormap" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:378 msgid ":pr:`1239`: Add TinyTex installation instructions" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:381 msgid ":pr:`1231`: Improve changelog generation script" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:385 msgid "Changes concerning the testing system" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:387 msgid ":pr:`1299`: Red pixels (different value) now appear over green pixels (same value) in GraphicalUnitTest" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:391 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:394 msgid ":pr:`1436`: Cache poetry venv with `pyproject.toml` hash in key" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:394 msgid "Cache poetry venv with `pyproject.toml` hash in key" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:397 msgid ":pr:`1435`: CI: Update poetry cache when new version is released" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:397 msgid "Fix `test_version` failure in CI when using cached poetry venv" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:399 msgid ":pr:`1427`: Add URL's to pyproject.toml" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:402 msgid ":pr:`1421`: Updated changelog generator's labels and removed pre-commit bot from changelog" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:405 msgid ":pr:`1339`: CI: Fix macOS installation error from creating file in read-only file system" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:409 msgid ":pr:`1257`: CI: Caching ffmpeg, tinytex dependencies and poetry venv" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:409 msgid "CI: Caching ffmpeg, tinytex dependencies and poetry venv" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:411 msgid ":pr:`1294`: Added mixed-line-ending to .pre-commit-config.yaml" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:414 msgid ":pr:`1278`: Fixed flake8 errors and removed linter/formatter workflows" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:417 msgid ":pr:`1270`: Added isort to pre_commit file" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:422 msgid ":pr:`1263`: CI: Turn off experimental installer for poetry to fix installation errors" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:421 msgid "Turn off experimental installer for poetry to prevent manim installation errors for packages." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:422 msgid "Downgrade py39 to py38 for flake checks as `pip` does not enjoy py39, along with `poetry`." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:425 msgid ":pr:`1255`: CI: Fix macOS pipeline failure" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:425 msgid "Update `ci.yml` to update and upgrade brew if necessary before installing dependencies, and remove the unsupported `dvisvgm.86_64-darwin` package." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:427 msgid ":pr:`1254`: Removed the comment warning that GitHub doesn't allow uploading video in the issue templates." msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:430 msgid ":pr:`1216`: Use actions/checkout for cloning repository; black-checks" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:433 msgid ":pr:`1235`: Fixed version of decorator at <5.0.0" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:437 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:439 msgid ":pr:`1411`: Change `Union[float, int]` to just `float` according to PEP 484" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:442 msgid ":pr:`1241`: Type Annotations: Fixing errors showing up in static type checking tool mypy" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:446 msgid ":pr:`1319`: Fix mean/meant typo" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:446 msgid "Fix typo in docs" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:448 msgid ":pr:`1313`: Singular typo fix on the Quickstart page in documentation" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:452 msgid ":pr:`1292`: Remove unnecessary imports from files" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:452 msgid "Imports reduced in a bunch of files" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:454 msgid ":pr:`1295`: Fix grammar and typos in the CODE OF CONDUCT" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:458 msgid ":pr:`1293`: Minor fixes - reduce lines" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:458 msgid "Remove unnecessary lines" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:460 msgid ":pr:`1281`: Remove all Carriage Return characters in our files" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:463 msgid ":pr:`1178`: Format Imports using Isort" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:466 msgid ":pr:`1233`: Fix deprecation warning for ``--use_opengl_renderer`` and ``--use_webgl_renderer``" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:469 msgid ":pr:`1282`: Fix typing hints in vectorized_mobject.py based on mypy" msgstr "" #: ../../source/changelog/0.6.0-changelog.rst:473 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.7.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.7.0-changelog.rst:3 msgid "v0.7.0" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:5 msgid "June 01, 2021" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:10 msgid "A total of 45 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:14 msgid "André +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:15 #: ../../source/changelog/0.7.0-changelog.rst:53 msgid "Anton Ballmaier" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:16 #: ../../source/changelog/0.7.0-changelog.rst:55 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:17 msgid "Clar Fon" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:18 #: ../../source/changelog/0.7.0-changelog.rst:56 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:19 #: ../../source/changelog/0.7.0-changelog.rst:57 msgid "Devin Neal" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:20 #: ../../source/changelog/0.7.0-changelog.rst:59 msgid "Hugues Devimeux" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:21 msgid "Iced-Tea3 +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:22 #: ../../source/changelog/0.7.0-changelog.rst:61 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:23 #: ../../source/changelog/0.7.0-changelog.rst:62 msgid "Jason Villanueva" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:24 msgid "Jerónimo Squartini +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:25 #: ../../source/changelog/0.7.0-changelog.rst:64 msgid "KingWampy" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:26 #: ../../source/changelog/0.7.0-changelog.rst:65 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:27 msgid "Max Stoumen +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:28 #: ../../source/changelog/0.7.0-changelog.rst:67 msgid "Mohammad Al-Fetyani" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:29 #: ../../source/changelog/0.7.0-changelog.rst:68 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:30 msgid "NeoPlato" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:31 msgid "Newell Jensen" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:32 #: ../../source/changelog/0.7.0-changelog.rst:69 msgid "Nikhil Garuda" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:33 msgid "Nikhil Sharma +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:34 msgid "PaulCMurdoch +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:35 #: ../../source/changelog/0.7.0-changelog.rst:71 msgid "Philipp Imhof" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:36 #: ../../source/changelog/0.7.0-changelog.rst:72 msgid "Raghav Goel" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:37 msgid "Robert West +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:38 msgid "Ryan McCauley +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:39 msgid "Skaft +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:40 msgid "SwiddisZwei +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:41 msgid "e4coder +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:42 #: ../../source/changelog/0.7.0-changelog.rst:78 msgid "friedkeenan" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:43 msgid "malte-v +" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:44 #: ../../source/changelog/0.7.0-changelog.rst:79 msgid "ralphieraccoon" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:45 #: ../../source/changelog/0.7.0-changelog.rst:80 msgid "sparshg" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:48 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:51 msgid "Aathish Sivasubrahmanian" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:52 msgid "Abhijith Muthyala" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:54 msgid "Aron" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:58 msgid "GameDungeon" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:60 msgid "Iced-Tea3" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:63 msgid "Jerónimo Squartini" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:66 msgid "Mark Miller" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:70 msgid "Oliver" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:73 msgid "Ricky Chon" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:74 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:75 msgid "Skaft" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:76 msgid "SwiddisZwei" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:77 msgid "e4coder" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:83 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:85 msgid "A total of 87 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:88 msgid "Breaking changes" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:92 msgid ":pr:`1521`: Improve :class:`~.Animation` docs" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:91 msgid "Improve documentation of the :class:`~.Animation` class." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:92 msgid "Unify the signature of ``get_all_mobjects``. Now it always returns a sequence of :class:`Mobjects <.Mobject>`. This breaks using ``FadeTransform.get_all_mobjects`` as ``Group``." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:95 msgid ":pr:`1470`: Drop support for Python 3.6" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:95 msgid "Manim won't work on Python 3.6 anymore." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:98 msgid "Highlights" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:100 msgid ":pr:`1447`: Added :class:`~.PolarPlane` for polar coordinates." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:109 msgid ":pr:`1490`: Added :class:`~.Polygram`, rework the polygon inheritance tree, and add :class:`~.Star`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:104 msgid "Add :class:`~.Polygram`, a generalized :class:`~.Polygon` that allows for disconnected sets of edges." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:105 msgid "Make :class:`~.Polygon` inherit from :class:`~.Polygram`." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:106 msgid "Add :func:`~.regular_vertices`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:107 msgid "Add :class:`~.RegularPolygram`." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:108 msgid "Make :class:`~.RegularPolygon` inherit from :class:`~.RegularPolygram`." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:109 msgid "Add :class:`~.Star`." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:112 msgid ":pr:`1462`: OpenGL: Added :class:`~.Shader`, :class:`~.Mesh`, and :class:`~.FullScreenQuad`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:112 msgid "Add Shader and Mesh objects" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:117 msgid ":pr:`1418`: Added project management commands" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:115 msgid "``manim init`` - quickly sets up default files for a manim project." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:116 msgid "``manim new project`` - lets the user set project settings. It also creates the project inside a new folder of name " msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:117 msgid "``manim new scene`` - used to quickly insert new scenes into files. If ``file name`` is not provided ``main.py`` is used as default." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:120 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:123 msgid ":pr:`1598`: Update examples to use :class:`~.Axes` and deprecate :class:`~.GraphScene`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:123 msgid ":class:`~.GraphScene` has been deprecated and its functionality has been shifted to :class:`~.Axes`. See the updated example gallery for sample usage." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:126 msgid ":pr:`1454`: Fading module enhancements" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:126 msgid "Moved functionality of all Fading classes to :class:`~.FadeIn` and :class:`~.FadeOut`. All other fading classes have been deprecated." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:128 msgid ":pr:`1375`: Deleted the deprecated ``ShowCreation`` in favor of :class:`~.Create`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:132 msgid "New features" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:134 msgid ":pr:`1566`: Added the ability to add gridlines to a :class:`~.Rectangle`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:137 msgid ":pr:`1548`: Added :class:`~.ArcBrace`, a subclass of :class:`~.Brace`." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:141 msgid ":pr:`1559`: Update VGroup to support item assignment (#1530)" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:141 msgid "Support indexed item-assignment for VGroup" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:143 msgid ":pr:`1518`: Allow fading multiple Mobjects in one Animation" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:146 msgid ":pr:`1422`: Added :func:`~.override_animation` decorator" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:154 msgid ":pr:`1504`: Color module enhancements" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:150 msgid "Replaced ``BLUE_E`` with what was previously ``DARK_BLUE`` and removed ``DARK_BLUE``" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:151 msgid "Added alias ``LIGHTER_GRAY`` for ``GRAY_A``" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:152 msgid "Added ``PURE_RED``, ``PURE_BLUE`` and renamed ``GREEN_SCREEN`` to ``PURE_GREEN``" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:153 msgid "All gray colors are now also available using British spelling (including ``GREY_BROWN``)" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:154 msgid "Replaced color example in the docs. It can now be used as a quick reference for all color names." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:156 msgid ":pr:`1272`: Implement metaclass approach in geometry module to make mobjects compatible with cairo and opengl rendering" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:160 msgid ":pr:`1404`: Added two deprecation decorators" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:160 msgid "Added two function decorators ``deprecated`` and ``deprecated_params`` as a consistent way of deprecating code." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:163 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:165 msgid ":pr:`1572`: OpenGL compatibility via metaclass: :class:`~.TracedPath`, :class:`~.ParametricFunction`, :class:`~.Brace`, :class:`~.VGroup`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:168 msgid ":pr:`1472`: Porting methods from :class:`~.GraphScene` to :class:`~.CoordinateSystem`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:171 msgid ":pr:`1589`: OpenGL compatibility via metaclass: :class:`~.ValueTracker`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:175 msgid ":pr:`1564`: Add extra notes for TeX compilation errors" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:175 msgid "Add hint to use custom ``TexTemplate`` on TeX compilation errors" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:177 msgid ":pr:`1584`: Added a check for ``0`` in :meth:`~.round_corners`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:181 msgid ":pr:`1586`: Add OpenGLMobject support to all ``isinstance`` occurrences" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:181 msgid "This PR increases the support for OpenGL in the remaining animation classes and in other places where appropriate." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:183 msgid ":pr:`1577`: Added new metaclass ConvertToOpenGL (replacing MetaVMobject), restore IntelliSense" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:187 msgid ":pr:`1562`: Improved VectorField's Nudge Accuracy Per Step" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:187 msgid "Implemented the Runge-Kutta algorithm in VectorField's nudge function. This increases the accuracy as an object moves along a vector field. This also increases efficiency as the nudge function requires less loops to achieve accuracy than the previous implementation." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:189 msgid ":pr:`1480`: Add logging info to tex errors" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:194 msgid ":pr:`1567`: Compatibility Fixes with ManimPango v0.3.0" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:193 msgid "ManimPango v0.3.0+ is required for Manim now." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:194 msgid "Show errors from Pango when Markup isn't correct" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:196 msgid ":pr:`1512`: OpenGL compatibility via metaclass: graph" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:199 msgid ":pr:`1511`: OpenGL compatibility via metaclass: svg_mobject, text_mobject, tex_mobject" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:202 msgid ":pr:`1502`: Added ``center`` parameter to :class:`~.Sphere` and ``point`` parameter to :class:`~.Dot3D`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:206 msgid ":pr:`1486`: Update of ``rate_functions``" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:206 msgid "Changed the picture for the non standard rate functions." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:208 msgid ":pr:`1495`: Ported value_tracker to OpenGL" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:212 msgid ":pr:`1382`: Expand documentation, testing, and functionality of ValueTrackers; remove ExponentialValueTracker" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:212 msgid "Added more documentation and inline operators to ValueTracker and ComplexValueTracker. Brought coverage for value_tracker.py to 100%. Removed ExponentialValueTracker." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:214 msgid ":pr:`1475`: Add SVG elliptical arc support" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:218 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:220 msgid ":pr:`1574`: Fixed error when processing SVG with omitted elliptical arc command" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:226 msgid ":pr:`1596`: Fix indexing for non-whitespace tex arg separator" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:224 msgid "Fixes #1568" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:226 msgid "Fix issue when setting the arg_separator of a Tex object as a non-whitespace character(s). The method `break_up_by_substrings(self)` was not accounting for the separator when setting the index." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:228 msgid ":pr:`1588`: Fixed multiple animations being saved in the same file" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:231 msgid ":pr:`1571`: Fix tests after introducing parallelization" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:234 msgid ":pr:`1545`: Fix outdated parameters for :class:`LinearTransformationScene` and add an example + typing." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:239 msgid ":pr:`1513`: Fixed rotation of gradients while rotating a VMobject" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:238 msgid "Fixed the direction of gradient which remained the same while rotating VMobjects" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:239 msgid "Added ``rotate_sheen_direction()`` method in VMobject" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:241 msgid ":pr:`1570`: Output errors to stderr" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:244 msgid ":pr:`1560`: Declare ``*.npz`` ``*.wav`` ``*.png`` as binary in ``.gitattributes``" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:248 msgid ":pr:`1211`: Refactored scene caching and fixed issue when a different hash was produced when copying a mobject in the scene" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:248 msgid "Refactored internal scene-caching mechanism and fixed bug when an inconsistent hash was produced when copying a mobject." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:250 msgid ":pr:`1527`: Improved handling of substring isolation within sqrt, and fixed a bug with transform_mismatch for the matching shape transforms" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:253 msgid ":pr:`1526`: Fix fading" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:256 msgid ":pr:`1523`: Fix multiple FadeIn / Out only working on VMobjects" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:260 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:262 msgid ":pr:`1599`: Added example for :class:`~.Annulus`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:265 msgid ":pr:`1415`: New example for gallery and some docs refinements" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:271 msgid ":pr:`1509`: Copyedited Documentation" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:269 msgid "Added a link to Manim Community GitHub page in ``for_dev.rst``. Fixed :meth:`~.Mobject.get_start` and added ``roll`` link in ``building_blocks-rst`` Added language to code blocks in ``configuration.rst``" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:274 msgid ":pr:`1384`: Added typings to space_ops.py" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:274 msgid "Added Typehints to most of the functions" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:276 msgid ":pr:`1500`: Example for :meth:`~.apply_complex_function`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:279 msgid ":pr:`1551`: Fixed the typo for Admonitions" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:282 msgid ":pr:`1550`: Restructuring of Contribution Section" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:285 msgid ":pr:`1541`: Fixing broken links and other minor doc things" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:288 msgid ":pr:`1516`: Update docs to use ``t_range`` instead of ``t_min`` and ``t_max`` in :class:`~.ParametricFunction`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:291 msgid ":pr:`1508`: Update troubleshooting docs" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:294 msgid ":pr:`1485`: Added :class:`~.Title` example for the docs" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:297 msgid ":pr:`1439`: Cleaning ``Sequence`` typehints" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:300 msgid ":pr:`1440`: Added Scoop installation docs (Windows)" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:303 msgid ":pr:`1452`: Refine typehints at :class:`~.Angle`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:306 msgid ":pr:`1458`: Refine docs of :class:`~.Text` ( add ``disable_ligatures=True`` for t2c)" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:309 msgid ":pr:`1449`: Added :class:`~.PointCloudDot` example" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:312 msgid ":pr:`1473`: Added easy example for :meth:`~.arrange_in_grid`" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:315 msgid ":pr:`1402`: Added typestring parser checker" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:318 msgid ":pr:`1451`: Reduce complexity of AngleExample" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:322 msgid ":pr:`1441`: Add inheritance diagrams to reference page" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:322 msgid "Added inheritance diagrams to the reference page as a quick navigation method." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:324 msgid ":pr:`1457`: Fixing broken doc links" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:327 msgid ":pr:`1445`: Remove $ from tutorial commands" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:331 msgid "Changes concerning the testing system" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:333 msgid ":pr:`1556`: Try pytest-xdist for parallelization in tests" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:337 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:340 msgid ":pr:`1505`: Add docs reference to PR template" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:340 msgid "Added documentation link to the Pull Request Template." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:342 msgid ":pr:`1499`: Updated Discord links in the docs to point towards a standardized redirect" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:345 msgid ":pr:`1461`: Build the docs - Logging" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:348 msgid ":pr:`1481`: pyproject.toml: poetry_core -> poetry-core" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:351 msgid ":pr:`1477`: Update RDT sphinx package to version 3.5.3" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:354 msgid ":pr:`1460`: Create CONTRIBUTING.md" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:358 msgid ":pr:`1453`: manim_directive: fix image links in docs - Windows" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:358 msgid "Use POSIX path on Windows to link images so documentation can build locally." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:361 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:363 msgid ":pr:`1465`: Added typings and description to some functions in :mod:`~.coordinate_systems`." msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:367 msgid ":pr:`1552`: Removed unwanted parameters in geometry" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:367 msgid "Removed ``anchors_span_full_range``, ``close_new_points``, ``anchors_span_full_range``, ``preserve_tip_size_when_scaling``, ``mark_paths_closed`` and ``close_new_points``" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:369 msgid ":pr:`1597`: Removed hilite_me and insert_line_numbers_in_html from global name space" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:372 msgid ":pr:`1535`: Update dependencies and fix tests" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:375 msgid ":pr:`1544`: Adding spell checker as a pre-commit hook" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:378 msgid ":pr:`1542`: Swapping a pango markup link in docs" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:381 msgid ":pr:`1531`: Don't use deprecated methods in deprecation.py" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:384 msgid ":pr:`1492`: Remove stray print statements introduced in #1404" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:387 msgid ":pr:`1471`: Fix Some Warnings from lgtm" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:391 msgid "Changes that needed to be reverted again" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:393 msgid ":pr:`1606`: Bring back ``DARK_BLUE``" msgstr "" #: ../../source/changelog/0.7.0-changelog.rst:397 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.8.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.8.0-changelog.rst:3 msgid "v0.8.0" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:5 msgid "July 02, 2021" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:10 msgid "A total of 37 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:14 #: ../../source/changelog/0.8.0-changelog.rst:51 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:15 msgid "Bill Shillito +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:16 msgid "Darigov Research +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:17 #: ../../source/changelog/0.8.0-changelog.rst:53 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:18 #: ../../source/changelog/0.8.0-changelog.rst:54 msgid "Devin Neal" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:19 msgid "Iced-Tea3" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:20 #: ../../source/changelog/0.8.0-changelog.rst:55 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:21 #: ../../source/changelog/0.8.0-changelog.rst:56 msgid "Jason Villanueva" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:22 #: ../../source/changelog/0.8.0-changelog.rst:57 msgid "KingWampy" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:23 #: ../../source/changelog/0.8.0-changelog.rst:58 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:24 msgid "MathInvariance +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:25 msgid "Max Stoumen" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:26 msgid "Mehmet Ali Özer +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:27 msgid "Michael Pilosov +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:28 #: ../../source/changelog/0.8.0-changelog.rst:61 msgid "Mohammad Al-Fetyani" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:29 #: ../../source/changelog/0.8.0-changelog.rst:62 msgid "Naveen M K" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:30 #: ../../source/changelog/0.8.0-changelog.rst:63 msgid "Nikhil Garuda" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:31 #: ../../source/changelog/0.8.0-changelog.rst:64 msgid "Oliver" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:32 msgid "PaulCMurdoch" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:33 #: ../../source/changelog/0.8.0-changelog.rst:65 msgid "Philipp Imhof" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:34 msgid "PipedQuintes +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:35 #: ../../source/changelog/0.8.0-changelog.rst:66 msgid "Raghav Goel" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:36 #: ../../source/changelog/0.8.0-changelog.rst:67 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:37 msgid "Ujjayanta +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:38 msgid "Vagrid +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:39 msgid "andrehisatsuga +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:40 #: ../../source/changelog/0.8.0-changelog.rst:70 msgid "friedkeenan" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:41 msgid "peaceheis +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:42 msgid "yit6 +" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:45 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:48 msgid "Abhijith Muthyala" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:49 msgid "Anton Ballmaier" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:50 msgid "Aron" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:52 msgid "Clar Fon" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:59 msgid "Mark Miller" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:60 msgid "MathInvariance" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:68 msgid "Ujjayanta" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:69 msgid "Vagrid" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:73 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:75 msgid "A total of 76 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:78 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:80 msgid ":pr:`1616`: Remove all functions and classes that were deprecated until ``v0.6.0``" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:84 msgid "New features" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:87 msgid ":pr:`1716`: Rewrite stroke and fill shaders" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:87 msgid "Rewrite vectorized mobject shaders to be compatible with transformation matrices." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:90 msgid ":pr:`1695`: Add option to justify text with :class:`~.MarkupText`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:90 msgid "A new parameter ``justify`` is added to :class:`~.MarkupText`. It can be used to justify a paragraph of text." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:94 msgid ":pr:`1660`: Added support for ``.webm`` and transparency of videos in Jupyter notebooks" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:93 msgid "Added support for generating ``webm`` videos via the command line flag ``--format=webm``" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:94 msgid "Added transparency support for Jupyter notebooks" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:96 msgid ":pr:`1553`: Add dearpygui integration" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:100 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:102 msgid ":pr:`1728`: Improved positioning and size of the OpenGL window; added some configuration options" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:105 msgid ":pr:`1733`: Let OpenGLMobject.copy return a deep copy by default" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:108 msgid ":pr:`1735`: Metaclass compatibility for `coordinate_system.py`, `Code` and `ParametricSurface`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:111 msgid ":pr:`1585`: OpenGL compatibility via metaclass for :class:`~.Matrix`, :class:`~.DecimalNumber`, :class:`~.Variable`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:114 msgid ":pr:`1713`: Exit the command line interface gracefully if no scene was chosen" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:119 msgid ":pr:`1652`: Refactored :class:`~.Mobject` and :class:`~.Scene` to no longer inherit from the abstract base class ``Container``" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:118 msgid "Moved tests in ``test_container.py`` for :class:`Container` that test :class:`~.Scene` and :class:`~.Mobject` to their own files." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:119 msgid "Corrected various instances of incorrectly passed keyword arguments, or unused keyword arguments." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:121 msgid ":pr:`1693`: Made the default arrowhead size for :class:`~.Arrow3D` smaller" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:127 msgid ":pr:`1678`: Allow some rate functions to assume values outside of [0, 1]; introduce clamping decorators" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:125 msgid "Fixed animations so that certain rate functions (``running_start``, ``wiggle``, ``ease_in_back``, ``ease_out_back``, ``ease_in_out_back``, ``ease_in_elastic``, ``ease_out_elastic``, and ``ease_out_elastic``) can go outside the range from 0 to 1." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:126 msgid "Fixed lag ratios so that they're spaced out evenly within the time interval and the rate functions are applied to each animation individually, rather than having the rate function determine when the animation starts." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:127 msgid "Fixed faulty code for ``ease_in_out_expo``, ``ease_in_bounce``, ``ease_out_bounce``, and ``ease_in_out_bounce``." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:129 msgid ":pr:`1649`: Made video file names in Jupyter notebook more readable" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:133 msgid ":pr:`1667`: Determine the default number of decimal places for :class:`~.NumberLine` labels automatically from the step size" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:133 msgid "As an example: If the step size is set to 0.5, labels will now show at least one decimal place." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:135 msgid ":pr:`1608`: Color file paths in terminal; remove curly braces surrounding the file path in \"Partial movie file written in...\" messages" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:138 msgid ":pr:`1632`: OpenGL compatibility via metaclass: :class:`~.Group`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:142 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:144 msgid ":pr:`1740`: Fix pillow to <8.3.0" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:147 msgid ":pr:`1729`: Fix bug when using :class:`~.Text` with the OpenGL renderer" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:150 msgid ":pr:`1675`: Fixed ignored fill and stroke colors for :class:`~.SVGMobject`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:153 msgid ":pr:`1664`: Fixed accidental displacement in :class:`~.Axes` caused by ``include_numbers`` / ``numbers_to_include``" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:156 msgid ":pr:`1670`: Fixed missing ``numpy`` import in OpenGL shader example" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:159 msgid ":pr:`1636`: Fixed bugs and added examples to methods and classes in :mod:`manim.mobject.matrix`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:162 msgid ":pr:`1614`: Fix tick issues and improve tick placement for :class:`~.NumberLine`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:165 msgid ":pr:`1593`: Un-flip output of ``get_frame()`` when using the OpenGL renderer" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:168 msgid ":pr:`1619`: Fix output of automatically detected LaTeX errors" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:176 msgid ":pr:`1595`: Fixed a few CLI and rendering bugs" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:172 msgid "Corrected issue where gifs were being logged with an incorrect extension" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:173 msgid "Fixed issue where videos were output when format was set to png" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:174 msgid "Added logging for png output" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:175 msgid "Added precedence handling when the ``write_to_movie`` flag would conflict with ``--format``" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:176 msgid "Fixed issue that caused png image output to be ignored when caching was enabled" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:178 msgid ":pr:`1635`: Added missing numpy import for :mod:`manim.mobject.probability`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:182 msgid ":pr:`1634`: Fixed OpenGL examples for MacOS" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:182 msgid "Renamed deprecated ``gl_FragColor`` to ``fragColor``." msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:185 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:187 msgid ":pr:`1732`: Remove reference to ``--plugins`` flag" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:190 msgid ":pr:`1734`: Fix inheritance graph background color" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:193 msgid ":pr:`1698`: Added an example for :class:`~.PMobject`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:196 msgid ":pr:`1690`: Added an example for :class:`~.CoordinateSystem`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:199 msgid ":pr:`1510`: Add a tutorial for using :class:`~.Text` and :class:`~.Tex`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:202 msgid ":pr:`1685`: Added an example and parameter description for :class:`~.AnnularSector`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:205 msgid ":pr:`1687`: Updated imports in ``geometry.py`` and added example to :class:`~.Arrow`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:208 msgid ":pr:`1681`: Added an example for :class:`~.NumberLine`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:211 msgid ":pr:`1697`: Added an example for :class:`~.PGroup`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:214 msgid ":pr:`1594`: Several improvements to the documentation design and layout" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:217 msgid ":pr:`1696`: Added an example for :class:`~.DashedVMobject`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:220 msgid ":pr:`1637`: Added an example for :class:`~.FunctionGraph`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:223 msgid ":pr:`1626`: Added an example for :class:`~.Prism`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:226 msgid ":pr:`1712`: Added a second example for :class:`~.DoubleArrow`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:229 msgid ":pr:`1710`: Update copyright year in documentation to 2020-2021" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:232 msgid ":pr:`1708`: Fixed link to interactive example notebook" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:235 msgid ":pr:`1657`: Added an example for :class:`~.ParametricSurface`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:238 msgid ":pr:`1642`: Added examples and docstrings for :class:`~.BarChart`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:241 msgid ":pr:`1700`: Added an example for :meth:`~.Mobject.scale`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:244 msgid ":pr:`1689`: Added an example for :class:`~.SurroundingRectangle`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:247 msgid ":pr:`1627`: Added an example for :class:`~.Sphere`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:250 msgid ":pr:`1569`: Added example to demonstrate differences between :class:`~.Transform` and :class:`~.ReplacementTransform`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:253 msgid ":pr:`1647`: Added an example for :class:`~.Sector`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:256 msgid ":pr:`1673`: Updated documentation examples for :class:`~.Text` and :class:`~.MarkupText`: set ``weight=BOLD`` instead of ``style``" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:259 msgid ":pr:`1650`: Added an example for :class:`~.ArcBetweenPoints`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:262 msgid ":pr:`1628`: Added an example for :class:`~.NumberPlane`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:265 msgid ":pr:`1646`: Added an example for :class:`~.Underline`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:268 msgid ":pr:`1659`: Added more details to the Google Colab installation instructions" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:271 msgid ":pr:`1658`: Updated python requirement in the documentation" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:274 msgid ":pr:`1639`: Added an example for :class:`~.SampleSpace`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:277 msgid ":pr:`1640`: Added an example for :class:`~.Point`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:280 msgid ":pr:`1643`: Fixed ``RightArcAngleExample`` for :class:`~.Angle` in documentation" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:283 msgid ":pr:`1617`: Visually improved an example in our tutorial" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:286 msgid ":pr:`1641`: Added an example for :class:`~.ComplexPlane`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:289 msgid ":pr:`1644`: Added an example for :class:`~.BackgroundRectangle`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:292 msgid ":pr:`1633`: Added an example for :class:`~.Integer`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:295 msgid ":pr:`1630`: Added an example for :class:`~.Arc`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:298 msgid ":pr:`1631`: Added an example for :class:`~.BulletedList`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:301 msgid ":pr:`1620`: Fixed reference to command line interface help command" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:305 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:307 msgid ":pr:`1623`: CI: branch rename: master -> main" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:310 msgid ":pr:`1621`: Revert default template and add new templates" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:313 msgid ":pr:`1573`: PR template for the manim hackathon" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:317 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:319 msgid ":pr:`1720`: Renamed incorrect references of ``master`` to ``main``" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:322 msgid ":pr:`1692`: Removed redundant warning in CLI parsing" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:325 msgid ":pr:`1651`: Small code cleanup for :class:`~.Polygram`" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:328 msgid ":pr:`1610`: Changed one image extension to lowercase letters" msgstr "" #: ../../source/changelog/0.8.0-changelog.rst:332 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/changelog/0.9.0-changelog.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/changelog/0.9.0-changelog.rst:3 msgid "v0.9.0" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:0 msgid "Date" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:5 msgid "August 02, 2021" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:8 msgid "Contributors" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:10 msgid "A total of 35 people contributed to this release. People with a '+' by their names authored a patch for the first time." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:14 #: ../../source/changelog/0.9.0-changelog.rst:47 msgid "Alex Lembcke" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:15 #: ../../source/changelog/0.9.0-changelog.rst:48 msgid "Benjamin Hackl" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:16 #: ../../source/changelog/0.9.0-changelog.rst:49 msgid "Darylgolden" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:17 #: ../../source/changelog/0.9.0-changelog.rst:50 msgid "Devin Neal" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:18 msgid "Harivinay +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:19 #: ../../source/changelog/0.9.0-changelog.rst:52 msgid "Hugues Devimeux" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:20 msgid "Jared Hughes +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:21 #: ../../source/changelog/0.9.0-changelog.rst:54 msgid "Jason Villanueva" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:22 msgid "Kadatatlu Kishore +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:23 #: ../../source/changelog/0.9.0-changelog.rst:55 msgid "KingWampy" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:24 msgid "LED Me Explain +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:25 #: ../../source/changelog/0.9.0-changelog.rst:56 msgid "Laith Bahodi" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:26 #: ../../source/changelog/0.9.0-changelog.rst:58 msgid "Mohammad Al-Fetyani" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:27 msgid "Noam Zaks" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:28 #: ../../source/changelog/0.9.0-changelog.rst:59 msgid "Oliver" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:29 msgid "PaulCMurdoch" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:30 msgid "Raghav Prabhakar +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:31 msgid "Ryan McCauley" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:32 msgid "Suhail Sherif +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:33 msgid "Taektiek +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:34 msgid "Udeshya Dhungana +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:35 msgid "UraniumCronorum +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:36 msgid "Vinh H. Pham (Vincent) +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:37 msgid "ccn +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:38 msgid "icedcoffeeee +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:39 msgid "sahilmakhijani +" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:40 #: ../../source/changelog/0.9.0-changelog.rst:64 msgid "sparshg" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:43 msgid "The patches included in this release have been reviewed by the following contributors." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:46 msgid "Abhijith Muthyala" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:51 msgid "Harivinay" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:53 msgid "Jan-Hendrik Müller" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:57 msgid "Lino" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:60 msgid "Raghav Goel" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:61 msgid "Suhail Sherif" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:62 msgid "icedcoffeeee" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:63 msgid "sahilmakhijani" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:67 msgid "Pull requests merged" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:69 msgid "A total of 55 pull requests were merged for this release." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:72 msgid "Highlights" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:75 msgid ":pr:`1677`: Added a new :class:`~.Table` mobject" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:75 msgid "This brings easy-to-use and customizable tables to Manim. Several examples for this new mobject can be found at :mod:`the module documentation page <.mobject.table>` and its subpages." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:78 msgid "Deprecated classes and functions" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:82 msgid ":pr:`1848`: Deprecated parameters for :class:`~.DashedLine` and :class:`~.DashedVMobject`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:81 msgid "``dash_spacing`` is an unused parameter" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:82 msgid "``positive_space_ratio`` has been replaced with the shorter name ``dashed_ratio``" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:92 msgid ":pr:`1773`: Remove all classes and functions that were deprecated until ``v0.7.0`` and ``v0.8.0``" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:85 msgid "The classes ``FadeInFrom``, ``FadeOutAndShift``, ``FadeOutToPoint``, ``FadeInFromPoint``, ``FadeInFromLarge``, ``VFadeIn``, ``VFadeOut``, ``VFadeInThenOut`` have been removed, use :class:`~.FadeIn` or :class:`~.FadeOut` with appropriate keyword arguments instead." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:88 msgid "The classes ``CircleIndicate``, ``ShowCreationThenDestruction``, ``AnimationOnSurroundingRectangle``, ``ShowPassingFlashAround``, ``ShowCreationThenDestructionAround``, ``ShowCreationThenFadeAround``, ``WiggleOutThenIn``, ``TurnInsideOut`` have been removed. Use :class:`~.Circumscribe`, :class:`~.ShowPassingFlash`, or :class:`~.Wiggle` instead." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:90 msgid "The classes ``OpenGLTexMobject`` and ``OpenGLTextMobject`` have been removed, use :class:`~.MathTex` and :class:`~.Tex` instead. Also, ``VMobjectFromSVGPathstring`` has been removed, use :class:`~.SVGPathMobject` instead." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:92 msgid "Finally, the utility functions ``get_norm`` and ``cross`` have been removed (use the corresponding Numpy methods instead), and the function ``angle_between`` has been replaced with ``angle_between_vectors``." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:96 msgid ":pr:`1731`: Deprecated :class:`~.ParametricSurface` parameters" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:95 msgid "``u_min`` and ``u_max`` have been replaced by ``u_range``." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:96 msgid "``v_min`` and ``v_max`` have been replaced by ``v_range``." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:99 msgid "New features" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:103 msgid ":pr:`1780`: Allow non-numerical values to be added to :class:`~.NumberLine` and :class:`~.Axes`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:102 msgid "Added :meth:`.NumberLine.add_labels` method to :class:`~.NumberLine` which accepts a dictionary of positions/values." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:103 msgid ":meth:`.CoordinateSystem.add_coordinates` now accepts a dictionary too." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:105 msgid ":pr:`1719`: Added a :class:`~.Broadcast` animation" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:109 msgid ":pr:`1765`: Added a static method :meth:`.Circle.from_three_points` for defining a circle from three points" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:109 msgid "Added a new :func:`~.perpendicular_bisector` function in ``space_ops.py``" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:112 msgid ":pr:`1686`: Added :meth:`.ParametricSurface.set_fill_by_value`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:112 msgid "This method enables a color gradient to be applied to a :class:`~.ParametricSurface`, including the ability to define at which points the colors should be centered." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:115 msgid "Enhancements" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:117 msgid ":pr:`1833`: Added OpenGL compatibility for :class:`~.VDict`, :meth:`~.Axes.get_line_graph` and :class:`~.FocusOn`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:121 msgid ":pr:`1760`: Added ``window_size`` flag to manually adjust the size of the OpenGL window" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:121 msgid "Accepts a tuple in the form: ``x,y``." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:124 msgid ":pr:`1823`: Reworked :class:`~.DashedVMobject`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:124 msgid "Rewritten the logic to generate dashes" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:129 msgid ":pr:`1808`: OpenGL renderer updates" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:127 msgid "Adds model matrices to all OpenGLVMobjects" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:128 msgid "Improved performance on vectorized mobject shaders" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:129 msgid "Added updaters that are part of the scene rather than a mobject" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:132 msgid ":pr:`1787`: Made :class:`~.DecimalNumber` apply color to the ellipsis" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:132 msgid "Made color apply to the dots when `show_ellipsis` is set to true in `DecimalNumber`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:134 msgid ":pr:`1775`: Let :class:`~.Create` work on :class:`~.OpenGLSurface`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:137 msgid ":pr:`1757`: Added warning when there is a large number of items to hash." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:140 msgid ":pr:`1774`: Add the ``reverse`` parameter to :class:`~.Write`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:144 msgid "Fixed bugs" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:146 msgid ":pr:`1722`: Fixed ``remover=True`` for :class:`~.AnimationGroup`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:151 msgid ":pr:`1727`: Fixed some hot reload issues and compatibility with IDEs" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:150 msgid "Fixed interactive embed issue where it would fail when running on non-tty terminals" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:151 msgid "Fixed issue where file observer would error after the second run as the first observer was not closed" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:153 msgid ":pr:`1844`: Fixed the oversized :class:`~.Code` window with the OpenGL renderer" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:159 msgid ":pr:`1821`: Fixed issues concerning ``frame_center`` in :class:`~.ThreeDScene`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:157 msgid "Changing ``frame_center`` in a :class:`~.ThreeDScene` now actually changes the camera position." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:158 msgid "An animation with only ``frame_center`` animated will now be rendered properly." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:159 msgid "A black dot is not created at the origin once ``frame_center`` is animated." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:161 msgid ":pr:`1826`: Fixed scaling issue with :meth:`.BarChart.change_bar_values`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:164 msgid ":pr:`1839`: Allow passing arguments to ``.animate`` with the OpenGL renderer" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:167 msgid ":pr:`1791`: :meth:`~.Mobject.set_z_index` now sets all submobjects' ``z_index`` value" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:170 msgid ":pr:`1792`: Fixed bug that caused dry runs to fail when using the PNG format" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:173 msgid ":pr:`1790`: Fixed an import from ``manimlib``" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:176 msgid ":pr:`1782`: Fixed :class:`~.Tex` not working properly with the OpenGL renderer" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:179 msgid ":pr:`1783`: Fixed :meth:`~.OpenGLMobject.shuffle` function and added :meth:`~.invert` to OpenGL" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:182 msgid ":pr:`1786`: Fixed :class:`~.DecimalNumber` not working properly when the number of digits changes" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:185 msgid ":pr:`1763`: Fixed not being able to set some CLI flags in the configuration file" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:189 msgid ":pr:`1776`: :meth:`.CoordinateSystem.get_riemann_rectangles` now uses the graph's range instead of the axes range" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:189 msgid "If no range specified, `get_riemann_rectangles` generates the rectangles only where the area is correctly bounded" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:191 msgid ":pr:`1770`: Rewrote :meth:`.OpenGLMobject.put_start_and_end_on` to work correctly in 3D" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:194 msgid ":pr:`1736`: Fixed :class:`~.LinearTransformationScene` crashing on multiple animations" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:198 msgid "Documentation-related changes" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:200 msgid ":pr:`1852`: Fixed docs for :meth:`.Coordinate_system.add_coordinates` and moved :class: `~.Code` example" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:206 msgid ":pr:`1807`: Updated installation instructions" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:204 msgid "Added a warning about the incompatibility of different versions of Manim in the README" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:205 msgid "Modified the admonition warning in the documentation" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:206 msgid "Removed duplicated information from the README (``pip install manim`` is already covered in the docs)" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:208 msgid ":pr:`1739`: Added a section on creating a custom animation to the \"Manim's building blocks\" tutorial" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:211 msgid ":pr:`1835`: Updated documentation with information about reworked graphical unit test system" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:214 msgid ":pr:`1845`: Improve ``ThreeDSurfacePlot`` example in example gallery" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:217 msgid ":pr:`1842`: Removed instructions on installing Poetry from Developer Installation documentation, reference Poetry's documentation instead" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:220 msgid ":pr:`1829`: Switch the order of Scoop and Chocolatey in the docs for the Windows Installation" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:223 msgid ":pr:`1827`: Added ``robots.txt`` to prevent old versions of documentation from showing in search results" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:226 msgid ":pr:`1819`: Removed mention of ``-h`` CLI flag from documentation" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:229 msgid ":pr:`1813`: Removed unused variables from tutorial" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:232 msgid ":pr:`1815`: Added codespell to the list of used linters in the contribution guidelines" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:235 msgid ":pr:`1778`: Improve sidebar structure of the documentation's reference manual" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:238 msgid ":pr:`1749`: Added documentation and example for :meth:`.VMobject.set_fill`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:241 msgid ":pr:`1743`: Edited the developer installation instructions to include information on cloning the repository" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:244 msgid ":pr:`1706`: Rework example for :class:`~.Variable`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:248 msgid "Changes concerning the testing system" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:250 msgid ":pr:`1836`: Converted all the graphical tests to the new syntax" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:254 msgid ":pr:`1802`: Refactored graphical unit testing system, and implemented multi frames tests" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:254 msgid "This PR introduces a new ``@frames_comparison`` decorator which allows writing simple ``construct``-like functions as tests. Control data for new tests can be easily generated by calling ``pytest --set_test``." msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:257 msgid "Changes to our development infrastructure" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:259 msgid ":pr:`1830`: Be more concise about the documentation URL in the PR template" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:263 msgid "Code quality improvements and similar refactors" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:265 msgid ":pr:`1851`: Renamed ``Tabular`` to :class:`~.Table`" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:268 msgid ":pr:`1817`: Remove pillow version requirement" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:271 msgid ":pr:`1806`: Fixed spelling mistake" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:274 msgid ":pr:`1745`: Updated the BibTeX template in the README to Manim v0.9.0" msgstr "" #: ../../source/changelog/0.9.0-changelog.rst:278 msgid "New releases" msgstr "" ================================================ FILE: docs/i18n/gettext/contributing/admonitions.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/contributing/admonitions.rst:3 msgid "Adding Admonitions" msgstr "" #: ../../source/contributing/admonitions.rst:6 msgid "Adding Blocks for Tip, Note, Important etc. (Admonitions)" msgstr "" #: ../../source/contributing/admonitions.rst:8 msgid "The following directives are called Admonitions. You can use them to point out additional or important information. Here are some examples:" msgstr "" #: ../../source/contributing/admonitions.rst:13 msgid "See also" msgstr "" #: ../../source/contributing/admonitions.rst:21 msgid "Some ideas at :mod:`~.tex_mobject`, :class:`~.Mobject`, :meth:`~.Mobject.add_updater`, :attr:`~.Mobject.depth`, :func:`~.make_config_parser`" msgstr "" #: ../../source/contributing/admonitions.rst:28 msgid "Note" msgstr "" #: ../../source/contributing/admonitions.rst:36 msgid "A note" msgstr "" #: ../../source/contributing/admonitions.rst:39 msgid "Tip" msgstr "" #: ../../source/contributing/admonitions.rst:47 msgid "A tip" msgstr "" #: ../../source/contributing/admonitions.rst:49 msgid "You may also use the admonition **hint**, but this is very similar and **tip** is more commonly used in the documentation." msgstr "" #: ../../source/contributing/admonitions.rst:53 msgid "Important" msgstr "" #: ../../source/contributing/admonitions.rst:61 msgid "Some important information which should be considered." msgstr "" #: ../../source/contributing/admonitions.rst:64 msgid "Warning" msgstr "" #: ../../source/contributing/admonitions.rst:72 msgid "Some text pointing out something that people should be warned about." msgstr "" #: ../../source/contributing/admonitions.rst:74 msgid "You may also use the admonitions **caution** or even **danger** if the severity of the warning must be stressed." msgstr "" #: ../../source/contributing/admonitions.rst:78 msgid "Attention" msgstr "" #: ../../source/contributing/admonitions.rst:86 msgid "A attention" msgstr "" ================================================ FILE: docs/i18n/gettext/contributing/development.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/contributing/development.rst:3 msgid "Manim Development Process" msgstr "" #: ../../source/contributing/development.rst:6 msgid "For first-time contributors" msgstr "" #: ../../source/contributing/development.rst:7 msgid "Install git:" msgstr "" #: ../../source/contributing/development.rst:9 msgid "For instructions see https://git-scm.com/." msgstr "" #: ../../source/contributing/development.rst:12 msgid "Fork the project. Go to https://github.com/ManimCommunity/manim and 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." msgstr "" #: ../../source/contributing/development.rst:17 msgid "Clone your fork to your local computer:" msgstr "" #: ../../source/contributing/development.rst:23 msgid "GitHub will provide both a SSH (``git@github.com:/manim.git``) and HTTPS (``https://github.com//manim.git``) URL for cloning. You can use SSH if you have SSH keys setup." msgstr "" #: ../../source/contributing/development.rst:29 msgid "Do not clone the ManimCommunity repository. You must clone your own fork." msgstr "" #: ../../source/contributing/development.rst:32 msgid "Change the directory to enter the project folder:" msgstr "" #: ../../source/contributing/development.rst:38 msgid "Add the upstream repository, ManimCommunity:" msgstr "" #: ../../source/contributing/development.rst:44 msgid "Now, ``git remote -v`` should show two remote repositories named:" msgstr "" #: ../../source/contributing/development.rst:46 msgid "``origin``, your forked repository" msgstr "" #: ../../source/contributing/development.rst:47 msgid "``upstream`` the ManimCommunity repository" msgstr "" #: ../../source/contributing/development.rst:49 msgid "Install Manim:" msgstr "" #: ../../source/contributing/development.rst:51 msgid "Follow the steps in our :doc:`installation instructions <../installation>` to install **Manim's dependencies**, primarily ``ffmpeg`` and ``LaTeX``." msgstr "" #: ../../source/contributing/development.rst:55 msgid "We recommend using `Poetry `__ to manage your developer installation of Manim. Poetry is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on, and it will manage (install / update) them for you. In addition, Poetry provides a simple interface for managing virtual environments." msgstr "" #: ../../source/contributing/development.rst:62 msgid "If you choose to use Poetry as well, follow `Poetry's installation guidelines `__ to install it on your system, then run ``poetry install`` from your cloned repository. Poetry will then install Manim, as well as create and enter a virtual environment. You can always re-enter that environment by running ``poetry shell``." msgstr "" #: ../../source/contributing/development.rst:69 msgid "In case you want to install extra dependencies that are defined in the ``[tool.poetry.extras]`` section of ``pyproject.toml``, this can be done by passing the ``-E`` flag, for example ``poetry install -E jupyterlab -E gui``." msgstr "" #: ../../source/contributing/development.rst:73 msgid "In case you decided against Poetry, you can install Manim via pip by running ``python3 -m pip install .``. Note that due to our development infrastructure being based on Poetry, we currently do not support editable installs via ``pip``, so you will have to re-run this command every time you make changes to the source code." msgstr "" #: ../../source/contributing/development.rst:82 msgid "The following steps assume that you chose to install and work with Poetry." msgstr "" #: ../../source/contributing/development.rst:85 msgid "Install Pre-Commit:" msgstr "" #: ../../source/contributing/development.rst:91 msgid "This will ensure during development that each of your commits is properly formatted against our linter and formatters, ``black``, ``flake8``, ``isort`` and ``codespell``." msgstr "" #: ../../source/contributing/development.rst:95 msgid "You are now ready to work on manim!" msgstr "" #: ../../source/contributing/development.rst:98 msgid "Develop your contribution" msgstr "" #: ../../source/contributing/development.rst:100 msgid "Checkout your local repository's main branch and pull the latest changes from ManimCommunity, ``upstream``, into your local repository:" msgstr "" #: ../../source/contributing/development.rst:108 msgid "Create a branch for the changes you want to work on rather than working off of your local main branch:" msgstr "" #: ../../source/contributing/development.rst:115 msgid "This ensures you can easily update your local repository's main with the first step and switch branches to work on multiple features." msgstr "" #: ../../source/contributing/development.rst:118 msgid "Write some awesome code!" msgstr "" #: ../../source/contributing/development.rst:120 msgid "You're ready to make changes in your local repository's branch. You can add local files you've changed within the current directory with ``git add .``, or add specific files with" msgstr "" #: ../../source/contributing/development.rst:128 msgid "and commit these changes to your local history with ``git commit``. If you have installed pre-commit, your commit will succeed only if none of the hooks fail." msgstr "" #: ../../source/contributing/development.rst:134 msgid "When crafting commit messages, it is highly recommended that you adhere to `these guidelines `_." msgstr "" #: ../../source/contributing/development.rst:137 msgid "Add new or update existing tests." msgstr "" #: ../../source/contributing/development.rst:139 msgid "Depending on your changes, you may need to update or add new tests. For new features, it is required that you include tests with your PR. Details of our testing system are explained in the :doc:`testing guide `." msgstr "" #: ../../source/contributing/development.rst:144 msgid "Update docstrings and documentation:" msgstr "" #: ../../source/contributing/development.rst:146 msgid "Update the docstrings (the text in triple quotation marks) of any functions or classes you change and include them with any new functions you add. See the :doc:`documentation guide ` for more information about how we prefer our code to be documented. The content of the docstrings will be rendered in the :doc:`reference manual <../reference>`." msgstr "" #: ../../source/contributing/development.rst:154 msgid "Use the :mod:`manim directive for Sphinx ` to add examples to the documentation!" msgstr "" #: ../../source/contributing/development.rst:157 msgid "As far as development on your local machine goes, these are the main steps you should follow." msgstr "" #: ../../source/contributing/development.rst:161 msgid "Polishing Changes and Submitting a Pull Request" msgstr "" #: ../../source/contributing/development.rst:163 msgid "As soon as you are ready to share your local changes with the community so that they can be discussed, go through the following steps to open a pull request. A pull request signifies to the ManimCommunity organization, \"Here are some changes I wrote; I think it's worthwhile for you to maintain them.\"" msgstr "" #: ../../source/contributing/development.rst:171 msgid "You do not need to have everything (code/documentation/tests) complete to open a pull request (PR). If the PR is still under development, please mark it as a draft. Community developers will still be able to review the changes, discuss yet-to-be-implemented changes, and offer advice; however, the more complete your PR, the quicker it will be merged." msgstr "" #: ../../source/contributing/development.rst:177 msgid "Update your fork on GitHub to reflect your local changes:" msgstr "" #: ../../source/contributing/development.rst:183 msgid "Doing so creates a new branch on your remote fork, ``origin``, with the contents of your local repository on GitHub. In subsequent pushes, this local branch will track the branch ``origin`` and ``git push`` is enough." msgstr "" #: ../../source/contributing/development.rst:188 msgid "Make a pull request (PR) on GitHub." msgstr "" #: ../../source/contributing/development.rst:190 msgid "In order to make the ManimCommunity development team aware of your changes, you can make a PR to the ManimCommunity repository from your fork." msgstr "" #: ../../source/contributing/development.rst:195 msgid "Make sure to select ``ManimCommunity/manim`` instead of ``3b1b/manim`` as the base repository!" msgstr "" #: ../../source/contributing/development.rst:198 msgid "Choose the branch from your fork as the head repository - see the screenshot below." msgstr "" #: ../../source/contributing/development.rst:204 msgid "Please make sure you follow the template (this is the default text you are shown when first opening the 'New Pull Request' page)." msgstr "" #: ../../source/contributing/development.rst:208 msgid "Your changes are eligible to be merged if:" msgstr "" #: ../../source/contributing/development.rst:210 msgid "there are no merge conflicts" msgstr "" #: ../../source/contributing/development.rst:211 msgid "the tests in our pipeline pass" msgstr "" #: ../../source/contributing/development.rst:212 msgid "at least one (two for more complex changes) Community Developer approves the changes" msgstr "" #: ../../source/contributing/development.rst:214 msgid "You can check for merge conflicts between the current upstream/main and your branch by executing ``git pull upstream main`` locally. If this generates any merge conflicts, you need to resolve them and push an updated version of the branch to your fork of the repository." msgstr "" #: ../../source/contributing/development.rst:219 msgid "Our pipeline consists of a series of different tests that ensure that manim still works as intended and that the code you added sticks to our coding conventions." msgstr "" #: ../../source/contributing/development.rst:223 msgid "**Code style**: We use the code style imposed by `Black `_, `isort `_ and `flake8 `_. The GitHub pipeline makes sure that the (Python) files changed in your pull request also adhere to this code style. If this step of the pipeline fails, fix your code formatting automatically by running ``black `` and ``isort ``. To fix code style problems, run ``flake8 `` for a style report, and then fix the problems manually that were detected by ``flake8``." msgstr "" #: ../../source/contributing/development.rst:232 msgid "**Tests**: The pipeline runs manim's test suite on different operating systems (the latest versions of Ubuntu, MacOS, and Windows) for different versions of Python. The test suite consists of two different kinds of tests: integration tests and doctests. You can run them locally by executing ``poetry run pytest`` and ``poetry run pytest --doctest-modules manim``, respectively, from the root directory of your cloned fork." msgstr "" #: ../../source/contributing/development.rst:239 msgid "**Documentation**: We also build a version of the documentation corresponding to your pull request. Make sure not to introduce any Sphinx errors, and have a look at the built HTML files to see whether the formatting of the documentation you added looks as you intended. You can build the documentation locally by running ``make html`` from the ``docs`` directory. Since the inheritance diagrams require you to have `Graphviz `_ installed locally." msgstr "" #: ../../source/contributing/development.rst:246 msgid "Finally, if the pipeline passes and you are satisfied with your changes: wait for feedback and iterate over any requested changes. You will likely be asked to edit or modify your PR in one way or another during this process. This is not an indictment of your work, but rather a strong signal that the community wants to merge your changes! Once approved, your changes may be merged!" msgstr "" #: ../../source/contributing/development.rst:253 msgid "Further useful guidelines" msgstr "" #: ../../source/contributing/development.rst:255 msgid "When submitting a PR, please mention explicitly if it includes breaking changes." msgstr "" #: ../../source/contributing/development.rst:257 msgid "When submitting a PR, make sure that your proposed changes are as general as possible, and ready to be taken advantage of by all of manim's users. In particular, leave out any machine-specific configurations, or any personal information it may contain." msgstr "" #: ../../source/contributing/development.rst:262 msgid "If you are a maintainer, please label issues and PRs appropriately and frequently." msgstr "" #: ../../source/contributing/development.rst:265 msgid "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)." msgstr "" #: ../../source/contributing/development.rst:268 msgid "When submitting a code review, it is highly recommended that you adhere to `these general guidelines `_." msgstr "" #: ../../source/contributing/development.rst:271 msgid "If you find stale or inactive issues that seem to be irrelevant, please post a comment saying 'This issue should be closed', and a community developer will take a look." msgstr "" #: ../../source/contributing/development.rst:275 msgid "Please do as much as possible to keep issues, PRs, and development in general as tidy as possible." msgstr "" #: ../../source/contributing/development.rst:279 msgid "You can find examples for the ``docs`` in several places: the :doc:`Example Gallery <../examples>`, :doc:`Tutorials <../tutorials/index>`, and :doc:`Reference Classes <../reference>`." msgstr "" #: ../../source/contributing/development.rst:283 msgid "In case you are contributing, please have a look at this flowchart:" msgstr "" ================================================ FILE: docs/i18n/gettext/contributing/docstrings.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/contributing/docstrings.rst:3 msgid "Adding Docstrings" msgstr "" #: ../../source/contributing/docstrings.rst:5 msgid "A docstring is a string literal that is used right after the definition of a module, function, class, or method. They are used to document our code. This page will give you a set of guidelines to write efficient and correct docstrings." msgstr "" #: ../../source/contributing/docstrings.rst:11 msgid "Formatting the Docstrings" msgstr "" #: ../../source/contributing/docstrings.rst:13 msgid "Please begin the description of the class/function in the same line as the 3 quotes:" msgstr "" #: ../../source/contributing/docstrings.rst:31 msgid "NumPy Format" msgstr "" #: ../../source/contributing/docstrings.rst:32 msgid "The Manim Community uses numpy format for the documentation." msgstr "" #: ../../source/contributing/docstrings.rst:34 msgid "Use the numpy format for sections and formatting - see https://numpydoc.readthedocs.io/en/latest/format.html." msgstr "" #: ../../source/contributing/docstrings.rst:37 msgid "This includes:" msgstr "" #: ../../source/contributing/docstrings.rst:39 msgid "The usage of ``Attributes`` to specify ALL ATTRIBUTES that a class can have and a brief (or long, if needed) description." msgstr "" #: ../../source/contributing/docstrings.rst:43 msgid "Also, ``__init__`` parameters should be specified as ``Parameters`` **on the class docstring**, *rather than under* ``__init__``. Note that this 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 the class specifies no attributes at all. (See more on Parameters in number 2 of this list.)" msgstr "" #: ../../source/contributing/docstrings.rst:51 #: ../../source/contributing/docstrings.rst:151 msgid "Example:" msgstr "" #: ../../source/contributing/docstrings.rst:83 msgid "The usage of ``Parameters`` on functions to specify how every parameter works and what it does. This should be excluded if the function has no parameters. Note that you **should not** specify the default value of the parameter on the type. On the documentation render, this is already specified on the function's signature. If you need to indicate a further consequence of value omission or simply want to specify it on the docs, make sure to **specify it in the parameter's DESCRIPTION**." msgstr "" #: ../../source/contributing/docstrings.rst:92 #: ../../source/contributing/docstrings.rst:128 msgid "See an example on list item 4." msgstr "" #: ../../source/contributing/docstrings.rst:96 msgid "When documenting varargs (args and kwargs), make sure to document them by listing the possible types of each value specified, like this:" msgstr "" #: ../../source/contributing/docstrings.rst:109 msgid "Note that, if the kwargs expect specific values, those can be specified in a section such as ``Other Parameters``:" msgstr "" #: ../../source/contributing/docstrings.rst:120 msgid "The usage of ``Returns`` to indicate what is the type of this function's return value and what exactly it returns (i.e., a brief - or long, if needed - description of what this function returns). Can be omitted if the function does not explicitly return (i.e., always returns ``None`` because ``return`` is never specified, and it is very clear why this function does not return at all). In all other cases, it should be specified." msgstr "" #: ../../source/contributing/docstrings.rst:130 msgid "The usage of ``Examples`` in order to specify an example of usage of a function **is highly encouraged** and, in general, should be specified for *every function* unless its usage is **extremely obvious**, which can be debatable. Even if it is, it's always a good idea to add an example in order to give a better orientation to the documentation user. Use the following format for Python code:" msgstr "" #: ../../source/contributing/docstrings.rst:144 msgid "Also, if this is a video- or animation-related change, please try to add an example GIF or video if possible for demonstration purposes." msgstr "" ================================================ FILE: docs/i18n/gettext/contributing/examples.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/contributing/examples.rst:3 msgid "Adding Examples" msgstr "" #: ../../source/contributing/examples.rst:5 msgid "This is a page for adding examples to the documentation. Here are some guidelines you should follow before you publish your examples." msgstr "" #: ../../source/contributing/examples.rst:9 msgid "Guidelines for examples" msgstr "" #: ../../source/contributing/examples.rst:11 msgid "Everybody is welcome to contribute examples to the documentation. Since straightforward examples are a great resource for quickly learning manim, here are some guidelines." msgstr "" #: ../../source/contributing/examples.rst:15 msgid "What makes a great example" msgstr "" #: ../../source/contributing/examples.rst:19 msgid "As soon as a new version of manim is released, the documentation will be a snapshot of that version. Examples contributed after the release will only be shown in the latest documentation." msgstr "" #: ../../source/contributing/examples.rst:22 msgid "Examples should be ready to copy and paste for use." msgstr "" #: ../../source/contributing/examples.rst:24 msgid "Examples should be brief yet still easy to understand." msgstr "" #: ../../source/contributing/examples.rst:26 msgid "Examples don't require the ``from manim import *`` statement, this will be added automatically when the docs are built." msgstr "" #: ../../source/contributing/examples.rst:28 msgid "There should be a balance of animated and non-animated examples." msgstr "" #: ../../source/contributing/examples.rst:30 msgid "As manim makes animations, we can include lots of animated examples; however, our RTD has a maximum 20 minutes to build. Animated examples should only be used when necessary, as last frame examples render faster." msgstr "" #: ../../source/contributing/examples.rst:32 msgid "Lots of examples (e.g. size of a plot-axis, setting opacities, making texts, etc.) will also work as images. It is a lot more convenient to see the end product immediately instead of waiting for an animation to reveal it." msgstr "" #: ../../source/contributing/examples.rst:34 msgid "Please ensure the examples run on the current main branch when you contribute an example." msgstr "" #: ../../source/contributing/examples.rst:36 msgid "If the functions used are confusing for people, make sure to add comments in the example to explain what they do." msgstr "" #: ../../source/contributing/examples.rst:39 msgid "How examples are structured" msgstr "" #: ../../source/contributing/examples.rst:41 msgid "Examples can be organized into chapters and subchapters." msgstr "" #: ../../source/contributing/examples.rst:43 msgid "When you create examples, the beginning example chapter should focus on only one functionality. When the functionality is simple, multiple ideas can be illustrated under a single example." msgstr "" #: ../../source/contributing/examples.rst:45 msgid "As soon as simple functionalities are explained, the chapter may include more complex examples which build on the simpler ideas." msgstr "" #: ../../source/contributing/examples.rst:48 msgid "Writing examples" msgstr "" #: ../../source/contributing/examples.rst:50 msgid "When you want to add/edit examples, they can be found in the ``docs/source/`` directory, or directly in the manim source code (e.g. ``manim/mobject/mobject.py``). The examples are written in ``rst`` format and use the manim directive (see :mod:`manim.utils.docbuild.manim_directive` ), ``.. manim::``. Every example is in its own block, and looks like this:" msgstr "" #: ../../source/contributing/examples.rst:67 msgid "In the building process of the docs, all ``rst`` files are scanned, and the manim directive (``.. manim::``) blocks are identified as scenes that will be run by the current version of manim. Here is the syntax:" msgstr "" #: ../../source/contributing/examples.rst:72 msgid "``.. manim:: [SCENE_NAME]`` has no indentation and ``SCENE_NAME`` refers to the name of the class below." msgstr "" #: ../../source/contributing/examples.rst:74 msgid "The flags are followed in the next line (no blank line here!), with the indentation level of one tab." msgstr "" #: ../../source/contributing/examples.rst:76 msgid "All possible flags can be found at :mod:`manim.utils.docbuild.manim_directive`." msgstr "" #: ../../source/contributing/examples.rst:78 msgid "In the example above, the ``Formula1`` following ``.. manim::`` is the scene that the directive expects to render; thus, in the python code, the class has the same name: ``class Formula1(Scene)``." msgstr "" ================================================ FILE: docs/i18n/gettext/contributing/internationalization.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/contributing/internationalization.rst:3 msgid "Internationalization" msgstr "" #: ../../source/contributing/internationalization.rst:5 msgid "Thank you for your interest in localizing Manim! Please read the instructions below to get started. You are also encouraged, though not required, to join our `Discord server `__." msgstr "" #: ../../source/contributing/internationalization.rst:11 msgid "Signing up" msgstr "" #: ../../source/contributing/internationalization.rst:13 msgid "You will first need to create an account for our project. Go to our `project homepage `__ and click the sign up button at the top right hand corner. Follow the instructions to create an account. After creating an account, you should return back to our homepage. Click the Manim project to contribute translations for the main library." msgstr "" #: ../../source/contributing/internationalization.rst:21 msgid "Contributing" msgstr "" #: ../../source/contributing/internationalization.rst:24 msgid "Keep in mind that Manim is still a work in progress. Tutorials and documentation are always subject to change. When a developer implements a new feature, they are not forced to respect any translations. This means that parts of the translation might become outdated over time." msgstr "" #: ../../source/contributing/internationalization.rst:29 msgid "That being said, improving the documentation and making it more accessible is still highly encouraged. And even if your work gets outdated and requires change, you or someone else can simply adjust the translation. Your efforts are not in vail!" msgstr "" #: ../../source/contributing/internationalization.rst:35 msgid "Voting" msgstr "" #: ../../source/contributing/internationalization.rst:37 msgid "To ensure that our translations are of good quality, we use crowdsourcing and voting to approve good translations and reject bad ones. The current threshold for a translation being accepted is 3 votes; this may change as we gauge the level of activity in the community and the quality of translations." msgstr "" #: ../../source/contributing/internationalization.rst:43 msgid "To vote on translations, first click on a language you would like to help with, then click the \"translate all\" button. You should then enter the translation editor. Next to the search bar, you will see a funnel-like icon - click it and select the \"Need to Be Voted\" option to see translations that need to be voted on. You can then select a string on the left sidebar, view the translations at the bottom and vote with the + and - icons for good and poor translations respectively." msgstr "" #: ../../source/contributing/internationalization.rst:52 msgid "Translations" msgstr "" #: ../../source/contributing/internationalization.rst:54 msgid "You can also help with contributing translations directly. Follow the steps above to enter the translation editor (instead of clicking \"Translate all\", you may also choose to translate strings from a specific file by clicking them). Crowdin's on-screen tutorial should guide you through the process." msgstr "" #: ../../source/contributing/internationalization.rst:61 msgid "Translation guidelines" msgstr "" #: ../../source/contributing/internationalization.rst:63 msgid "In general, follow the conventions for technical writing in your target language. You may want to refer to similar, high quality sources (eg. Python's documentation in your language) for guidance. Note that code blocks, code literals, names and pseudonyms should be left unchanged." msgstr "" #: ../../source/contributing/internationalization.rst:69 msgid "Proofreading" msgstr "" #: ../../source/contributing/internationalization.rst:71 msgid "For certain languages with a significant number of speakers within the Manim Community, an additional step of proofreading is used after crowdsourcing to further ensure the quality of our translations. Proofreaders are trusted community members who will look over and give the final approval on translations. If you would like to be a proofreader, please email translations@manim.community with the answers to the following questions:" msgstr "" #: ../../source/contributing/internationalization.rst:79 msgid "What is your Crowdin username?" msgstr "" #: ../../source/contributing/internationalization.rst:80 msgid "What is your Discord username (optional)?" msgstr "" #: ../../source/contributing/internationalization.rst:81 msgid "What is your GitHub username (optional)?" msgstr "" #: ../../source/contributing/internationalization.rst:82 msgid "List the languages you speak, and your level of fluency with them." msgstr "" #: ../../source/contributing/internationalization.rst:83 msgid "What language(s) are you applying to be a proofreader for?" msgstr "" #: ../../source/contributing/internationalization.rst:84 msgid "Do you have any previous experience with translations?" msgstr "" #: ../../source/contributing/internationalization.rst:85 msgid "If yes, give us more details." msgstr "" #: ../../source/contributing/internationalization.rst:86 msgid "How will you ensure the quality of translations, should you become a proofreader?" msgstr "" #: ../../source/contributing/internationalization.rst:89 msgid "Please note that you don't need to have prior translation experience to be a proofreader, just a commitment to maintaining a good quality of translations." msgstr "" #: ../../source/contributing/internationalization.rst:94 msgid "Errors" msgstr "" #: ../../source/contributing/internationalization.rst:97 msgid "Source errors" msgstr "" ================================================ FILE: docs/i18n/gettext/contributing/performance.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/contributing/performance.rst:3 msgid "Improving performance" msgstr "" #: ../../source/contributing/performance.rst:5 msgid "One of Manim's main flaws as an animation library is its slow performance. As of time of writing (January 2022), the library is still very unoptimized. As such, we highly encourage contributors to help out in optimizing the code." msgstr "" #: ../../source/contributing/performance.rst:10 msgid "Profiling" msgstr "" #: ../../source/contributing/performance.rst:12 msgid "Before the library can be optimized, we first need to identify the bottlenecks in performance via profiling. There are numerous Python profilers available for this purpose; some examples include cProfile and Scalene." msgstr "" #: ../../source/contributing/performance.rst:17 msgid "Running an animation as a script" msgstr "" #: ../../source/contributing/performance.rst:19 msgid "Most instructions for profilers assume you can run the python file directly as a script from the command line. While Manim animations are usually run from the command-line, we can run them as scripts by adding something like the following to the bottom of the file:" msgstr "" #: ../../source/contributing/performance.rst:30 msgid "Where ``SceneName`` is the name of the scene you want to run. You can then run the file directly, and can thus follow the instructions for most profilers." msgstr "" #: ../../source/contributing/performance.rst:34 msgid "An example: profiling with cProfile and SnakeViz" msgstr "" #: ../../source/contributing/performance.rst:36 msgid "Install SnakeViz:" msgstr "" #: ../../source/contributing/performance.rst:42 msgid "cProfile is included with in Python's standard library and does not need to be installed." msgstr "" #: ../../source/contributing/performance.rst:44 msgid "Suppose we want to profile ``SquareToCircle``. Then we add and save the following code to ``square_to_circle.py``:" msgstr "" #: ../../source/contributing/performance.rst:64 msgid "Now run the following in the terminal:" msgstr "" #: ../../source/contributing/performance.rst:70 msgid "This will create a file called ``square_to_circle.txt``." msgstr "" #: ../../source/contributing/performance.rst:72 msgid "Now, we can run SnakeViz on the profile file:" msgstr "" ================================================ FILE: docs/i18n/gettext/contributing/references.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/contributing/references.rst:3 msgid "Adding References" msgstr "" #: ../../source/contributing/references.rst:6 msgid "Reference to types in documentation" msgstr "" #: ../../source/contributing/references.rst:8 msgid "Always specify types with the correct **role** (see https://www.sphinx-doc.org/en/1.7/domains.html#python-roles) for the sake of proper rendering. E.g.: Use ``:class:`int``` to refer to an int type, and in general ``:class:``​`` to refer to a certain class (see ``Path specification`` below). See after for more specific instructions." msgstr "" #: ../../source/contributing/references.rst:16 msgid "Path specifications" msgstr "" #: ../../source/contributing/references.rst:18 msgid "If it's on stdlib: Use ```` directly. If it's a class, just the name is enough. If it's a method (``:meth:``) or attribute (``:attr:``), dotted names may be used (e.g. ``:meth:`str.to_lower`​``)." msgstr "" #: ../../source/contributing/references.rst:23 msgid "Example: ``:class:`int`​``, ``:class:`str`​``, ``:class:`float`​``, ``:class:`bool`​``" msgstr "" #: ../../source/contributing/references.rst:26 msgid "If it's on the same file as the docstring or, for methods and attributes, under the same class, then the name may also be specified directly." msgstr "" #: ../../source/contributing/references.rst:30 msgid "Example: ``:class:`MyClass`​`` referring to a class in the same file; ``:meth:`push`​`` referring to a method in the same class; ``:meth:`MyClass.push`​`` referring to a method in a different class in the same file; ``:attr:`color`​`` referring to an attribute in the same class; ``:attr:`MyClass.color`​`` referring to an attribute in a different class in the same file." msgstr "" #: ../../source/contributing/references.rst:37 msgid "If it's on a different file, then you may either use the full dotted name (e.g. ``~manim.animations.Animation``) or simply use the shortened 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 displays just ``Animation`` instead of the full location in the rendering. It can be removed for disambiguation purposes only." msgstr "" #: ../../source/contributing/references.rst:45 msgid "Example: ``:class:`~.Animation`​``, ``:meth:`~.VMobject.set_color`​``, ``:attr:`~.VMobject.color`​``" msgstr "" #: ../../source/contributing/references.rst:48 msgid "If it's a class from a different module, specify the full dotted syntax." msgstr "" #: ../../source/contributing/references.rst:51 msgid "Example: ``:class:`numpy.ndarray`​`` for a numpy ndarray." msgstr "" #: ../../source/contributing/references.rst:54 msgid "Reference type specifications" msgstr "" #: ../../source/contributing/references.rst:56 msgid "**The following instructions refer to types of attributes, parameters, and return values.** When specifying a type mid-text, it does not necessarily 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 jump to the related documentation." msgstr "" #: ../../source/contributing/references.rst:63 msgid "Class names should be wrapped in ``:class:`path_goes_here`​``. See examples in the subsection above." msgstr "" #: ../../source/contributing/references.rst:65 msgid "Method names should be wrapped in ``:meth:`path_goes_here`​``. See examples in the subsection above." msgstr "" #: ../../source/contributing/references.rst:67 msgid "Attribute names should be wrapped in ``:attr:`path_goes_here`​``. See examples in the subsection above." msgstr "" #: ../../source/contributing/references.rst:69 msgid "If ``None`` can also be specified, use ``Optional[type]``, where ``type`` must follow the guidelines in the current section." msgstr "" #: ../../source/contributing/references.rst:72 msgid "Example: ``Optional[:class:`str`]`` means you can either specify a ``str`` or ``None``." msgstr "" #: ../../source/contributing/references.rst:75 msgid "If more than one type is possible, use ``Union[type_1, type_2, (...), type_n]``, where all the ``type_n`` must follow the guidelines in the current section. Note that, if one of these types is ``None``, then the Union should be wrapped with ``Optional`` instead." msgstr "" #: ../../source/contributing/references.rst:81 msgid "Example: ``Union[:class:`str`, :class:`int`]`` for either ``str`` or ``int``. ``Optional[Union[:class:`int`, :class:`bool`]]`` for either ``int``, ``bool`` or ``None``." msgstr "" #: ../../source/contributing/references.rst:85 msgid "**Dictionaries:** Use ``Dict[key_type, value_type]``, where ``key_type`` and ``value_type`` must follow the guidelines in the current section." msgstr "" #: ../../source/contributing/references.rst:89 msgid "Example: ``Dict[:class:`str`, :class:`~.Mobject`]`` is a dictionary that maps strings to Mobjects. ``Dict[:class:`str`, Union[:class:`int`, :class:`MyClass`]]`` is a dictionary that maps a string to either an int or an instance of ``MyClass``." msgstr "" #: ../../source/contributing/references.rst:95 msgid "**If the parameter is a list:** Note that it is very rare to require the parameter to be exactly a ``list`` type. One could usually specify a ``tuple`` instead, for example. So, in order to cover all cases, consider:" msgstr "" #: ../../source/contributing/references.rst:100 msgid "If the parameter only needs to be an ``Iterable``, i.e., if the function only requires being able to iterate over this parameter's value (e.g. can be a ``list``, ``tuple``, ``str``, but also ``zip()``, ``iter()`` and so on), then specify ``Iterable[type_here]``, where ``type_here`` is the type of the iterable's yielded elements and should follow the format in the present section (``Type specifications``)." msgstr "" #: ../../source/contributing/references.rst:108 msgid "Example: ``Iterable[:class:`str`]`` for any iterable of strings; ``Iterable[:class:`~.Mobject`]`` for an iterable of Mobjects; etc." msgstr "" #: ../../source/contributing/references.rst:111 msgid "If you require being able to index the parameter (i.e. ``x[n]``) or retrieve its length (i.e. ``len(x)``), or even just pass it to a function that requires any of those, then specify ``Sequence``, which allows any list-like object to be specified (e.g. ``list``, ``tuple``...)" msgstr "" #: ../../source/contributing/references.rst:117 msgid "Example: ``Sequence[:class:`str`]`` for a sequence of strings; ``Sequence[Union[:class:`str`, :class:`int`]]`` for a sequence of integers or strings." msgstr "" #: ../../source/contributing/references.rst:121 msgid "If you EXPLICITLY REQUIRE it to be a ``list`` for some reason, then use ``List[type]``, where ``type`` is the type that any element in the list will have. It must follow the guidelines in the current section." msgstr "" #: ../../source/contributing/references.rst:126 msgid "**If the return type is a list or tuple:** Specify ``List[type]`` for a list, ``Tuple[type_a, type_b, (...), type_n]`` for a tuple (if the elements are all different) or ``Tuple[type, ...]`` (if all elements have the same type). Each ``type_n`` on those representations corresponds to elements in the returned list/tuple and must follow the guidelines in the current section." msgstr "" ================================================ FILE: docs/i18n/gettext/contributing/testing.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/contributing/testing.rst:3 msgid "Adding Tests" msgstr "" #: ../../source/contributing/testing.rst:4 msgid "If you are adding new features to manim, you should add appropriate tests for them. Tests prevent manim from breaking at each change by checking that no other feature has been broken and/or been unintentionally modified." msgstr "" #: ../../source/contributing/testing.rst:9 msgid "How Manim tests" msgstr "" #: ../../source/contributing/testing.rst:11 msgid "Manim uses pytest as its testing framework. To start the testing process, go to the root directory of the project and run pytest in your terminal. Any errors that occur during testing will be displayed in the terminal." msgstr "" #: ../../source/contributing/testing.rst:15 msgid "Some useful pytest flags:" msgstr "" #: ../../source/contributing/testing.rst:17 msgid "``-x`` will make pytest stop at the first failure it encounters" msgstr "" #: ../../source/contributing/testing.rst:19 msgid "``-s`` will make pytest display all the print messages (including those during scene generation, like DEBUG messages)" msgstr "" #: ../../source/contributing/testing.rst:21 msgid "``--skip_slow`` will skip the (arbitrarily) slow tests" msgstr "" #: ../../source/contributing/testing.rst:23 msgid "``--show_diff`` will show a visual comparison in case a unit test is failing." msgstr "" #: ../../source/contributing/testing.rst:27 msgid "How it Works" msgstr "" #: ../../source/contributing/testing.rst:29 msgid "At the moment there are three types of tests:" msgstr "" #: ../../source/contributing/testing.rst:31 msgid "Unit Tests:" msgstr "" #: ../../source/contributing/testing.rst:33 msgid "Tests for most of the basic functionalities of manim. For example, there a test for ``Mobject``, that checks if it can be added to a Scene, etc." msgstr "" #: ../../source/contributing/testing.rst:36 msgid "Graphical unit tests: Because ``manim`` is a graphics library, we test frames. To do so, we create test scenes that render a specific feature. When pytest runs, it compares the result of the test to the control data, either at 6 fps or just the last frame. If it matches, the tests pass. If the test and control data differ, the tests fail. You can use ``--show_diff`` flag with ``pytest`` to visually see the differences." msgstr "" #: ../../source/contributing/testing.rst:42 msgid "Videos format tests:" msgstr "" #: ../../source/contributing/testing.rst:44 msgid "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 the system (for reasons related to ffmpeg). Therefore, we only compare video configuration values, exported in .json." msgstr "" #: ../../source/contributing/testing.rst:51 msgid "Architecture" msgstr "" #: ../../source/contributing/testing.rst:53 msgid "The ``manim/tests`` directory looks like this:" msgstr "" #: ../../source/contributing/testing.rst:122 msgid "The Main Directories" msgstr "" #: ../../source/contributing/testing.rst:124 msgid "``control_data/``:" msgstr "" #: ../../source/contributing/testing.rst:126 msgid "The directory containing control data. ``control_data/graphical_units_data/`` contains the expected and correct frame data for graphical tests, and ``control_data/videos_data/`` contains the .json files used to check videos." msgstr "" #: ../../source/contributing/testing.rst:129 msgid "``test_graphical_units/``:" msgstr "" #: ../../source/contributing/testing.rst:131 msgid "Contains graphical tests." msgstr "" #: ../../source/contributing/testing.rst:133 msgid "``test_scene_rendering/``:" msgstr "" #: ../../source/contributing/testing.rst:135 msgid "For tests that need to render a scene in some way, such as tests for CLI flags (end-to-end tests)." msgstr "" #: ../../source/contributing/testing.rst:138 msgid "``utils/``:" msgstr "" #: ../../source/contributing/testing.rst:140 msgid "Useful internal functions used by pytest." msgstr "" #: ../../source/contributing/testing.rst:142 msgid "fixtures are not contained here, they are in ``conftest.py``." msgstr "" #: ../../source/contributing/testing.rst:144 msgid "``helpers/``:" msgstr "" #: ../../source/contributing/testing.rst:146 msgid "Helper functions for developers to setup graphical/video tests." msgstr "" #: ../../source/contributing/testing.rst:149 msgid "Adding a New Test" msgstr "" #: ../../source/contributing/testing.rst:152 msgid "Unit Tests" msgstr "" #: ../../source/contributing/testing.rst:154 msgid "Pytest determines which functions are tests by searching for files whose names begin with \"test\\_\", and then within those files for functions beginning with \"test\" and classes beginning with \"Test\". These kinds of tests must be in ``tests/`` (e.g. ``tests/test_container.py``)." msgstr "" #: ../../source/contributing/testing.rst:160 msgid "Graphical Unit Test" msgstr "" #: ../../source/contributing/testing.rst:162 msgid "The test must be written in the correct file (i.e. the file that corresponds to the appropriate category the feature belongs to) and follow the structure of unit tests." msgstr "" #: ../../source/contributing/testing.rst:165 msgid "For example, to test the ``Circle`` VMobject which resides in ``manim/mobject/geometry.py``, add the CircleTest to ``test/test_geometry.py``." msgstr "" #: ../../source/contributing/testing.rst:169 msgid "The name of the module is indicated by the variable __module_test__, that **must** be declared in any graphical test file. The module name is used to store the graphical control data." msgstr "" #: ../../source/contributing/testing.rst:172 msgid "You will need to use the ``frames_comparison`` decorator to create a test. The test function **must** accept a parameter named ``scene`` that will be used like ``self`` in a standard ``construct`` method." msgstr "" #: ../../source/contributing/testing.rst:175 msgid "Here's an example in ``test_geometry.py``:" msgstr "" #: ../../source/contributing/testing.rst:190 msgid "The decorator can be used with or without parentheses. **By default, the test only tests the last frame. To enable multi-frame testing, you have to set ``last_frame=False`` in the parameters.**" msgstr "" #: ../../source/contributing/testing.rst:199 msgid "You can also specify, when needed, which base scene you need (ThreeDScene, for example) :" msgstr "" #: ../../source/contributing/testing.rst:208 msgid "Feel free to check the documentation of ``@frames_comparison`` for more." msgstr "" #: ../../source/contributing/testing.rst:210 msgid "Note that tests name must follow the syntax ``test_``, otherwise pytest will not recognize it as a test." msgstr "" #: ../../source/contributing/testing.rst:213 msgid "If you run pytest now, you will get a ``FileNotFound`` error. This is because you have not created control data for your test." msgstr "" #: ../../source/contributing/testing.rst:216 msgid "To create the control data for your test, you have to use the flag ``--set_test`` along with pytest. For the example above, it would be" msgstr "" #: ../../source/contributing/testing.rst:223 msgid "(``-s`` is here to see manim logs, so you can see what's going on)." msgstr "" #: ../../source/contributing/testing.rst:225 msgid "Please make sure to add the control data to git as soon as it is produced with ``git add ``." msgstr "" #: ../../source/contributing/testing.rst:229 msgid "Videos tests" msgstr "" #: ../../source/contributing/testing.rst:231 msgid "To test videos generated, we use the decorator ``tests.utils.videos_tester.video_comparison``:" msgstr "" #: ../../source/contributing/testing.rst:254 msgid "``assert exit*\\ code == 0, err`` is used in case of the command fails to run. The decorator takes two arguments: json name and the path to where the video should be generated, starting from the ``media/`` dir." msgstr "" #: ../../source/contributing/testing.rst:258 msgid "Note the fixtures here:" msgstr "" #: ../../source/contributing/testing.rst:260 msgid "tmp_path is a pytest fixture to get a tmp_path. Manim will output here, according to the flag ``--media_dir``." msgstr "" #: ../../source/contributing/testing.rst:262 msgid "``manim_cfg_file`` fixture that return a path pointing to ``test_scene_rendering/standard_config.cfg``. It's just to shorten the code, in the case multiple tests need to use this cfg file." msgstr "" #: ../../source/contributing/testing.rst:264 msgid "``simple_scenes_path`` same as above, except for ``test_scene_rendering/simple_scene.py``" msgstr "" #: ../../source/contributing/testing.rst:266 msgid "You have to generate a ``.json`` file first to be able to test your video. To do that, use ``helpers.save_control_data_from_video``." msgstr "" #: ../../source/contributing/testing.rst:269 msgid "For instance, a test that will check if the l flag works properly will first require rendering a video using the -l flag from a scene. Then we will test (in this case, SquareToCircle), that lives in ``test_scene_rendering/simple_scene.py``. Change directories to ``tests/``, create a file (e.g. ``create\\_data.py``) that you will remove as soon as you're done. Then run:" msgstr "" #: ../../source/contributing/testing.rst:280 msgid "Running this will save ``control_data/videos_data/SquareToCircleWithlFlag.json``, which will look like this:" msgstr "" ================================================ FILE: docs/i18n/gettext/contributing/typings.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/contributing/typings.rst:3 msgid "Adding Typings" msgstr "" #: ../../source/contributing/typings.rst:6 msgid "Adding type hints to functions and parameters" msgstr "" #: ../../source/contributing/typings.rst:9 msgid "This section is still a work in progress." msgstr "" #: ../../source/contributing/typings.rst:11 msgid "If you've never used type hints before, this is a good place to get started: https://realpython.com/python-type-checking/#hello-types." msgstr "" #: ../../source/contributing/typings.rst:14 msgid "When adding type hints to manim, there are some guidelines that should be followed:" msgstr "" #: ../../source/contributing/typings.rst:16 msgid "Coordinates have the typehint ``Sequence[float]``, e.g." msgstr "" #: ../../source/contributing/typings.rst:23 msgid "``**kwargs`` has no typehint" msgstr "" #: ../../source/contributing/typings.rst:25 msgid "Mobjects have the typehint \"Mobject\", e.g." msgstr "" #: ../../source/contributing/typings.rst:33 msgid "Colors have the typehint ``Color``, e.g." msgstr "" #: ../../source/contributing/typings.rst:40 msgid "As ``float`` and ``Union[int, float]`` are the same, use only ``float``" msgstr "" #: ../../source/contributing/typings.rst:42 msgid "For numpy arrays use the typehint ``np.ndarray``" msgstr "" #: ../../source/contributing/typings.rst:44 msgid "Functions that does not return a value should get the type hint ``None``. (This annotations help catch the kinds of subtle bugs where you are trying to use a meaningless return value. )" msgstr "" #: ../../source/contributing/typings.rst:51 msgid "Parameters that are None by default should get the type hint ``Optional``" msgstr "" #: ../../source/contributing/typings.rst:65 msgid "The ``__init__()`` method always should have None as its return type." msgstr "" #: ../../source/contributing/typings.rst:67 msgid "Functions and lambda functions should get the typehint ``Callable``" msgstr "" #: ../../source/contributing/typings.rst:74 msgid "Assuming that typical path objects are either Paths or strs, one can use the typehint ``typing.Union[str, pathlib.Path]``" msgstr "" #: ../../source/contributing/typings.rst:77 msgid "As a helper for tool for typesets, you can use `typestring-parser `_ which can be accessed by first installing it via ``pip`` - ``pip install typestring-parser`` and then using ``from typestring_parser import parse``." msgstr "" #: ../../source/contributing/typings.rst:96 msgid "Missing Sections for typehints are:" msgstr "" #: ../../source/contributing/typings.rst:97 msgid "Tools for typehinting" msgstr "" #: ../../source/contributing/typings.rst:98 msgid "Link to MyPy" msgstr "" #: ../../source/contributing/typings.rst:99 msgid "Mypy and numpy import errors: https://realpython.com/python-type-checking/#running-mypy" msgstr "" #: ../../source/contributing/typings.rst:100 msgid "Where to find the alias" msgstr "" #: ../../source/contributing/typings.rst:101 msgid "When to use Object and when to use \"Object\"." msgstr "" #: ../../source/contributing/typings.rst:102 msgid "The use of a TypeVar on the type hints for copy()." msgstr "" ================================================ FILE: docs/i18n/gettext/faq/general.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/faq/general.md:1 msgid "FAQ: General Usage" msgstr "" #: ../../source/faq/general.md:3 msgid "Why does Manim say that \"there are no scenes inside that module\"?" msgstr "" #: ../../source/faq/general.md:5 msgid "There are two main reasons why this error appears: if you have edited the file containing your `Scene` class and forgot to save it, or if you have accidentally passed the name of a wrong file to `manim`, this is a likely outcome. Check that you have spelled everything correctly." msgstr "" #: ../../source/faq/general.md:10 msgid "Otherwise you are likely mixing up Manim versions. See {ref}`this FAQ answer ` for an explanation regarding why there are different versions. Under the assumption that you are trying to use the `manim` executable from the terminal to run a scene that has been written for the community version (i.e., there is `from manim import *`, or more specifically `from manim import Scene`)" msgstr "" #: ../../source/faq/general.md:18 msgid "No matter what code I put in my file, Manim only renders a black frame! Why?" msgstr "" #: ../../source/faq/general.md:20 msgid "If you are using the usual pattern to write a `Scene`, i.e.," msgstr "" #: ../../source/faq/general.md:27 msgid "then double check whether you have spelled `construct` correctly. If the method containing your code is not called `construct` (or if you are not calling a different, custom method from `construct`), Manim will not call your method and simply output a black frame." msgstr "" #: ../../source/faq/general.md:34 msgid "What are the default measurements for Manim's scene?" msgstr "" #: ../../source/faq/general.md:36 msgid "The scene measures 8 units in height and has a default ratio of 16:9, which means that it measures {math}`8 \\cdot 16 / 9 = 14 + 2/9` units in width. The origin is in the center of the scene, which means that, for example, the upper left corner of the scene has coordinates `[-7-1/9, 4, 0]`." msgstr "" #: ../../source/faq/general.md:43 msgid "How do I find out which keyword arguments I can pass when creating a `Mobject`?" msgstr "" #: ../../source/faq/general.md:45 msgid "Let us consider some specific example, like the {class}`.Circle` class. When looking at its documentation page, only two specific keyword arguments are listed (`radius`, and `color`). Besides these concrete arguments, there is also a catchall `**kwargs` argument which captures all other arguments that are passed to `Circle`, and passes them on to the base class of {class}`.Circle`, {class}`.Arc`." msgstr "" #: ../../source/faq/general.md:51 msgid "The same holds for {class}`.Arc`: some arguments are explicitly documented, and there is again a catchall `**kwargs` argument that passes unprocessed arguments to the next base class -- and so on." msgstr "" #: ../../source/faq/general.md:55 msgid "The most important keyword arguments relevant to styling your mobjects are the ones that are documented for the base classes {class}`.VMobject` and {class}`.Mobject`." msgstr "" #: ../../source/faq/general.md:61 msgid "Can Manim render a video with transparent background?" msgstr "" #: ../../source/faq/general.md:63 msgid "Yes: simply pass the CLI flag `-t` (or its long form `--transparent`). Note that the default video file format does not support transparency, which is why Manim will output a `.mov` instead of a `.mp4` when rendering with a transparent background. Other movie file formats that support transparency can be obtained by passing `--format=webm` or `--format=gif`." msgstr "" #: ../../source/faq/general.md:72 msgid "I have watched a video where a creator ran command X, but it does not work for me. Why?" msgstr "" #: ../../source/faq/general.md:74 msgid "The video you have been watching is likely outdated. If you want to follow along, you either need to use the same version used in the video, or modify the code (in many cases it is just a method having been renamed etc.) accordingly. Check the video description, in some cases creators point out whether changes need to be applied to the code shown in the video." msgstr "" #: ../../source/faq/general.md:82 msgid "When using `Tex` or `MathTex`, some letters are missing. How can I fix this?" msgstr "" #: ../../source/faq/general.md:84 msgid "It is possible that you have to (re)build some fonts used by LaTeX. For some distributions, you can do this manually by running" msgstr "" #: ../../source/faq/general.md:89 msgid "We recommend consulting the documentation of your LaTeX distribution for more information." msgstr "" #: ../../source/faq/general.md:94 msgid "I want to translate some code from `manimgl` to `manim`, what do I do with `CONFIG` dictionaries?" msgstr "" #: ../../source/faq/general.md:96 msgid "The community maintained version has dropped the use of `CONFIG` dictionaries very early, with {doc}`version v0.2.0 ` released in January 2021." msgstr "" #: ../../source/faq/general.md:100 msgid "Before that, Manim's classes basically processed `CONFIG` dictionaries by mimicking inheritance (to properly process `CONFIG` dictionaries set by parent classes) and then assigning all of the key-value-pairs in the dictionary as attributes of the corresponding object." msgstr "" #: ../../source/faq/general.md:105 msgid "In situations where there is not much inheritance going on, or for any custom setting, you should set these attributes yourself. For example, for an old-style `Scene` with custom attributes like" msgstr "" #: ../../source/faq/general.md:114 msgid "should be written as" msgstr "" #: ../../source/faq/general.md:122 msgid "In situations where values should be properly inherited, the arguments should be added to the initialization function of the class. An old-style mobject `Thing` could look like" msgstr "" #: ../../source/faq/general.md:135 msgid "where `stroke_color` and `fill_opacity` are arguments that concern the parent class of `Thing`, and `my_awesome_argument` is a custom argument that only concerns `Thing`. A version without `CONFIG` could look like this:" msgstr "" #: ../../source/faq/general.md:150 msgid "My installation does not support converting PDF to SVG, help?" msgstr "" #: ../../source/faq/general.md:152 msgid "This is an issue with `dvisvgm`, the tool shipped with LaTeX that transforms LaTeX output to a `.svg` file that Manim can parse." msgstr "" #: ../../source/faq/general.md:156 msgid "First, make sure your ``dvisvgm`` version is at least 2.4 by checking the output of" msgstr "" #: ../../source/faq/general.md:163 msgid "If you do not know how to update `dvisvgm`, please refer to your LaTeX distributions documentation (or the documentation of your operating system, if `dvisvgm` was installed as a system package)." msgstr "" #: ../../source/faq/general.md:167 msgid "Second, check whether your ``dvisvgm`` supports PostScript specials. This is needed to convert from PDF to SVG. Run:" msgstr "" #: ../../source/faq/general.md:174 msgid "If the output to this command does **not** contain `ps dvips PostScript specials`, this is a bad sign. In this case, run" msgstr "" #: ../../source/faq/general.md:181 msgid "If the output does **not** contain `--libgs=filename`, this means your `dvisvgm` does not currently support PostScript. You must get another binary." msgstr "" #: ../../source/faq/general.md:184 msgid "If, however, `--libgs=filename` appears in the help, that means that your `dvisvgm` needs the Ghostscript library 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, also probably in `C:\\windows\\system32`) or `libgsl.dylib` (on MacOS, 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." msgstr "" #: ../../source/faq/general.md:193 msgid "When you have found the library, try (on MacOS or Linux)" msgstr "" #: ../../source/faq/general.md:200 msgid "or (on Windows)" msgstr "" #: ../../source/faq/general.md:207 msgid "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." msgstr "" #: ../../source/faq/general.md:211 msgid "As a last check, you can run" msgstr "" #: ../../source/faq/general.md:217 msgid "(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." msgstr "" #: ../../source/faq/general.md:221 msgid "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." msgstr "" #: ../../source/faq/general.md:225 msgid "If you are unable to solve your problem, check out the [dvisvgm FAQ](https://dvisvgm.de/FAQ/)." msgstr "" #: ../../source/faq/general.md:230 msgid "Where can I find more resources for learning Manim?" msgstr "" ================================================ FILE: docs/i18n/gettext/faq/help.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/faq/help.md:1 msgid "FAQ: Getting Help" msgstr "" #: ../../source/faq/help.md:3 msgid "How do I animate X? Why do I get error Y? Can someone help me?" msgstr "" #: ../../source/faq/help.md:5 msgid "Before asking the community, please make sure that the issue you are having is not already discussed in our {doc}`FAQ section ` sufficiently well so that you can resolve the problem yourself. You can also try to use your favorite search engine, if you are lucky you might find a blog post, a question on [StackOverflow](https://stackoverflow.com/questions/tagged/manim), or a post in the [r/manim subreddit](https://reddit.com/r/manim)." msgstr "" #: ../../source/faq/help.md:12 msgid "If this is not the case, please take a moment to properly prepare your question: the better you manage to explain what exactly it is you are struggling with, the more efficient people will be able to help you. Regardless of the platform you choose in the next step, StackOverflow has a good guide on [asking good questions](https://stackoverflow.com/help/how-to-ask)." msgstr "" #: ../../source/faq/help.md:18 msgid "As soon as you have a good idea of what exactly you want to ask, pick one of the following communication channels:" msgstr "" #: ../../source/faq/help.md:21 msgid "The community is most active [in our Discord server](https://manim.community/discord/). Click the link to join, then pick one of the `#manim-help` channels in the sidebar, and post your question there. If you are comfortable with using Discord, try to search for your problem using the search function of our server; perhaps people have been talking about it before!" msgstr "" #: ../../source/faq/help.md:26 msgid "We are also monitoring questions on [StackOverflow](https://stackoverflow.com/questions/tagged/manim) that are tagged with `manim`." msgstr "" #: ../../source/faq/help.md:29 msgid "Many people are also active in our [r/manim subreddit](https://reddit.com/r/manim), feel free to post there if you are an avid Redditor -- but be aware that Discord or StackOverflow might be better choices." msgstr "" #: ../../source/faq/help.md:32 msgid "And finally, you can also start a new [discussion on GitHub](https://github.com/ManimCommunity/manim/discussions) if you dislike all other options." msgstr "" #: ../../source/faq/help.md:35 msgid "In all of these channels, please make sure to abide by Manim's {doc}`Code of Conduct ` -- in short, be *excellent* to one another: be friendly and patient, considerate, and respectful." msgstr "" #: ../../source/faq/help.md:41 msgid "What should I do if nobody answers my question?" msgstr "" #: ../../source/faq/help.md:43 msgid "Try and see whether your question can be improved: did you include all relevant information (in case of errors: the full stack trace, the code that you were rendering, and the command you used to run Manim?). In case you used a very long example, is it possible to construct a more minimal version that has the same (faulty) behavior?" msgstr "" #: ../../source/faq/help.md:49 msgid "If you posted in one of our help channels on Discord and your question got buried, you are allowed to ping the `@Manim Helper` role to bring it to the attention of the volunteers who are willing to take a look. Please refrain from pinging the role immediately when asking your question for the first time, this is considered impolite." msgstr "" #: ../../source/faq/help.md:54 msgid "You can also try to post your question to a different channel if you feel that you are not having any success with your initial choice -- but please do not spam your question in all of our communication channels (and in particular for Discord: please don't use multiple help channels at once)." msgstr "" #: ../../source/faq/help.md:59 msgid "In the end, it is as for most open-source projects: our community members are volunteers. If you do not receive a quick answer to your question, it may be because nobody knows the answer, or because your question is not clear enough, or it could be that everyone who can help you with your problem is busy doing other things." msgstr "" #: ../../source/faq/help.md:67 msgid "The library does not behave as documented, or something broke in a new release. What should I do?" msgstr "" #: ../../source/faq/help.md:69 msgid "Sounds like you have found a bug. One of the best ways of contributing to the development of Manim is by reporting it!" msgstr "" #: ../../source/faq/help.md:72 msgid "Check our list of known issues and feature requests [in our GitHub repository](https://github.com/ManimCommunity/manim/issues). If the problem you have found is not listed there yet (use the search function; also check whether there is a corresponding closed issue, it is possible that your problem has already been resolved and will be fixed with the next release), please consider the following steps to submit a new issue." msgstr "" #: ../../source/faq/help.md:80 msgid "If you are unsure whether or not you should file a new issue for some odd behavior that you found, feel free to ask the community developers, preferably in one of our `#manim-dev` channels in [our Discord](https://manim.community/discord/)." msgstr "" #: ../../source/faq/help.md:85 msgid "Make sure you are running the latest released version of Manim, your problem might otherwise already be fixed in a more recent version. Check the {doc}`/changelog` for a full list of changes between Manim releases." msgstr "" #: ../../source/faq/help.md:89 msgid "Choose the correct category for your report when [creating a new issue](https://github.com/ManimCommunity/manim/issues/new/choose). We have dedicated issue templates for *bug reports*, *feature requests*, and *installation issues*. If your report falls into one of these categories, read the issue template carefully! Instructions are given in the `` sections of the text field. If you want to suggest a new feature without concrete implementation details, see {ref}`the instructions given in this answer `." msgstr "" #: ../../source/faq/help.md:98 msgid "For bug reports: prepare a minimal example that can be used to illustrate the issue. Examples with hundreds of lines are very inefficient and tedious to debug. Your problem needs to be reproducible for others, so please make sure to prepare a suitable example." msgstr "" #: ../../source/faq/help.md:103 msgid "This is mentioned in the bug report template as well, but it is very important: if you report that some code raises an error, make sure to include the full terminal output, from the command you used to run the library up to and including the last line with the error message. Read carefully: if the message mentions that there is another relevant log file, include this other file as well!" msgstr "" #: ../../source/faq/help.md:112 msgid "I have an idea for a really cool feature that should be implemented, where should I share my idea?" msgstr "" ================================================ FILE: docs/i18n/gettext/faq/index.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/faq/index.rst:4 #: ../../source/faq/index.rst:4 msgid "Table of Contents" msgstr "" ================================================ FILE: docs/i18n/gettext/faq/installation.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/faq/installation.md:1 msgid "FAQ: Installation" msgstr "" #: ../../source/faq/installation.md:4 msgid "Why are there different versions of Manim?" msgstr "" #: ../../source/faq/installation.md:6 msgid "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." msgstr "" #: ../../source/faq/installation.md:13 msgid "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 documented on this website. In early 2021, Grant merged the shaders branch back into master, making it the default branch in his repository -- and this is what `manimgl` is. The old version, before merging the `shaders` branch is sometimes referred to as `ManimCairo` and is, at this point, only useful for one singular purpose: rendering Grant's old videos locally on your machine. It is still available in his GitHub repository in form of the `cairo-backend` branch." msgstr "" #: ../../source/faq/installation.md:22 msgid "To summarize:" msgstr "" #: ../../source/faq/installation.md:23 msgid "[**Manim**, or **ManimCE**](https://manim.community) refers to the community maintained version of the library. This is the version documented on this website; the package name on PyPI is [`manim`](https://pypi.org/project/manim/)." msgstr "" #: ../../source/faq/installation.md:26 msgid "[ManimGL](https://github.com/3b1b/manim) is the latest released version of the version of the library developed by Grant \"3b1b\" Sanderson. It has more experimental features and breaking changes between versions are not documented. Check out its documentation [here](https://3b1b.github.io/manim/index.html); on PyPI the package name is [`manimgl`](https://pypi.org/project/manimgl/)." msgstr "" #: ../../source/faq/installation.md:31 msgid "[ManimCairo](https://github.com/3b1b/manim/tree/cairo-backend) is the name that is sometimes used for the old, pre-OpenGL version of `manimgl`. The latest version of it is available [on PyPI as `manimlib`](https://pypi.org/project/manimgl/), but note that if you intend to use it to compile some old project of Grant, you will likely have to install the exact version from the time the project was created from source." msgstr "" #: ../../source/faq/installation.md:40 msgid "Which version should I use?" msgstr "" #: ../../source/faq/installation.md:42 msgid "We recommend the community maintained version especially for beginners. It has been developed to be more stable, better tested and documented (!), and quicker to respond to community contributions. It is also perfectly reasonable to start learning with the community maintained version and then switch to a different version later on." msgstr "" #: ../../source/faq/installation.md:47 msgid "If you do not care so much about documentation or stability, and would like to use the exact same version that Grant is using, then use ManimGL." msgstr "" #: ../../source/faq/installation.md:50 msgid "And as mentioned above, ManimCairo should only be used for (re)rendering old 3Blue1Brown projects (basically 2019 and before)." msgstr "" #: ../../source/faq/installation.md:55 msgid "What are the differences between Manim, ManimGL, ManimCairo? Can I tell for which version a scene was written for?" msgstr "" #: ../../source/faq/installation.md:57 msgid "You can! The thing that usually gives it away is the `import` statement at the top of the file; depending on how the code imports Manim you can tell for which version of the code it was written for:" msgstr "" #: ../../source/faq/installation.md:61 msgid "If the code imports from `manim` (i.e., `from manim import *`, `import manim as mn`, etc.), then the code you are reading is supposed to be run with the community maintained version." msgstr "" #: ../../source/faq/installation.md:63 msgid "If the import reads `import manimlib` (or `from manimlib import *`), you are likely reading a file to be rendered with ManimGL." msgstr "" #: ../../source/faq/installation.md:65 msgid "And if the import reads `from manimlib.imports import *`, or perhaps even `from big_ol_pile_of_manim_imports import *` you are reading a snippet that is supposed to be rendered with an early, or very early version of ManimCairo, respectively." msgstr "" #: ../../source/faq/installation.md:71 msgid "How do I know which version of Manim I have installed?" msgstr "" #: ../../source/faq/installation.md:73 msgid "Assuming you can run `manim` in your terminal and there is some output, check the first line of the text being produced. If you are using the community maintained version, the first line of any output will be `Manim Community `. If it does not say that, you are likely using ManimGL." msgstr "" #: ../../source/faq/installation.md:78 msgid "You can also check the list of packages you have installed: if typing `python` in your terminal spawns the interpreter that corresponds to the Python installation you use (might also be `py`, or `python3`, depending on your operating system), running `python -m pip list` will print a list of all installed packages. Check whether `manim` or `manimgl` appear in that list." msgstr "" #: ../../source/faq/installation.md:84 msgid "Similarly, you can use `python -m pip install ` and `python -m pip uninstall ` to install and uninstall packages from that list, respectively." msgstr "" #: ../../source/faq/installation.md:90 msgid "I am following the video guide X to install Manim, but some step fails. What do I do?" msgstr "" #: ../../source/faq/installation.md:92 msgid "It is only natural that there are many video guides on installing Manim out there, given that Manim is a library used for creating videos. Unfortunately however, (YouTube) videos can't be updated easily (without uploading a new one, that is) when some step in the installation process changes, and so there are many **severely outdated** resources out there." msgstr "" #: ../../source/faq/installation.md:98 msgid "This is why we strongly recommend following our {doc}`written installation guide ` to guide you through the process. In case you prefer using a video guide regardless, please check whether the creator whose guide you have been watching has made a more recent version available, and otherwise please contact them directly. Asking for help in the community will likely lead to being suggested to follow our written guide." msgstr "" #: ../../source/faq/installation.md:107 msgid "Why does ManimPango fail to install when running `pip install manim`?" msgstr "" #: ../../source/faq/installation.md:109 msgid "This most likely means that pip was not able to use our pre-built wheels of the `manimpango` dependency. Let us know (via [Discord](https://www.manim.community/discord/) or by opening a [new issue on GitHub](https://github.com/ManimCommunity/ManimPango/issues/new)) which architecture you would like to see supported, and we'll see what we can do about it." msgstr "" #: ../../source/faq/installation.md:116 msgid "To fix errors when installing `manimpango`, you need to make sure you have all the necessary build requirements. Check out the detailed instructions given in [the BUILDING section](https://github.com/ManimCommunity/ManimPango#BUILDING) of [ManimPango's README](https://github.com/ManimCommunity/ManimPango)." msgstr "" #: ../../source/faq/installation.md:123 msgid "I am using Windows and get the error `X is not recognized as an internal or external command, operable program or batch file`" msgstr "" #: ../../source/faq/installation.md:125 msgid "Regardless of whether `X` says `python` or `manim`, this means that the executable you are trying to run is not located in one of the directories your system is looking for them (specified by the `PATH` variable). Take a look at the instructions {doc}`in the installation guide for Windows `, or [this StackExchange answer](https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path/143121#143121) to get help with editing the `PATH` variable manually." msgstr "" #: ../../source/faq/installation.md:132 msgid "If `python` is recognized but not `manim` or `pip`, you can try running commands by prepending `python -m`. That is, `manim` becomes `python -m manim`, and `pip` becomes `python -m pip`." msgstr "" #: ../../source/faq/installation.md:138 msgid "I have tried using Chocolatey (`choco install manimce`) to install Manim, but it failed!" msgstr "" #: ../../source/faq/installation.md:140 msgid "Make sure that you were running the command with administrator permissions, otherwise there can be problems. If this is not the issue, read Chocolatey's output carefully, it should mention a `.log` file containing information why the process failed." msgstr "" #: ../../source/faq/installation.md:145 msgid "You are welcome to take this file (and any other input you feel might be relevant) and submit it to Manim's community to ask for help with your problem. See the {doc}`FAQ on getting help ` for instructions." msgstr "" #: ../../source/faq/installation.md:151 msgid "On Windows, when typing `python` or `python3` the Windows store is opened, can I fix this?" msgstr "" #: ../../source/faq/installation.md:153 msgid "Yes: you can remove these aliases with these steps:" msgstr "" #: ../../source/faq/installation.md:155 msgid "Go to the Windows Setting." msgstr "" #: ../../source/faq/installation.md:156 msgid "Under *Apps and Features* you will find application execution aliases." msgstr "" #: ../../source/faq/installation.md:157 msgid "Within this menu, disable the alias(es) that are causing the issue (`python` and/or `python3`)." msgstr "" #: ../../source/faq/installation.md:162 msgid "I am using Anaconda and get an `ImportError` mentioning that some Symbol is not found." msgstr "" ================================================ FILE: docs/i18n/gettext/faq/internals.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/faq/internals.md:1 msgid "Where can I learn more about Manim's internal structure?" msgstr "" #: ../../source/faq/internals.md:3 msgid "Efforts to document the internal structure of Manim is ongoing on our [wiki](https://github.com/ManimCommunity/manim/wiki/Developer-documentation-(WIP))." msgstr "" ================================================ FILE: docs/i18n/gettext/faq/opengl.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/faq/opengl.md:1 msgid "FAQ: OpenGL rendering" msgstr "" #: ../../source/faq/opengl.md:3 msgid "Are there any resources on how the OpenGL renderer in the community maintained version can be used?" msgstr "" #: ../../source/faq/opengl.md:5 msgid "Yes. Unfortunately, at this point, the official online documentation does not contain the relevant base classes like `OpenGLMobject` and `OpenGLVMobject` or specific OpenGL classes like `OpenGLSurface`, but documentation for some of them is available in form of docstrings [in the source code](https://github.com/ManimCommunity/manim/tree/main/manim/mobject/opengl)." msgstr "" #: ../../source/faq/opengl.md:11 msgid "Furthermore, [this user guide by *aquabeam*](https://www.aquabeam.me/manim/opengl_guide/) can be helpful to get started using the OpenGL renderer." msgstr "" #: ../../source/faq/opengl.md:16 msgid "I am trying to run an interactive scene with `--renderer=opengl` and `Scene.interactive_embed`, but an error (`sqlite3.ProgrammingError`) is raised. How can I fix this?" msgstr "" ================================================ FILE: docs/i18n/gettext/guides/configuration.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/guides/configuration.rst:2 msgid "Configuration" msgstr "" #: ../../source/guides/configuration.rst:4 msgid "Manim provides an extensive configuration system that allows it to adapt to many different use cases. There are many configuration options that can be configured at different times during the scene rendering process. Each option can be configured programmatically via `the ManimConfig class`_, at the time of command invocation via `command-line arguments`_, or at the time the library is first imported via `the config files`_." msgstr "" #: ../../source/guides/configuration.rst:11 msgid "The most common, simplest, and recommended way to configure Manim is via the command-line interface (CLI), which is described directly below." msgstr "" #: ../../source/guides/configuration.rst:15 msgid "Command-line arguments" msgstr "" #: ../../source/guides/configuration.rst:17 msgid "By far the most commonly used command in the CLI is the ``render`` command, which is used to render scene(s) to an output file. It is used with the following arguments:" msgstr "" #: ../../source/guides/configuration.rst:24 msgid "However, since Manim defaults to the :code:`render` command whenever no command is specified, the following form is far more common and can be used instead:" msgstr "" #: ../../source/guides/configuration.rst:31 msgid "An example of using the above form is:" msgstr "" #: ../../source/guides/configuration.rst:37 msgid "This asks Manim to search for a Scene class called :code:`SceneOne` inside the file ``file.py`` and render it with medium quality (specified by the ``-qm`` flag)." msgstr "" #: ../../source/guides/configuration.rst:40 msgid "Another frequently used flag is ``-p`` (\"preview\"), which makes manim open the rendered video after it's done rendering." msgstr "" #: ../../source/guides/configuration.rst:43 msgid "The ``-p`` flag does not change any properties of the global ``config`` dict. The ``-p`` flag is only a command-line convenience." msgstr "" #: ../../source/guides/configuration.rst:47 msgid "Advanced examples" msgstr "" #: ../../source/guides/configuration.rst:49 msgid "To render a scene in high quality, but only output the last frame of the scene instead of the whole video, you can execute" msgstr "" #: ../../source/guides/configuration.rst:56 msgid "The following example specifies the output file name (with the :code:`-o` flag), renders only the first ten animations (:code:`-n` flag) with a white background (:code:`-c` flag), and saves the animation as a ``.gif`` instead of as a ``.mp4`` file (``--format=gif`` flag). It uses the default quality and does not try to open the file after it is rendered." msgstr "" #: ../../source/guides/configuration.rst:67 msgid "A list of all CLI flags" msgstr "" #: ../../source/guides/configuration.rst:75 msgid "The ManimConfig class" msgstr "" #: ../../source/guides/configuration.rst:77 msgid "The most direct way of configuring Manim is through the global ``config`` object, which is an instance of :class:`.ManimConfig`. Each property of this class is a config option that can be accessed either with standard attribute syntax or with dict-like syntax:" msgstr "" #: ../../source/guides/configuration.rst:88 msgid "The former is preferred; the latter is provided for backwards compatibility." msgstr "" #: ../../source/guides/configuration.rst:91 msgid "Most classes, including :class:`.Camera`, :class:`.Mobject`, and :class:`.Animation`, read some of their default configuration from the global ``config``." msgstr "" #: ../../source/guides/configuration.rst:103 msgid ":class:`.ManimConfig` is designed to keep internal consistency. For example, setting ``frame_y_radius`` will affect ``frame_height``:" msgstr "" #: ../../source/guides/configuration.rst:114 msgid "The global ``config`` object is meant to be the single source of truth for all config options. All of the other ways of setting config options ultimately change the values of the global ``config`` object." msgstr "" #: ../../source/guides/configuration.rst:118 msgid "The following example illustrates the video resolution chosen for examples rendered in our documentation with a reference frame." msgstr "" #: ../../source/guides/configuration.rst:140 msgid "The config files" msgstr "" #: ../../source/guides/configuration.rst:142 msgid "As the last example shows, executing Manim from the command line may involve using many flags simultaneously. This may become a nuisance if you must execute the same script many times in a short time period, for example, when making small incremental tweaks to your scene script. For this reason, Manim can also be configured using a configuration file. A configuration file is a file ending with the suffix ``.cfg``." msgstr "" #: ../../source/guides/configuration.rst:149 msgid "To use a local configuration file when rendering your scene, you must create a file with the name ``manim.cfg`` in the same directory as your scene code." msgstr "" #: ../../source/guides/configuration.rst:152 msgid "The config file **must** be named ``manim.cfg``. Currently, Manim does not support config files with any other name." msgstr "" #: ../../source/guides/configuration.rst:155 msgid "The config file must start with the section header ``[CLI]``. The configuration options under this header have the same name as the CLI flags and serve the same purpose. Take, for example, the following config file." msgstr "" #: ../../source/guides/configuration.rst:167 msgid "Config files are parsed with the standard python library ``configparser``. In particular, they will ignore any line that starts with a pound symbol ``#``." msgstr "" #: ../../source/guides/configuration.rst:170 msgid "Now, executing the following command" msgstr "" #: ../../source/guides/configuration.rst:176 msgid "is equivalent to executing the following command, provided that ``manim.cfg`` is in the same directory as ," msgstr "" #: ../../source/guides/configuration.rst:183 msgid "The names of the configuration options admissible in config files are exactly the same as the **long names** of the corresponding command- line flags. For example, the ``-c`` and ``--background_color`` flags are interchangeable, but the config file only accepts :code:`background_color` as an admissible option." msgstr "" #: ../../source/guides/configuration.rst:189 msgid "Since config files are meant to replace CLI flags, all CLI flags can be set via a config file. Moreover, any config option can be set via a config file, whether or not it has an associated CLI flag. See the bottom of this document for a list of all CLI flags and config options." msgstr "" #: ../../source/guides/configuration.rst:194 msgid "Manim will look for a ``manim.cfg`` config file in the same directory as the file being rendered, and **not** in the directory of execution. For example," msgstr "" #: ../../source/guides/configuration.rst:201 msgid "will use the config file found in ``path/to/file.py``, if any. It will **not** use the config file found in the current working directory, even if it exists. In this way, the user may keep different config files for different scenes or projects, and execute them with the right configuration from anywhere in the system." msgstr "" #: ../../source/guides/configuration.rst:207 msgid "The file described here is called the **folder-wide** config file because it affects all scene scripts found in the same folder." msgstr "" #: ../../source/guides/configuration.rst:212 msgid "The user config file" msgstr "" #: ../../source/guides/configuration.rst:214 msgid "As explained in the previous section, a :code:`manim.cfg` config file only affects the scene scripts in its same folder. However, the user may also create a special config file that will apply to all scenes rendered by that user. This is referred to as the **user-wide** config file, and it will apply regardless of where Manim is executed from, and regardless of where the scene script is stored." msgstr "" #: ../../source/guides/configuration.rst:221 msgid "The user-wide config file lives in a special folder, depending on the operating system." msgstr "" #: ../../source/guides/configuration.rst:224 msgid "Windows: :code:`UserDirectory`/AppData/Roaming/Manim/manim.cfg" msgstr "" #: ../../source/guides/configuration.rst:225 msgid "MacOS: :code:`UserDirectory`/.config/manim/manim.cfg" msgstr "" #: ../../source/guides/configuration.rst:226 msgid "Linux: :code:`UserDirectory`/.config/manim/manim.cfg" msgstr "" #: ../../source/guides/configuration.rst:228 msgid "Here, :code:`UserDirectory` is the user's home folder." msgstr "" #: ../../source/guides/configuration.rst:231 msgid "A user may have many **folder-wide** config files, one per folder, but only one **user-wide** config file. Different users in the same computer may each have their own user-wide config file." msgstr "" #: ../../source/guides/configuration.rst:235 msgid "Do not store scene scripts in the same folder as the user-wide config file. In this case, the behavior is undefined." msgstr "" #: ../../source/guides/configuration.rst:238 msgid "Whenever you use Manim from anywhere in the system, Manim will look for a user-wide config file and read its configuration." msgstr "" #: ../../source/guides/configuration.rst:243 msgid "Cascading config files" msgstr "" #: ../../source/guides/configuration.rst:245 msgid "What happens if you execute Manim and it finds both a folder-wide config file and a user-wide config file? Manim will read both files, but if they are incompatible, **the folder-wide file takes precedence**." msgstr "" #: ../../source/guides/configuration.rst:249 msgid "For example, take the following user-wide config file" msgstr "" #: ../../source/guides/configuration.rst:259 msgid "and the following folder-wide file" msgstr "" #: ../../source/guides/configuration.rst:267 msgid "Then, executing :code:`manim SceneName` will be equivalent to not using any config files and executing" msgstr "" #: ../../source/guides/configuration.rst:274 msgid "Any command-line flags have precedence over any config file. For example, using the previous two config files and executing :code:`manim -c RED SceneName` is equivalent to not using any config files and executing" msgstr "" #: ../../source/guides/configuration.rst:283 msgid "There 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 precedence, so any config options in the user-wide and any folder-wide files will override the library-wide file. This is referred to as the *cascading* config file system." msgstr "" #: ../../source/guides/configuration.rst:289 msgid "**The user should not try to modify the library-wide file**. Contributors should receive explicit confirmation from the core developer team before modifying it." msgstr "" #: ../../source/guides/configuration.rst:295 msgid "Order of operations" msgstr "" #: ../../source/guides/configuration.rst:304 msgid "With so many different ways of configuring Manim, it can be difficult to know when each config option is being set. In fact, this will depend on how Manim is being used." msgstr "" #: ../../source/guides/configuration.rst:308 msgid "If Manim is imported from a module, then the configuration system will follow these steps:" msgstr "" #: ../../source/guides/configuration.rst:311 msgid "The library-wide config file is loaded." msgstr "" #: ../../source/guides/configuration.rst:312 msgid "The user-wide and folder-wide files are loaded if they exist." msgstr "" #: ../../source/guides/configuration.rst:313 msgid "All files found in the previous two steps are parsed in a single :class:`ConfigParser` object, called ``parser``. This is where *cascading* happens." msgstr "" #: ../../source/guides/configuration.rst:316 msgid ":class:`logging.Logger` is instantiated to create Manim's global ``logger`` object. It is configured using the \"logger\" section of the parser, i.e. ``parser['logger']``." msgstr "" #: ../../source/guides/configuration.rst:319 msgid ":class:`ManimConfig` is instantiated to create the global ``config`` object." msgstr "" #: ../../source/guides/configuration.rst:320 msgid "The ``parser`` from step 3 is fed into the ``config`` from step 5 via :meth:`ManimConfig.digest_parser`." msgstr "" #: ../../source/guides/configuration.rst:322 msgid "Both ``logger`` and ``config`` are exposed to the user." msgstr "" #: ../../source/guides/configuration.rst:324 msgid "If Manim is being invoked from the command line, all of the previous steps happen, and are complemented by:" msgstr "" #: ../../source/guides/configuration.rst:327 msgid "The CLI flags are parsed and fed into ``config`` via :meth:`~ManimConfig.digest_args`." msgstr "" #: ../../source/guides/configuration.rst:329 msgid "If the ``--config_file`` flag was used, a new :class:`ConfigParser` object is created with the contents of the library-wide file, the user-wide file if it exists, and the file passed via ``--config_file``. In this case, the folder-wide file, if it exists, is ignored." msgstr "" #: ../../source/guides/configuration.rst:333 msgid "The new parser is fed into ``config``." msgstr "" #: ../../source/guides/configuration.rst:334 msgid "The rest of the CLI flags are processed." msgstr "" #: ../../source/guides/configuration.rst:336 msgid "To summarize, the order of precedence for configuration options, from lowest to highest precedence is:" msgstr "" #: ../../source/guides/configuration.rst:339 msgid "Library-wide config file," msgstr "" #: ../../source/guides/configuration.rst:340 msgid "user-wide config file, if it exists," msgstr "" #: ../../source/guides/configuration.rst:341 msgid "folder-wide config file, if it exists OR custom config file, if passed via ``--config_file``," msgstr "" #: ../../source/guides/configuration.rst:343 msgid "other CLI flags, and" msgstr "" #: ../../source/guides/configuration.rst:344 msgid "any programmatic changes made after the config system is set." msgstr "" #: ../../source/guides/configuration.rst:348 msgid "A list of all config options" msgstr "" #: ../../source/guides/configuration.rst:369 msgid "Accessing CLI command options" msgstr "" #: ../../source/guides/configuration.rst:371 msgid "Entering ``manim``, or ``manim --help``, will open the main help page." msgstr "" ================================================ FILE: docs/i18n/gettext/guides/index.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/guides/index.rst:4 #: ../../source/guides/index.rst:4 msgid "Table of Contents" msgstr "" ================================================ FILE: docs/i18n/gettext/guides/using_text.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/guides/using_text.rst:3 msgid "Rendering Text and Formulas" msgstr "" #: ../../source/guides/using_text.rst:5 msgid "There are two different ways by which you can render **Text** in videos:" msgstr "" #: ../../source/guides/using_text.rst:7 msgid "Using Pango (:mod:`~.text_mobject`)" msgstr "" #: ../../source/guides/using_text.rst:8 msgid "Using LaTeX (:mod:`~.tex_mobject`)" msgstr "" #: ../../source/guides/using_text.rst:10 msgid "If you want to render simple text, you should use either :class:`~.Text` or :class:`~.MarkupText`, or one of its derivatives like :class:`~.Paragraph`. See :ref:`using-text-objects` for more information." msgstr "" #: ../../source/guides/using_text.rst:14 msgid "LaTeX should be used when you need mathematical typesetting. See :ref:`rendering-with-latex` for more information." msgstr "" #: ../../source/guides/using_text.rst:20 msgid "Text Without LaTeX" msgstr "" #: ../../source/guides/using_text.rst:22 msgid "The simplest way to add text to your animations is to use the :class:`~.Text` class. It uses the `Pango library`_ to render text. With Pango, you can also render non-English alphabets like 你好 or こんにちは or 안녕하세요 or مرحبا بالعالم." msgstr "" #: ../../source/guides/using_text.rst:27 msgid "Here is a simple *Hello World* animation." msgstr "" #: ../../source/guides/using_text.rst:38 msgid "You can also use :class:`~.MarkupText` which allows the use of PangoMarkup (see the documentation of :class:`~.MarkupText` for details) to render text. For example:" msgstr "" #: ../../source/guides/using_text.rst:56 msgid "Working with :class:`~.Text`" msgstr "" #: ../../source/guides/using_text.rst:58 msgid "This section explains the properties of :class:`~.Text` and how can it be used in your animations." msgstr "" #: ../../source/guides/using_text.rst:62 msgid "Using Fonts" msgstr "" #: ../../source/guides/using_text.rst:64 msgid "You can set a different font using :attr:`~.Text.font`." msgstr "" #: ../../source/guides/using_text.rst:68 msgid "The font used must be installed in your system, and Pango should know about it. You can get a list of fonts using :func:`manimpango.list_fonts`." msgstr "" #: ../../source/guides/using_text.rst:85 msgid "Setting Slant and Weight" msgstr "" #: ../../source/guides/using_text.rst:86 msgid "Slant is the style of the Text, and it can be ``NORMAL`` (the default), ``ITALIC`` or ``OBLIQUE``. Usually, for many fonts both ``ITALIC`` and ``OBLIQUE`` look similar, but ``ITALIC`` uses **Roman Style**, whereas ``OBLIQUE`` uses **Italic Style**." msgstr "" #: ../../source/guides/using_text.rst:91 msgid "Weight specifies the boldness of a font. You can see a list of weights in :class:`manimpango.Weight`." msgstr "" #: ../../source/guides/using_text.rst:126 msgid "Using Colors" msgstr "" #: ../../source/guides/using_text.rst:128 msgid "You can set the color of the text using :attr:`~.Text.color`:" msgstr "" #: ../../source/guides/using_text.rst:138 msgid "You can use utilities like :attr:`~.Text.t2c` for coloring specific characters. This may be problematic if your text contains ligatures as explained in :ref:`iterating-text`." msgstr "" #: ../../source/guides/using_text.rst:142 msgid ":attr:`~Text.t2c` accepts two types of dictionaries," msgstr "" #: ../../source/guides/using_text.rst:144 msgid "The keys can contain indices like ``[2:-1]`` or ``[4:8]``, this works similar to how `slicing `_ works in Python. The values should be the color of the Text from :class:`~.Color`." msgstr "" #: ../../source/guides/using_text.rst:149 msgid "The keys contain words or characters which should be colored separately and the values should be the color from :class:`~.Color`:" msgstr "" #: ../../source/guides/using_text.rst:161 msgid "If you want to avoid problems when using colors (due to ligatures), consider using :class:`MarkupText`." msgstr "" #: ../../source/guides/using_text.rst:166 msgid "Using Gradients" msgstr "" #: ../../source/guides/using_text.rst:168 msgid "You can add a gradient using :attr:`~.Text.gradient`. The value must be an iterable of any length:" msgstr "" #: ../../source/guides/using_text.rst:179 msgid "You can also use :attr:`~.Text.t2g` for gradients with specific characters of the text. It shares a similar syntax to :ref:`the interface for colors `:" msgstr "" #: ../../source/guides/using_text.rst:203 msgid "Setting Line Spacing" msgstr "" #: ../../source/guides/using_text.rst:205 msgid "You can set the line spacing using :attr:`~.Text.line_spacing`:" msgstr "" #: ../../source/guides/using_text.rst:220 msgid "Disabling Ligatures" msgstr "" #: ../../source/guides/using_text.rst:222 msgid "By disabling ligatures you would get a one-to-one mapping between characters and submobjects. This fixes the issues with coloring text." msgstr "" #: ../../source/guides/using_text.rst:228 msgid "Be aware that using this method with text that heavily depends on ligatures (Arabic text) may yield unexpected results." msgstr "" #: ../../source/guides/using_text.rst:231 msgid "You can disable ligatures by passing ``disable_ligatures`` to :class:`Text`. For example:" msgstr "" #: ../../source/guides/using_text.rst:246 msgid "Iterating :class:`~.Text`" msgstr "" #: ../../source/guides/using_text.rst:248 msgid "Text objects behave like :class:`VGroups <.VGroup>`. Therefore, you can slice and index the text." msgstr "" #: ../../source/guides/using_text.rst:251 msgid "For example, you can set each letter to different color by iterating it." msgstr "" #: ../../source/guides/using_text.rst:265 msgid "Please note that `Ligature`_ can cause problems here. If you need a one-to-one mapping of characters to submobjects you should pass the ``disable_ligatures`` parameter to :class:`~.Text`. See :ref:`disable-ligatures`." msgstr "" #: ../../source/guides/using_text.rst:273 msgid "Working with :class:`~.MarkupText`" msgstr "" #: ../../source/guides/using_text.rst:275 msgid "MarkupText is similar to :class:`~.Text`, the only difference between them is that this accepts and processes PangoMarkup (which is similar to html), instead of just rendering plain text." msgstr "" #: ../../source/guides/using_text.rst:279 msgid "Consult the documentation of :class:`~.MarkupText` for more details and further references about PangoMarkup." msgstr "" #: ../../source/guides/using_text.rst:297 msgid "Text With LaTeX" msgstr "" #: ../../source/guides/using_text.rst:299 msgid "Just as you can use :class:`~.Text` to add text to your videos, you can use :class:`~.Tex` to insert LaTeX." msgstr "" #: ../../source/guides/using_text.rst:302 msgid "For example," msgstr "" #: ../../source/guides/using_text.rst:314 msgid "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 ``\\\\`` to escape the backslash: ``Tex('\\\\LaTeX')``." msgstr "" #: ../../source/guides/using_text.rst:320 msgid "Working with :class:`~.MathTex`" msgstr "" #: ../../source/guides/using_text.rst:322 msgid "Everything passed to :class:`~.MathTex` is in math mode by default. To be more precise, :class:`~.MathTex` is processed within an ``align*`` environment. You can achieve a similar effect with :class:`~.Tex` by enclosing your formula with ``$`` symbols: ``$\\xrightarrow{x^6y^8}$``:" msgstr "" #: ../../source/guides/using_text.rst:339 msgid "LaTeX commands and keyword arguments" msgstr "" #: ../../source/guides/using_text.rst:341 msgid "We can use any standard LaTeX commands in the AMS maths packages. Such as the ``mathtt`` math-text type or the ``looparrowright`` arrow." msgstr "" #: ../../source/guides/using_text.rst:352 msgid "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." msgstr "" #: ../../source/guides/using_text.rst:366 msgid "Extra LaTeX Packages" msgstr "" #: ../../source/guides/using_text.rst:368 msgid "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 have to add it manually." msgstr "" #: ../../source/guides/using_text.rst:388 msgid "Substrings and parts" msgstr "" #: ../../source/guides/using_text.rst:390 msgid "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 by selecting parts of the tex code. In this example, we set the color of the ``\\bigstar`` using :func:`~.set_color_by_tex`:" msgstr "" #: ../../source/guides/using_text.rst:404 msgid "Note that :func:`~.set_color_by_tex` colors the entire substring containing the Tex, not just the specific symbol or Tex expression. Consider the following example:" msgstr "" #: ../../source/guides/using_text.rst:418 msgid "As you can see, this colors the entire equation yellow, contrary to what may be expected. To color only ``x`` yellow, we have to do the following:" msgstr "" #: ../../source/guides/using_text.rst:433 msgid "By setting ``substrings_to_isolate`` to ``x``, we split up the :class:`~.MathTex` into substrings automatically and isolate the ``x`` components into individual substrings. Only then can :meth:`~.set_color_by_tex` be used to achieve the desired result." msgstr "" #: ../../source/guides/using_text.rst:438 msgid "Note that Manim also supports a custom syntax that allows splitting a TeX string into substrings easily: simply enclose parts of your formula that you want to isolate with double braces. In the string ``MathTex(r\"{{ a^2 }} + {{ b^2 }} = {{ c^2 }}\")``, the rendered mobject will consist of the substrings ``a^2``, ``+``, ``b^2``, ``=``, and ``c^2``. This makes transformations between similar text fragments easy to write using :class:`~.TransformMatchingTex`." msgstr "" #: ../../source/guides/using_text.rst:447 msgid "Using ``index_labels`` to work with complicated strings" msgstr "" #: ../../source/guides/using_text.rst:449 msgid "You might sometimes be working with a very complicated :class:`~.MathTex` mobject that makes it difficult to work with its individual components. This is where the debugging function :func:`.index_labels` is very useful." msgstr "" #: ../../source/guides/using_text.rst:453 msgid "The method shows the index of a mobject's submobjects, allowing you to easily find the components of the mobject you would like to change." msgstr "" #: ../../source/guides/using_text.rst:472 msgid "LaTeX Maths Fonts - The Template Library" msgstr "" #: ../../source/guides/using_text.rst:474 msgid "Changing fonts in LaTeX when typesetting mathematical formulae is trickier than regular text. It requires changing the template that is used to compile the TeX. Manim comes with a collection of :class:`~.TexFontTemplates` ready for you to use. These templates will all work in math mode:" msgstr "" #: ../../source/guides/using_text.rst:491 msgid "Manim also has a :class:`~.TexTemplateLibrary` containing the TeX templates used by 3Blue1Brown. One example is the ctex template, used for typesetting Chinese script. 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` instead." msgstr "" #: ../../source/guides/using_text.rst:508 msgid "Aligning formulae" msgstr "" ================================================ FILE: docs/i18n/gettext/installation/docker.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/installation/docker.rst:2 msgid "Docker" msgstr "" #: ../../source/installation/docker.rst:4 msgid "The community maintains a docker image, which can be found `on DockerHub `__. For our image ``manimcommunity/manim``, there are the following tags:" msgstr "" #: ../../source/installation/docker.rst:8 msgid "``latest``: the most recent version corresponding to `the main branch `__," msgstr "" #: ../../source/installation/docker.rst:10 msgid "``stable``: the latest released version (according to `the releases page `__)," msgstr "" #: ../../source/installation/docker.rst:12 msgid "``vX.Y.Z``: any particular released version (according to `the releases page `__)." msgstr "" #: ../../source/installation/docker.rst:17 msgid "When using Manim's CLI within a Docker container, some flags like ``-p`` (preview file) and ``-f`` (show output file in the file browser) are not supported." msgstr "" #: ../../source/installation/docker.rst:23 msgid "Basic usage of the Docker container" msgstr "" #: ../../source/installation/docker.rst:25 msgid "Assuming that you can access the docker installation on your system from a terminal (bash / PowerShell) via ``docker``, you can render a scene ``CircleToSquare`` in a file `test_scenes.py` with the following command." msgstr "" #: ../../source/installation/docker.rst:36 msgid "For Linux users there might be permission problems when letting the user in the container write to the mounted volume. Add ``--user=\"$(id -u):$(id -g)\"`` to the ``docker`` CLI arguments to prevent the creation of output files not belonging to your user." msgstr "" #: ../../source/installation/docker.rst:42 msgid "Instead of using the \"throwaway container\" approach outlined above, you can also create a named container that you can modify to your liking. First, run" msgstr "" #: ../../source/installation/docker.rst:51 msgid "to obtain an interactive shell inside your container allowing you to, e.g., install further dependencies (like texlive packages using ``tlmgr``). Exit the container as soon as you are satisfied. Then, before using it, start the container by running" msgstr "" #: ../../source/installation/docker.rst:60 msgid "which starts the container in the background. Then, to render a scene ``CircleToSquare`` in a file ``test_scenes.py``, run" msgstr "" #: ../../source/installation/docker.rst:69 msgid "Running JupyterLab via Docker" msgstr "" #: ../../source/installation/docker.rst:71 msgid "Another alternative to using the Docker image is to spin up a local JupyterLab instance. To do that, simply run" msgstr "" ================================================ FILE: docs/i18n/gettext/installation/jupyter.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/installation/jupyter.rst:2 msgid "Jupyter Notebooks" msgstr "" #: ../../source/installation/jupyter.rst:6 msgid "Binder" msgstr "" #: ../../source/installation/jupyter.rst:8 msgid "`Binder `__ is an online platform that hosts shareable and customizable computing environments in the form of Jupyter notebooks. Manim ships with a built-in ``%%manim`` Jupyter magic command which makes it easy to use in these notebooks." msgstr "" #: ../../source/installation/jupyter.rst:13 msgid "To see an example for such an environment, visit our interactive tutorial over at https://try.manim.community/." msgstr "" #: ../../source/installation/jupyter.rst:16 msgid "It is relatively straightforward to prepare your own notebooks in a way that allows them to be shared interactively via Binder as well:" msgstr "" #: ../../source/installation/jupyter.rst:19 msgid "First, prepare a directory containing one or multiple notebooks which you would like to share in an interactive environment. You can create these notebooks by using Jupyter notebooks with a local installation of Manim, or also by working in our pre-existing `interactive tutorial environment `__." msgstr "" #: ../../source/installation/jupyter.rst:24 msgid "In the same directory containing your notebooks, add a file named ``Dockerfile`` with the following content:" msgstr "" #: ../../source/installation/jupyter.rst:33 msgid "Don't forget to change the version tag ``v0.9.0`` to the version you were working with locally when creating your notebooks." msgstr "" #: ../../source/installation/jupyter.rst:35 msgid "Make the directory with your worksheets and the ``Dockerfile`` available to the public (and in particular: to Binder!). There are `several different options to do so `__, within the community we usually work with GitHub repositories or gists." msgstr "" #: ../../source/installation/jupyter.rst:41 msgid "Once your material is publicly available, visit https://mybinder.org and follow the instructions there to generate an interactive environment for your worksheets." msgstr "" #: ../../source/installation/jupyter.rst:47 msgid "The repository containing our `interactive tutorial `__ can be found at https://github.com/ManimCommunity/jupyter_examples." msgstr "" #: ../../source/installation/jupyter.rst:53 msgid "Google Colaboratory" msgstr "" #: ../../source/installation/jupyter.rst:55 msgid "It is also possible to install Manim in a `Google Colaboratory `__ environment. In contrast to Binder, where you can customize and prepare the environment beforehand (such that Manim is already installed and ready to be used), you will have to take care of that every time you start a new notebook in Google Colab. Fortunately, this is not particularly difficult." msgstr "" #: ../../source/installation/jupyter.rst:63 msgid "After creating a new notebook, paste the following code block in a cell, then execute it." msgstr "" #: ../../source/installation/jupyter.rst:76 msgid "You should start to see Colab installing all the dependencies specified in these commands. After the execution has completed, you will be prompted to restart the runtime. Click the \"restart runtime\" button at the bottom of the cell output. You are now ready to use Manim in Colab!" msgstr "" #: ../../source/installation/jupyter.rst:81 msgid "To check that everything works as expected, first import Manim by running" msgstr "" #: ../../source/installation/jupyter.rst:87 msgid "in a new code cell. Then create another cell containing the following code::" msgstr "" ================================================ FILE: docs/i18n/gettext/installation/linux.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/installation/linux.rst:2 msgid "Linux" msgstr "" #: ../../source/installation/linux.rst:4 msgid "The installation instructions depend on your particular operating system and package manager. If you happen to know exactly what you are doing, you can also simply ensure that your system has:" msgstr "" #: ../../source/installation/linux.rst:8 msgid "a reasonably recent version of Python 3 (3.7–3.10)," msgstr "" #: ../../source/installation/linux.rst:9 msgid "with working Cairo bindings in the form of `pycairo `__," msgstr "" #: ../../source/installation/linux.rst:11 msgid "FFmpeg accessible from the command line as ``ffmpeg``," msgstr "" #: ../../source/installation/linux.rst:12 msgid "and `Pango `__ headers." msgstr "" #: ../../source/installation/linux.rst:14 msgid "Then, installing Manim is just a matter of running:" msgstr "" #: ../../source/installation/linux.rst:22 msgid "In light of the current efforts of migrating to rendering via OpenGL, this list might be incomplete. Please `let us know ` if you ran into missing dependencies while installing." msgstr "" #: ../../source/installation/linux.rst:27 msgid "In any case, we have also compiled instructions for several common combinations of operating systems and package managers below." msgstr "" #: ../../source/installation/linux.rst:31 msgid "Required Dependencies" msgstr "" #: ../../source/installation/linux.rst:34 msgid "apt – Ubuntu / Mint / Debian" msgstr "" #: ../../source/installation/linux.rst:36 msgid "To first update your sources, and then install Cairo, Pango, and FFmpeg simply run:" msgstr "" #: ../../source/installation/linux.rst:44 msgid "If you don't have python3-pip installed, install it via:" msgstr "" #: ../../source/installation/linux.rst:50 msgid "Then, to install Manim, run:" msgstr "" #: ../../source/installation/linux.rst:56 #: ../../source/installation/linux.rst:90 #: ../../source/installation/linux.rst:123 msgid "Continue by reading the :ref:`optional dependencies ` section." msgstr "" #: ../../source/installation/linux.rst:60 msgid "dnf – Fedora / CentOS / RHEL" msgstr "" #: ../../source/installation/linux.rst:62 msgid "To install Cairo and Pango:" msgstr "" #: ../../source/installation/linux.rst:68 msgid "In order to successfully build the ``pycairo`` wheel, you will also need the Python development headers:" msgstr "" #: ../../source/installation/linux.rst:75 msgid "FFmpeg is only available via the RPMfusion repository which you have to configure first – please consult https://rpmfusion.org/Configuration/ for instructions. Then, install FFmpeg:" msgstr "" #: ../../source/installation/linux.rst:83 msgid "At this point you have all required dependencies and can install Manim by running:" msgstr "" #: ../../source/installation/linux.rst:94 msgid "pacman – Arch / Manjaro" msgstr "" #: ../../source/installation/linux.rst:98 msgid "Thanks to *groctel*, there is a `dedicated Manim package on the AUR! `" msgstr "" #: ../../source/installation/linux.rst:101 msgid "If you don't want to use the packaged version from AUR, here is what you need to do manually: Update your package sources, then install Cairo, Pango, and FFmpeg:" msgstr "" #: ../../source/installation/linux.rst:110 msgid "If you don't have ``python-pip`` installed, get it by running:" msgstr "" #: ../../source/installation/linux.rst:116 msgid "then simply install Manim via:" msgstr "" #: ../../source/installation/linux.rst:130 msgid "Optional Dependencies" msgstr "" #: ../../source/installation/linux.rst:132 msgid "In order to make use of Manim's interface to LaTeX for, e.g., rendering equations, LaTeX has to be installed as well. Note that this is an optional dependency: if you don't intend to use LaTeX, you don't have to install it." msgstr "" #: ../../source/installation/linux.rst:136 msgid "You can use whichever LaTeX distribution you like or whichever is easiest to install with your package manager. Usually, `TeX Live `__ is a good candidate if you don't care too much about disk space." msgstr "" ================================================ FILE: docs/i18n/gettext/installation/macos.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/installation/macos.rst:2 msgid "MacOS" msgstr "" #: ../../source/installation/macos.rst:4 msgid "For the sake of simplicity, the following instructions assume that you have the popular `package manager Homebrew `__ installed. While you can certainly also install all dependencies without it, using Homebrew makes the process much easier." msgstr "" #: ../../source/installation/macos.rst:9 msgid "If you want to use Homebrew but do not have it installed yet, please follow `Homebrew's installation instructions `__." msgstr "" #: ../../source/installation/macos.rst:14 msgid "For a while after Apple released its new ARM-based processors (the *\"M1 chip\"*), the recommended way of installing Manim relied on *Rosetta*, Apple's compatibility layer between Intel and ARM architectures. This is no longer necessary, Manim can (and is recommended to) be installed natively." msgstr "" #: ../../source/installation/macos.rst:21 msgid "Required Dependencies" msgstr "" #: ../../source/installation/macos.rst:23 msgid "To install all required dependencies for installing Manim (namely: ffmpeg, Python, and some required Python packages), run:" msgstr "" #: ../../source/installation/macos.rst:30 msgid "On *Apple Silicon* based machines (i.e., devices with the M1 chip or similar; if you are unsure which processor you have check by opening the Apple menu, select *About This Mac* and check the entry next to *Chip*), some additional dependencies are required, namely:" msgstr "" #: ../../source/installation/macos.rst:39 msgid "After all required dependencies are installed, simply run:" msgstr "" #: ../../source/installation/macos.rst:45 msgid "to install Manim." msgstr "" #: ../../source/installation/macos.rst:49 msgid "A frequent source for installation problems is if ``pip3`` does not point to the correct Python installation on your system. To check this, run ``pip3 -V``: for MacOS Intel, the path should start with ``/usr/local``, and for Apple Silicon with ``/opt/homebrew``. If this is not the case, you either forgot to modify your shell profile (``.zprofile``) during the installation of Homebrew, or did not reload your shell (e.g., by opening a new terminal) after doing so. It is also possible that some other software (like Pycharm) changed the ``PATH`` variable – to fix this, make sure that the Homebrew-related lines in your ``.zprofile`` are at the very end of the file." msgstr "" #: ../../source/installation/macos.rst:63 msgid "Optional Dependencies" msgstr "" #: ../../source/installation/macos.rst:65 msgid "In order to make use of Manim's interface to LaTeX for, e.g., rendering equations, LaTeX has to be installed as well. Note that this is an optional dependency: if you don't intend to use LaTeX, you don't have to install it." msgstr "" #: ../../source/installation/macos.rst:69 msgid "For MacOS, the recommended LaTeX distribution is `MacTeX `__. You can install it by following the instructions from the link, or alternatively also via Homebrew by running:" msgstr "" #: ../../source/installation/macos.rst:80 msgid "MacTeX is a *full* LaTeX distribution and will require more than 4GB of disk space. If this is an issue for you, consider installing a smaller distribution like `BasicTeX `__." msgstr "" #: ../../source/installation/macos.rst:85 msgid "Should you choose to work with some partial TeX distribution, the full list of LaTeX packages which Manim interacts with in some way (a subset might be sufficient for your particular application) is::" msgstr "" #: ../../source/installation/macos.rst:96 msgid "Working with Manim" msgstr "" ================================================ FILE: docs/i18n/gettext/installation/troubleshooting.pot ================================================ ================================================ FILE: docs/i18n/gettext/installation/versions.pot ================================================ ================================================ FILE: docs/i18n/gettext/installation/windows.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/installation/windows.rst:2 msgid "Windows" msgstr "" #: ../../source/installation/windows.rst:4 msgid "The easiest way of installing Manim and its dependencies is by using a package manager like `Chocolatey `__ or `Scoop `__. If you are not afraid of editing your System's ``PATH``, a manual installation is also possible. In fact, if you already have an existing Python installation (3.7-3.10), it might be the easiest way to get everything up and running." msgstr "" #: ../../source/installation/windows.rst:12 msgid "If you choose to use one of the package managers, please follow their installation instructions (`for Chocolatey `__, `for Scoop `__) to make one of them available on your system." msgstr "" #: ../../source/installation/windows.rst:20 msgid "Required Dependencies" msgstr "" #: ../../source/installation/windows.rst:22 msgid "Manim requires a recent version of Python (3.7–3.10) and ``ffmpeg`` in order to work." msgstr "" #: ../../source/installation/windows.rst:26 msgid "Chocolatey" msgstr "" #: ../../source/installation/windows.rst:28 msgid "Manim can be installed via Chocolatey simply by running:" msgstr "" #: ../../source/installation/windows.rst:34 msgid "That's it, no further steps required. You can continue with installing the :ref:`optional dependencies ` below." msgstr "" #: ../../source/installation/windows.rst:38 msgid "Scoop" msgstr "" #: ../../source/installation/windows.rst:40 msgid "While there is no recipe for installing Manim with Scoop directly, you can install all requirements by running:" msgstr "" #: ../../source/installation/windows.rst:47 msgid "and then Manim can be installed by running:" msgstr "" #: ../../source/installation/windows.rst:53 msgid "Manim should now be installed on your system. Continue reading the :ref:`optional dependencies ` section below." msgstr "" #: ../../source/installation/windows.rst:58 msgid "Manual Installation" msgstr "" #: ../../source/installation/windows.rst:60 msgid "As mentioned above, Manim needs a reasonably recent version of Python 3 (3.7–3.10) and FFmpeg." msgstr "" #: ../../source/installation/windows.rst:63 msgid "**Python:** Head over to https://www.python.org, download an installer for Python (3.7–3.10), and follow its instructions to get Python installed on your system." msgstr "" #: ../../source/installation/windows.rst:69 msgid "We have received reports of problems caused by using the version of Python that can be installed from the Windows Store. At this point, we recommend staying away from the Windows Store version. Instead, install Python directly from the `official website `__." msgstr "" #: ../../source/installation/windows.rst:75 msgid "**FFmpeg:** In order to install FFmpeg, you can get a pre-compiled and ready-to-use version from one of the resources linked at https://ffmpeg.org/download.html#build-windows, such as `the version available here `__ (recommended), or if you know exactly what you are doing you can alternatively get the source code from https://ffmpeg.org/download.html and compile it yourself." msgstr "" #: ../../source/installation/windows.rst:85 msgid "After downloading the pre-compiled archive, `unzip it `__ and, if you like, move the extracted directory to some more permanent place (e.g., ``C:\\Program Files\\``). Next, edit the ``PATH`` environment variable: first, visit ``Control Panel`` > ``System`` > ``System settings`` > ``Environment Variables``, then add the full path to the ``bin`` directory inside of the (moved) ffmpeg directory to the ``PATH`` variable. Finally, save your changes and exit." msgstr "" #: ../../source/installation/windows.rst:94 msgid "If you now open a new command line prompt (or PowerShell) and run ``ffmpeg``, the command should be recognized." msgstr "" #: ../../source/installation/windows.rst:97 msgid "At this point, you have all the required dependencies and can now install Manim via" msgstr "" #: ../../source/installation/windows.rst:108 msgid "Optional Dependencies" msgstr "" #: ../../source/installation/windows.rst:110 msgid "In order to make use of Manim's interface to LaTeX to, for example, render equations, LaTeX has to be installed as well. Note that this is an optional dependency: if you don't intend to use LaTeX, you don't have to install it." msgstr "" #: ../../source/installation/windows.rst:114 msgid "For Windows, the recommended LaTeX distribution is `MiKTeX `__. You can install it by using the installer from the linked MiKTeX site, or by using the package manager of your choice (Chocolatey: ``choco install miktex.install``, Scoop: ``scoop install latex``)." msgstr "" #: ../../source/installation/windows.rst:120 msgid "If you are concerned about disk space, there are some alternative, smaller distributions of LaTeX." msgstr "" #: ../../source/installation/windows.rst:123 msgid "**Using Chocolatey:** If you used Chocolatey to install manim or are already a chocolatey user, then you can simply run ``choco install manim-latex``. It is a dedicated package for Manim based on TinyTeX which contains all the required packages that Manim interacts with." msgstr "" #: ../../source/installation/windows.rst:128 msgid "**Manual Installation:** You can also use `TinyTeX `__ (Chocolatey: ``choco install tinytex``, Scoop: first ``scoop bucket add r-bucket https://github.com/cderv/r-bucket.git``, then ``scoop install tinytex``) alternative installation instructions can be found at their website. Keep in mind that you will have to manage the LaTeX packages installed on your system yourself via ``tlmgr``. Therefore we only recommend this option if you know what you are doing." msgstr "" #: ../../source/installation/windows.rst:135 msgid "The full list of LaTeX packages which Manim interacts with in some way (a subset might be sufficient for your particular application) are::" msgstr "" #: ../../source/installation/windows.rst:146 msgid "Working with Manim" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim._config.logger_utils.JSONFormatter.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim._config.logger_utils.JSONFormatter.rst:2 msgid "JSONFormatter" msgstr "" #: ../../source/reference/manim._config.logger_utils.JSONFormatter.rst:4 msgid "Qualified name: ``manim.\\_config.logger\\_utils.JSONFormatter``" msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.JSONFormatter:1 msgid "Bases: :py:class:`logging.Formatter`" msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.JSONFormatter:1 msgid "A formatter that outputs logs in a custom JSON format." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.JSONFormatter:3 msgid "This class is used internally for testing purposes." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.JSONFormatter:6 msgid "Initialize the formatter with specified format strings." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.JSONFormatter:8 msgid "Initialize the formatter either with the specified format string, or a default as described above. Allow for specialized date formatting with the optional datefmt argument. If datefmt is omitted, you get an ISO8601-like (or RFC 3339-like) format." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.JSONFormatter:13 msgid "Use a style parameter of '%', '{' or '$' to specify that you want to use one of %-formatting, :meth:`str.format` (``{}``) formatting or :class:`string.Template` formatting in your format string." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.JSONFormatter:17 msgid "Added the ``style`` parameter." msgstr "" #: ../../source/reference/manim._config.logger_utils.JSONFormatter.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim._config.logger_utils.JSONFormatter.rst:20::1 #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.JSONFormatter.format:1 msgid "Format the record in a custom JSON format." msgstr "" #: ../../source/reference/manim._config.logger_utils.JSONFormatter.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.JSONFormatter.format:0 msgid "Parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim._config.logger_utils.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim._config.logger_utils.rst:2 msgid "logger\\_utils" msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils:1 msgid "Utilities to create and set the logger." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils:3 msgid "Manim's logger can be accessed as ``manim.logger``, or as ``logging.getLogger(\"manim\")``, once the library has been imported. Manim also exports a second object, ``console``, which should be used to print on screen messages that need not be logged." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils:8 msgid "Both ``logger`` and ``console`` use the ``rich`` library to produce rich text format." msgstr "" #: ../../source/reference/manim._config.logger_utils.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim._config.logger_utils.rst:26::1 msgid "A formatter that outputs logs in a custom JSON format." msgstr "" #: ../../source/reference/manim._config.logger_utils.rst:29 msgid "Functions" msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.make_logger:1 msgid "Make the manim logger and console." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.make_logger:0 #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.parse_theme:0 #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.set_file_logger:0 msgid "Parameters" msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.make_logger:3 #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.parse_theme:3 msgid "A parser containing any .cfg files in use." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.make_logger:5 msgid "The verbosity level of the logger." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.make_logger:0 #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.parse_theme:0 msgid "Returns" msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.make_logger:8 msgid "The manim logger and consoles. The first console outputs to stdout, the second to stderr. All use the theme returned by :func:`parse_theme`." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.make_logger:0 #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.parse_theme:0 #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.set_file_logger:0 msgid "Return type" msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.make_logger:16 msgid "Notes" msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.make_logger:17 msgid "The ``parser`` is assumed to contain only the options related to configuring the logger at the top level." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.parse_theme:1 msgid "Configure the rich style of logger and console output." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.parse_theme:6 msgid "The rich theme to be used by the manim logger." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.set_file_logger:1 msgid "Add a file handler to manim logger." msgstr "" #: ../../../manim/_config/logger_utils.py:docstring of manim._config.logger_utils.set_file_logger:3 msgid "The path to the file is built using ``config.log_dir``." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim._config.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim._config.rst:2 msgid "\\_config" msgstr "" #: ../../../manim/_config/__init__.py:docstring of manim._config:1 msgid "Set the global config and logger." msgstr "" #: ../../source/reference/manim._config.rst:20 msgid "Functions" msgstr "" #: ../../../manim/_config/__init__.py:docstring of manim._config.tempconfig:1 msgid "Context manager that temporarily modifies the global ``config`` object." msgstr "" #: ../../../manim/_config/__init__.py:docstring of manim._config.tempconfig:3 msgid "Inside the ``with`` statement, the modified config will be used. After context manager exits, the config will be restored to its original state." msgstr "" #: ../../../manim/_config/__init__.py:docstring of manim._config.tempconfig:0 msgid "Parameters" msgstr "" #: ../../../manim/_config/__init__.py:docstring of manim._config.tempconfig:6 msgid "Object whose keys will be used to temporarily update the global ``config``." msgstr "" #: ../../../manim/_config/__init__.py:docstring of manim._config.tempconfig:0 msgid "Return type" msgstr "" #: ../../../manim/_config/__init__.py:docstring of manim._config.tempconfig:11 msgid "Examples" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim._config.utils.ManimConfig.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim._config.utils.ManimConfig.rst:2 msgid "ManimConfig" msgstr "" #: ../../source/reference/manim._config.utils.ManimConfig.rst:4 msgid "Qualified name: ``manim.\\_config.utils.ManimConfig``" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:1 msgid "Bases: :py:class:`collections.abc.MutableMapping`" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:1 msgid "Dict-like class storing all config options." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:3 msgid "The global ``config`` object is an instance of this class, and acts as a single source of truth for all of the library's customizable behavior." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:6 msgid "The global ``config`` object is capable of digesting different types of sources and converting them into a uniform interface. These sources are (in ascending order of precedence): configuration files, command line arguments, and programmatic changes. Regardless of how the user chooses to set a config option, she can access its current value using :class:`ManimConfig`'s attributes and properties." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:14 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.copy:9 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_args:15 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_file:16 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:18 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:19 msgid "Notes" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:15 msgid "Each config option is implemented as a property of this class." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:17 msgid "Each config option can be set via a config file, using the full name of the property. If a config option has an associated CLI flag, then the flag is equal to the full name of the property. Those that admit an alternative flag or no flag at all are documented in the individual property's docstring." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:24 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:25 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:25 msgid "Examples" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:25 msgid "We use a copy of the global configuration object in the following examples for the sake of demonstration; you can skip these lines and just import ``config`` directly if you actually want to modify the configuration:" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:35 msgid "Each config option allows for dict syntax and attribute syntax. For example, the following two lines are equivalent," msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:44 msgid "The former is preferred; the latter is provided mostly for backwards compatibility." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:47 msgid "The config options are designed to keep internal consistency. For example, setting ``frame_y_radius`` will affect ``frame_height``:" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:58 msgid "There are many ways of interacting with config options. Take for example the config option ``background_color``. There are three ways to change it: via a config file, via CLI flags, or programmatically." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:62 msgid "To set the background color via a config file, save the following ``manim.cfg`` file with the following contents." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:70 msgid "In order to have this ``.cfg`` file apply to a manim scene, it needs to be placed in the same directory as the script," msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:79 msgid "Now, when the user executes" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:85 msgid "the background of the scene will be set to ``WHITE``. This applies regardless of where the manim command is invoked from." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:88 msgid "Command line arguments override ``.cfg`` files. In the previous example, executing" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:95 msgid "will set the background color to BLUE, regardless of the contents of ``manim.cfg``." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:98 msgid "Finally, any programmatic changes made within the scene script itself will override the command line arguments. For example, if ``scene.py`` contains the following" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:111 msgid "the background color will be set to RED, regardless of the contents of ``manim.cfg`` or the CLI arguments used when invoking manim." msgstr "" #: ../../source/reference/manim._config.utils.ManimConfig.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim._config.utils.ManimConfig.rst:26::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.copy:1 msgid "Deepcopy the contents of this ManimConfig." msgstr "" #: ../../source/reference/manim._config.utils.ManimConfig.rst:26::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_args:1 msgid "Process the config options present in CLI arguments." msgstr "" #: ../../source/reference/manim._config.utils.ManimConfig.rst:26::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_file:1 msgid "Process the config options present in a ``.cfg`` file." msgstr "" #: ../../source/reference/manim._config.utils.ManimConfig.rst:26::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:1 msgid "Process the config options present in a :class:`ConfigParser` object." msgstr "" #: ../../source/reference/manim._config.utils.ManimConfig.rst:26::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:1 msgid "Resolve a config option that stores a directory." msgstr "" #: ../../source/reference/manim._config.utils.ManimConfig.rst:26::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.update:1 msgid "Digest the options found in another :class:`ManimConfig` or in a dict." msgstr "" #: ../../source/reference/manim._config.utils.ManimConfig.rst:28 msgid "Attributes" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1 msgid "Aspect ratio (width / height) in pixels (--resolution, -r)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.assets_dir:1 msgid "Directory to locate video assets (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.background_color:1 msgid "Background color of the scene (-c)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.background_opacity:1 msgid "A number between 0.0 (fully transparent) and 1.0 (fully opaque)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.bottom:1 msgid "Coordinate at the center bottom of the frame." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.custom_folders:1 msgid "Whether to use custom folder output." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.disable_caching:1 msgid "Whether to use scene caching." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.disable_caching_warning:1 msgid "Whether a warning is raised if there are too much submobjects to hash." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.dry_run:1 msgid "Whether dry run is enabled." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.enable_gui:1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.gui_location:1 msgid "Enable GUI interaction." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.enable_wireframe:1 msgid "Enable wireframe debugging mode in opengl." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.ffmpeg_executable:1 msgid "Manually specify the path to the ffmpeg executable" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.ffmpeg_loglevel:1 msgid "Verbosity level of ffmpeg (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.flush_cache:1 msgid "Whether to delete all the cached partial movie files." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.force_window:1 msgid "Set to force window when using the opengl renderer" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.format:1 msgid "File format; \"png\", \"gif\", \"mp4\", \"webm\" or \"mov\"." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.frame_height:1 msgid "Frame height in logical units (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.frame_rate:1 msgid "Frame rate in frames per second." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.frame_size:1 msgid "Tuple with (pixel width, pixel height) (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.frame_width:1 msgid "Frame width in logical units (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.frame_x_radius:1 msgid "Half the frame width (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.frame_y_radius:1 msgid "Half the frame height (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.from_animation_number:1 msgid "Start rendering animations at this number (-n)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.fullscreen:1 msgid "Expand the window to its maximum possible size." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Directory to place images (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.input_file:1 msgid "Input file name." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.left_side:1 msgid "Coordinate at the middle left of the frame." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Directory to place logs." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.log_to_file:1 msgid "Whether to save logs to a file." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Maximum number of files cached." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Main output directory." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.media_embed:1 msgid "Embed videos in Jupyter notebook" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.media_width:1 msgid "Media width in Jupyter notebook" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.movie_file_extension:1 msgid "Either .mp4, .webm or .mov." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.notify_outdated_version:1 msgid "Whether to notify if there is a version update available." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.output_file:1 msgid "Output file name (-o)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Directory to place partial movie files (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.pixel_height:1 msgid "Frame height in pixels (--resolution, -r)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.pixel_width:1 msgid "Frame width in pixels (--resolution, -r)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.plugins:1 msgid "List of plugins to enable." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.preview:1 msgid "Whether to play the rendered movie (-p)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.progress_bar:1 msgid "Whether to show progress bars while rendering animations." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.quality:1 msgid "Video quality (-q)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.renderer:1 msgid "\"cairo\", \"opengl" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.right_side:1 msgid "Coordinate at the middle right of the frame." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.save_as_gif:1 msgid "Whether to save the rendered scene in .gif format (-i)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.save_last_frame:1 msgid "Whether to save the last frame of the scene as an image file (-s)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.save_pngs:1 msgid "Whether to save all frames in the scene as images files (-g)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.save_sections:1 msgid "Whether to save single videos for each section in addition to the movie file." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.scene_names:1 msgid "Scenes to play from file." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Directory to place section videos (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.show_in_file_browser:1 msgid "Whether to show the output file in the file browser (-f)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Directory to place tex (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Template used when rendering Tex." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "File to read Tex template from (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Directory to place text (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.top:1 msgid "Coordinate at the center top of the frame." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.transparent:1 msgid "Whether the background opacity is 0.0 (-t)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Stop rendering animations at this nmber." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.use_opengl_renderer:1 msgid "Whether or not to use the OpenGL renderer." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.use_projection_fill_shaders:1 msgid "Use shaders for OpenGLVMobject fill which are compatible with transformation matrices." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.use_projection_stroke_shaders:1 msgid "Use shaders for OpenGLVMobject stroke which are compatible with transformation matrices." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.verbosity:1 msgid "Logger verbosity; \"DEBUG\", \"INFO\", \"WARNING\", \"ERROR\", or \"CRITICAL\" (-v)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Directory to place videos (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.window_monitor:1 msgid "The monitor on which the scene will be rendered" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "Set the position of preview window." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "The size of the opengl window." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.write_all:1 msgid "Whether to render all scenes in the input file (-a)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.write_to_movie:1 msgid "Whether to render the scene to a movie file (-w)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1::1 msgid "PNG zero padding." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.copy:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_args:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_file:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.update:0 msgid "Return type" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.copy:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_args:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_file:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:0 msgid "Returns" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.copy:3 msgid "A copy of this object containing no shared references." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.copy:10 msgid "This is the main mechanism behind :func:`tempconfig`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_args:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_file:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.update:0 msgid "Parameters" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_args:3 msgid "An object returned by :func:`.main_utils.parse_args()`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_args:6 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:12 msgid "**self** -- This object, after processing the contents of ``parser``." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_args:16 msgid "If ``args.config_file`` is a non-empty string, ``ManimConfig`` tries to digest the contents of said file with :meth:`~ManimConfig.digest_file` before digesting any other CLI arguments." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_file:3 msgid "This method processes a single ``.cfg`` file, whereas :meth:`~ManimConfig.digest_parser` can process arbitrary parsers, built perhaps from multiple ``.cfg`` files." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_file:7 msgid "Path to the ``.cfg`` file." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_file:10 msgid "**self** -- This object, after processing the contents of ``filename``." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_file:17 msgid "If there are multiple ``.cfg`` files to process, it is always more efficient to parse them into a single :class:`ConfigParser` object first and digesting them with one call to :meth:`~ManimConfig.digest_parser`, instead of calling this method multiple times." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:3 msgid "This method processes arbitrary parsers, not only those read from a single file, whereas :meth:`~ManimConfig.digest_file` can only process one file at a time." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:7 msgid "An object reflecting the contents of one or many ``.cfg`` files. In particular, it may reflect the contents of multiple files that have been parsed in a cascading fashion." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:19 msgid "If there are multiple ``.cfg`` files to process, it is always more efficient to parse them into a single :class:`ConfigParser` object first, and then call this function once (instead of calling :meth:`~.ManimConfig.digest_file` multiple times)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:26 msgid "To digest the config options set in two files, first create a ConfigParser and parse both files and then digest the parser:" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.digest_parser:35 msgid "In fact, the global ``config`` object is initialized like so:" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:3 msgid "Config options that store directories may depend on one another. This method is used to provide the actual directory to the end user." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:6 msgid "The config option to be resolved. Must be an option ending in ``'_dir'``, for example ``'media_dir'`` or ``'video_dir'``." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:9 msgid "Any strings to be used when resolving the directory." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:12 msgid "Path to the requested directory. If the path resolves to the empty string, return ``None`` instead." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.update:0 msgid "Raises" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:16 msgid "When ``key`` is not a config option that stores a directory and thus :meth:`~ManimConfig.get_dir` is not appropriate; or when ``key`` is appropriate but there is not enough information to resolve the directory." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:20 msgid "Standard :meth:`str.format` syntax is used to resolve the paths so the paths may contain arbitrary placeholders using f-string notation. However, these will require ``kwargs`` to contain the required values." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:26 msgid "The value of ``config.tex_dir`` is ``'{media_dir}/Tex'`` by default, i.e. it is a subfolder of wherever ``config.media_dir`` is located. In order to get the *actual* directory, use :meth:`~ManimConfig.get_dir`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:41 msgid "Resolving directories is done in a lazy way, at the last possible moment, to reflect any changes in other config options:" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:50 msgid "Some directories depend on information that is not available to :class:`ManimConfig`. For example, the default value of `video_dir` includes the name of the input file and the video quality (e.g. 480p15). This informamtion has to be supplied via ``kwargs``:" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:65 msgid "Note the quality does not need to be passed as keyword argument since :class:`ManimConfig` does store information about quality." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:68 msgid "Directories may be recursively defined. For example, the config option ``partial_movie_dir`` depends on ``video_dir``, which in turn depends on ``media_dir``:" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.get_dir:84 msgid "Standard f-string syntax is used. Arbitrary names can be used when defining directories, as long as the corresponding values are passed to :meth:`ManimConfig.get_dir` via ``kwargs``." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.images_dir:1 msgid "Directory to place images (no flag). See :meth:`ManimConfig.get_dir`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.log_dir:1 msgid "Directory to place logs. See :meth:`ManimConfig.get_dir`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.max_files_cached:1 msgid "Maximum number of files cached. Use -1 for infinity (no flag)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.media_dir:1 msgid "Main output directory. See :meth:`ManimConfig.get_dir`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.partial_movie_dir:1 msgid "Directory to place partial movie files (no flag). See :meth:`ManimConfig.get_dir`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.renderer:0 msgid "type" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.renderer:3 msgid "Renderer" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.sections_dir:1 msgid "Directory to place section videos (no flag). See :meth:`ManimConfig.get_dir`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.tex_dir:1 msgid "Directory to place tex (no flag). See :meth:`ManimConfig.get_dir`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.tex_template:1 msgid "Template used when rendering Tex. See :class:`.TexTemplate`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.tex_template_file:1 msgid "File to read Tex template from (no flag). See :class:`.TexTemplateFromFile`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.text_dir:1 msgid "Directory to place text (no flag). See :meth:`ManimConfig.get_dir`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.update:3 msgid "Similar to :meth:`dict.update`, replaces the values of this object with those of ``obj``." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.update:6 msgid "The object to copy values from." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.update:11 msgid "If ``obj`` is a dict but contains keys that do not belong to any config options." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.upto_animation_number:1 msgid "Stop rendering animations at this nmber. Use -1 to avoid skipping (-n)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.video_dir:1 msgid "Directory to place videos (no flag). See :meth:`ManimConfig.get_dir`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.window_position:1 msgid "Set the position of preview window. You can use directions, e.g. UL/DR/ORIGIN/LEFT...or the position(pixel) of the upper left corner of the window, e.g. '960,540'" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.window_size:1 msgid "The size of the opengl window. 'default' to automatically scale the window based on the display monitor." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim._config.utils.ManimFrame.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim._config.utils.ManimFrame.rst:2 msgid "ManimFrame" msgstr "" #: ../../source/reference/manim._config.utils.ManimFrame.rst:4 msgid "Qualified name: ``manim.\\_config.utils.ManimFrame``" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimFrame:1 msgid "Bases: :py:class:`collections.abc.Mapping`" msgstr "" #: ../../source/reference/manim._config.utils.ManimFrame.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim._config.utils.ManimFrame.rst:21 msgid "Attributes" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimFrame:0 msgid "Parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim._config.utils.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim._config.utils.rst:2 msgid "utils" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils:1 msgid "Utilities to create and set the config." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils:3 msgid "The main class exported by this module is :class:`ManimConfig`. This class contains all configuration options, including frame geometry (e.g. frame height/width, frame rate), output (e.g. directories, logging), styling (e.g. background color, transparency), and general behavior (e.g. writing a movie vs writing a single frame)." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils:9 msgid "See :doc:`/guides/configuration` for an introduction to Manim's configuration system." msgstr "" #: ../../source/reference/manim._config.utils.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim._config.utils.rst:28::1 msgid "Dict-like class storing all config options." msgstr "" #: ../../source/reference/manim._config.utils.rst:31 msgid "Functions" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.config_file_paths:1 msgid "The paths where ``.cfg`` files will be searched for." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.config_file_paths:3 msgid "When manim is first imported, it processes any ``.cfg`` files it finds. This function returns the locations in which these files are searched for. In ascending order of precedence, these are: the library-wide config file, the user-wide config file, and the folder-wide config file." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.config_file_paths:8 msgid "The library-wide config file determines manim's default behavior. The user-wide config file is stored in the user's home folder, and determines the behavior of manim whenever the user invokes it from anywhere in the system. The folder-wide config file only affects scenes that are in the same folder. The latter two files are optional." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.config_file_paths:14 msgid "These files, if they exist, are meant to loaded into a single :class:`configparser.ConfigParser` object, and then processed by :class:`ManimConfig`." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.config_file_paths:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.make_config_parser:0 msgid "Returns" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.config_file_paths:18 msgid "List of paths which may contain ``.cfg`` files, in ascending order of precedence." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.config_file_paths:0 #: ../../../manim/_config/utils.py:docstring of manim._config.utils.make_config_parser:0 msgid "Return type" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.config_file_paths:20 msgid "List[:class:`Path`]" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.config_file_paths:25 msgid "Notes" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.config_file_paths:26 msgid "The location of the user-wide config file is OS-specific." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.make_config_parser:1 msgid "Make a :class:`ConfigParser` object and load any ``.cfg`` files." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.make_config_parser:3 msgid "The user-wide file, if it exists, overrides the library-wide file. The folder-wide file, if it exists, overrides the other two." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.make_config_parser:6 msgid "The folder-wide file can be ignored by passing ``custom_file``. However, the user-wide and library-wide config files cannot be ignored." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.make_config_parser:0 msgid "Parameters" msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.make_config_parser:9 msgid "Path to a custom config file. If used, the folder-wide file in the relevant directory will be ignored, if it exists. If None, the folder-wide file will be used, if it exists." msgstr "" #: ../../../manim/_config/utils.py:docstring of manim._config.utils.make_config_parser:14 msgid "A parser containing the config options found in the .cfg files that were found. It is guaranteed to contain at least the config options found in the library-wide file." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.animation.Animation.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.animation.Animation.rst:2 msgid "Animation" msgstr "" #: ../../source/reference/manim.animation.animation.Animation.rst:4 msgid "Qualified name: ``manim.animation.animation.Animation``" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:1 msgid "Bases: :py:class:`object`" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:1 msgid "An animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:3 msgid "Animations have a fixed time span." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.clean_up_from_scene:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_sub_alpha:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.interpolate:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.interpolate_mobject:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_name:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_rate_func:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_run_time:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.update_mobjects:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:5 msgid "The mobject to be animated. This is not required for all types of animations." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:6 msgid "Defines the delay after which the animation is applied to submobjects. This lag is relative to the duration of the animation. This does not influence the total runtime of the animation. Instead the runtime of individual animations is adjusted so that the complete animation has the defined run time." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:6 msgid "Defines the delay after which the animation is applied to submobjects. This lag is relative to the duration of the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:9 msgid "This does not influence the total runtime of the animation. Instead the runtime of individual animations is adjusted so that the complete animation has the defined run time." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:12 msgid "The duration of the animation in seconds." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:13 msgid "The function defining the animation progress based on the relative runtime (see :mod:`~.rate_functions`) . For example ``rate_func(0.5)`` is the proportion of the animation that is done after half of the animations run time." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:13 msgid "The function defining the animation progress based on the relative runtime (see :mod:`~.rate_functions`) ." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:15 msgid "For example ``rate_func(0.5)`` is the proportion of the animation that is done after half of the animations run time." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:21 msgid "reverse_rate_function" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:19 msgid "Reverses the rate function of the animation. Setting ``reverse_rate_function`` does not have any effect on ``remover`` or ``introducer``. These need to be set explicitly if an introducer-animation should be turned into a remover one and vice versa." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:24 msgid "name" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:24 msgid "The name of the animation. This gets displayed while rendering the animation. Defaults to ()." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:26 msgid "remover" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:27 msgid "Whether the given mobject should be removed from the scene after this animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:30 msgid "suspend_mobject_updating" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:29 msgid "Whether updaters of the mobject should be suspended during the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:34 msgid "In the current implementation of this class, the specified rate function is applied within :meth:`.Animation.interpolate_mobject` call as part of the call to :meth:`.Animation.interpolate_submobject`. For subclasses of :class:`.Animation` that are implemented by overriding :meth:`interpolate_mobject`, the rate function has to be applied manually (e.g., by passing ``self.rate_func(alpha)`` instead of just ``alpha``)." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:43 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.animation.Animation.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1 msgid "Begin the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.clean_up_from_scene:1 msgid "Clean up the :class:`~.Scene` after finishing the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.copy:1 msgid "Create a copy of the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.finish:1 msgid "Finish the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_all_mobjects:1 msgid "Get all mobjects involved in the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_all_mobjects_to_update:1 msgid "Get all mobjects to be updated during the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_rate_func:1 msgid "Get the rate function of the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_run_time:1 msgid "Get the run time of the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_sub_alpha:1 msgid "Get the animation progress of any submobjects subanimation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.interpolate:1 msgid "Set the animation progress." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.interpolate_mobject:1 msgid "Interpolates the mobject of the :class:`Animation` based on alpha value." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.is_introducer:1 msgid "Test if the animation is an introducer." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.is_remover:1 msgid "Test if the animation is a remover." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_name:1 msgid "Set the name of the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_rate_func:1 msgid "Set the rate function of the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_run_time:1 msgid "Set the run time of the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1::1 msgid "Updates things like starting_mobject, and (for Transforms) target_mobject." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:3 msgid "This method is called right as an animation is being played. As much initialization as possible, especially any mobject copying, should live in this method." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.clean_up_from_scene:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.copy:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.finish:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_all_mobjects:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_all_mobjects_to_update:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_rate_func:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_run_time:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_sub_alpha:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.interpolate:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.interpolate_mobject:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.is_introducer:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.is_remover:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_name:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_rate_func:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_run_time:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.update_mobjects:0 msgid "Return type" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.clean_up_from_scene:3 msgid "This includes to :meth:`~.Scene.remove` the Animation's :class:`~.Mobject` if the animation is a remover." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.clean_up_from_scene:6 msgid "The scene the animation should be cleaned up from." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.copy:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_all_mobjects:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_all_mobjects_to_update:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_rate_func:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_run_time:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_sub_alpha:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.is_introducer:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.is_remover:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_name:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_rate_func:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_run_time:0 msgid "Returns" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.copy:3 msgid "A copy of ``self``" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.finish:3 msgid "This method gets called when the animation is over." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_all_mobjects:3 msgid "Ordering must match the ordering of arguments to interpolate_submobject" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_all_mobjects:5 msgid "The sequence of mobjects." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_all_mobjects_to_update:3 msgid "The list of mobjects to be updated during the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_rate_func:3 msgid "The rate function of the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_run_time:3 msgid "The time the animation takes in seconds." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_sub_alpha:3 msgid "The overall animation progress" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_sub_alpha:4 msgid "The index of the subanimation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_sub_alpha:5 msgid "The total count of subanimations." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.get_sub_alpha:7 msgid "The progress of the subanimation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.interpolate:3 msgid "This method gets called for every frame during an animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.interpolate:5 msgid "The relative time to set the animation to, 0 meaning the start, 1 meaning the end." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.interpolate_mobject:3 msgid "A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.is_introducer:3 msgid "``True`` if the animation is an introducer, ``False`` otherwise." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.is_remover:3 msgid "``True`` if the animation is a remover, ``False`` otherwise." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_name:3 msgid "The new name of the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_name:5 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_rate_func:5 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_run_time:7 msgid "``self``" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_rate_func:3 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_run_time:3 msgid "The new time the animation should take in seconds." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.set_run_time:4 msgid "The run_time of an animation should not be changed while it is already running." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.animation.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.animation.rst:2 msgid "animation" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation:1 msgid "Animate mobjects." msgstr "" #: ../../source/reference/manim.animation.animation.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.animation.animation.rst:28::1 msgid "An animation." msgstr "" #: ../../source/reference/manim.animation.animation.rst:28::1 msgid "A \"no operation\" animation." msgstr "" #: ../../source/reference/manim.animation.animation.rst:31 msgid "Functions" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.override_animation:1 msgid "Decorator used to mark methods as overrides for specific :class:`~.Animation` types." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.override_animation:3 msgid "Should only be used to decorate methods of classes derived from :class:`~.Mobject`. ``Animation`` overrides get inherited to subclasses of the ``Mobject`` who defined them. They don't override subclasses of the ``Animation`` they override." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.override_animation:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.prepare_animation:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.override_animation:9 msgid "The animation to be overridden." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.override_animation:0 msgid "Returns" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.override_animation:11 msgid "The actual decorator. This marks the method as overriding an animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.override_animation:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.prepare_animation:0 msgid "Return type" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.override_animation:15 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.prepare_animation:5 msgid "Examples" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.animation.Wait.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.animation.Wait.rst:2 msgid "Wait" msgstr "" #: ../../source/reference/manim.animation.animation.Wait.rst:4 msgid "Qualified name: ``manim.animation.animation.Wait``" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait:1 msgid "A \"no operation\" animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.clean_up_from_scene:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.interpolate:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.update_mobjects:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait:3 msgid "The amount of time that should pass." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait:4 msgid "A function without positional arguments that evaluates to a boolean. The function is evaluated after every new frame has been rendered. Playing the animation only stops after the return value is truthy. Overrides the specified ``run_time``." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait:8 msgid "Controls whether or not the wait animation is static, i.e., corresponds to a frozen frame. If ``False`` is passed, the render loop still progresses through the animation as usual and (among other things) continues to call updater functions. If ``None`` (the default value), the :meth:`.Scene.play` call tries to determine whether the Wait call can be static or not itself via :meth:`.Scene.should_mobjects_update`." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait:14 msgid "Keyword arguments to be passed to the parent class, :class:`.Animation`." msgstr "" #: ../../source/reference/manim.animation.animation.Wait.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.begin:1 msgid "Begin the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.clean_up_from_scene:1 msgid "Clean up the :class:`~.Scene` after finishing the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.finish:1 msgid "Finish the animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.begin:1::1 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.interpolate:1 msgid "Set the animation progress." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.begin:1::1 msgid "Updates things like starting_mobject, and (for Transforms) target_mobject." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.begin:3 msgid "This method is called right as an animation is being played. As much initialization as possible, especially any mobject copying, should live in this method." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.begin:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.clean_up_from_scene:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.finish:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.interpolate:0 #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.update_mobjects:0 msgid "Return type" msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.clean_up_from_scene:3 msgid "This includes to :meth:`~.Scene.remove` the Animation's :class:`~.Mobject` if the animation is a remover." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.clean_up_from_scene:6 msgid "The scene the animation should be cleaned up from." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.finish:3 msgid "This method gets called when the animation is over." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.interpolate:3 msgid "This method gets called for every frame during an animation." msgstr "" #: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Wait.interpolate:5 msgid "The relative time to set the animation to, 0 meaning the start, 1 meaning the end." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.changing.AnimatedBoundary.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.changing.AnimatedBoundary.rst:2 msgid "AnimatedBoundary" msgstr "" #: ../../source/reference/manim.animation.changing.AnimatedBoundary.rst:4 msgid "Qualified name: ``manim.animation.changing.AnimatedBoundary``" msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.AnimatedBoundary:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.AnimatedBoundary:1 msgid "Boundary of a :class:`.VMobject` with animated color change." msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.AnimatedBoundary:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.changing.AnimatedBoundary.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.changing.AnimatedBoundary.rst:23 msgid "Attributes" msgstr "" #: ../../source/reference/manim.animation.changing.AnimatedBoundary.rst:34::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.animation.changing.AnimatedBoundary.rst:34::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.animation.changing.AnimatedBoundary.rst:34::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.animation.changing.AnimatedBoundary.rst:34::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.changing.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.changing.rst:2 msgid "changing" msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing:1 msgid "Animation of a mobject boundary and tracing of points." msgstr "" #: ../../source/reference/manim.animation.changing.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.animation.changing.rst:22::1 msgid "Boundary of a :class:`.VMobject` with animated color change." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.changing.TracedPath.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.changing.TracedPath.rst:2 msgid "TracedPath" msgstr "" #: ../../source/reference/manim.animation.changing.TracedPath.rst:4 msgid "Qualified name: ``manim.animation.changing.TracedPath``" msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.TracedPath:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.TracedPath:1 msgid "Traces the path of a point returned by a function call." msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.TracedPath:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.TracedPath:3 msgid "The function to be traced." msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.TracedPath:4 msgid "The width of the trace." msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.TracedPath:5 msgid "The color of the trace." msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.TracedPath:6 msgid "The time taken for the path to dissipate. Default set to ``None`` which disables dissipation." msgstr "" #: ../../../manim/animation/changing.py:docstring of manim.animation.changing.TracedPath:10 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.changing.TracedPath.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.changing.TracedPath.rst:22 msgid "Attributes" msgstr "" #: ../../source/reference/manim.animation.changing.TracedPath.rst:33::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.animation.changing.TracedPath.rst:33::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.animation.changing.TracedPath.rst:33::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.animation.changing.TracedPath.rst:33::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.composition.AnimationGroup.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.composition.AnimationGroup.rst:2 msgid "AnimationGroup" msgstr "" #: ../../source/reference/manim.animation.composition.AnimationGroup.rst:4 msgid "Qualified name: ``manim.animation.composition.AnimationGroup``" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../source/reference/manim.animation.composition.AnimationGroup.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.begin:1::1 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.begin:1 msgid "Begin the animation." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.begin:1::1 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.build_animations_with_timings:1 msgid "Creates a list of triplets of the form (anim, start_time, end_time)" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.begin:1::1 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.clean_up_from_scene:1 msgid "Clean up the :class:`~.Scene` after finishing the animation." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.begin:1::1 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.finish:1 msgid "Finish the animation." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.begin:1::1 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.get_all_mobjects:1 msgid "Get all mobjects involved in the animation." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.begin:1::1 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.interpolate:1 msgid "Set the animation progress." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.begin:1::1 msgid "Updates things like starting_mobject, and (for Transforms) target_mobject." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.begin:3 msgid "This method is called right as an animation is being played. As much initialization as possible, especially any mobject copying, should live in this method." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.begin:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.build_animations_with_timings:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.clean_up_from_scene:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.finish:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.get_all_mobjects:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.interpolate:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.update_mobjects:0 msgid "Return type" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.clean_up_from_scene:3 msgid "This includes to :meth:`~.Scene.remove` the Animation's :class:`~.Mobject` if the animation is a remover." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.clean_up_from_scene:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.interpolate:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.update_mobjects:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.clean_up_from_scene:6 msgid "The scene the animation should be cleaned up from." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.finish:3 msgid "This method gets called when the animation is over." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.get_all_mobjects:3 msgid "Ordering must match the ordering of arguments to interpolate_submobject" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.get_all_mobjects:0 msgid "Returns" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.get_all_mobjects:5 msgid "The sequence of mobjects." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.interpolate:3 msgid "This method gets called for every frame during an animation." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.interpolate:5 msgid "The relative time to set the animation to, 0 meaning the start, 1 meaning the end." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.composition.LaggedStart.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.composition.LaggedStart.rst:2 msgid "LaggedStart" msgstr "" #: ../../source/reference/manim.animation.composition.LaggedStart.rst:4 msgid "Qualified name: ``manim.animation.composition.LaggedStart``" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.LaggedStart:1 msgid "Bases: :py:class:`manim.animation.composition.AnimationGroup`" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.composition.LaggedStartMap.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.composition.LaggedStartMap.rst:2 msgid "LaggedStartMap" msgstr "" #: ../../source/reference/manim.animation.composition.LaggedStartMap.rst:4 msgid "Qualified name: ``manim.animation.composition.LaggedStartMap``" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.LaggedStartMap:1 msgid "Bases: :py:class:`manim.animation.composition.LaggedStart`" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.composition.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.composition.rst:2 msgid "composition" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition:1 msgid "Tools for displaying multiple animations at once." msgstr "" #: ../../source/reference/manim.animation.composition.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.composition.Succession.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.composition.Succession.rst:2 msgid "Succession" msgstr "" #: ../../source/reference/manim.animation.composition.Succession.rst:4 msgid "Qualified name: ``manim.animation.composition.Succession``" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession:1 msgid "Bases: :py:class:`manim.animation.composition.AnimationGroup`" msgstr "" #: ../../source/reference/manim.animation.composition.Succession.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.begin:1::1 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.begin:1 msgid "Begin the animation." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.begin:1::1 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.finish:1 msgid "Finish the animation." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.begin:1::1 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.interpolate:1 msgid "Set the animation progress." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.begin:1::1 msgid "Updates things like starting_mobject, and (for Transforms) target_mobject." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.begin:3 msgid "This method is called right as an animation is being played. As much initialization as possible, especially any mobject copying, should live in this method." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.begin:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.finish:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.interpolate:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.update_mobjects:0 msgid "Return type" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.finish:3 msgid "This method gets called when the animation is over." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.interpolate:3 msgid "This method gets called for every frame during an animation." msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.interpolate:0 #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.update_mobjects:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession.interpolate:5 msgid "The relative time to set the animation to, 0 meaning the start, 1 meaning the end." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.AddTextLetterByLetter.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.AddTextLetterByLetter.rst:2 msgid "AddTextLetterByLetter" msgstr "" #: ../../source/reference/manim.animation.creation.AddTextLetterByLetter.rst:4 msgid "Qualified name: ``manim.animation.creation.AddTextLetterByLetter``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.AddTextLetterByLetter:1 msgid "Bases: :py:class:`manim.animation.creation.ShowIncreasingSubsets`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.AddTextLetterByLetter:1 msgid "Show a :class:`~.Text` letter by letter on the scene." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.AddTextLetterByLetter:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.AddTextLetterByLetter:3 msgid "Frequency of appearance of the letters." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.AddTextLetterByLetter:5 msgid "This is currently only possible for class:`~.Text` and not for class:`~.MathTex`" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.AddTextWordByWord.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.AddTextWordByWord.rst:2 msgid "AddTextWordByWord" msgstr "" #: ../../source/reference/manim.animation.creation.AddTextWordByWord.rst:4 msgid "Qualified name: ``manim.animation.creation.AddTextWordByWord``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.AddTextWordByWord:1 msgid "Bases: :py:class:`manim.animation.composition.Succession`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.AddTextWordByWord:1 msgid "Show a :class:`~.Text` word by word on the scene. Note: currently broken." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.Create.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.Create.rst:2 msgid "Create" msgstr "" #: ../../source/reference/manim.animation.creation.Create.rst:4 msgid "Qualified name: ``manim.animation.creation.Create``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Create:1 msgid "Bases: :py:class:`manim.animation.creation.ShowPartial`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Create:1 msgid "Incrementally show a VMobject." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Create:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Create:3 msgid "The VMobject to animate." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Create:0 msgid "Raises" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Create:6 msgid "If ``mobject`` is not an instance of :class:`~.VMobject`." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Create:9 msgid "Examples" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.DrawBorderThenFill.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.DrawBorderThenFill.rst:2 msgid "DrawBorderThenFill" msgstr "" #: ../../source/reference/manim.animation.creation.DrawBorderThenFill.rst:4 msgid "Qualified name: ``manim.animation.creation.DrawBorderThenFill``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill:1 msgid "Draw the border first and then show the fill." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.creation.DrawBorderThenFill.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill.begin:1::1 #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill.begin:1 msgid "Begin the animation." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill.begin:1::1 #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill.get_all_mobjects:1 msgid "Get all mobjects involved in the animation." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill.begin:3 msgid "This method is called right as an animation is being played. As much initialization as possible, especially any mobject copying, should live in this method." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill.begin:0 #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill.get_all_mobjects:0 msgid "Return type" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill.get_all_mobjects:3 msgid "Ordering must match the ordering of arguments to interpolate_submobject" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill.get_all_mobjects:0 msgid "Returns" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.rst:2 msgid "creation" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation:1 msgid "Animate the display or removal of a mobject from a scene." msgstr "" #: ../../source/reference/manim.animation.creation.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.animation.creation.rst:40::1 msgid "Show a :class:`~.Text` letter by letter on the scene." msgstr "" #: ../../source/reference/manim.animation.creation.rst:40::1 msgid "Show a :class:`~.Text` word by word on the scene." msgstr "" #: ../../source/reference/manim.animation.creation.rst:40::1 msgid "Incrementally show a VMobject." msgstr "" #: ../../source/reference/manim.animation.creation.rst:40::1 msgid "Draw the border first and then show the fill." msgstr "" #: ../../source/reference/manim.animation.creation.rst:40::1 msgid "Show one submobject at a time, leaving all previous ones displayed on screen." msgstr "" #: ../../source/reference/manim.animation.creation.rst:40::1 msgid "Abstract class for Animations that show the VMobject partially." msgstr "" #: ../../source/reference/manim.animation.creation.rst:40::1 msgid "Show one submobject at a time, removing all previously displayed ones from screen." msgstr "" #: ../../source/reference/manim.animation.creation.rst:40::1 msgid "Create the Mobject with sub-Mobjects flying in on spiral trajectories." msgstr "" #: ../../source/reference/manim.animation.creation.rst:40::1 msgid "Like :class:`Create` but in reverse." msgstr "" #: ../../source/reference/manim.animation.creation.rst:40::1 msgid "Simulate erasing by hand a :class:`~.Text` or a :class:`~.VMobject`." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.ShowIncreasingSubsets.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.ShowIncreasingSubsets.rst:2 msgid "ShowIncreasingSubsets" msgstr "" #: ../../source/reference/manim.animation.creation.ShowIncreasingSubsets.rst:4 msgid "Qualified name: ``manim.animation.creation.ShowIncreasingSubsets``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowIncreasingSubsets:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowIncreasingSubsets:1 msgid "Show one submobject at a time, leaving all previous ones displayed on screen." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowIncreasingSubsets:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.creation.ShowIncreasingSubsets.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowIncreasingSubsets.interpolate_mobject:1::1 #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowIncreasingSubsets.interpolate_mobject:1 msgid "Interpolates the mobject of the :class:`Animation` based on alpha value." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowIncreasingSubsets.interpolate_mobject:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowIncreasingSubsets.interpolate_mobject:3 msgid "A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.ShowPartial.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.ShowPartial.rst:2 msgid "ShowPartial" msgstr "" #: ../../source/reference/manim.animation.creation.ShowPartial.rst:4 msgid "Qualified name: ``manim.animation.creation.ShowPartial``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowPartial:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowPartial:1 msgid "Abstract class for Animations that show the VMobject partially." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowPartial:0 msgid "Raises" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowPartial:3 msgid "If ``mobject`` is not an instance of :class:`~.VMobject`." msgstr "" #: ../../source/reference/manim.animation.creation.ShowPartial.rst:14 msgid "Methods" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.ShowSubmobjectsOneByOne.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.ShowSubmobjectsOneByOne.rst:2 msgid "ShowSubmobjectsOneByOne" msgstr "" #: ../../source/reference/manim.animation.creation.ShowSubmobjectsOneByOne.rst:4 msgid "Qualified name: ``manim.animation.creation.ShowSubmobjectsOneByOne``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowSubmobjectsOneByOne:1 msgid "Bases: :py:class:`manim.animation.creation.ShowIncreasingSubsets`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowSubmobjectsOneByOne:1 msgid "Show one submobject at a time, removing all previously displayed ones from screen." msgstr "" #: ../../source/reference/manim.animation.creation.ShowSubmobjectsOneByOne.rst:14 msgid "Methods" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.SpiralIn.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.SpiralIn.rst:2 msgid "SpiralIn" msgstr "" #: ../../source/reference/manim.animation.creation.SpiralIn.rst:4 msgid "Qualified name: ``manim.animation.creation.SpiralIn``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn:1 msgid "Create the Mobject with sub-Mobjects flying in on spiral trajectories." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn:0 #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn.interpolate_mobject:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn:3 msgid "The Mobject on which to be operated." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn:4 msgid "The factor used for scaling the effect." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn:5 msgid "Fractional duration of initial fade-in of sub-Mobjects as they fly inward." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn:8 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.creation.SpiralIn.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn.interpolate_mobject:1::1 #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn.interpolate_mobject:1 msgid "Interpolates the mobject of the :class:`Animation` based on alpha value." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn.interpolate_mobject:3 msgid "A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.Uncreate.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.Uncreate.rst:2 msgid "Uncreate" msgstr "" #: ../../source/reference/manim.animation.creation.Uncreate.rst:4 msgid "Qualified name: ``manim.animation.creation.Uncreate``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Uncreate:1 msgid "Bases: :py:class:`manim.animation.creation.Create`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Uncreate:1 msgid "Like :class:`Create` but in reverse." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Uncreate:4 msgid "Examples" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.Unwrite.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.Unwrite.rst:2 msgid "Unwrite" msgstr "" #: ../../source/reference/manim.animation.creation.Unwrite.rst:4 msgid "Qualified name: ``manim.animation.creation.Unwrite``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Unwrite:1 msgid "Bases: :py:class:`manim.animation.creation.Write`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Unwrite:1 msgid "Simulate erasing by hand a :class:`~.Text` or a :class:`~.VMobject`." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Unwrite:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Unwrite:3 msgid "Set True to have the animation start erasing from the last submobject first." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Unwrite:7 msgid "Examples" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.creation.Write.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.creation.Write.rst:2 msgid "Write" msgstr "" #: ../../source/reference/manim.animation.creation.Write.rst:4 msgid "Qualified name: ``manim.animation.creation.Write``" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write:1 msgid "Bases: :py:class:`manim.animation.creation.DrawBorderThenFill`" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write:1 msgid "Simulate hand-writing a :class:`~.Text` or hand-drawing a :class:`~.VMobject`." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.creation.Write.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write.begin:1::1 #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write.begin:1 msgid "Begin the animation." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write.begin:1::1 #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write.finish:1 msgid "Finish the animation." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write.begin:3 msgid "This method is called right as an animation is being played. As much initialization as possible, especially any mobject copying, should live in this method." msgstr "" #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write.begin:0 #: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write.finish:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.fading.FadeIn.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.fading.FadeIn.rst:2 msgid "FadeIn" msgstr "" #: ../../source/reference/manim.animation.fading.FadeIn.rst:4 msgid "Qualified name: ``manim.animation.fading.FadeIn``" msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeIn:1 msgid "Bases: :py:class:`manim.animation.fading._Fade`" msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeIn:1 msgid "Fade in :class:`~.Mobject` s." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeIn:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeIn:3 msgid "The mobjects to be faded in." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeIn:4 msgid "The vector by which the mobject shifts while being faded in." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeIn:5 msgid "The position from which the mobject starts while being faded in. In case another mobject is given as target position, its center is used." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeIn:7 msgid "The factor by which the mobject is scaled initially before being rescaling to its original size while being faded in." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeIn:11 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.fading.FadeIn.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.fading.FadeIn.rst:23 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.fading.FadeOut.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.fading.FadeOut.rst:2 msgid "FadeOut" msgstr "" #: ../../source/reference/manim.animation.fading.FadeOut.rst:4 msgid "Qualified name: ``manim.animation.fading.FadeOut``" msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut:1 msgid "Bases: :py:class:`manim.animation.fading._Fade`" msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut:1 msgid "Fade out :class:`~.Mobject` s." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut:0 #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut.clean_up_from_scene:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut:3 msgid "The mobjects to be faded out." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut:4 msgid "The vector by which the mobject shifts while being faded out." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut:5 msgid "The position to which the mobject moves while being faded out. In case another mobject is given as target position, its center is used." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut:7 msgid "The factor by which the mobject is scaled while being faded out." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut:10 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.fading.FadeOut.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.fading.FadeOut.rst:21::1 #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut.clean_up_from_scene:1 msgid "Clean up the :class:`~.Scene` after finishing the animation." msgstr "" #: ../../source/reference/manim.animation.fading.FadeOut.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut.clean_up_from_scene:3 msgid "This includes to :meth:`~.Scene.remove` the Animation's :class:`~.Mobject` if the animation is a remover." msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading.FadeOut.clean_up_from_scene:6 msgid "The scene the animation should be cleaned up from." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.fading.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.fading.rst:2 msgid "fading" msgstr "" #: ../../../manim/animation/fading.py:docstring of manim.animation.fading:1 msgid "Fading in and out of view." msgstr "" #: ../../source/reference/manim.animation.fading.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.animation.fading.rst:22::1 msgid "Fade in :class:`~.Mobject` s." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.growing.GrowArrow.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.growing.GrowArrow.rst:2 msgid "GrowArrow" msgstr "" #: ../../source/reference/manim.animation.growing.GrowArrow.rst:4 msgid "Qualified name: ``manim.animation.growing.GrowArrow``" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowArrow:1 msgid "Bases: :py:class:`manim.animation.growing.GrowFromPoint`" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowArrow:1 msgid "Introduce an :class:`~.Arrow` by growing it from its start toward its tip." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowArrow:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowArrow:3 msgid "The arrow to be introduced." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowArrow:4 msgid "Initial color of the arrow before growing to its full size. Leave empty to match arrow's color." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowArrow:7 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.growing.GrowArrow.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.growing.GrowArrow.rst:22 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.growing.GrowFromCenter.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.growing.GrowFromCenter.rst:2 msgid "GrowFromCenter" msgstr "" #: ../../source/reference/manim.animation.growing.GrowFromCenter.rst:4 msgid "Qualified name: ``manim.animation.growing.GrowFromCenter``" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromCenter:1 msgid "Bases: :py:class:`manim.animation.growing.GrowFromPoint`" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromCenter:1 msgid "Introduce an :class:`~.Mobject` by growing it from its center." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromCenter:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromCenter:3 msgid "The mobjects to be introduced." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromCenter:4 msgid "Initial color of the mobject before growing to its full size. Leave empty to match mobject's color." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromCenter:7 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.growing.GrowFromCenter.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.growing.GrowFromCenter.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.growing.GrowFromEdge.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.growing.GrowFromEdge.rst:2 msgid "GrowFromEdge" msgstr "" #: ../../source/reference/manim.animation.growing.GrowFromEdge.rst:4 msgid "Qualified name: ``manim.animation.growing.GrowFromEdge``" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromEdge:1 msgid "Bases: :py:class:`manim.animation.growing.GrowFromPoint`" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromEdge:1 msgid "Introduce an :class:`~.Mobject` by growing it from one of its bounding box edges." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromEdge:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromEdge:3 msgid "The mobjects to be introduced." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromEdge:4 msgid "The direction to seek bounding box edge of mobject." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromEdge:5 msgid "Initial color of the mobject before growing to its full size. Leave empty to match mobject's color." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromEdge:8 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.growing.GrowFromEdge.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.growing.GrowFromEdge.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.growing.GrowFromPoint.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.growing.GrowFromPoint.rst:2 msgid "GrowFromPoint" msgstr "" #: ../../source/reference/manim.animation.growing.GrowFromPoint.rst:4 msgid "Qualified name: ``manim.animation.growing.GrowFromPoint``" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromPoint:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromPoint:1 msgid "Introduce an :class:`~.Mobject` by growing it from a point." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromPoint:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromPoint:3 msgid "The mobjects to be introduced." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromPoint:4 msgid "The point from which the mobject grows." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromPoint:5 msgid "Initial color of the mobject before growing to its full size. Leave empty to match mobject's color." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.GrowFromPoint:8 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.growing.GrowFromPoint.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.growing.GrowFromPoint.rst:23 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.growing.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.growing.rst:2 msgid "growing" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing:1 msgid "Animations that introduce mobjects to scene by growing them from points." msgstr "" #: ../../source/reference/manim.animation.growing.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.animation.growing.rst:28::1 msgid "Introduce an :class:`~.Arrow` by growing it from its start toward its tip." msgstr "" #: ../../source/reference/manim.animation.growing.rst:28::1 msgid "Introduce an :class:`~.Mobject` by growing it from its center." msgstr "" #: ../../source/reference/manim.animation.growing.rst:28::1 msgid "Introduce an :class:`~.Mobject` by growing it from one of its bounding box edges." msgstr "" #: ../../source/reference/manim.animation.growing.rst:28::1 msgid "Introduce an :class:`~.Mobject` by growing it from a point." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.growing.SpinInFromNothing.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.growing.SpinInFromNothing.rst:2 msgid "SpinInFromNothing" msgstr "" #: ../../source/reference/manim.animation.growing.SpinInFromNothing.rst:4 msgid "Qualified name: ``manim.animation.growing.SpinInFromNothing``" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.SpinInFromNothing:1 msgid "Bases: :py:class:`manim.animation.growing.GrowFromCenter`" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.SpinInFromNothing:1 msgid "Introduce an :class:`~.Mobject` spinning and growing it from its center." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.SpinInFromNothing:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.SpinInFromNothing:3 msgid "The mobjects to be introduced." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.SpinInFromNothing:4 msgid "The amount of spinning before mobject reaches its full size. E.g. 2*PI means that the object will do one full spin before being fully introduced." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.SpinInFromNothing:6 msgid "Initial color of the mobject before growing to its full size. Leave empty to match mobject's color." msgstr "" #: ../../../manim/animation/growing.py:docstring of manim.animation.growing.SpinInFromNothing:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.growing.SpinInFromNothing.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.growing.SpinInFromNothing.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.indication.ApplyWave.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.indication.ApplyWave.rst:2 msgid "ApplyWave" msgstr "" #: ../../source/reference/manim.animation.indication.ApplyWave.rst:4 msgid "Qualified name: ``manim.animation.indication.ApplyWave``" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:1 msgid "Bases: :py:class:`manim.animation.movement.Homotopy`" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:1 msgid "Send a wave through the Mobject distorting it temporarily." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:3 msgid "The mobject to be distorted." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:4 msgid "The direction in which the wave nudges points of the shape" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:5 msgid "The distance points of the shape get shifted" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:6 msgid "The function defining the shape of one wave flank." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:7 msgid "The length of the wave relative to the width of the mobject." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:8 msgid "The number of ripples of the wave" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:9 msgid "The duration of the animation." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ApplyWave:12 msgid "Examples" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.indication.Circumscribe.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.indication.Circumscribe.rst:2 msgid "Circumscribe" msgstr "" #: ../../source/reference/manim.animation.indication.Circumscribe.rst:4 msgid "Qualified name: ``manim.animation.indication.Circumscribe``" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:1 msgid "Bases: :py:class:`manim.animation.composition.Succession`" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:1 msgid "Draw a temporary line surrounding the mobject." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:3 msgid "The mobject to be circumscribed." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:4 msgid "The shape with which to surrond the given mobject. Should be either :class:`~.Rectangle` or :class:`~.Circle`" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:6 msgid "Whether to make the surrounding shape to fade in. It will be drawn otherwise." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:7 msgid "Whether to make the surrounding shape to fade out. It will be undrawn otherwise." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:8 msgid "The time_width of the drawing and undrawing. Gets ignored if either `fade_in` or `fade_out` is `True`." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:9 msgid "The distance between the surrounding shape and the given mobject." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:10 msgid "The color of the surrounding shape." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:11 msgid "The duration of the entire animation." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:12 msgid "Additional arguments to be passed to the :class:`~.Succession` constructor" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Circumscribe:16 msgid "Examples" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.indication.Flash.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.indication.Flash.rst:2 msgid "Flash" msgstr "" #: ../../source/reference/manim.animation.indication.Flash.rst:4 msgid "Qualified name: ``manim.animation.indication.Flash``" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:1 msgid "Bases: :py:class:`manim.animation.composition.AnimationGroup`" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:1 msgid "Send out lines in all directions." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:3 msgid "The center of the flash lines. If it is a :class:`.~Mobject` its center will be used." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:4 msgid "The length of the flash lines." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:5 msgid "The number of flash lines." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:6 msgid "The distance from `point` at which the flash lines start." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:7 msgid "The stroke width of the flash lines." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:8 msgid "The color of the flash lines." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:9 msgid "The time width used for the flash lines. See :class:`.~ShowPassingFlash` for more details." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:10 msgid "The duration of the animation." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:11 msgid "Additional arguments to be passed to the :class:`~.Succession` constructor" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Flash:15 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.indication.Flash.rst:14 msgid "Methods" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.indication.FocusOn.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.indication.FocusOn.rst:2 msgid "FocusOn" msgstr "" #: ../../source/reference/manim.animation.indication.FocusOn.rst:4 msgid "Qualified name: ``manim.animation.indication.FocusOn``" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.FocusOn:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.FocusOn:1 msgid "Shrink a spotlight to a position." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.FocusOn:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.FocusOn:3 msgid "The point at which to shrink the spotlight. If it is a :class:`.~Mobject` its center will be used." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.FocusOn:4 msgid "The opacity of the spotlight." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.FocusOn:5 msgid "The color of the spotlight." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.FocusOn:6 msgid "The duration of the animation." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.FocusOn:7 msgid "Additional arguments to be passed to the :class:`~.Succession` constructor" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.FocusOn:11 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.indication.FocusOn.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.indication.FocusOn.rst:22 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.indication.Indicate.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.indication.Indicate.rst:2 msgid "Indicate" msgstr "" #: ../../source/reference/manim.animation.indication.Indicate.rst:4 msgid "Qualified name: ``manim.animation.indication.Indicate``" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Indicate:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Indicate:1 msgid "Indicate a Mobject by temporarily resizing and recoloring it." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Indicate:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Indicate:3 msgid "The mobject to indicate." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Indicate:4 msgid "The factor by which the mobject will be temporally scaled" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Indicate:5 msgid "The color the mobject temporally takes." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Indicate:6 msgid "The function definig the animation progress at every point in time." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Indicate:7 msgid "Additional arguments to be passed to the :class:`~.Succession` constructor" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Indicate:11 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.indication.Indicate.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.indication.Indicate.rst:22 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.indication.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.indication.rst:2 msgid "indication" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication:1 msgid "Animations drawing attention to particular mobjects." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.indication.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.animation.indication.rst:36::1 msgid "Send a wave through the Mobject distorting it temporarily." msgstr "" #: ../../source/reference/manim.animation.indication.rst:36::1 msgid "Draw a temporary line surrounding the mobject." msgstr "" #: ../../source/reference/manim.animation.indication.rst:36::1 msgid "Send out lines in all directions." msgstr "" #: ../../source/reference/manim.animation.indication.rst:36::1 msgid "Shrink a spotlight to a position." msgstr "" #: ../../source/reference/manim.animation.indication.rst:36::1 msgid "Indicate a Mobject by temporarily resizing and recoloring it." msgstr "" #: ../../source/reference/manim.animation.indication.rst:36::1 msgid "Deprecated" msgstr "" #: ../../source/reference/manim.animation.indication.rst:36::1 msgid "Show only a sliver of the VMobject each frame." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.indication.ShowCreationThenFadeOut.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.indication.ShowCreationThenFadeOut.rst:2 msgid "ShowCreationThenFadeOut" msgstr "" #: ../../source/reference/manim.animation.indication.ShowCreationThenFadeOut.rst:4 msgid "Qualified name: ``manim.animation.indication.ShowCreationThenFadeOut``" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowCreationThenFadeOut:1 msgid "Bases: :py:class:`manim.animation.composition.Succession`" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowCreationThenFadeOut:1 msgid "Deprecated The class ShowCreationThenFadeOut has been deprecated since v0.15.0 and is expected to be removed after v0.16.0. Use Create then FadeOut to achieve this effect." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.indication.ShowPassingFlash.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.indication.ShowPassingFlash.rst:2 msgid "ShowPassingFlash" msgstr "" #: ../../source/reference/manim.animation.indication.ShowPassingFlash.rst:4 msgid "Qualified name: ``manim.animation.indication.ShowPassingFlash``" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash:1 msgid "Bases: :py:class:`manim.animation.creation.ShowPartial`" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash:1 msgid "Show only a sliver of the VMobject each frame." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash:0 #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash.clean_up_from_scene:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash:3 msgid "The mobject whose stroke is animated." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash:4 msgid "The length of the sliver relative to the length of the stroke." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash:7 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.indication.ShowPassingFlash.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash.clean_up_from_scene:1::1 #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash.clean_up_from_scene:1 msgid "Clean up the :class:`~.Scene` after finishing the animation." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash.clean_up_from_scene:3 msgid "This includes to :meth:`~.Scene.remove` the Animation's :class:`~.Mobject` if the animation is a remover." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlash.clean_up_from_scene:6 msgid "The scene the animation should be cleaned up from." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.indication.ShowPassingFlashWithThinningStrokeWidth.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.indication.ShowPassingFlashWithThinningStrokeWidth.rst:2 msgid "ShowPassingFlashWithThinningStrokeWidth" msgstr "" #: ../../source/reference/manim.animation.indication.ShowPassingFlashWithThinningStrokeWidth.rst:4 msgid "Qualified name: ``manim.animation.indication.ShowPassingFlashWithThinningStrokeWidth``" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowPassingFlashWithThinningStrokeWidth:1 msgid "Bases: :py:class:`manim.animation.composition.AnimationGroup`" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.indication.Wiggle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.indication.Wiggle.rst:2 msgid "Wiggle" msgstr "" #: ../../source/reference/manim.animation.indication.Wiggle.rst:4 msgid "Qualified name: ``manim.animation.indication.Wiggle``" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:1 msgid "Wiggle a Mobject." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:3 msgid "The mobject to wiggle." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:5 msgid "The factor by which the mobject will be temporarily scaled." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:6 msgid "The wiggle angle." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:7 msgid "The number of wiggles." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:8 msgid "The point about which the mobject gets scaled." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:9 msgid "The point around which the mobject gets rotated." msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:10 msgid "The duration of the animation" msgstr "" #: ../../../manim/animation/indication.py:docstring of manim.animation.indication.Wiggle:13 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.indication.Wiggle.rst:14 msgid "Methods" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.movement.ComplexHomotopy.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.movement.ComplexHomotopy.rst:2 msgid "ComplexHomotopy" msgstr "" #: ../../source/reference/manim.animation.movement.ComplexHomotopy.rst:4 msgid "Qualified name: ``manim.animation.movement.ComplexHomotopy``" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.ComplexHomotopy:1 msgid "Bases: :py:class:`manim.animation.movement.Homotopy`" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.ComplexHomotopy:1 msgid "Complex Homotopy a function Cx[0, 1] to C" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.movement.Homotopy.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.movement.Homotopy.rst:2 msgid "Homotopy" msgstr "" #: ../../source/reference/manim.animation.movement.Homotopy.rst:4 msgid "Qualified name: ``manim.animation.movement.Homotopy``" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.Homotopy:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.Homotopy:1 msgid "A Homotopy." msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.Homotopy:3 msgid "This is an animation transforming the points of a mobject according to the specified transformation function. With the parameter :math:`t` moving from 0 to 1 throughout the animation and :math:`(x, y, z)` describing the coordinates of the point of a mobject, the function passed to the ``homotopy`` keyword argument should transform the tuple :math:`(x, y, z, t)` to :math:`(x', y', z')`, the coordinates the original point is transformed to at time :math:`t`." msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.Homotopy:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.Homotopy:11 msgid "A function mapping :math:`(x, y, z, t)` to :math:`(x', y', z')`." msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.Homotopy:12 msgid "The mobject transformed under the given homotopy." msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.Homotopy:13 msgid "The run time of the animation." msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.Homotopy:14 msgid "Keyword arguments propagated to :meth:`.Mobject.apply_function`." msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.Homotopy:15 msgid "Further keyword arguments passed to the parent class." msgstr "" #: ../../source/reference/manim.animation.movement.Homotopy.rst:14 msgid "Methods" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.movement.MoveAlongPath.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.movement.MoveAlongPath.rst:2 msgid "MoveAlongPath" msgstr "" #: ../../source/reference/manim.animation.movement.MoveAlongPath.rst:4 msgid "Qualified name: ``manim.animation.movement.MoveAlongPath``" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.MoveAlongPath:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.MoveAlongPath:1 msgid "Make one mobject move along the path of another mobject. .. rubric:: Example" msgstr "" #: ../../source/reference/manim.animation.movement.MoveAlongPath.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.MoveAlongPath.interpolate_mobject:1::1 #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.MoveAlongPath.interpolate_mobject:1 msgid "Interpolates the mobject of the :class:`Animation` based on alpha value." msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.MoveAlongPath.interpolate_mobject:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.MoveAlongPath.interpolate_mobject:3 msgid "A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.movement.PhaseFlow.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.movement.PhaseFlow.rst:2 msgid "PhaseFlow" msgstr "" #: ../../source/reference/manim.animation.movement.PhaseFlow.rst:4 msgid "Qualified name: ``manim.animation.movement.PhaseFlow``" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.PhaseFlow:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../source/reference/manim.animation.movement.PhaseFlow.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.PhaseFlow.interpolate_mobject:1::1 #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.PhaseFlow.interpolate_mobject:1 msgid "Interpolates the mobject of the :class:`Animation` based on alpha value." msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.PhaseFlow.interpolate_mobject:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.PhaseFlow.interpolate_mobject:3 msgid "A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.movement.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.movement.rst:2 msgid "movement" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement:1 msgid "Animations related to movement." msgstr "" #: ../../source/reference/manim.animation.movement.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.animation.movement.rst:28::1 msgid "Complex Homotopy a function Cx[0, 1] to C" msgstr "" #: ../../source/reference/manim.animation.movement.rst:28::1 msgid "A Homotopy." msgstr "" #: ../../source/reference/manim.animation.movement.rst:28::1 msgid "Make one mobject move along the path of another mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.movement.SmoothedVectorizedHomotopy.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.movement.SmoothedVectorizedHomotopy.rst:2 msgid "SmoothedVectorizedHomotopy" msgstr "" #: ../../source/reference/manim.animation.movement.SmoothedVectorizedHomotopy.rst:4 msgid "Qualified name: ``manim.animation.movement.SmoothedVectorizedHomotopy``" msgstr "" #: ../../../manim/animation/movement.py:docstring of manim.animation.movement.SmoothedVectorizedHomotopy:1 msgid "Bases: :py:class:`manim.animation.movement.Homotopy`" msgstr "" #: ../../source/reference/manim.animation.movement.SmoothedVectorizedHomotopy.rst:14 msgid "Methods" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.numbers.ChangeDecimalToValue.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.numbers.ChangeDecimalToValue.rst:2 msgid "ChangeDecimalToValue" msgstr "" #: ../../source/reference/manim.animation.numbers.ChangeDecimalToValue.rst:4 msgid "Qualified name: ``manim.animation.numbers.ChangeDecimalToValue``" msgstr "" #: ../../../manim/animation/numbers.py:docstring of manim.animation.numbers.ChangeDecimalToValue:1 msgid "Bases: :py:class:`manim.animation.numbers.ChangingDecimal`" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.numbers.ChangingDecimal.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.numbers.ChangingDecimal.rst:2 msgid "ChangingDecimal" msgstr "" #: ../../source/reference/manim.animation.numbers.ChangingDecimal.rst:4 msgid "Qualified name: ``manim.animation.numbers.ChangingDecimal``" msgstr "" #: ../../../manim/animation/numbers.py:docstring of manim.animation.numbers.ChangingDecimal:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../source/reference/manim.animation.numbers.ChangingDecimal.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/numbers.py:docstring of manim.animation.numbers.ChangingDecimal.interpolate_mobject:1::1 #: ../../../manim/animation/numbers.py:docstring of manim.animation.numbers.ChangingDecimal.interpolate_mobject:1 msgid "Interpolates the mobject of the :class:`Animation` based on alpha value." msgstr "" #: ../../../manim/animation/numbers.py:docstring of manim.animation.numbers.ChangingDecimal.interpolate_mobject:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/numbers.py:docstring of manim.animation.numbers.ChangingDecimal.interpolate_mobject:3 msgid "A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.numbers.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.numbers.rst:2 msgid "numbers" msgstr "" #: ../../../manim/animation/numbers.py:docstring of manim.animation.numbers:1 msgid "Animations for changing numbers." msgstr "" #: ../../source/reference/manim.animation.numbers.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.rotation.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.rotation.rst:2 msgid "rotation" msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation:1 msgid "Animations related to rotation." msgstr "" #: ../../source/reference/manim.animation.rotation.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.animation.rotation.rst:22::1 msgid "Animation that rotates a Mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.rotation.Rotate.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.rotation.Rotate.rst:2 msgid "Rotate" msgstr "" #: ../../source/reference/manim.animation.rotation.Rotate.rst:4 msgid "Qualified name: ``manim.animation.rotation.Rotate``" msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotate:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotate:1 msgid "Animation that rotates a Mobject." msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotate:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotate:3 msgid "The mobject to be rotated." msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotate:4 msgid "The rotation angle." msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotate:5 msgid "The rotation axis as a numpy vector." msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotate:6 msgid "The rotation center." msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotate:7 msgid "If ``about_point``is ``None``, this argument specifies the direction of the bounding box point to be taken as the rotation center." msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotate:12 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.rotation.Rotate.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.rotation.Rotate.rst:22 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.rotation.Rotating.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.rotation.Rotating.rst:2 msgid "Rotating" msgstr "" #: ../../source/reference/manim.animation.rotation.Rotating.rst:4 msgid "Qualified name: ``manim.animation.rotation.Rotating``" msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotating:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../source/reference/manim.animation.rotation.Rotating.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotating.interpolate_mobject:1::1 #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotating.interpolate_mobject:1 msgid "Interpolates the mobject of the :class:`Animation` based on alpha value." msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotating.interpolate_mobject:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/rotation.py:docstring of manim.animation.rotation.Rotating.interpolate_mobject:3 msgid "A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.specialized.Broadcast.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.specialized.Broadcast.rst:2 msgid "Broadcast" msgstr "" #: ../../source/reference/manim.animation.specialized.Broadcast.rst:4 msgid "Qualified name: ``manim.animation.specialized.Broadcast``" msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:1 msgid "Bases: :py:class:`manim.animation.composition.LaggedStart`" msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:1 msgid "Broadcast a mobject starting from an ``initial_width``, up to the actual size of the mobject." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:3 msgid "The mobject to be broadcast." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:4 msgid "The center of the broadcast, by default ORIGIN." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:5 msgid "The number of mobjects that emerge from the focal point, by default 5." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:6 msgid "The starting stroke opacity of the mobjects emitted from the broadcast, by default 1." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:7 msgid "The final stroke opacity of the mobjects emitted from the broadcast, by default 0." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:8 msgid "The initial width of the mobjects, by default 0.0." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:9 msgid "Whether the mobjects should be removed from the scene after the animation, by default True." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:10 msgid "The time between each iteration of the mobject, by default 0.2." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:11 msgid "The total duration of the animation, by default 3." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:12 msgid "Additional arguments to be passed to :class:`~.LaggedStart`." msgstr "" #: ../../../manim/animation/specialized.py:docstring of manim.animation.specialized.Broadcast:15 msgid "Examples" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.specialized.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.specialized.rst:2 msgid "specialized" msgstr "" #: ../../source/reference/manim.animation.specialized.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.speedmodifier.ChangeSpeed.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:2 msgid "ChangeSpeed" msgstr "" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:4 msgid "Qualified name: ``manim.animation.speedmodifier.ChangeSpeed``" msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed:1 msgid "Modifies the speed of passed animation. :class:`AnimationGroup` with different ``lag_ratio`` can also be used which combines multiple animations into one. The ``run_time`` of the passed animation is changed to modify the speed." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed:0 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.add_updater:0 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.clean_up_from_scene:0 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.interpolate:0 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.update_mobjects:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed:6 msgid "Animation of which the speed is to be modified." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed:7 msgid "Contains nodes (percentage of ``run_time``) and its corresponding speed factor." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed:8 msgid "Overrides ``rate_func`` of passed animation, applied before changing speed." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed:11 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:27::1 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.add_updater:1 msgid "This static method can be used to apply speed change to updaters." msgstr "" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:27::1 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.begin:1 msgid "Begin the animation." msgstr "" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:27::1 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.clean_up_from_scene:1 msgid "Clean up the :class:`~.Scene` after finishing the animation." msgstr "" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:27::1 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.finish:1 msgid "Finish the animation." msgstr "" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:27::1 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.get_scaled_total_time:1 msgid "The time taken by the animation under the assumption that the ``run_time`` is 1." msgstr "" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:27::1 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.interpolate:1 msgid "Set the animation progress." msgstr "" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:27::1 msgid "Updates things like starting_mobject, and (for Transforms) target_mobject." msgstr "" #: ../../source/reference/manim.animation.speedmodifier.ChangeSpeed.rst:29 msgid "Attributes" msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.add_updater:3 msgid "This updater will follow speed and rate function of any :class:`.ChangeSpeed` animation that is playing with ``affects_speed_updaters=True``. By default, updater functions added via the usual :meth:`.Mobject.add_updater` method do not respect the change of animation speed." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.add_updater:8 msgid "The mobject to which the updater should be attached." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.add_updater:9 msgid "The function that is called whenever a new frame is rendered." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.add_updater:10 msgid "The position in the list of the mobject's updaters at which the function should be inserted." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.add_updater:12 msgid "If ``True``, calls the update function when attaching it to the mobject." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.begin:3 msgid "This method is called right as an animation is being played. As much initialization as possible, especially any mobject copying, should live in this method." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.begin:0 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.clean_up_from_scene:0 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.finish:0 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.get_scaled_total_time:0 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.interpolate:0 #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.update_mobjects:0 msgid "Return type" msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.clean_up_from_scene:3 msgid "This includes to :meth:`~.Scene.remove` the Animation's :class:`~.Mobject` if the animation is a remover." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.clean_up_from_scene:6 msgid "The scene the animation should be cleaned up from." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.finish:3 msgid "This method gets called when the animation is over." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.interpolate:3 msgid "This method gets called for every frame during an animation." msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier.ChangeSpeed.interpolate:5 msgid "The relative time to set the animation to, 0 meaning the start, 1 meaning the end." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.speedmodifier.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.speedmodifier.rst:2 msgid "speedmodifier" msgstr "" #: ../../../manim/animation/speedmodifier.py:docstring of manim.animation.speedmodifier:1 msgid "Utilities for modifying the speed at which animations are played." msgstr "" #: ../../source/reference/manim.animation.speedmodifier.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.ApplyComplexFunction.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.ApplyComplexFunction.rst:2 msgid "ApplyComplexFunction" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyComplexFunction.rst:4 msgid "Qualified name: ``manim.animation.transform.ApplyComplexFunction``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyComplexFunction:1 msgid "Bases: :py:class:`manim.animation.transform.ApplyMethod`" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyComplexFunction.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyComplexFunction.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.ApplyFunction.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.ApplyFunction.rst:2 msgid "ApplyFunction" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyFunction.rst:4 msgid "Qualified name: ``manim.animation.transform.ApplyFunction``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyFunction:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyFunction.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyFunction.rst:22 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.ApplyMatrix.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.ApplyMatrix.rst:2 msgid "ApplyMatrix" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyMatrix.rst:4 msgid "Qualified name: ``manim.animation.transform.ApplyMatrix``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMatrix:1 msgid "Bases: :py:class:`manim.animation.transform.ApplyPointwiseFunction`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMatrix:1 msgid "Applies a matrix transform to an mobject." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMatrix:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMatrix:3 msgid "The transformation matrix." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMatrix:4 msgid "The :class:`~.Mobject`." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMatrix:5 msgid "The origin point for the transform. Defaults to ``ORIGIN``." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMatrix:6 msgid "Further keyword arguments that are passed to :class:`ApplyPointwiseFunction`." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMatrix:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyMatrix.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyMatrix.rst:22 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.ApplyMethod.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.ApplyMethod.rst:2 msgid "ApplyMethod" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyMethod.rst:4 msgid "Qualified name: ``manim.animation.transform.ApplyMethod``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMethod:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMethod:1 msgid "Animates a mobject by applying a method." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMethod:3 msgid "Note that only the method needs to be passed to this animation, it is not required to pass the corresponding mobject. Furthermore, this animation class only works if the method returns the modified mobject." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMethod:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMethod:8 msgid "The method that will be applied in the animation." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMethod:9 msgid "Any positional arguments to be passed when applying the method." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyMethod:10 msgid "Any keyword arguments passed to :class:`~.Transform`." msgstr "" #: ../../source/reference/manim.animation.transform.ApplyMethod.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyMethod.rst:23 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.ApplyPointwiseFunction.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.ApplyPointwiseFunction.rst:2 msgid "ApplyPointwiseFunction" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyPointwiseFunction.rst:4 msgid "Qualified name: ``manim.animation.transform.ApplyPointwiseFunction``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyPointwiseFunction:1 msgid "Bases: :py:class:`manim.animation.transform.ApplyMethod`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyPointwiseFunction:1 msgid "Animation that applies a pointwise function to a mobject." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyPointwiseFunction:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyPointwiseFunction.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyPointwiseFunction.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.ApplyPointwiseFunctionToCenter.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.ApplyPointwiseFunctionToCenter.rst:2 msgid "ApplyPointwiseFunctionToCenter" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyPointwiseFunctionToCenter.rst:4 msgid "Qualified name: ``manim.animation.transform.ApplyPointwiseFunctionToCenter``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyPointwiseFunctionToCenter:1 msgid "Bases: :py:class:`manim.animation.transform.ApplyPointwiseFunction`" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyPointwiseFunctionToCenter.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.ApplyPointwiseFunctionToCenter.rst:20::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyPointwiseFunctionToCenter.begin:1 msgid "Begin the animation." msgstr "" #: ../../source/reference/manim.animation.transform.ApplyPointwiseFunctionToCenter.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ApplyPointwiseFunctionToCenter.begin:3 msgid "This method is called right as an animation is being played. As much initialization as possible, especially any mobject copying, should live in this method." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.ClockwiseTransform.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.ClockwiseTransform.rst:2 msgid "ClockwiseTransform" msgstr "" #: ../../source/reference/manim.animation.transform.ClockwiseTransform.rst:4 msgid "Qualified name: ``manim.animation.transform.ClockwiseTransform``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ClockwiseTransform:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ClockwiseTransform:1 msgid "Transforms the points of a mobject along a clockwise oriented arc." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ClockwiseTransform:6 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.ClockwiseTransform.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.ClockwiseTransform.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.CounterclockwiseTransform.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.CounterclockwiseTransform.rst:2 msgid "CounterclockwiseTransform" msgstr "" #: ../../source/reference/manim.animation.transform.CounterclockwiseTransform.rst:4 msgid "Qualified name: ``manim.animation.transform.CounterclockwiseTransform``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.CounterclockwiseTransform:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.CounterclockwiseTransform:1 msgid "Transforms the points of a mobject along a counterclockwise oriented arc." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.CounterclockwiseTransform:6 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.CounterclockwiseTransform.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.CounterclockwiseTransform.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.CyclicReplace.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.CyclicReplace.rst:2 msgid "CyclicReplace" msgstr "" #: ../../source/reference/manim.animation.transform.CyclicReplace.rst:4 msgid "Qualified name: ``manim.animation.transform.CyclicReplace``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.CyclicReplace:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../source/reference/manim.animation.transform.CyclicReplace.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.CyclicReplace.rst:22 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.FadeToColor.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.FadeToColor.rst:2 msgid "FadeToColor" msgstr "" #: ../../source/reference/manim.animation.transform.FadeToColor.rst:4 msgid "Qualified name: ``manim.animation.transform.FadeToColor``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeToColor:1 msgid "Bases: :py:class:`manim.animation.transform.ApplyMethod`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeToColor:1 msgid "Animation that changes color of a mobject." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeToColor:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.FadeToColor.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.FadeToColor.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.FadeTransform.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.FadeTransform.rst:2 msgid "FadeTransform" msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransform.rst:4 msgid "Qualified name: ``manim.animation.transform.FadeTransform``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform:1 msgid "Fades one mobject into another." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform:0 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.clean_up_from_scene:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform:3 msgid "The starting :class:`~.Mobject`." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform:4 msgid "The target :class:`~.Mobject`." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform:5 msgid "Controls whether the target :class:`~.Mobject` is stretched during the animation. Default: ``True``." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform:7 msgid "If the target mobject is not stretched automatically, this allows to adjust the initial scale of the target :class:`~.Mobject` while it is shifted in. Setting this to 0, 1, and 2, respectively, matches the length of the target with the length of the starting :class:`~.Mobject` in x, y, and z direction, respectively." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform:12 msgid "Further keyword arguments are passed to the parent class." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform:15 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransform.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransform.rst:24::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.begin:1 msgid "Initial setup for the animation." msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransform.rst:24::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.clean_up_from_scene:1 msgid "Clean up the :class:`~.Scene` after finishing the animation." msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransform.rst:24::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.get_all_mobjects:1 msgid "Get all mobjects involved in the animation." msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransform.rst:24::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.ghost_to:1 msgid "Replaces the source by the target and sets the opacity to 0." msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransform.rst:26 msgid "Attributes" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.begin:3 msgid "The mobject to which this animation is bound is a group consisting of both the starting and the ending mobject. At the start, the ending mobject replaces the starting mobject (and is completely faded). In the end, it is set to be the other way around." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.clean_up_from_scene:3 msgid "This includes to :meth:`~.Scene.remove` the Animation's :class:`~.Mobject` if the animation is a remover." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.clean_up_from_scene:6 msgid "The scene the animation should be cleaned up from." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.get_all_mobjects:3 msgid "Ordering must match the ordering of arguments to interpolate_submobject" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.get_all_mobjects:0 msgid "Returns" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransform.get_all_mobjects:5 msgid "The sequence of mobjects." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.FadeTransformPieces.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.FadeTransformPieces.rst:2 msgid "FadeTransformPieces" msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransformPieces.rst:4 msgid "Qualified name: ``manim.animation.transform.FadeTransformPieces``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransformPieces:1 msgid "Bases: :py:class:`manim.animation.transform.FadeTransform`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransformPieces:1 msgid "Fades submobjects of one mobject into submobjects of another one." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransformPieces:6 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransformPieces.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransformPieces.rst:21::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransformPieces.begin:1 msgid "Initial setup for the animation." msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransformPieces.rst:21::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.FadeTransformPieces.ghost_to:1 msgid "Replaces the source submobjects by the target submobjects and sets the opacity to 0." msgstr "" #: ../../source/reference/manim.animation.transform.FadeTransformPieces.rst:23 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.MoveToTarget.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.MoveToTarget.rst:2 msgid "MoveToTarget" msgstr "" #: ../../source/reference/manim.animation.transform.MoveToTarget.rst:4 msgid "Qualified name: ``manim.animation.transform.MoveToTarget``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.MoveToTarget:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.MoveToTarget:1 msgid "Transforms a mobject to the mobject stored in its ``target`` attribute." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.MoveToTarget:3 msgid "After calling the :meth:`~.Mobject.generate_target` method, the :attr:`target` attribute of the mobject is populated with a copy of it. After modifying the attribute, playing the :class:`.MoveToTarget` animation transforms the original mobject into the modified one stored in the :attr:`target` attribute." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.MoveToTarget:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.MoveToTarget.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.MoveToTarget.rst:22 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.rst:2 msgid "transform" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform:1 msgid "Animations transforming one mobject into another." msgstr "" #: ../../source/reference/manim.animation.transform.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Applies a matrix transform to an mobject." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Animates a mobject by applying a method." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Animation that applies a pointwise function to a mobject." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Transforms the points of a mobject along a clockwise oriented arc." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Transforms the points of a mobject along a counterclockwise oriented arc." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Animation that changes color of a mobject." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Fades one mobject into another." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Fades submobjects of one mobject into submobjects of another one." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Transforms a mobject to the mobject stored in its ``target`` attribute." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Replaces and morphs a mobject into a target mobject." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Transforms a mobject to its last saved state." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Animation that scales a mobject by a certain factor." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "Animation that makes a mobject shrink to center." msgstr "" #: ../../source/reference/manim.animation.transform.rst:60::1 msgid "A Transform transforms a Mobject into a target Mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.ReplacementTransform.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.ReplacementTransform.rst:2 msgid "ReplacementTransform" msgstr "" #: ../../source/reference/manim.animation.transform.ReplacementTransform.rst:4 msgid "Qualified name: ``manim.animation.transform.ReplacementTransform``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ReplacementTransform:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ReplacementTransform:1 msgid "Replaces and morphs a mobject into a target mobject." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ReplacementTransform:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ReplacementTransform:3 msgid "The starting :class:`~.Mobject`." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ReplacementTransform:4 msgid "The target :class:`~.Mobject`." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ReplacementTransform:5 msgid "Further keyword arguments that are passed to :class:`Transform`." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ReplacementTransform:8 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.ReplacementTransform.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.ReplacementTransform.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.Restore.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.Restore.rst:2 msgid "Restore" msgstr "" #: ../../source/reference/manim.animation.transform.Restore.rst:4 msgid "Qualified name: ``manim.animation.transform.Restore``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Restore:1 msgid "Bases: :py:class:`manim.animation.transform.ApplyMethod`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Restore:1 msgid "Transforms a mobject to its last saved state." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Restore:3 msgid "To save the state of a mobject, use the :meth:`~.Mobject.save_state` method." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Restore:6 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.Restore.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.Restore.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.ScaleInPlace.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.ScaleInPlace.rst:2 msgid "ScaleInPlace" msgstr "" #: ../../source/reference/manim.animation.transform.ScaleInPlace.rst:4 msgid "Qualified name: ``manim.animation.transform.ScaleInPlace``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ScaleInPlace:1 msgid "Bases: :py:class:`manim.animation.transform.ApplyMethod`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ScaleInPlace:1 msgid "Animation that scales a mobject by a certain factor." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ScaleInPlace:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.ScaleInPlace.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.ScaleInPlace.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.ShrinkToCenter.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.ShrinkToCenter.rst:2 msgid "ShrinkToCenter" msgstr "" #: ../../source/reference/manim.animation.transform.ShrinkToCenter.rst:4 msgid "Qualified name: ``manim.animation.transform.ShrinkToCenter``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ShrinkToCenter:1 msgid "Bases: :py:class:`manim.animation.transform.ScaleInPlace`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ShrinkToCenter:1 msgid "Animation that makes a mobject shrink to center." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.ShrinkToCenter:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.ShrinkToCenter.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.ShrinkToCenter.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.Swap.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.Swap.rst:2 msgid "Swap" msgstr "" #: ../../source/reference/manim.animation.transform.Swap.rst:4 msgid "Qualified name: ``manim.animation.transform.Swap``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Swap:1 msgid "Bases: :py:class:`manim.animation.transform.CyclicReplace`" msgstr "" #: ../../source/reference/manim.animation.transform.Swap.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.Swap.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.Transform.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.Transform.rst:2 msgid "Transform" msgstr "" #: ../../source/reference/manim.animation.transform.Transform.rst:4 msgid "Qualified name: ``manim.animation.transform.Transform``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:1 msgid "A Transform transforms a Mobject into a target Mobject." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:0 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.clean_up_from_scene:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:3 msgid "The :class:`.Mobject` to be transformed. It will be mutated to become the ``target_mobject``." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:4 msgid "The target of the transformation." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:5 msgid "A function defining the path that the points of the ``mobject`` are being moved along until they match the points of the ``target_mobject``, see :mod:`.utils.paths`." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:7 msgid "The arc angle (in radians) that the points of ``mobject`` will follow to reach the points of the target if using a circular path arc, see ``path_arc_centers``. See also :func:`manim.utils.paths.path_along_arc`." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:10 msgid "The axis to rotate along if using a circular path arc, see ``path_arc_centers``." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:11 msgid "The center of the circular arcs along which the points of ``mobject`` are moved by the transformation. If this is set and ``path_func`` is not set, then a ``path_along_circles`` path will be generated using the ``path_arc`` parameters and stored in ``path_func``. If ``path_func`` is set, this and the other ``path_arc`` fields are set as attributes, but a ``path_func`` is not generated from it." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:11 msgid "The center of the circular arcs along which the points of ``mobject`` are moved by the transformation." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:14 msgid "If this is set and ``path_func`` is not set, then a ``path_along_circles`` path will be generated using the ``path_arc`` parameters and stored in ``path_func``. If ``path_func`` is set, this and the other ``path_arc`` fields are set as attributes, but a ``path_func`` is not generated from it." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:17 msgid "Controls which mobject is replaced when the transformation is complete. If set to True, ``mobject`` will be removed from the scene and ``target_mobject`` will replace it. Otherwise, ``target_mobject`` is never added and ``mobject`` just takes its shape." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:17 msgid "Controls which mobject is replaced when the transformation is complete." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:19 msgid "If set to True, ``mobject`` will be removed from the scene and ``target_mobject`` will replace it. Otherwise, ``target_mobject`` is never added and ``mobject`` just takes its shape." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform:23 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform.Transform.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.Transform.rst:25::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.begin:1 msgid "Begin the animation." msgstr "" #: ../../source/reference/manim.animation.transform.Transform.rst:25::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.clean_up_from_scene:1 msgid "Clean up the :class:`~.Scene` after finishing the animation." msgstr "" #: ../../source/reference/manim.animation.transform.Transform.rst:25::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.get_all_mobjects:1 msgid "Get all mobjects involved in the animation." msgstr "" #: ../../source/reference/manim.animation.transform.Transform.rst:27 msgid "Attributes" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.begin:3 msgid "This method is called right as an animation is being played. As much initialization as possible, especially any mobject copying, should live in this method." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.begin:0 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.clean_up_from_scene:0 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.get_all_mobjects:0 msgid "Return type" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.clean_up_from_scene:3 msgid "This includes to :meth:`~.Scene.remove` the Animation's :class:`~.Mobject` if the animation is a remover." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.clean_up_from_scene:6 msgid "The scene the animation should be cleaned up from." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.get_all_mobjects:3 msgid "Ordering must match the ordering of arguments to interpolate_submobject" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.Transform.get_all_mobjects:0 msgid "Returns" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.TransformAnimations.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.TransformAnimations.rst:2 msgid "TransformAnimations" msgstr "" #: ../../source/reference/manim.animation.transform.TransformAnimations.rst:4 msgid "Qualified name: ``manim.animation.transform.TransformAnimations``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformAnimations:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../source/reference/manim.animation.transform.TransformAnimations.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.TransformAnimations.rst:20::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformAnimations.interpolate:1 msgid "Set the animation progress." msgstr "" #: ../../source/reference/manim.animation.transform.TransformAnimations.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformAnimations.interpolate:3 msgid "This method gets called for every frame during an animation." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformAnimations.interpolate:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformAnimations.interpolate:5 msgid "The relative time to set the animation to, 0 meaning the start, 1 meaning the end." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform.TransformFromCopy.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform.TransformFromCopy.rst:2 msgid "TransformFromCopy" msgstr "" #: ../../source/reference/manim.animation.transform.TransformFromCopy.rst:4 msgid "Qualified name: ``manim.animation.transform.TransformFromCopy``" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformFromCopy:1 msgid "Bases: :py:class:`manim.animation.transform.Transform`" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformFromCopy:1 msgid "Performs a reversed Transform" msgstr "" #: ../../source/reference/manim.animation.transform.TransformFromCopy.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.animation.transform.TransformFromCopy.rst:20::1 #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformFromCopy.interpolate:1 msgid "Set the animation progress." msgstr "" #: ../../source/reference/manim.animation.transform.TransformFromCopy.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformFromCopy.interpolate:3 msgid "This method gets called for every frame during an animation." msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformFromCopy.interpolate:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/transform.py:docstring of manim.animation.transform.TransformFromCopy.interpolate:5 msgid "The relative time to set the animation to, 0 meaning the start, 1 meaning the end." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform_matching_parts.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform_matching_parts.rst:2 msgid "transform\\_matching\\_parts" msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts:1 msgid "Animations that try to transform Mobjects while keeping track of identical parts." msgstr "" #: ../../source/reference/manim.animation.transform_matching_parts.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.animation.transform_matching_parts.rst:24::1 msgid "Abstract base class for transformations that keep track of matching parts." msgstr "" #: ../../source/reference/manim.animation.transform_matching_parts.rst:24::1 msgid "An animation trying to transform groups by matching the shape of their submobjects." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform_matching_parts.TransformMatchingAbstractBase.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform_matching_parts.TransformMatchingAbstractBase.rst:2 msgid "TransformMatchingAbstractBase" msgstr "" #: ../../source/reference/manim.animation.transform_matching_parts.TransformMatchingAbstractBase.rst:4 msgid "Qualified name: ``manim.animation.transform\\_matching\\_parts.TransformMatchingAbstractBase``" msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:1 msgid "Bases: :py:class:`manim.animation.composition.AnimationGroup`" msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:1 msgid "Abstract base class for transformations that keep track of matching parts." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:3 msgid "Subclasses have to implement the two static methods :meth:`~.TransformMatchingAbstractBase.get_mobject_parts` and :meth:`~.TransformMatchingAbstractBase.get_mobject_key`." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:7 msgid "Basically, this transformation first maps all submobjects returned by the ``get_mobject_parts`` method to certain keys by applying the ``get_mobject_key`` method. Then, submobjects with matching keys are transformed into each other." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:0 #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase.clean_up_from_scene:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:12 msgid "The starting :class:`~.Mobject`." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:13 msgid "The target :class:`~.Mobject`." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:14 msgid "Controls whether submobjects without a matching key are transformed into each other by using :class:`~.Transform`. Default: ``False``." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:16 msgid "Controls whether submobjects without a matching key are transformed into each other by using :class:`~.FadeTransform`. Default: ``False``." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:18 msgid "Optional. A dictionary mapping keys belonging to some of the starting mobject's submobjects (i.e., the return values of the ``get_mobject_key`` method) to some keys belonging to the target mobject's submobjects that should be transformed although the keys don't match." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:22 msgid "All further keyword arguments are passed to the submobject transformations." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase:26 msgid "If neither ``transform_mismatches`` nor ``fade_transform_mismatches`` are set to ``True``, submobjects without matching keys in the starting mobject are faded out in the direction of the unmatched submobjects in the target mobject, and unmatched submobjects in the target mobject are faded in from the direction of the unmatched submobjects in the start mobject." msgstr "" #: ../../source/reference/manim.animation.transform_matching_parts.TransformMatchingAbstractBase.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase.clean_up_from_scene:1::1 #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase.clean_up_from_scene:1 msgid "Clean up the :class:`~.Scene` after finishing the animation." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase.clean_up_from_scene:3 msgid "This includes to :meth:`~.Scene.remove` the Animation's :class:`~.Mobject` if the animation is a remover." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingAbstractBase.clean_up_from_scene:6 msgid "The scene the animation should be cleaned up from." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform_matching_parts.TransformMatchingShapes.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform_matching_parts.TransformMatchingShapes.rst:2 msgid "TransformMatchingShapes" msgstr "" #: ../../source/reference/manim.animation.transform_matching_parts.TransformMatchingShapes.rst:4 msgid "Qualified name: ``manim.animation.transform\\_matching\\_parts.TransformMatchingShapes``" msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingShapes:1 msgid "Bases: :py:class:`manim.animation.transform_matching_parts.TransformMatchingAbstractBase`" msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingShapes:1 msgid "An animation trying to transform groups by matching the shape of their submobjects." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingShapes:4 msgid "Two submobjects match if the hash of their point coordinates after normalization (i.e., after translation to the origin, fixing the submobject height at 1 unit, and rounding the coordinates to three decimal places) matches." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingShapes:12 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform_matching_parts.TransformMatchingShapes.rst:14 msgid "Methods" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.transform_matching_parts.TransformMatchingTex.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.transform_matching_parts.TransformMatchingTex.rst:2 msgid "TransformMatchingTex" msgstr "" #: ../../source/reference/manim.animation.transform_matching_parts.TransformMatchingTex.rst:4 msgid "Qualified name: ``manim.animation.transform\\_matching\\_parts.TransformMatchingTex``" msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingTex:1 msgid "Bases: :py:class:`manim.animation.transform_matching_parts.TransformMatchingAbstractBase`" msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingTex:1 msgid "A transformation trying to transform rendered LaTeX strings." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingTex:3 msgid "Two submobjects match if their ``tex_string`` matches." msgstr "" #: ../../../manim/animation/transform_matching_parts.py:docstring of manim.animation.transform_matching_parts.TransformMatchingTex:8 msgid "Examples" msgstr "" #: ../../source/reference/manim.animation.transform_matching_parts.TransformMatchingTex.rst:14 msgid "Methods" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.update.MaintainPositionRelativeTo.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.animation.update.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.animation.update.UpdateFromAlphaFunc.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.animation.update.UpdateFromFunc.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.animation.updaters.mobject_update_utils.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.updaters.mobject_update_utils.rst:2 msgid "mobject\\_update\\_utils" msgstr "" #: ../../../manim/animation/updaters/mobject_update_utils.py:docstring of manim.animation.updaters.mobject_update_utils:1 msgid "Utility functions for continuous animation of mobjects." msgstr "" #: ../../source/reference/manim.animation.updaters.mobject_update_utils.rst:20 msgid "Functions" msgstr "" #: ../../../manim/animation/updaters/mobject_update_utils.py:docstring of manim.animation.updaters.mobject_update_utils.f_always:1 msgid "More functional version of always, where instead of taking in args, it takes in functions which output the relevant arguments." msgstr "" #: ../../../manim/animation/updaters/mobject_update_utils.py:docstring of manim.animation.updaters.mobject_update_utils.turn_animation_into_updater:1 msgid "Add an updater to the animation's mobject which applies the interpolation and update functions of the animation" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.updaters.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.updaters.rst:2 msgid "updaters" msgstr "" #: ../../../manim/animation/updaters/__init__.py:docstring of manim.animation.updaters:1 msgid "Animations and utility mobjects related to update functions." msgstr "" #: ../../../manim/animation/updaters/__init__.py:docstring of manim.animation.updaters:4 msgid "Modules" msgstr "" #: ../../../manim/animation/updaters/__init__.py:docstring of manim.animation.updaters:11::1 msgid "Utility functions for continuous animation of mobjects." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.updaters.update.MaintainPositionRelativeTo.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.updaters.update.MaintainPositionRelativeTo.rst:2 msgid "MaintainPositionRelativeTo" msgstr "" #: ../../source/reference/manim.animation.updaters.update.MaintainPositionRelativeTo.rst:4 msgid "Qualified name: ``manim.animation.updaters.update.MaintainPositionRelativeTo``" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.MaintainPositionRelativeTo:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../source/reference/manim.animation.updaters.update.MaintainPositionRelativeTo.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.MaintainPositionRelativeTo.interpolate_mobject:1::1 #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.MaintainPositionRelativeTo.interpolate_mobject:1 msgid "Interpolates the mobject of the :class:`Animation` based on alpha value." msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.MaintainPositionRelativeTo.interpolate_mobject:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.MaintainPositionRelativeTo.interpolate_mobject:3 msgid "A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.updaters.update.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.updaters.update.rst:2 msgid "update" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update:1 msgid "Animations that update mobjects." msgstr "" #: ../../source/reference/manim.animation.updaters.update.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.updaters.update.UpdateFromAlphaFunc.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.updaters.update.UpdateFromAlphaFunc.rst:2 msgid "UpdateFromAlphaFunc" msgstr "" #: ../../source/reference/manim.animation.updaters.update.UpdateFromAlphaFunc.rst:4 msgid "Qualified name: ``manim.animation.updaters.update.UpdateFromAlphaFunc``" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromAlphaFunc:1 msgid "Bases: :py:class:`manim.animation.updaters.update.UpdateFromFunc`" msgstr "" #: ../../source/reference/manim.animation.updaters.update.UpdateFromAlphaFunc.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromAlphaFunc.interpolate_mobject:1::1 #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromAlphaFunc.interpolate_mobject:1 msgid "Interpolates the mobject of the :class:`Animation` based on alpha value." msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromAlphaFunc.interpolate_mobject:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromAlphaFunc.interpolate_mobject:3 msgid "A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.animation.updaters.update.UpdateFromFunc.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.animation.updaters.update.UpdateFromFunc.rst:2 msgid "UpdateFromFunc" msgstr "" #: ../../source/reference/manim.animation.updaters.update.UpdateFromFunc.rst:4 msgid "Qualified name: ``manim.animation.updaters.update.UpdateFromFunc``" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromFunc:1 msgid "Bases: :py:class:`manim.animation.animation.Animation`" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromFunc:1 msgid "update_function of the form func(mobject), presumably to be used when the state of one mobject is dependent on another simultaneously animated mobject" msgstr "" #: ../../source/reference/manim.animation.updaters.update.UpdateFromFunc.rst:14 msgid "Methods" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromFunc.interpolate_mobject:1::1 #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromFunc.interpolate_mobject:1 msgid "Interpolates the mobject of the :class:`Animation` based on alpha value." msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromFunc.interpolate_mobject:0 msgid "Parameters" msgstr "" #: ../../../manim/animation/updaters/update.py:docstring of manim.animation.updaters.update.UpdateFromFunc.interpolate_mobject:3 msgid "A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.camera.BackgroundColoredVMobjectDisplayer.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.camera.BackgroundColoredVMobjectDisplayer.rst:2 msgid "BackgroundColoredVMobjectDisplayer" msgstr "" #: ../../source/reference/manim.camera.camera.BackgroundColoredVMobjectDisplayer.rst:4 msgid "Qualified name: ``manim.camera.camera.BackgroundColoredVMobjectDisplayer``" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer:1 msgid "Bases: :py:class:`object`" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.display:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.get_background_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array_to_match:0 msgid "Parameters" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer:1 msgid "Camera object to use." msgstr "" #: ../../source/reference/manim.camera.camera.BackgroundColoredVMobjectDisplayer.rst:14 msgid "Methods" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.display:1::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.display:1 msgid "Displays the colored VMobjects." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.display:1::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.get_background_array:1 msgid "Gets the background array that has the passed file_name." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.display:1::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array:1 msgid "Resizes the pixel array representing the background." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.display:1::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array_to_match:1 msgid "Resizes the background array to match the passed pixel array." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.display:3 msgid "The VMobjects" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.display:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.get_background_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array_to_match:0 msgid "Returns" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.display:6 msgid "The pixel array with the `cvmobjects` displayed." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.display:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.get_background_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array_to_match:0 msgid "Return type" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.get_background_array:3 msgid "The background image or its file name." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.get_background_array:5 msgid "The pixel array of the image." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array:3 msgid "The pixel" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array:5 msgid "The new width of the background" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array:7 msgid "The new height of the background" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array:9 msgid "The PIL image mode, by default \"RGBA\"" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array:12 msgid "The numpy pixel array of the resized background." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array_to_match:3 msgid "The prospective pixel array." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.BackgroundColoredVMobjectDisplayer.resize_background_array_to_match:5 msgid "The pixel array whose width and height should be matched." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.camera.Camera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.camera.Camera.rst:2 msgid "Camera" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:4 msgid "Qualified name: ``manim.camera.camera.Camera``" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:1 msgid "Bases: :py:class:`object`" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:1 msgid "Base camera class." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:3 msgid "This is the object which takes care of what exactly is displayed on screen at any given moment." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:6 msgid "Some important configuration values and local variables to note are:" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:10 msgid "background_image : :class:`str`, optional" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:9 msgid "str, optional" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:9 msgid "The path to an image that should be the background image. If not set, the background is filled with `self.background_color`" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:14 msgid "pixel_height : :class:`int`, optional" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:13 msgid "int, optional" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:13 msgid "The height of the scene in pixels." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:16 msgid "Initialises the Camera." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.adjust_out_of_range_points:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.adjusted_thickness:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_fill:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_stroke:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.cache_cairo_context:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobject:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobjects:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.convert_pixel_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_image_mobject:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_background_colored_vmobjects:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_image_mobjects:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_non_background_colored_vmobjects:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_point_cloud_mobjects:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_vectorized_mobjects:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_vectorized:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cached_cairo_context:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cairo_context:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_fill_rgbas:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_image:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_mobjects_to_display:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_stroke_rgbas:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_thickening_nudges:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.is_in_frame:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.make_background_from_func:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.on_screen_pixels:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.overlay_PIL_image:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.overlay_rgba_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.reset_pixel_shape:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.resize_frame_shape:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_background:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_background_from_func:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_color:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_path:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_pixel_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.thickened_coordinates:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:0 msgid "Parameters" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:18 msgid "What self.background should be, by default None as will be set later." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera:20 msgid "Any local variables to be set." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.adjust_out_of_range_points:1 msgid "If any of the points in the passed array are out of the viable range, they are adjusted suitably." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::0 #: ../../source/reference/manim.camera.camera.Camera.rst:63::0 msgid "param thickness" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_fill:1 msgid "Fills the cairo context" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_stroke:1 msgid "Applies a stroke to the VMobject in the cairo context." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.cache_cairo_context:1 msgid "Caches the passed Pixel array into a Cairo Context" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobject:1 msgid "Capture mobjects by storing it in :attr:`pixel_array`." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobjects:1 msgid "Capture mobjects by printing them on :attr:`pixel_array`." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.convert_pixel_array:1 msgid "Converts a pixel array from values that have floats in then to proper RGB values." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_image_mobject:1 msgid "Displays an ImageMobject by changing the pixel_array suitably." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_background_colored_vmobjects:1 msgid "Displays multiple vmobjects that have the same color as the background." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_image_mobjects:1 msgid "Displays multiple image mobjects by modifying the passed pixel_array." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_non_background_colored_vmobjects:1 msgid "Displays multiple VMobjects in the cairo context, as long as they don't have background colors." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_point_cloud_mobjects:1 msgid "Displays multiple PMobjects by modifying the passed pixel array." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_vectorized_mobjects:1 msgid "Displays multiple VMobjects in the pixel_array" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 msgid "Displays a PMobject by modifying the Pixel array suitably." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_vectorized:1 msgid "Displays a VMobject in the cairo context" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_background_colored_vmobject_displayer:1 msgid "Returns the background_colored_vmobject_displayer if it exists or makes one and returns it if not." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cached_cairo_context:1 msgid "Returns the cached cairo context of the passed pixel array if it exists, and None if it doesn't." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cairo_context:1 msgid "Returns the cairo context for a pixel array after caching it to self.pixel_array_to_cairo_context If that array has already been cached, it returns the cached version instead." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_coords_of_all_pixels:1 msgid "Returns the cartesian coordinates of each pixel." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_fill_rgbas:1 msgid "Returns the RGBA array of the fill of the passed VMobject" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_image:1 msgid "Returns an image from the passed pixel array, or from the current frame if the passed pixel array is none." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_mobjects_to_display:1 msgid "Used to get the list of mobjects to display with the camera." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_stroke_rgbas:1 msgid "Gets the RGBA array for the stroke of the passed VMobject." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 msgid "Initialize the background." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.is_in_frame:1 msgid "Checks whether the passed mobject is in frame or not." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 msgid "Makes a pixel array for the background by using coords_to_colors_func to determine each pixel's color." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.on_screen_pixels:1 msgid "Returns array of pixels that are on the screen from a given array of pixel_coordinates" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.overlay_PIL_image:1 msgid "Overlays a PIL image on the passed pixel array." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.overlay_rgba_array:1 msgid "Overlays an RGBA array on top of the given Pixel array." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.reset:1 msgid "Resets the camera's pixel array to that of the background" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.reset_pixel_shape:1 msgid "This method resets the height and width of a single pixel to the passed new_height and new_width." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.resize_frame_shape:1 msgid "Changes frame_shape to match the aspect ratio of the pixels, where fixed_dimension determines whether frame_height or frame_width remains fixed while the other changes accordingly." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_background:1 msgid "Sets the background to the passed pixel_array after converting to valid RGB values." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 msgid "Sets the background to a pixel array using coords_to_colors_func to determine each pixel's color." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_color:1 msgid "Sets the color of the cairo context" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_path:1 msgid "Sets a path for the cairo context with the vmobject passed" msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_pixel_array:1 msgid "Sets the pixel array of the camera to the passed pixel array." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.thickened_coordinates:1 msgid "Returns thickened coordinates for a passed array of pixel coords and a thickness to thicken by." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:63::1 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:1 msgid "Return the type of mobject, if it is a type that can be rendered." msgstr "" #: ../../source/reference/manim.camera.camera.Camera.rst:65 msgid "Attributes" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.adjust_out_of_range_points:4 msgid "The points to adjust" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.adjust_out_of_range_points:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_fill:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_stroke:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.convert_pixel_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_background_colored_vmobjects:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_vectorized:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_background_colored_vmobject_displayer:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cached_cairo_context:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cairo_context:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_coords_of_all_pixels:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_fill_rgbas:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_image:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_mobjects_to_display:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_stroke_rgbas:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.is_in_frame:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.make_background_from_func:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.on_screen_pixels:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.reset:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_color:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_path:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.thickened_coordinates:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:0 msgid "Returns" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.adjust_out_of_range_points:7 msgid "The adjusted points." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.adjust_out_of_range_points:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.adjusted_thickness:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_fill:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_stroke:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.convert_pixel_array:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_background_colored_vmobjects:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_vectorized:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_background_colored_vmobject_displayer:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cached_cairo_context:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cairo_context:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_coords_of_all_pixels:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_fill_rgbas:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_image:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_mobjects_to_display:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_stroke_rgbas:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_thickening_nudges:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.is_in_frame:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.make_background_from_func:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.on_screen_pixels:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.reset:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_color:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_path:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.thickened_coordinates:0 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:0 msgid "Return type" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_fill:3 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_stroke:3 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_color:3 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_path:3 msgid "The cairo context" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_fill:5 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_stroke:5 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_fill_rgbas:3 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_stroke_rgbas:4 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_path:5 msgid "The VMobject" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_fill:8 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_background_colored_vmobjects:8 msgid "The camera object." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_stroke:7 msgid "Whether or not to consider the background when applying this stroke width, by default False" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.apply_stroke:11 msgid "The camera object with the stroke applied." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.cache_cairo_context:3 msgid "The pixel array to cache" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.cache_cairo_context:5 msgid "The context to cache it into." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobject:3 msgid "This is a single-mobject version of :meth:`capture_mobjects`." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobject:5 msgid "Mobject to capture." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobject:6 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobjects:8 msgid "Keyword arguments to be passed to :meth:`get_mobjects_to_display`." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobjects:3 msgid "This is the essential function that converts the contents of a Scene into an array, which is then converted to an image or video." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobjects:6 msgid "Mobjects to capture." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobjects:12 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:12 msgid "Notes" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.capture_mobjects:13 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:13 msgid "For a list of classes that can currently be rendered, see :meth:`display_funcs`." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.convert_pixel_array:4 msgid "Pixel array to convert." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.convert_pixel_array:6 msgid "Whether or not to convert float values to ints, by default False" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.convert_pixel_array:9 msgid "The new, converted pixel array." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_image_mobject:3 msgid "The imageMobject to display" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_image_mobject:5 msgid "The Pixel array to put the imagemobject in." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_background_colored_vmobjects:3 msgid "List of Colored VMobjects" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_background_colored_vmobjects:5 msgid "The pixel array." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_image_mobjects:3 msgid "list of ImageMobjects" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_image_mobjects:5 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_point_cloud_mobjects:5 msgid "The pixel array to modify." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_non_background_colored_vmobjects:4 msgid "list of the VMobjects" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_non_background_colored_vmobjects:6 msgid "The Pixel array to add the VMobjects to." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_point_cloud_mobjects:3 msgid "List of PMobjects" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_vectorized_mobjects:3 msgid "list of VMobjects to display" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_multiple_vectorized_mobjects:5 msgid "The pixel array" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_point_cloud:1 msgid "Displays a PMobject by modifying the Pixel array suitably.. TODO: Write a description for the rgbas argument. :param pmobject: Point Cloud Mobject :type pmobject: PMobject :param points: The points to display in the point cloud mobject :type points: list :param rgbas: :type rgbas: np.array :param thickness: The thickness of each point of the PMobject :type thickness: int, float :param pixel_array: The pixel array to modify. :type pixel_array: np.array" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_vectorized:3 msgid "The Vectorized Mobject to display" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_vectorized:5 msgid "The cairo context to use." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.display_vectorized:8 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_color:10 msgid "The camera object" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_background_colored_vmobject_displayer:4 msgid "Object that displays VMobjects that have the same color as the background." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cached_cairo_context:4 msgid "The pixel array to check." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cached_cairo_context:7 msgid "The cached cairo context." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cairo_context:6 msgid "The Pixel array to get the cairo context of." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_cairo_context:9 msgid "The cairo context of the pixel array." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_coords_of_all_pixels:3 msgid "The array of cartesian coordinates." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_fill_rgbas:6 msgid "The RGBA Array of the fill of the VMobject" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_image:5 msgid "The pixel array from which to get an image, by default None" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_image:8 msgid "The PIL image of the array." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_mobjects_to_display:4 msgid "The Mobjects" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_mobjects_to_display:6 msgid "Whether or not to include the submobjects of mobjects, by default True" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_mobjects_to_display:8 msgid "Any mobjects to exclude, by default None" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_mobjects_to_display:11 msgid "list of mobjects" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_stroke_rgbas:6 msgid "Whether or not to consider the background when getting the stroke RGBAs, by default False" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.get_stroke_rgbas:10 msgid "The RGBA array of the stroke." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.init_background:1 msgid "Initialize the background. If self.background_image is the path of an image the image is set as background; else, the default background color fills the background." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.is_in_frame:4 msgid "The mobject for which the checking needs to be done." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.is_in_frame:7 msgid "True if in frame, False otherwise." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.make_background_from_func:1 msgid "Makes a pixel array for the background by using coords_to_colors_func to determine each pixel's color. Each input pixel's color. Each input to coords_to_colors_func is an (x, y) pair in space (in ordinary space coordinates; not pixel coordinates), and each output is expected to be an RGBA array of 4 floats." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.make_background_from_func:5 #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_background_from_func:5 msgid "The function whose input is an (x,y) pair of coordinates and whose return values must be the colors for that point" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.make_background_from_func:9 msgid "The pixel array which can then be passed to set_background." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.on_screen_pixels:4 msgid "The pixel coords to check." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.on_screen_pixels:7 msgid "The pixel coords on screen." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.overlay_PIL_image:3 msgid "The Pixel array" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.overlay_PIL_image:5 msgid "The Image to overlay." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.overlay_rgba_array:3 msgid "The original pixel array to modify." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.overlay_rgba_array:5 msgid "The new pixel array to overlay." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.reset:4 msgid "The camera object after setting the pixel array." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.reset_pixel_shape:4 msgid "The new height of the entire scene in pixels" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.reset_pixel_shape:6 msgid "The new width of the entire scene in pixels" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.resize_frame_shape:6 msgid "If 0, height is scaled with respect to width else, width is scaled with respect to height." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_background:4 msgid "The pixel array to set the background to." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_background:6 msgid "Whether or not to convert floats values to proper RGB valid ones, by default False" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_background_from_func:1 msgid "Sets the background to a pixel array using coords_to_colors_func to determine each pixel's color. Each input pixel's color. Each input to coords_to_colors_func is an (x, y) pair in space (in ordinary space coordinates; not pixel coordinates), and each output is expected to be an RGBA array of 4 floats." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_color:5 msgid "The RGBA array with which to color the context." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_color:7 msgid "The VMobject with which to set the color." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_cairo_context_path:8 msgid "Camera object after setting cairo_context_path" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_pixel_array:3 msgid "The pixel array to convert and then set as the camera's pixel array." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.set_pixel_array:5 msgid "Whether or not to convert float values to proper RGB values, by default False" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.thickened_coordinates:4 msgid "Pixel coordinates" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.thickened_coordinates:6 msgid "Thickness" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.thickened_coordinates:9 msgid "Array of thickened pixel coords." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:3 msgid "If `mobject` is an instance of a class that inherits from a class that can be rendered, return the super class. For example, an instance of a Square is also an instance of VMobject, and these can be rendered. Therefore, `type_or_raise(Square())` returns True." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:8 msgid "The object to take the type of." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:15 msgid "The type of mobjects, if it can be rendered." msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:16 msgid "Type[:class:`~.Mobject`]" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera.Camera.type_or_raise:0 msgid "Raises" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.camera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.camera.rst:2 msgid "camera" msgstr "" #: ../../../manim/camera/camera.py:docstring of manim.camera.camera:1 msgid "A camera converts the mobjects contained in a Scene into an array of pixels." msgstr "" #: ../../source/reference/manim.camera.camera.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.camera.camera.rst:22::0 msgid "param camera" msgstr "" #: ../../source/reference/manim.camera.camera.rst:22::1 msgid "Camera object to use." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.mapping_camera.MappingCamera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.mapping_camera.MappingCamera.rst:2 msgid "MappingCamera" msgstr "" #: ../../source/reference/manim.camera.mapping_camera.MappingCamera.rst:4 msgid "Qualified name: ``manim.camera.mapping\\_camera.MappingCamera``" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera:1 msgid "Bases: :py:class:`manim.camera.camera.Camera`" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera:1 msgid "Camera object that allows mapping between objects." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera:4 msgid "Initialises the Camera." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera:0 #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera.capture_mobjects:0 msgid "Parameters" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera:6 msgid "What self.background should be, by default None as will be set later." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera:8 msgid "Any local variables to be set." msgstr "" #: ../../source/reference/manim.camera.mapping_camera.MappingCamera.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.camera.mapping_camera.MappingCamera.rst:21::1 #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera.capture_mobjects:1 msgid "Capture mobjects by printing them on :attr:`pixel_array`." msgstr "" #: ../../source/reference/manim.camera.mapping_camera.MappingCamera.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera.capture_mobjects:3 msgid "This is the essential function that converts the contents of a Scene into an array, which is then converted to an image or video." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera.capture_mobjects:6 msgid "Mobjects to capture." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera.capture_mobjects:8 msgid "Keyword arguments to be passed to :meth:`get_mobjects_to_display`." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.MappingCamera.capture_mobjects:12 msgid "Notes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.mapping_camera.OldMultiCamera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.mapping_camera.OldMultiCamera.rst:2 msgid "OldMultiCamera" msgstr "" #: ../../source/reference/manim.camera.mapping_camera.OldMultiCamera.rst:4 msgid "Qualified name: ``manim.camera.mapping\\_camera.OldMultiCamera``" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera:1 msgid "Bases: :py:class:`manim.camera.camera.Camera`" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera:1 msgid "Initialises the Camera." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera:0 #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.capture_mobjects:0 #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.set_background:0 #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.set_pixel_array:0 msgid "Parameters" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera:3 msgid "What self.background should be, by default None as will be set later." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera:5 msgid "Any local variables to be set." msgstr "" #: ../../source/reference/manim.camera.mapping_camera.OldMultiCamera.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.camera.mapping_camera.OldMultiCamera.rst:23::1 #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.capture_mobjects:1 msgid "Capture mobjects by printing them on :attr:`pixel_array`." msgstr "" #: ../../source/reference/manim.camera.mapping_camera.OldMultiCamera.rst:23::1 msgid "Initialize the background." msgstr "" #: ../../source/reference/manim.camera.mapping_camera.OldMultiCamera.rst:23::1 #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.set_background:1 msgid "Sets the background to the passed pixel_array after converting to valid RGB values." msgstr "" #: ../../source/reference/manim.camera.mapping_camera.OldMultiCamera.rst:23::1 #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.set_pixel_array:1 msgid "Sets the pixel array of the camera to the passed pixel array." msgstr "" #: ../../source/reference/manim.camera.mapping_camera.OldMultiCamera.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.capture_mobjects:3 msgid "This is the essential function that converts the contents of a Scene into an array, which is then converted to an image or video." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.capture_mobjects:6 msgid "Mobjects to capture." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.capture_mobjects:8 msgid "Keyword arguments to be passed to :meth:`get_mobjects_to_display`." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.capture_mobjects:12 msgid "Notes" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.capture_mobjects:13 msgid "For a list of classes that can currently be rendered, see :meth:`display_funcs`." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.init_background:1 msgid "Initialize the background. If self.background_image is the path of an image the image is set as background; else, the default background color fills the background." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.set_background:4 msgid "The pixel array to set the background to." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.set_background:6 msgid "Whether or not to convert floats values to proper RGB valid ones, by default False" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.OldMultiCamera.set_pixel_array:3 msgid "The pixel array to convert and then set as the camera's pixel array." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.mapping_camera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.mapping_camera.rst:2 msgid "mapping\\_camera" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera:1 msgid "A camera that allows mapping between objects." msgstr "" #: ../../source/reference/manim.camera.mapping_camera.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.camera.mapping_camera.rst:24::1 msgid "Camera object that allows mapping between objects." msgstr "" #: ../../source/reference/manim.camera.mapping_camera.rst:24::1 #: ../../source/reference/manim.camera.mapping_camera.rst:24::1 msgid "Initialises the Camera." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.mapping_camera.SplitScreenCamera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.mapping_camera.SplitScreenCamera.rst:2 msgid "SplitScreenCamera" msgstr "" #: ../../source/reference/manim.camera.mapping_camera.SplitScreenCamera.rst:4 msgid "Qualified name: ``manim.camera.mapping\\_camera.SplitScreenCamera``" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.SplitScreenCamera:1 msgid "Bases: :py:class:`manim.camera.mapping_camera.OldMultiCamera`" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.SplitScreenCamera:1 msgid "Initialises the Camera." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.SplitScreenCamera:0 msgid "Parameters" msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.SplitScreenCamera:3 msgid "What self.background should be, by default None as will be set later." msgstr "" #: ../../../manim/camera/mapping_camera.py:docstring of manim.camera.mapping_camera.SplitScreenCamera:5 msgid "Any local variables to be set." msgstr "" #: ../../source/reference/manim.camera.mapping_camera.SplitScreenCamera.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.camera.mapping_camera.SplitScreenCamera.rst:21 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.moving_camera.CameraFrame.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.camera.moving_camera.MovingCamera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.moving_camera.MovingCamera.rst:2 msgid "MovingCamera" msgstr "" #: ../../source/reference/manim.camera.moving_camera.MovingCamera.rst:4 msgid "Qualified name: ``manim.camera.moving\\_camera.MovingCamera``" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera:1 msgid "Bases: :py:class:`manim.camera.camera.Camera`" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera:1 msgid "Stays in line with the height, width and position of it's 'frame', which is a Rectangle" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera:8 msgid "Frame is a Mobject, (should almost certainly be a rectangle) determining which region of space the camera displays" msgstr "" #: ../../source/reference/manim.camera.moving_camera.MovingCamera.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.camera.moving_camera.MovingCamera.rst:24::1 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:1 msgid "Zooms on to a given array of mobjects (or a singular mobject) and automatically resizes to frame all the mobjects." msgstr "" #: ../../source/reference/manim.camera.moving_camera.MovingCamera.rst:24::1 #: ../../source/reference/manim.camera.moving_camera.MovingCamera.rst:24::1 msgid "Since the frame can be moving around, the cairo context used for updating should be regenerated at each frame." msgstr "" #: ../../source/reference/manim.camera.moving_camera.MovingCamera.rst:24::1 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.capture_mobjects:1 msgid "Capture mobjects by printing them on :attr:`pixel_array`." msgstr "" #: ../../source/reference/manim.camera.moving_camera.MovingCamera.rst:24::1 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.get_mobjects_indicating_movement:1 msgid "Returns all mobjects whose movement implies that the camera should think of all other mobjects on the screen as moving" msgstr "" #: ../../source/reference/manim.camera.moving_camera.MovingCamera.rst:26 msgid "Attributes" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:1::1 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_center:1 msgid "Returns the centerpoint of the frame in cartesian coordinates." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:1::1 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_height:1 msgid "Returns the height of the frame." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:1::1 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_width:1 msgid "Returns the width of the frame" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:6 msgid "This method only works when 2D-objects in the XY-plane are considered, it will not work correctly when the camera has been rotated." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:0 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.capture_mobjects:0 msgid "Parameters" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:9 msgid "The mobject or array of mobjects that the camera will focus on." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:10 msgid "The width of the margin that is added to the frame (optional, 0 by default)." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:11 msgid "If set to ``True``, only allows focusing on mobjects that are already in frame." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:12 msgid "If set to ``False``, applies the changes instead of returning the corresponding animation" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:0 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_center:0 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_height:0 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_width:0 msgid "Returns" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:14 msgid "_AnimationBuilder that zooms the camera view to a given list of mobjects or ScreenRectangle with position and size updated to zoomed position." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.auto_zoom:0 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_center:0 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_height:0 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_width:0 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.get_mobjects_indicating_movement:0 msgid "Return type" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.cache_cairo_context:1 #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.get_cached_cairo_context:1 msgid "Since the frame can be moving around, the cairo context used for updating should be regenerated at each frame. So no caching." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.capture_mobjects:3 msgid "This is the essential function that converts the contents of a Scene into an array, which is then converted to an image or video." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.capture_mobjects:6 msgid "Mobjects to capture." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.capture_mobjects:8 msgid "Keyword arguments to be passed to :meth:`get_mobjects_to_display`." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.capture_mobjects:12 msgid "Notes" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.capture_mobjects:13 msgid "For a list of classes that can currently be rendered, see :meth:`display_funcs`." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_center:3 msgid "The cartesian coordinates of the center of the frame." msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera.MovingCamera.frame_height:3 msgid "The height of the frame." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.moving_camera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.moving_camera.rst:2 msgid "moving\\_camera" msgstr "" #: ../../../manim/camera/moving_camera.py:docstring of manim.camera.moving_camera:1 msgid "A camera able to move through a scene." msgstr "" #: ../../source/reference/manim.camera.moving_camera.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.multi_camera.MultiCamera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.multi_camera.MultiCamera.rst:2 msgid "MultiCamera" msgstr "" #: ../../source/reference/manim.camera.multi_camera.MultiCamera.rst:4 msgid "Qualified name: ``manim.camera.multi\\_camera.MultiCamera``" msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera:1 msgid "Bases: :py:class:`manim.camera.moving_camera.MovingCamera`" msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera:1 msgid "Camera Object that allows for multiple perspectives." msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera:3 msgid "Initialises the MultiCamera" msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera:0 #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.add_image_mobject_from_camera:0 #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.capture_mobjects:0 msgid "Parameters" msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera:7 msgid "Any valid keyword arguments of MovingCamera." msgstr "" #: ../../source/reference/manim.camera.multi_camera.MultiCamera.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.camera.multi_camera.MultiCamera.rst:24::1 #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.add_image_mobject_from_camera:1 msgid "Adds an ImageMobject that's been obtained from the camera into the list ``self.image_mobject_from_cameras``" msgstr "" #: ../../source/reference/manim.camera.multi_camera.MultiCamera.rst:24::1 #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.capture_mobjects:1 msgid "Capture mobjects by printing them on :attr:`pixel_array`." msgstr "" #: ../../source/reference/manim.camera.multi_camera.MultiCamera.rst:24::1 #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.get_mobjects_indicating_movement:1 msgid "Returns all mobjects whose movement implies that the camera should think of all other mobjects on the screen as moving" msgstr "" #: ../../source/reference/manim.camera.multi_camera.MultiCamera.rst:24::1 #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.reset:1 msgid "Resets the MultiCamera." msgstr "" #: ../../source/reference/manim.camera.multi_camera.MultiCamera.rst:24::1 #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.update_sub_cameras:1 msgid "Reshape sub_camera pixel_arrays" msgstr "" #: ../../source/reference/manim.camera.multi_camera.MultiCamera.rst:26 msgid "Attributes" msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.add_image_mobject_from_camera:1::1 msgid "Returns the centerpoint of the frame in cartesian coordinates." msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.add_image_mobject_from_camera:1::1 msgid "Returns the height of the frame." msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.add_image_mobject_from_camera:1::1 msgid "Returns the width of the frame" msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.add_image_mobject_from_camera:4 msgid "The ImageMobject to add to self.image_mobject_from_cameras" msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.capture_mobjects:3 msgid "This is the essential function that converts the contents of a Scene into an array, which is then converted to an image or video." msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.capture_mobjects:6 msgid "Mobjects to capture." msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.capture_mobjects:8 msgid "Keyword arguments to be passed to :meth:`get_mobjects_to_display`." msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.capture_mobjects:12 msgid "Notes" msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.capture_mobjects:13 msgid "For a list of classes that can currently be rendered, see :meth:`display_funcs`." msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.get_mobjects_indicating_movement:0 #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.reset:0 msgid "Return type" msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera.MultiCamera.reset:0 msgid "Returns" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.multi_camera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.multi_camera.rst:2 msgid "multi\\_camera" msgstr "" #: ../../../manim/camera/multi_camera.py:docstring of manim.camera.multi_camera:1 msgid "A camera supporting multiple perspectives." msgstr "" #: ../../source/reference/manim.camera.multi_camera.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.three_d_camera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.three_d_camera.rst:2 msgid "three\\_d\\_camera" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera:1 msgid "A camera that can be positioned and oriented in three-dimensional space." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.camera.three_d_camera.ThreeDCamera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:2 msgid "ThreeDCamera" msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:4 msgid "Qualified name: ``manim.camera.three\\_d\\_camera.ThreeDCamera``" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera:1 msgid "Bases: :py:class:`manim.camera.camera.Camera`" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera:1 msgid "Initializes the ThreeDCamera" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.add_fixed_in_frame_mobjects:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.add_fixed_orientation_mobjects:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.capture_mobjects:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_fill_rgbas:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_mobjects_to_display:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_stroke_rgbas:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_point:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_points:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.remove_fixed_in_frame_mobjects:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.remove_fixed_orientation_mobjects:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_focal_distance:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_gamma:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_phi:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_theta:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_zoom:0 msgid "Parameters" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera:3 msgid "Any argument of Camera" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera:4 msgid "Any keyword argument of Camera." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 msgid "This method allows the mobject to have a fixed position, even when the camera moves around." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 msgid "This method allows the mobject to have a fixed orientation, even when the camera moves around." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.capture_mobjects:1 msgid "Capture mobjects by printing them on :attr:`pixel_array`." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.generate_rotation_matrix:1 msgid "Generates a rotation matrix based off the current position of the camera." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_fill_rgbas:1 msgid "Returns the RGBA array of the fill of the passed VMobject" msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_focal_distance:1 msgid "Returns focal_distance of the Camera." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_gamma:1 msgid "Returns the rotation of the camera about the vector from the ORIGIN to the Camera." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_mobjects_to_display:1 msgid "Used to get the list of mobjects to display with the camera." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_phi:1 msgid "Returns the Polar angle (the angle off Z_AXIS) phi." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_rotation_matrix:1 msgid "Returns the matrix corresponding to the current position of the camera." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_stroke_rgbas:1 msgid "Gets the RGBA array for the stroke of the passed VMobject." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_theta:1 msgid "Returns the Azimuthal i.e the angle that spins the camera around the Z_AXIS." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_value_trackers:1 msgid "Returns list of ValueTrackers of phi, theta, focal_distance and gamma" msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_zoom:1 msgid "Returns the zoom amount of the camera." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_point:1 msgid "Applies the current rotation_matrix as a projection matrix to the passed point." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_points:1 msgid "Applies the current rotation_matrix as a projection matrix to the passed array of points." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 msgid "If a mobject was fixed in frame by passing it through :meth:`.add_fixed_in_frame_mobjects`, then this undoes that fixing." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 msgid "If a mobject was fixed in its orientation by passing it through :meth:`.add_fixed_orientation_mobjects`, then this undoes that fixing." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.reset_rotation_matrix:1 msgid "Sets the value of self.rotation_matrix to the matrix corresponding to the current position of the camera" msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_focal_distance:1 msgid "Sets the focal_distance of the Camera." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_gamma:1 msgid "Sets the angle of rotation of the camera about the vector from the ORIGIN to the Camera." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_phi:1 msgid "Sets the polar angle i.e the angle between Z_AXIS and Camera through ORIGIN in radians." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_theta:1 msgid "Sets the azimuthal angle i.e the angle that spins the camera around Z_AXIS in radians." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:45::1 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_zoom:1 msgid "Sets the zoom amount of the camera." msgstr "" #: ../../source/reference/manim.camera.three_d_camera.ThreeDCamera.rst:47 msgid "Attributes" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.add_fixed_in_frame_mobjects:1 msgid "This method allows the mobject to have a fixed position, even when the camera moves around. E.G If it was passed through this method, at the top of the frame, it will continue to be displayed at the top of the frame." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.add_fixed_in_frame_mobjects:6 msgid "Highly useful when displaying Titles or formulae or the like." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.add_fixed_in_frame_mobjects:8 msgid "The mobject to fix in frame." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.add_fixed_orientation_mobjects:1 msgid "This method allows the mobject to have a fixed orientation, even when the camera moves around. E.G If it was passed through this method, facing the camera, it will continue to face the camera even as the camera moves. Highly useful when adding labels to graphs and the like." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.add_fixed_orientation_mobjects:7 msgid "The mobject whose orientation must be fixed." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.add_fixed_orientation_mobjects:9 msgid "Whether or not to use the function that takes the mobject's center as centerpoint, by default False" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.add_fixed_orientation_mobjects:12 msgid "The function which returns the centerpoint with respect to which the mobject will be oriented, by default None" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.capture_mobjects:3 msgid "This is the essential function that converts the contents of a Scene into an array, which is then converted to an image or video." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.capture_mobjects:6 msgid "Mobjects to capture." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.capture_mobjects:8 msgid "Keyword arguments to be passed to :meth:`get_mobjects_to_display`." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.capture_mobjects:12 msgid "Notes" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.capture_mobjects:13 msgid "For a list of classes that can currently be rendered, see :meth:`display_funcs`." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.generate_rotation_matrix:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_fill_rgbas:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_focal_distance:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_gamma:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_mobjects_to_display:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_phi:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_rotation_matrix:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_stroke_rgbas:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_theta:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_value_trackers:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_zoom:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_point:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_points:0 msgid "Returns" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.generate_rotation_matrix:3 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_rotation_matrix:3 msgid "The matrix corresponding to the current position of the camera." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.generate_rotation_matrix:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_fill_rgbas:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_focal_distance:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_gamma:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_mobjects_to_display:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_phi:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_rotation_matrix:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_stroke_rgbas:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_theta:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_value_trackers:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_zoom:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_point:0 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_points:0 msgid "Return type" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_fill_rgbas:3 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_stroke_rgbas:4 msgid "The VMobject" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_fill_rgbas:6 msgid "The RGBA Array of the fill of the VMobject" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_focal_distance:3 msgid "The focal_distance of the Camera in MUnits." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_gamma:3 msgid "The angle of rotation of the camera about the vector from the ORIGIN to the Camera in radians" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_mobjects_to_display:4 msgid "The Mobjects" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_mobjects_to_display:6 msgid "Whether or not to include the submobjects of mobjects, by default True" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_mobjects_to_display:8 msgid "Any mobjects to exclude, by default None" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_mobjects_to_display:11 msgid "list of mobjects" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_phi:3 msgid "The Polar angle in radians." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_stroke_rgbas:6 msgid "Whether or not to consider the background when getting the stroke RGBAs, by default False" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_stroke_rgbas:10 msgid "The RGBA array of the stroke." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_theta:3 msgid "The Azimuthal angle in radians." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_value_trackers:3 msgid "list of ValueTracker objects" msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.get_zoom:3 #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_zoom:3 msgid "The zoom amount of the camera." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_point:4 msgid "The point to project." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_point:7 msgid "The point after projection." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_points:4 msgid "The list of points to project." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.project_points:7 msgid "The points after projecting." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.remove_fixed_in_frame_mobjects:1 msgid "If a mobject was fixed in frame by passing it through :meth:`.add_fixed_in_frame_mobjects`, then this undoes that fixing. The Mobject will no longer be fixed in frame." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.remove_fixed_in_frame_mobjects:5 msgid "The mobjects which need not be fixed in frame any longer." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.remove_fixed_orientation_mobjects:1 msgid "If a mobject was fixed in its orientation by passing it through :meth:`.add_fixed_orientation_mobjects`, then this undoes that fixing. The Mobject will no longer have a fixed orientation." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.remove_fixed_orientation_mobjects:5 msgid "The mobjects whose orientation need not be fixed any longer." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_focal_distance:3 msgid "The focal_distance of the Camera." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_gamma:3 msgid "The new angle of rotation of the camera." msgstr "" #: ../../../manim/camera/three_d_camera.py:docstring of manim.camera.three_d_camera.ThreeDCamera.set_phi:3 msgid "The new value of the polar angle in radians." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.constants.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.constants.rst:2 msgid "constants" msgstr "" #: ../../../manim/constants.py:docstring of manim.constants:1 msgid "Constant definitions." msgstr "" #: ../../source/reference/manim.constants.rst:11 msgid "Module Attributes" msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "The center of the coordinate system." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "One unit step in the positive Y direction." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "One unit step in the negative Y direction." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "One unit step in the positive X direction." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "One unit step in the negative X direction." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "One unit step in the negative Z direction." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "One unit step in the positive Z direction." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "One step up plus one step left." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "One step up plus one step right." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "One step down plus one step left." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "One step down plus one step right." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "The ratio of the circumference of a circle to its diameter." msgstr "" #: ../../source/reference/manim.constants.rst:27::1 msgid "The ratio of the circumference of a circle to its radius." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.boolean_ops.Difference.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.boolean_ops.Exclusion.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.boolean_ops.Intersection.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.boolean_ops.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.boolean_ops.Union.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.changing.AnimatedBoundary.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.changing.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.changing.TracedPath.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.coordinate_systems.Axes.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.coordinate_systems.ComplexPlane.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.coordinate_systems.CoordinateSystem.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.coordinate_systems.NumberPlane.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.coordinate_systems.PolarPlane.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.coordinate_systems.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.coordinate_systems.ThreeDAxes.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.frame.FullScreenFadeRectangle.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.frame.FullScreenRectangle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.frame.FullScreenRectangle.rst:2 msgid "FullScreenRectangle" msgstr "" #: ../../source/reference/manim.mobject.frame.FullScreenRectangle.rst:4 msgid "Qualified name: ``manim.mobject.frame.FullScreenRectangle``" msgstr "" #: ../../../manim/mobject/frame.py:docstring of manim.mobject.frame.FullScreenRectangle:1 msgid "Bases: :py:class:`manim.mobject.frame.ScreenRectangle`" msgstr "" #: ../../source/reference/manim.mobject.frame.FullScreenRectangle.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.frame.FullScreenRectangle.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.frame.FullScreenRectangle.rst:33::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.frame.FullScreenRectangle.rst:33::1 msgid "The aspect ratio." msgstr "" #: ../../source/reference/manim.mobject.frame.FullScreenRectangle.rst:33::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.frame.FullScreenRectangle.rst:33::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.frame.FullScreenRectangle.rst:33::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.frame.PictureInPictureFrame.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.frame.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.frame.rst:2 msgid "frame" msgstr "" #: ../../../manim/mobject/frame.py:docstring of manim.mobject.frame:1 msgid "Special rectangles." msgstr "" #: ../../source/reference/manim.mobject.frame.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.frame.ScreenRectangle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.frame.ScreenRectangle.rst:2 msgid "ScreenRectangle" msgstr "" #: ../../source/reference/manim.mobject.frame.ScreenRectangle.rst:4 msgid "Qualified name: ``manim.mobject.frame.ScreenRectangle``" msgstr "" #: ../../../manim/mobject/frame.py:docstring of manim.mobject.frame.ScreenRectangle:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.Rectangle`" msgstr "" #: ../../source/reference/manim.mobject.frame.ScreenRectangle.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.frame.ScreenRectangle.rst:21 msgid "Attributes" msgstr "" #: ../../../manim/mobject/frame.py:docstring of manim.mobject.frame.ScreenRectangle.aspect_ratio:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/frame.py:docstring of manim.mobject.frame.ScreenRectangle.aspect_ratio:1::1 #: ../../../manim/mobject/frame.py:docstring of manim.mobject.frame.ScreenRectangle.aspect_ratio:1 msgid "The aspect ratio." msgstr "" #: ../../../manim/mobject/frame.py:docstring of manim.mobject.frame.ScreenRectangle.aspect_ratio:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/frame.py:docstring of manim.mobject.frame.ScreenRectangle.aspect_ratio:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/frame.py:docstring of manim.mobject.frame.ScreenRectangle.aspect_ratio:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/frame.py:docstring of manim.mobject.frame.ScreenRectangle.aspect_ratio:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.functions.FunctionGraph.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.functions.ImplicitFunction.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.functions.ParametricFunction.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.functions.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Angle.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.AnnotationDot.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.AnnularSector.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Annulus.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.AnnotationDot.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.AnnotationDot.rst:2 msgid "AnnotationDot" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnotationDot.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.AnnotationDot``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnotationDot:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.Dot`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnotationDot:1 msgid "A dot with bigger radius and bold stroke to annotate scenes." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnotationDot.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnotationDot.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnotationDot.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnotationDot.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnotationDot.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnotationDot.rst:32::1 msgid "The height of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnotationDot.rst:32::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.AnnularSector.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.AnnularSector.rst:2 msgid "AnnularSector" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnularSector.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.AnnularSector``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.Arc`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector:1 msgid "The inside radius of the Annular Sector." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector:2 msgid "The outside radius of the Annular Sector." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector:3 msgid "The clockwise angle of the Annular Sector." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector:4 msgid "The starting clockwise angle of the Annular Sector." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector:5 msgid "The opacity of the color filled in the Annular Sector." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector:6 msgid "The stroke width of the Annular Sector." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector:7 msgid "The color filled into the Annular Sector." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector:10 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnularSector.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnularSector.rst:21::1 #: ../../source/reference/manim.mobject.geometry.arc.AnnularSector.rst:21::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector.generate_points:1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector.generate_points:1 msgid "Initializes :attr:`points` and therefore the shape." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.AnnularSector.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector.generate_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.AnnularSector.generate_points:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.Annulus.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.Annulus.rst:2 msgid "Annulus" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Annulus.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.Annulus``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.Circle`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus:1 msgid "Region between two concentric :class:`Circles <.Circle>`." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus:3 msgid "The radius of the inner :class:`Circle`." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus:4 msgid "The radius of the outer :class:`Circle`." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus:5 msgid "Additional arguments to be passed to :class:`Annulus`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus:8 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Annulus.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Annulus.rst:21::1 #: ../../source/reference/manim.mobject.geometry.arc.Annulus.rst:21::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus.generate_points:1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus.generate_points:1 msgid "Initializes :attr:`points` and therefore the shape." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Annulus.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus.generate_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Annulus.generate_points:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.Arc.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.Arc.rst:2 msgid "Arc" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Arc.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.Arc``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.TipableVMobject`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc:1 msgid "A circular arc." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc:5 msgid "A simple arc of angle Pi." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Arc.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Arc.rst:24::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc.generate_points:1 msgid "Initializes :attr:`points` and therefore the shape." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Arc.rst:24::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc.get_arc_center:1 msgid "Looks at the normals to the first two anchors, and finds their intersection points" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Arc.rst:26 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc.generate_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc.generate_points:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Arc:0 msgid "Parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.ArcBetweenPoints.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.ArcBetweenPoints.rst:2 msgid "ArcBetweenPoints" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcBetweenPoints.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.ArcBetweenPoints``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcBetweenPoints:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.Arc`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcBetweenPoints:1 msgid "Inherits from Arc and additionally takes 2 points between which the arc is spanned." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcBetweenPoints:4 msgid "Example" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcBetweenPoints.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcBetweenPoints.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcBetweenPoints.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcBetweenPoints.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcBetweenPoints.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcBetweenPoints.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.ArcPolygon.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygon.rst:2 msgid "ArcPolygon" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygon.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.ArcPolygon``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:1 msgid "A generalized polygon allowing for points to be connected with arcs." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:3 msgid "This version tries to stick close to the way :class:`Polygon` is used. Points can be passed to it directly which are used to generate the according arcs (using :class:`ArcBetweenPoints`). An angle or radius can be passed to it to use across all arcs, but to configure arcs individually an ``arc_config`` list has to be passed with the syntax explained below." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:9 msgid "A list of vertices, start and end points for the arc segments." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:10 msgid "The angle used for constructing the arcs. If no other parameters are set, this angle is used to construct all arcs." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:12 msgid "The circle radius used to construct the arcs. If specified, overrides the specified ``angle``." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:14 msgid "When passing a ``dict``, its content will be passed as keyword arguments to :class:`~.ArcBetweenPoints`. Otherwise, a list of dictionaries containing values that are passed as keyword arguments for every individual arc can be passed." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:18 msgid "Further keyword arguments that are passed to the constructor of :class:`~.VMobject`." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:25 msgid "The arcs created from the input parameters::" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:0 msgid "type" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:36 msgid "Two instances of :class:`ArcPolygon` can be transformed properly into one another as well. Be advised that any arc initialized with ``angle=0`` will actually be a straight line, so if a straight section should seamlessly transform into an arced section or vice versa, initialize the straight section with a negligible angle instead (such as ``angle=0.0001``)." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:43 msgid "There is an alternative version (:class:`ArcPolygonFromArcs`) that is instantiated with pre-defined arcs." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:49 msgid "Examples" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygon:68 msgid "For further examples see :class:`ArcPolygonFromArcs`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygon.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygon.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygon.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygon.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygon.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygon.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.ArcPolygonFromArcs.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygonFromArcs.rst:2 msgid "ArcPolygonFromArcs" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygonFromArcs.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.ArcPolygonFromArcs``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:1 msgid "A generalized polygon allowing for points to be connected with arcs." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:3 msgid "This version takes in pre-defined arcs to generate the arcpolygon and introduces little new syntax. However unlike :class:`Polygon` it can't be created with points directly." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:7 msgid "For proper appearance the passed arcs should connect seamlessly: ``[a,b][b,c][c,a]``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:10 msgid "If there are any gaps between the arcs, those will be filled in with straight lines, which can be used deliberately for any straight sections. Arcs can also be passed as straight lines such as an arc initialized with ``angle=0``." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:15 msgid "These are the arcs from which the arcpolygon is assembled." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:16 msgid "Keyword arguments that are passed to the constructor of :class:`~.VMobject`. Affects how the ArcPolygon itself is drawn, but doesn't affect passed arcs." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:24 msgid "The arcs used to initialize the ArcPolygonFromArcs::" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:33 msgid "Two instances of :class:`ArcPolygon` can be transformed properly into one another as well. Be advised that any arc initialized with ``angle=0`` will actually be a straight line, so if a straight section should seamlessly transform into an arced section or vice versa, initialize the straight section with a negligible angle instead (such as ``angle=0.0001``)." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:40 msgid "There is an alternative version (:class:`ArcPolygon`) that can be instantiated with points." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:47 msgid "Examples" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:48 msgid "One example of an arcpolygon is the Reuleaux triangle. Instead of 3 straight lines connecting the outer points, a Reuleaux triangle has 3 arcs connecting those points, making a shape with constant width." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:53 msgid "Passed arcs are stored as submobjects in the arcpolygon. This means that the arcs are changed along with the arcpolygon, for example when it's shifted, and these arcs can be manipulated after the arcpolygon has been initialized." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:58 msgid "Also both the arcs contained in an :class:`~.ArcPolygonFromArcs`, as well as the arcpolygon itself are drawn, which affects draw time in :class:`~.Create` for example. In most cases the arcs themselves don't need to be drawn, in which case they can be passed as invisible." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.ArcPolygonFromArcs:80 msgid "The arcpolygon itself can also be hidden so that instead only the contained arcs are drawn. This can be used to easily debug arcs or to highlight them." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygonFromArcs.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygonFromArcs.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygonFromArcs.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygonFromArcs.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygonFromArcs.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.ArcPolygonFromArcs.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.Circle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.Circle.rst:2 msgid "Circle" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Circle.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.Circle``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.Arc`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle:1 msgid "A circle." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle:0 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.from_three_points:0 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.point_at_angle:0 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.surround:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle:3 msgid "The color of the shape." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle:4 msgid "Additional arguments to be passed to :class:`Arc`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle:7 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.point_at_angle:9 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.surround:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Circle.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Circle.rst:22::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.from_three_points:1 msgid "Returns a circle passing through the specified three points." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Circle.rst:22::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.point_at_angle:1 msgid "Returns the position of a point on the circle." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Circle.rst:22::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.surround:1 msgid "Modifies a circle so that it surrounds a given mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Circle.rst:24 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.from_three_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.from_three_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.from_three_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.from_three_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.from_three_points:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.from_three_points:5 msgid "Example" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.point_at_angle:3 msgid "The angle of the point along the circle in radians." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.point_at_angle:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.point_at_angle:5 msgid "The location of the point along the circle's circumference." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.point_at_angle:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.surround:3 msgid "The mobject that the circle will be surrounding." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Circle.surround:5 msgid "Scales the circle with respect to the mobject. A `buffer_factor` < 1 makes the circle smaller than the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.CubicBezier.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.CubicBezier.rst:2 msgid "CubicBezier" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CubicBezier.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.CubicBezier``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.CubicBezier:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.CubicBezier:2 msgid "Example" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CubicBezier.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CubicBezier.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CubicBezier.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CubicBezier.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CubicBezier.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CubicBezier.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.CurvedArrow.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.CurvedArrow.rst:2 msgid "CurvedArrow" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedArrow.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.CurvedArrow``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.CurvedArrow:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.ArcBetweenPoints`" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedArrow.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedArrow.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedArrow.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedArrow.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedArrow.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedArrow.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.CurvedDoubleArrow.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.CurvedDoubleArrow.rst:2 msgid "CurvedDoubleArrow" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedDoubleArrow.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.CurvedDoubleArrow``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.CurvedDoubleArrow:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.CurvedArrow`" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedDoubleArrow.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedDoubleArrow.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedDoubleArrow.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedDoubleArrow.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedDoubleArrow.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.CurvedDoubleArrow.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.Dot.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.Dot.rst:2 msgid "Dot" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Dot.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.Dot``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Dot:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.Circle`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Dot:1 msgid "A circle with a very small radius." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Dot:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Dot:3 msgid "The location of the dot." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Dot:4 msgid "The radius of the dot." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Dot:5 msgid "The thickness of the outline of the dot." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Dot:6 msgid "The opacity of the dot's fill_colour" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Dot:7 msgid "The color of the dot." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Dot:8 msgid "Additional arguments to be passed to :class:`Circle`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Dot:11 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Dot.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Dot.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Dot.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Dot.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Dot.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Dot.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.Ellipse.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.Ellipse.rst:2 msgid "Ellipse" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Ellipse.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.Ellipse``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Ellipse:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.Circle`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Ellipse:1 msgid "A circular shape; oval, circle." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Ellipse:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Ellipse:3 msgid "The horizontal width of the ellipse." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Ellipse:4 msgid "The vertical height of the ellipse." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Ellipse:5 msgid "Additional arguments to be passed to :class:`Circle`." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Ellipse:8 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Ellipse.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Ellipse.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Ellipse.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Ellipse.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Ellipse.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Ellipse.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.LabeledDot.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.LabeledDot.rst:2 msgid "LabeledDot" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.LabeledDot.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.LabeledDot``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.LabeledDot:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.Dot`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.LabeledDot:1 msgid "A :class:`Dot` containing a label in its center." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.LabeledDot:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.LabeledDot:3 msgid "The label of the :class:`Dot`. This is rendered as :class:`~.MathTex` by default (i.e., when passing a :class:`str`), but other classes representing rendered strings like :class:`~.Text` or :class:`~.Tex` can be passed as well." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.LabeledDot:7 msgid "The radius of the :class:`Dot`. If ``None`` (the default), the radius is calculated based on the size of the ``label``." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.LabeledDot:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.LabeledDot:11 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.LabeledDot.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.LabeledDot.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.LabeledDot.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.LabeledDot.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.LabeledDot.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.LabeledDot.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.rst:2 msgid "arc" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc:1 msgid "Mobjects that are curved." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc:4 #: ../../source/reference/manim.mobject.geometry.arc.rst:50::0 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 msgid "A dot with bigger radius and bold stroke to annotate scenes." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::0 msgid "param inner_radius" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 msgid "The inside radius of the Annular Sector." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 msgid "Region between two concentric :class:`Circles <.Circle>`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 msgid "A circular arc." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 msgid "Inherits from Arc and additionally takes 2 points between which the arc is spanned." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 msgid "A generalized polygon allowing for points to be connected with arcs." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 msgid "A circle." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::0 msgid "Example" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 msgid "A circle with a very small radius." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 msgid "A circular shape; oval, circle." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.rst:50::1 msgid "A :class:`Dot` containing a label in its center." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.Sector.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.Sector.rst:2 msgid "Sector" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Sector.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.Sector``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Sector:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.AnnularSector`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.Sector:2 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Sector.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Sector.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Sector.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Sector.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Sector.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.Sector.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.arc.TipableVMobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:2 msgid "TipableVMobject" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:4 msgid "Qualified name: ``manim.mobject.geometry.arc.TipableVMobject``" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:1 msgid "Meant for shared functionality between Arc and Line. Functionality can be classified broadly into these groups:" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:7 msgid "Adding, Creating, Modifying tips" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:5 msgid "add_tip calls create_tip, before pushing the new tip" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:6 msgid "into the TipableVMobject's list of submobjects" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:7 msgid "stylistic and positional configuration" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:11 msgid "Checking for tips" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:11 msgid "Boolean checks for whether the TipableVMobject has a tip" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:11 msgid "and a starting tip" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:15 msgid "Getters" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:15 msgid "Straightforward accessors, returning information pertaining" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject:15 msgid "to the TipableVMobject instance's tip(s), its length etc" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:36::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.add_tip:1 msgid "Adds a tip to the TipableVMobject instance, recognising that the endpoints might need to be switched if it's a 'starting tip' or not." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:36::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.create_tip:1 msgid "Stylises the tip, positions it spatially, and returns the newly instantiated tip to the caller." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:36::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.get_end:1 msgid "Returns the point, where the stroke that surrounds the :class:`~.Mobject` ends." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:36::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.get_start:1 msgid "Returns the point, where the stroke that surrounds the :class:`~.Mobject` starts." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:36::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.get_tip:1 msgid "Returns the TipableVMobject instance's (first) tip, otherwise throws an exception." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:36::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.get_tips:1 msgid "Returns a VGroup (collection of VMobjects) containing the TipableVMObject instance's tips." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:36::1 #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.get_unpositioned_tip:1 msgid "Returns a tip that has been stylistically configured, but has not yet been given a position in space." msgstr "" #: ../../source/reference/manim.mobject.geometry.arc.TipableVMobject.rst:38 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.add_tip:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.add_tip:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.add_tip:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/arc.py:docstring of manim.mobject.geometry.arc.TipableVMobject.add_tip:1::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.ArcBetweenPoints.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.ArcPolygon.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.ArcPolygonFromArcs.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Arrow.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.ArrowCircleFilledTip.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.ArrowCircleTip.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.ArrowSquareFilledTip.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.ArrowSquareTip.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.ArrowTip.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.ArrowTriangleFilledTip.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.ArrowTriangleTip.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.boolean_ops.Difference.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Difference.rst:2 msgid "Difference" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Difference.rst:4 msgid "Qualified name: ``manim.mobject.geometry.boolean\\_ops.Difference``" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Difference:1 msgid "Bases: :py:class:`manim.mobject.geometry.boolean_ops._BooleanOps`" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Difference:1 msgid "Subtracts one :class:`~.VMobject` from another one." msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Difference:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Difference:3 msgid "The 1st :class:`~.VMobject`." msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Difference:4 msgid "The 2nd :class:`~.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Difference:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Difference:7 msgid "Example" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Difference.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Difference.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Difference.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Difference.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Difference.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Difference.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.boolean_ops.Exclusion.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Exclusion.rst:2 msgid "Exclusion" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Exclusion.rst:4 msgid "Qualified name: ``manim.mobject.geometry.boolean\\_ops.Exclusion``" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Exclusion:1 msgid "Bases: :py:class:`manim.mobject.geometry.boolean_ops._BooleanOps`" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Exclusion:1 msgid "Find the XOR between two :class:`~.VMobject`. This creates a new :class:`~.VMobject` consisting of the region covered by exactly one of them." msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Exclusion:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Exclusion:5 msgid "The 1st :class:`~.VMobject`." msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Exclusion:6 msgid "The 2nd :class:`~.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Exclusion:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Exclusion:9 msgid "Example" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Exclusion.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Exclusion.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Exclusion.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Exclusion.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Exclusion.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Exclusion.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.boolean_ops.Intersection.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Intersection.rst:2 msgid "Intersection" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Intersection.rst:4 msgid "Qualified name: ``manim.mobject.geometry.boolean\\_ops.Intersection``" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Intersection:1 msgid "Bases: :py:class:`manim.mobject.geometry.boolean_ops._BooleanOps`" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Intersection:1 msgid "Find the intersection of two :class:`~.VMobject` s. This keeps the parts covered by both :class:`~.VMobject` s." msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Intersection:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Intersection:4 msgid "The :class:`~.VMobject` to find the intersection." msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Intersection:0 msgid "Raises" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Intersection:6 msgid "If less the 2 :class:`~.VMobject` are passed." msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Intersection:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Intersection:9 msgid "Example" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Intersection.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Intersection.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Intersection.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Intersection.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Intersection.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Intersection.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.boolean_ops.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.boolean_ops.rst:2 msgid "boolean\\_ops" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops:1 msgid "Boolean operations for two-dimensional mobjects." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.rst:26::1 msgid "Subtracts one :class:`~.VMobject` from another one." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.rst:26::1 msgid "Find the XOR between two :class:`~.VMobject`." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.rst:26::1 msgid "Find the intersection of two :class:`~.VMobject` s." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.boolean_ops.Union.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Union.rst:2 msgid "Union" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Union.rst:4 msgid "Qualified name: ``manim.mobject.geometry.boolean\\_ops.Union``" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Union:1 msgid "Bases: :py:class:`manim.mobject.geometry.boolean_ops._BooleanOps`" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Union:1 msgid "Union of two or more :class:`~.VMobject` s. This returns the common region of the :class:`~VMobject` s." msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Union:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Union:4 msgid "The :class:`~.VMobject` s to find the union of." msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Union:0 msgid "Raises" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Union:6 msgid "If less than 2 :class:`~.VMobject` s are passed." msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Union:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/geometry/boolean_ops.py:docstring of manim.mobject.geometry.boolean_ops.Union:9 msgid "Example" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Union.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Union.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Union.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Union.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Union.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.boolean_ops.Union.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Circle.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.CubicBezier.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.CurvedArrow.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.CurvedDoubleArrow.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Cutout.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.DashedLine.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Dot.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.DoubleArrow.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Elbow.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Ellipse.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.LabeledDot.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.line.Angle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.line.Angle.rst:2 msgid "Angle" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Angle.rst:4 msgid "Qualified name: ``manim.mobject.geometry.line.Angle``" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:1 msgid "A circular arc or elbow-type mobject representing an angle of two lines." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:0 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:0 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_value:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:3 msgid "The first line." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:4 msgid "The second line." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:5 msgid "The radius of the :class:`Arc`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:6 msgid "A sequence of two :class:`int` numbers determining which of the 4 quadrants should be used. The first value indicates whether to anchor the arc on the first line closer to the end point (1) or start point (-1), and the second value functions similarly for the end (1) or start (-1) of the second line. Possibilities: (1,1), (-1,1), (1,-1), (-1,-1)." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:12 msgid "Toggles between the two possible angles defined by two points and an arc center. If set to False (default), the arc will always go counterclockwise from the point on line1 until the point on line2 is reached. If set to True, the angle will go clockwise from line1 to line2." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:15 msgid "Allows for a :class:`Dot` in the arc. Mainly used as an convention to indicate a right angle. The dot can be customized in the next three parameters." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:18 msgid "The radius of the :class:`Dot`. If not specified otherwise, this radius will be 1/10 of the arc radius." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:20 msgid "Relative distance from the center to the arc: 0 puts the dot in the center and 1 on the arc itself." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:22 msgid "The color of the :class:`Dot`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:24 msgid "Produces an elbow-type mobject indicating a right angle, see :class:`RightAngle` for more information and a shorthand." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:27 msgid "Further keyword arguments that are passed to the constructor of :class:`Arc` or :class:`Elbow`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:30 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:15 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_lines:7 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_value:9 msgid "Examples" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle:31 msgid "The first example shows some right angles with a dot in the middle while the second example shows all 8 possible angles defined by two lines." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Angle.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Angle.rst:22::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:1 msgid "The angle between the lines AB and BC." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Angle.rst:22::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_lines:1 msgid "Get the lines forming an angle of the :class:`Angle` class." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Angle.rst:22::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_value:1 msgid "Get the value of an angle of the :class:`Angle` class." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Angle.rst:24 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:3 msgid "This constructs the angle :math:`\\angle ABC`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:5 msgid "The endpoint of the first angle leg" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:6 msgid "The vertex of the angle" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:7 msgid "The endpoint of the second angle leg" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:8 msgid "Further keyword arguments are passed to :class:`.Angle`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:0 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_lines:0 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_value:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:10 msgid "Angle(line1, line2, radius=0.5, quadrant=(-1,1), stroke_width=8), Angle(line1, line2, radius=0.7, quadrant=(-1,-1), color=RED, other_angle=True)," msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.from_three_points:0 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_lines:0 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_value:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_lines:3 msgid "A :class:`~.VGroup` containing the lines that form the angle of the :class:`Angle` class." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_value:3 msgid "A boolean to decide the unit (deg/rad) in which the value of the angle is returned." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Angle.get_value:5 msgid "The value in degrees/radians of an angle of the :class:`Angle` class." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.line.Arrow.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.line.Arrow.rst:2 msgid "Arrow" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Arrow.rst:4 msgid "Qualified name: ``manim.mobject.geometry.line.Arrow``" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:1 msgid "Bases: :py:class:`manim.mobject.geometry.line.Line`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:1 msgid "An arrow." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:3 msgid "Arguments to be passed to :class:`Line`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:5 msgid "The thickness of the arrow. Influenced by :attr:`max_stroke_width_to_length_ratio`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:7 msgid "The distance of the arrow from its start and end points." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:9 msgid ":attr:`tip_length` scales with the length of the arrow. Increasing this ratio raises the max value of :attr:`tip_length`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:11 msgid ":attr:`stroke_width` scales with the length of the arrow. Increasing this ratio ratios the max value of :attr:`stroke_width`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:13 msgid "Additional arguments to be passed to :class:`Line`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:17 msgid ":class:`ArrowTip` :class:`CurvedArrow`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow:21 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_default_tip_length:4 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_normal_vector:4 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.scale:8 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Arrow.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Arrow.rst:23::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_default_tip_length:1 msgid "Returns the default tip_length of the arrow." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Arrow.rst:23::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_normal_vector:1 msgid "Returns the normal of a vector." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Arrow.rst:23::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.reset_normal_vector:1 msgid "Resets the normal of a vector" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Arrow.rst:23::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.scale:1 msgid "Scale an arrow, but keep stroke width and arrow tip size fixed." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Arrow.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_default_tip_length:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_default_tip_length:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_default_tip_length:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_default_tip_length:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_default_tip_length:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_default_tip_length:0 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Arrow.get_normal_vector:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.line.DashedLine.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.line.DashedLine.rst:2 msgid "DashedLine" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DashedLine.rst:4 msgid "Qualified name: ``manim.mobject.geometry.line.DashedLine``" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine:1 msgid "Bases: :py:class:`manim.mobject.geometry.line.Line`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine:1 msgid "A dashed :class:`Line`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine:3 msgid "Arguments to be passed to :class:`Line`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine:5 msgid "The length of each individual dash of the line." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine:7 msgid "The ratio of dash space to empty space. Range of 0-1." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine:9 msgid "Additional arguments to be passed to :class:`Line`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine:16 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_end:4 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_first_handle:4 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_last_handle:4 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_start:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DashedLine.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DashedLine.rst:23::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_end:1 msgid "Returns the end point of the line." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DashedLine.rst:23::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_first_handle:1 msgid "Returns the point of the first handle." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DashedLine.rst:23::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_last_handle:1 msgid "Returns the point of the last handle." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DashedLine.rst:23::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_start:1 msgid "Returns the start point of the line." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DashedLine.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_end:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_end:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_end:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_end:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DashedLine.get_end:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.line.DoubleArrow.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.line.DoubleArrow.rst:2 msgid "DoubleArrow" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DoubleArrow.rst:4 msgid "Qualified name: ``manim.mobject.geometry.line.DoubleArrow``" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DoubleArrow:1 msgid "Bases: :py:class:`manim.mobject.geometry.line.Arrow`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DoubleArrow:1 msgid "An arrow with tips on both ends." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DoubleArrow:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DoubleArrow:3 msgid "Arguments to be passed to :class:`Arrow`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DoubleArrow:5 msgid "Additional arguments to be passed to :class:`Arrow`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DoubleArrow:9 msgid ":class:`.~ArrowTip` :class:`.~CurvedDoubleArrow`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.DoubleArrow:13 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DoubleArrow.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DoubleArrow.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DoubleArrow.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DoubleArrow.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DoubleArrow.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.DoubleArrow.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.line.Elbow.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.line.Elbow.rst:2 msgid "Elbow" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Elbow.rst:4 msgid "Qualified name: ``manim.mobject.geometry.line.Elbow``" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Elbow:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Elbow:1 msgid "Two lines that create a right angle about each other: L-shape." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Elbow:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Elbow:3 msgid "The length of the elbow's sides." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Elbow:5 msgid "The rotation of the elbow." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Elbow:7 msgid "Additional arguments to be passed to :class:`~.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Elbow:12 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Elbow.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Elbow.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Elbow.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Elbow.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Elbow.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Elbow.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.line.Line.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.line.Line.rst:2 msgid "Line" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Line.rst:4 msgid "Qualified name: ``manim.mobject.geometry.line.Line``" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line:1 msgid "Bases: :py:class:`manim.mobject.geometry.arc.TipableVMobject`" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Line.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Line.rst:31::1 #: ../../source/reference/manim.mobject.geometry.line.Line.rst:31::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.generate_points:1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.generate_points:1 msgid "Initializes :attr:`points` and therefore the shape." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Line.rst:31::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.get_projection:1 msgid "Returns the projection of a point onto a line." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Line.rst:31::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.put_start_and_end_on:1 msgid "Sets starts and end coordinates of a line." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Line.rst:33 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.generate_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.generate_points:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.generate_points:3 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.generate_points:3 msgid "Gets called upon creation. This is an empty method that can be implemented by subclasses." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.get_projection:0 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.put_start_and_end_on:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.get_projection:3 msgid "The point to which the line is projected." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Line.get_projection:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.line.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.line.rst:2 msgid "line" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line:1 msgid "Mobjects that are lines or variations of them." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.rst:36::1 msgid "A circular arc or elbow-type mobject representing an angle of two lines." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.rst:36::1 msgid "An arrow." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.rst:36::1 msgid "A dashed :class:`Line`." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.rst:36::1 msgid "An arrow with tips on both ends." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.rst:36::1 msgid "Two lines that create a right angle about each other: L-shape." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.rst:36::1 msgid "An elbow-type mobject representing a right angle between two lines." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.rst:36::1 msgid "Constructs a line tangent to a :class:`~.VMobject` at a specific point." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.line.RightAngle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.line.RightAngle.rst:2 msgid "RightAngle" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.RightAngle.rst:4 msgid "Qualified name: ``manim.mobject.geometry.line.RightAngle``" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.RightAngle:1 msgid "Bases: :py:class:`manim.mobject.geometry.line.Angle`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.RightAngle:1 msgid "An elbow-type mobject representing a right angle between two lines." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.RightAngle:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.RightAngle:3 msgid "The first line." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.RightAngle:4 msgid "The second line." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.RightAngle:5 msgid "The length of the arms." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.RightAngle:6 msgid "Further keyword arguments that are passed to the constructor of :class:`Angle`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.RightAngle:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.RightAngle.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.RightAngle.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.RightAngle.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.RightAngle.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.RightAngle.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.RightAngle.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.line.TangentLine.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.line.TangentLine.rst:2 msgid "TangentLine" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.TangentLine.rst:4 msgid "Qualified name: ``manim.mobject.geometry.line.TangentLine``" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.TangentLine:1 msgid "Bases: :py:class:`manim.mobject.geometry.line.Line`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.TangentLine:1 msgid "Constructs a line tangent to a :class:`~.VMobject` at a specific point." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.TangentLine:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.TangentLine:3 msgid "The VMobject on which the tangent line is drawn." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.TangentLine:5 msgid "How far along the shape that the line will be constructed. range: 0-1." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.TangentLine:7 msgid "Length of the tangent line." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.TangentLine:9 msgid "The ``dx`` value" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.TangentLine:11 msgid "Additional arguments to be passed to :class:`Line`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.TangentLine:18 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.TangentLine.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.TangentLine.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.TangentLine.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.TangentLine.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.TangentLine.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.TangentLine.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.line.Vector.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.line.Vector.rst:2 msgid "Vector" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Vector.rst:4 msgid "Qualified name: ``manim.mobject.geometry.line.Vector``" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector:1 msgid "Bases: :py:class:`manim.mobject.geometry.line.Arrow`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector:1 msgid "A vector specialized for use in graphs." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector:0 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector:3 msgid "The direction of the arrow." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector:5 msgid "The distance of the vector from its endpoints." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector:7 msgid "Additional arguments to be passed to :class:`Arrow`" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector:11 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:12 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Vector.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Vector.rst:20::1 #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:1 msgid "Creates a label based on the coordinates of the vector." msgstr "" #: ../../source/reference/manim.mobject.geometry.line.Vector.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:3 msgid "Whether or not to round the coordinates to integers." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:4 msgid "The number of dimensions of the vector." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:5 msgid "Sets the color of label, optional." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:6 msgid "Additional arguments to be passed to :class:`~.Matrix`." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:8 msgid "The label." msgstr "" #: ../../../manim/mobject/geometry/line.py:docstring of manim.mobject.geometry.line.Vector.coordinate_label:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Polygon.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.Cutout.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.Cutout.rst:2 msgid "Cutout" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Cutout.rst:4 msgid "Qualified name: ``manim.mobject.geometry.polygram.Cutout``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Cutout:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Cutout:1 msgid "A shape with smaller cutouts." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Cutout:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Cutout:3 msgid "The primary shape from which cutouts are made." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Cutout:5 msgid "The smaller shapes which are to be cut out of the ``main_shape``." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Cutout:7 msgid "Further keyword arguments that are passed to the constructor of :class:`~.VMobject`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Cutout:11 msgid "Technically, this class behaves similar to a symmetric difference: if parts of the ``mobjects`` are not located within the ``main_shape``, these parts will be added to the resulting :class:`~.VMobject`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Cutout:16 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Cutout.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Cutout.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Cutout.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Cutout.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Cutout.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Cutout.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.Polygon.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.Polygon.rst:2 msgid "Polygon" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygon.rst:4 msgid "Qualified name: ``manim.mobject.geometry.polygram.Polygon``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygon:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.Polygram`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygon:1 msgid "A shape consisting of one closed loop of vertices." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygon:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygon:3 msgid "The vertices of the :class:`Polygon`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygon:4 msgid "Forwarded to the parent constructor." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygon:7 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygon.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygon.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygon.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygon.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygon.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygon.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.Polygram.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.Polygram.rst:2 msgid "Polygram" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygram.rst:4 msgid "Qualified name: ``manim.mobject.geometry.polygram.Polygram``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram:1 msgid "A generalized :class:`Polygon`, allowing for disconnected sets of edges." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram:0 #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.round_corners:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram:3 msgid "The groups of vertices making up the :class:`Polygram`. The first vertex in each group is repeated to close the shape. Each point must be 3-dimensional: ``[x,y,z]``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram:3 msgid "The groups of vertices making up the :class:`Polygram`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram:5 msgid "The first vertex in each group is repeated to close the shape. Each point must be 3-dimensional: ``[x,y,z]``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram:7 msgid "The color of the :class:`Polygram`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram:8 msgid "Forwarded to the parent constructor." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram:11 #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertex_groups:7 #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertices:7 #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.round_corners:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygram.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygram.rst:22::1 #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertex_groups:1 msgid "Gets the vertex groups of the :class:`Polygram`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygram.rst:22::1 #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertices:1 msgid "Gets the vertices of the :class:`Polygram`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygram.rst:22::1 #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.round_corners:1 msgid "Rounds off the corners of the :class:`Polygram`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Polygram.rst:24 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertex_groups:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertex_groups:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertex_groups:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertex_groups:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertex_groups:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertex_groups:0 #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertices:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertex_groups:3 msgid "The vertex groups of the :class:`Polygram`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertex_groups:0 #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertices:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.get_vertices:3 msgid "The vertices of the :class:`Polygram`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Polygram.round_corners:3 msgid "The curvature of the corners of the :class:`Polygram`." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.rst:2 msgid "polygram" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram:1 msgid "Mobjects that are simple geometric shapes." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.rst:38::1 msgid "A shape with smaller cutouts." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.rst:38::1 msgid "A shape consisting of one closed loop of vertices." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.rst:38::1 msgid "A generalized :class:`Polygon`, allowing for disconnected sets of edges." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.rst:38::1 msgid "A quadrilateral with two sets of parallel sides." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.rst:38::1 msgid "An n-sided regular :class:`Polygon`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.rst:38::1 msgid "A :class:`Polygram` with regularly spaced vertices." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.rst:38::1 msgid "A rectangle with rounded corners." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.rst:38::1 msgid "A rectangle with equal side lengths." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.rst:38::1 msgid "A regular polygram without the intersecting lines." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.Rectangle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.Rectangle.rst:2 msgid "Rectangle" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Rectangle.rst:4 msgid "Qualified name: ``manim.mobject.geometry.polygram.Rectangle``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.Polygon`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:1 msgid "A quadrilateral with two sets of parallel sides." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:3 msgid "The color of the rectangle." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:5 msgid "The vertical height of the rectangle." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:7 msgid "The horizontal width of the rectangle." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:9 msgid "Space between vertical grid lines." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:11 msgid "Space between horizontal grid lines." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:13 #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:15 msgid "No purpose." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:17 msgid "Additional arguments to be passed to :class:`Polygon`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Rectangle:21 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Rectangle.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Rectangle.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Rectangle.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Rectangle.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Rectangle.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Rectangle.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.RegularPolygon.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygon.rst:2 msgid "RegularPolygon" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygon.rst:4 msgid "Qualified name: ``manim.mobject.geometry.polygram.RegularPolygon``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygon:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.RegularPolygram`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygon:1 msgid "An n-sided regular :class:`Polygon`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygon:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygon:3 msgid "The number of sides of the :class:`RegularPolygon`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygon:4 msgid "Forwarded to the parent constructor." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygon:7 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygon.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygon.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygon.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygon.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygon.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygon.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.RegularPolygram.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygram.rst:2 msgid "RegularPolygram" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygram.rst:4 msgid "Qualified name: ``manim.mobject.geometry.polygram.RegularPolygram``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.Polygram`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:1 msgid "A :class:`Polygram` with regularly spaced vertices." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:3 msgid "The number of vertices." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:4 msgid "The density of the :class:`RegularPolygram`. Can be thought of as how many vertices to hop to draw a line between them. Every ``density``-th vertex is connected." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:4 msgid "The density of the :class:`RegularPolygram`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:6 msgid "Can be thought of as how many vertices to hop to draw a line between them. Every ``density``-th vertex is connected." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:9 msgid "The radius of the circle that the vertices are placed on." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:10 msgid "The angle the vertices start at; the rotation of the :class:`RegularPolygram`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:12 msgid "Forwarded to the parent constructor." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RegularPolygram:15 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygram.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygram.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygram.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygram.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygram.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RegularPolygram.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.RoundedRectangle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.RoundedRectangle.rst:2 msgid "RoundedRectangle" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RoundedRectangle.rst:4 msgid "Qualified name: ``manim.mobject.geometry.polygram.RoundedRectangle``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RoundedRectangle:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.Rectangle`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RoundedRectangle:1 msgid "A rectangle with rounded corners." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RoundedRectangle:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RoundedRectangle:3 msgid "The curvature of the corners of the rectangle." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RoundedRectangle:5 msgid "Additional arguments to be passed to :class:`Rectangle`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.RoundedRectangle:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RoundedRectangle.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RoundedRectangle.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RoundedRectangle.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RoundedRectangle.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RoundedRectangle.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.RoundedRectangle.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.Square.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.Square.rst:2 msgid "Square" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Square.rst:4 msgid "Qualified name: ``manim.mobject.geometry.polygram.Square``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Square:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.Rectangle`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Square:1 msgid "A rectangle with equal side lengths." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Square:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Square:3 msgid "The length of the sides of the square." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Square:5 msgid "Additional arguments to be passed to :class:`Rectangle`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Square:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Square.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Square.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Square.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Square.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Square.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Square.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.Star.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.Star.rst:2 msgid "Star" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Star.rst:4 msgid "Qualified name: ``manim.mobject.geometry.polygram.Star``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.Polygon`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:1 msgid "A regular polygram without the intersecting lines." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:3 msgid "How many points on the :class:`Star`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:4 msgid "The radius of the circle that the outer vertices are placed on." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:5 msgid "The radius of the circle that the inner vertices are placed on. If unspecified, the inner radius will be calculated such that the edges of the :class:`Star` perfectly follow the edges of its :class:`RegularPolygram` counterpart." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:5 msgid "The radius of the circle that the inner vertices are placed on." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:7 msgid "If unspecified, the inner radius will be calculated such that the edges of the :class:`Star` perfectly follow the edges of its :class:`RegularPolygram` counterpart." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:11 msgid "The density of the :class:`Star`. Only used if ``inner_radius`` is unspecified. See :class:`RegularPolygram` for more information." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:11 msgid "The density of the :class:`Star`. Only used if ``inner_radius`` is unspecified." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:14 msgid "See :class:`RegularPolygram` for more information." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:15 msgid "The angle the vertices start at; the rotation of the :class:`Star`." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:17 msgid "Forwardeds to the parent constructor." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:0 msgid "Raises" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:19 msgid "If ``inner_radius`` is unspecified and ``density`` is not in the range ``[1, n/2)``." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Star:22 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Star.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Star.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Star.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Star.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Star.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Star.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.polygram.Triangle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.polygram.Triangle.rst:2 msgid "Triangle" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Triangle.rst:4 msgid "Qualified name: ``manim.mobject.geometry.polygram.Triangle``" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Triangle:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.RegularPolygon`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Triangle:1 msgid "An equilateral triangle." msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Triangle:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Triangle:3 msgid "Additional arguments to be passed to :class:`RegularPolygon`" msgstr "" #: ../../../manim/mobject/geometry/polygram.py:docstring of manim.mobject.geometry.polygram.Triangle:7 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Triangle.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Triangle.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Triangle.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Triangle.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Triangle.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.polygram.Triangle.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.rst:2 msgid "geometry" msgstr "" #: ../../../manim/mobject/geometry/__init__.py:docstring of manim.mobject.geometry:1 msgid "Various geometric Mobjects." msgstr "" #: ../../../manim/mobject/geometry/__init__.py:docstring of manim.mobject.geometry:4 msgid "Modules" msgstr "" #: ../../../manim/mobject/geometry/__init__.py:docstring of manim.mobject.geometry:15::1 msgid "Mobjects that are curved." msgstr "" #: ../../../manim/mobject/geometry/__init__.py:docstring of manim.mobject.geometry:15::1 msgid "Boolean operations for two-dimensional mobjects." msgstr "" #: ../../../manim/mobject/geometry/__init__.py:docstring of manim.mobject.geometry:15::1 msgid "Mobjects that are lines or variations of them." msgstr "" #: ../../../manim/mobject/geometry/__init__.py:docstring of manim.mobject.geometry:15::1 msgid "Mobjects that are simple geometric shapes." msgstr "" #: ../../../manim/mobject/geometry/__init__.py:docstring of manim.mobject.geometry:15::1 msgid "Mobjects used to mark and annotate other mobjects." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Rectangle.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.RegularPolygon.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.RegularPolygram.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.RightAngle.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.RoundedRectangle.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Sector.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.shape_matchers.BackgroundRectangle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.shape_matchers.BackgroundRectangle.rst:2 msgid "BackgroundRectangle" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.BackgroundRectangle.rst:4 msgid "Qualified name: ``manim.mobject.geometry.shape\\_matchers.BackgroundRectangle``" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle:1 msgid "Bases: :py:class:`manim.mobject.geometry.shape_matchers.SurroundingRectangle`" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle:1 msgid "A background rectangle. Its default color is the background color of the scene." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle:5 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.BackgroundRectangle.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.BackgroundRectangle.rst:22::1 #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.get_fill_color:1::1 #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.get_fill_color:1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.BackgroundRectangle.rst:22::1 msgid "Given two bounds a and b, transforms the points of the self vmobject into the points of the vmobject passed as parameter with respect to the bounds." msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.BackgroundRectangle.rst:24 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.get_fill_color:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.get_fill_color:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.get_fill_color:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.get_fill_color:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle:0 #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.pointwise_become_partial:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.pointwise_become_partial:1 msgid "Given two bounds a and b, transforms the points of the self vmobject into the points of the vmobject passed as parameter with respect to the bounds. Points here stand for control points of the bezier curves (anchors and handles)" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.pointwise_become_partial:4 msgid "The vmobject that will serve as a model." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.pointwise_become_partial:6 msgid "upper-bound." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.pointwise_become_partial:8 msgid "lower-bound" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.pointwise_become_partial:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.pointwise_become_partial:11 msgid "``self``" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.BackgroundRectangle.pointwise_become_partial:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.shape_matchers.Cross.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Cross.rst:2 msgid "Cross" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Cross.rst:4 msgid "Qualified name: ``manim.mobject.geometry.shape\\_matchers.Cross``" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Cross:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Cross:1 msgid "Creates a cross." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Cross:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Cross:3 msgid "The mobject linked to this instance. It fits the mobject when specified. Defaults to None." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Cross:4 msgid "Specifies the color of the cross lines. Defaults to RED." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Cross:5 msgid "Specifies the width of the cross lines. Defaults to 6." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Cross:6 msgid "Scales the cross to the provided units. Defaults to 1." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Cross:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Cross.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Cross.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Cross.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Cross.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Cross.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Cross.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.shape_matchers.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.shape_matchers.rst:2 msgid "shape\\_matchers" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers:1 msgid "Mobjects used to mark and annotate other mobjects." msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.rst:26::1 msgid "A background rectangle." msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.rst:26::1 msgid "Creates a cross." msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.rst:26::1 msgid "A rectangle surrounding a :class:`~.Mobject`" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.shape_matchers.SurroundingRectangle.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.shape_matchers.SurroundingRectangle.rst:2 msgid "SurroundingRectangle" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.SurroundingRectangle.rst:4 msgid "Qualified name: ``manim.mobject.geometry.shape\\_matchers.SurroundingRectangle``" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.SurroundingRectangle:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.RoundedRectangle`" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.SurroundingRectangle:1 msgid "A rectangle surrounding a :class:`~.Mobject`" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.SurroundingRectangle:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.SurroundingRectangle.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.SurroundingRectangle.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.SurroundingRectangle.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.SurroundingRectangle.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.SurroundingRectangle.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.SurroundingRectangle.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.shape_matchers.Underline.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Underline.rst:2 msgid "Underline" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Underline.rst:4 msgid "Qualified name: ``manim.mobject.geometry.shape\\_matchers.Underline``" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Underline:1 msgid "Bases: :py:class:`manim.mobject.geometry.line.Line`" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Underline:1 msgid "Creates an underline." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Underline:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Underline:3 msgid "The underline." msgstr "" #: ../../../manim/mobject/geometry/shape_matchers.py:docstring of manim.mobject.geometry.shape_matchers.Underline:6 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Underline.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Underline.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Underline.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Underline.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Underline.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.shape_matchers.Underline.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Square.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Star.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.TangentLine.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.TipableVMobject.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:2 msgid "ArrowCircleFilledTip" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:4 msgid "Qualified name: ``manim.mobject.geometry.tips.ArrowCircleFilledTip``" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowCircleFilledTip:1 msgid "Bases: :py:class:`manim.mobject.geometry.tips.ArrowCircleTip`" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowCircleFilledTip:1 msgid "Circular arrow tip with filled tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:37::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:37::1 msgid "The base point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:37::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:37::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:37::1 msgid "The height of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:37::1 msgid "The length of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:37::1 msgid "The angle of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:37::1 msgid "The tip point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleFilledTip.rst:37::1 msgid "The vector pointing from the base point to the tip point." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.tips.ArrowCircleTip.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:2 msgid "ArrowCircleTip" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:4 msgid "Qualified name: ``manim.mobject.geometry.tips.ArrowCircleTip``" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowCircleTip:1 msgid "Bases: :py:class:`manim.mobject.geometry.tips.ArrowTip`, :py:class:`manim.mobject.geometry.arc.Circle`" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowCircleTip:1 msgid "Circular arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:37::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:37::1 msgid "The base point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:37::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:37::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:37::1 msgid "The height of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:37::1 msgid "The length of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:37::1 msgid "The angle of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:37::1 msgid "The tip point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowCircleTip.rst:37::1 msgid "The vector pointing from the base point to the tip point." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:2 msgid "ArrowSquareFilledTip" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:4 msgid "Qualified name: ``manim.mobject.geometry.tips.ArrowSquareFilledTip``" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowSquareFilledTip:1 msgid "Bases: :py:class:`manim.mobject.geometry.tips.ArrowSquareTip`" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowSquareFilledTip:1 msgid "Square arrow tip with filled tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:37::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:37::1 msgid "The base point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:37::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:37::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:37::1 msgid "The height of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:37::1 msgid "The length of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:37::1 msgid "The angle of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:37::1 msgid "The tip point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareFilledTip.rst:37::1 msgid "The vector pointing from the base point to the tip point." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.tips.ArrowSquareTip.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:2 msgid "ArrowSquareTip" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:4 msgid "Qualified name: ``manim.mobject.geometry.tips.ArrowSquareTip``" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowSquareTip:1 msgid "Bases: :py:class:`manim.mobject.geometry.tips.ArrowTip`, :py:class:`manim.mobject.geometry.polygram.Square`" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowSquareTip:1 msgid "Square arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:37::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:37::1 msgid "The base point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:37::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:37::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:37::1 msgid "The height of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:37::1 msgid "The length of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:37::1 msgid "The angle of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:37::1 msgid "The tip point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowSquareTip.rst:37::1 msgid "The vector pointing from the base point to the tip point." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.tips.ArrowTip.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTip.rst:2 msgid "ArrowTip" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTip.rst:4 msgid "Qualified name: ``manim.mobject.geometry.tips.ArrowTip``" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip:1 msgid "Base class for arrow tips." msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip:4 msgid ":class:`ArrowTriangleTip` :class:`ArrowTriangleFilledTip` :class:`ArrowCircleTip` :class:`ArrowCircleFilledTip` :class:`ArrowSquareTip` :class:`ArrowSquareFilledTip`" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip:12 #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:6 #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.length:4 #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.tip_angle:4 #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.tip_point:4 #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.vector:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip:13 msgid "Cannot be used directly, only intended for inheritance::" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip:20 msgid "Instead, use one of the pre-defined ones, or make a custom one like this:" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip:40 msgid "Using a class inherited from :class:`ArrowTip` to get a non-filled tip is a shorthand to manually specifying the arrow tip style as follows::" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip:46 msgid "The following example illustrates the usage of all of the predefined arrow tips." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTip.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTip.rst:21 msgid "Attributes" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1::1 #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1 msgid "The base point of the arrow tip." msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1::1 #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.length:1 msgid "The length of the arrow tip." msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1::1 #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.tip_angle:1 msgid "The angle of the arrow tip." msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1::1 #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.tip_point:1 msgid "The tip point of the arrow tip." msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1::1 #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.vector:1 msgid "The vector pointing from the base point to the tip point." msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTip.base:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:2 msgid "ArrowTriangleFilledTip" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:4 msgid "Qualified name: ``manim.mobject.geometry.tips.ArrowTriangleFilledTip``" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTriangleFilledTip:1 msgid "Bases: :py:class:`manim.mobject.geometry.tips.ArrowTriangleTip`" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTriangleFilledTip:1 msgid "Triangular arrow tip with filled tip." msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTriangleFilledTip:3 msgid "This is the default arrow tip shape." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:37::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:37::1 msgid "The base point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:37::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:37::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:37::1 msgid "The height of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:37::1 msgid "The length of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:37::1 msgid "The angle of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:37::1 msgid "The tip point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleFilledTip.rst:37::1 msgid "The vector pointing from the base point to the tip point." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.tips.ArrowTriangleTip.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:2 msgid "ArrowTriangleTip" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:4 msgid "Qualified name: ``manim.mobject.geometry.tips.ArrowTriangleTip``" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTriangleTip:1 msgid "Bases: :py:class:`manim.mobject.geometry.tips.ArrowTip`, :py:class:`manim.mobject.geometry.polygram.Triangle`" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips.ArrowTriangleTip:1 msgid "Triangular arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:37::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:37::1 msgid "The base point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:37::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:37::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:37::1 msgid "The height of the mobject." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:37::1 msgid "The length of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:37::1 msgid "The angle of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:37::1 msgid "The tip point of the arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.ArrowTriangleTip.rst:37::1 msgid "The vector pointing from the base point to the tip point." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.tips.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.geometry.tips.rst:2 msgid "tips" msgstr "" #: ../../../manim/mobject/geometry/tips.py:docstring of manim.mobject.geometry.tips:1 msgid "A collection of tip mobjects for use with :class:`~.TipableVMobject`." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.rst:32::1 msgid "Circular arrow tip with filled tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.rst:32::1 msgid "Circular arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.rst:32::1 msgid "Square arrow tip with filled tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.rst:32::1 msgid "Square arrow tip." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.rst:32::1 msgid "Base class for arrow tips." msgstr "" #: ../../source/reference/manim.mobject.geometry.tips.rst:32::1 msgid "Triangular arrow tip with filled tip." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Triangle.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.geometry.Vector.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graph.Graph.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graph.Graph.rst:2 msgid "Graph" msgstr "" #: ../../source/reference/manim.mobject.graph.Graph.rst:4 msgid "Qualified name: ``manim.mobject.graph.Graph``" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:1 msgid "An undirected graph (that is, a collection of vertices connected with edges)." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:3 msgid "Graphs can be instantiated by passing both a list of (distinct, hashable) vertex names, together with list of edges (as tuples of vertex names). See the examples below for details." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:9 msgid "This implementation uses updaters to make the edges move with the vertices." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_vertices:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.change_layout:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.from_networkx:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.remove_edges:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.remove_vertices:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:12 msgid "A list of vertices. Must be hashable elements." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:13 msgid "A list of edges, specified as tuples ``(u, v)`` where both ``u`` and ``v`` are vertices." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:15 msgid "Controls whether or not vertices are labeled. If ``False`` (the default), the vertices are not labeled; if ``True`` they are labeled using their names (as specified in ``vertices``) via :class:`~.MathTex`. Alternatively, custom labels can be specified by passing a dictionary whose keys are the vertices, and whose values are the corresponding vertex labels (rendered via, e.g., :class:`~.Text` or :class:`~.Tex`)." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:21 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_vertices:10 msgid "Sets the fill color of the default labels generated when ``labels`` is set to ``True``. Has no effect for other values of ``labels``." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:23 msgid "Either one of ``\"spring\"`` (the default), ``\"circular\"``, ``\"kamada_kawai\"``, ``\"planar\"``, ``\"random\"``, ``\"shell\"``, ``\"spectral\"``, ``\"spiral\"``, ``\"tree\"``, and ``\"partite\"`` for automatic vertex positioning using ``networkx`` (see `their documentation `_ for more details), or a dictionary specifying a coordinate (value) for each vertex (key) for manual positioning." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:29 msgid "Only for automatically generated layouts. A dictionary whose entries are passed as keyword arguments to the automatic layout algorithm specified via ``layout`` of``networkx``. The ``tree`` layout also accepts a special parameter ``vertex_spacing`` passed as a keyword argument inside the ``layout_config`` dictionary. Passing a tuple ``(space_x, space_y)`` as this argument overrides the value of ``layout_scale`` and ensures that vertices are arranged in a way such that the centers of siblings in the same layer are at least ``space_x`` units apart horizontally, and neighboring layers are spaced ``space_y`` units vertically." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:39 msgid "The scale of automatically generated layouts: the vertices will be arranged such that the coordinates are located within the interval ``[-scale, scale]``. Some layouts accept a tuple ``(scale_x, scale_y)`` causing the first coordinate to be in the interval ``[-scale_x, scale_x]``, and the second in ``[-scale_y, scale_y]``. Default: 2." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:44 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_vertices:12 msgid "The mobject class used for displaying vertices in the scene." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:45 msgid "Either a dictionary containing keyword arguments to be passed to the class specified via ``vertex_type``, or a dictionary whose keys are the vertices, and whose values are dictionaries containing keyword arguments for the mobject related to the corresponding vertex." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:49 msgid "A dictionary whose keys are the vertices, and whose values are mobjects to be used as vertices. Passing vertices here overrides all other configuration options for a vertex." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:52 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:6 msgid "The mobject class used for displaying edges in the scene." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:53 msgid "Either a dictionary containing keyword arguments to be passed to the class specified via ``edge_type``, or a dictionary whose keys are the edges, and whose values are dictionaries containing keyword arguments for the mobject related to the corresponding edge." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.change_layout:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.from_networkx:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.remove_edges:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:59 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.change_layout:7 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.from_networkx:7 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.remove_vertices:6 msgid "Examples" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:60 msgid "First, we create a small graph and demonstrate that the edges move together with the vertices." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:78 msgid "There are several automatic positioning algorithms to choose from:" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:99 msgid "Vertices can also be positioned manually:" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:112 msgid "The vertices in graphs can be labeled, and configurations for vertices and edges can be modified both by default and for specific vertices and edges." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:118 msgid "In ``edge_config``, edges can be passed in both directions: if ``(u, v)`` is an edge in the graph, both ``(u, v)`` as well as ``(v, u)`` can be used as keys in the dictionary." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:138 msgid "You can also lay out a partite graph on columns by specifying a list of the vertices on each side and choosing the partite layout." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:143 msgid "All vertices in your graph which are not listed in any of the partitions are collected in their own partition and rendered in the rightmost column." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:159 msgid "The representation of a linear artificial neural network is facilitated by the use of the partite layout and defining partitions for each layer." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:193 msgid "The custom tree layout can be used to show the graph by distance from the root vertex. You must pass the root vertex of the tree." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph:219 msgid "The following code sample illustrates the use of the ``vertex_spacing`` layout parameter specific to the ``\"tree\"`` layout. As mentioned above, setting ``vertex_spacing`` overrides the specified value for ``layout_scale``, and as such it is harder to control the size of the mobject. However, we can adjust the captured frame and zoom out by using a :class:`.MovingCameraScene`::" msgstr "" #: ../../source/reference/manim.mobject.graph.Graph.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graph.Graph.rst:25::1 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:1 msgid "Add new edges to the graph." msgstr "" #: ../../source/reference/manim.mobject.graph.Graph.rst:25::1 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_vertices:1 msgid "Add a list of vertices to the graph." msgstr "" #: ../../source/reference/manim.mobject.graph.Graph.rst:25::1 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.change_layout:1 msgid "Change the layout of this graph." msgstr "" #: ../../source/reference/manim.mobject.graph.Graph.rst:25::1 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.from_networkx:1 msgid "Build a :class:`~.Graph` from a given ``networkx`` graph." msgstr "" #: ../../source/reference/manim.mobject.graph.Graph.rst:25::1 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.remove_edges:1 msgid "Remove several edges from the graph." msgstr "" #: ../../source/reference/manim.mobject.graph.Graph.rst:25::1 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.remove_vertices:1 msgid "Remove several vertices from the graph." msgstr "" #: ../../source/reference/manim.mobject.graph.Graph.rst:27 msgid "Attributes" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:3 msgid "Edges (as tuples of vertex identifiers) to be added. If a non-existing vertex is passed, a new vertex with default settings will be created. Create new vertices yourself beforehand to customize them." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:7 msgid "A dictionary either containing keyword arguments to be passed to the class specified via ``edge_type``, or a dictionary whose keys are the edge tuples, and whose values are dictionaries containing keyword arguments to be passed for the construction of the corresponding edge." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:12 msgid "Any further keyword arguments are passed to :meth:`.add_vertices` which is used to create new vertices in the passed edges." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:0 #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.remove_edges:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_edges:15 msgid "A group containing all newly added vertices and edges." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_vertices:3 msgid "Hashable vertex identifiers." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_vertices:4 msgid "A dictionary specifying the coordinates where the new vertices should be added. If ``None``, all vertices are created at the center of the graph." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_vertices:6 msgid "Controls whether or not the vertex is labeled. If ``False`` (the default), the vertex is not labeled; if ``True`` it is labeled using its names (as specified in ``vertex``) via :class:`~.MathTex`. Alternatively, any :class:`~.Mobject` can be passed to be used as the label." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_vertices:13 msgid "A dictionary containing keyword arguments to be passed to the class specified via ``vertex_type``." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.add_vertices:15 msgid "A dictionary whose keys are the vertex identifiers, and whose values are mobjects that should be used as vertices. Overrides all other vertex customization options." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.change_layout:3 msgid "See the documentation of :class:`~.Graph` for details about the keyword arguments." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.from_networkx:3 msgid "A ``networkx`` graph." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.from_networkx:4 msgid "Keywords to be passed to the constructor of :class:`~.Graph`." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.remove_edges:3 msgid "Edges to be removed from the graph." msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph.Graph.remove_edges:5 msgid "A group containing all removed edges." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graph.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graph.rst:2 msgid "graph" msgstr "" #: ../../../manim/mobject/graph.py:docstring of manim.mobject.graph:1 msgid "Mobjects used to represent mathematical graphs (think graph theory, not plotting)." msgstr "" #: ../../source/reference/manim.mobject.graph.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.coordinate_systems.Axes.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.Axes.rst:2 msgid "Axes" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.Axes.rst:4 msgid "Qualified name: ``manim.mobject.graphing.coordinate\\_systems.Axes``" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`, :py:class:`manim.mobject.graphing.coordinate_systems.CoordinateSystem`" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:1 msgid "Creates a set of axes." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.point_to_coords:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:3 msgid "The ``(x_min, x_max, x_step)`` values of the x-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:4 msgid "The ``(y_min, y_max, y_step)`` values of the y-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:5 msgid "The length of the x-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:6 msgid "The length of the y-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:7 msgid "Arguments to be passed to :class:`~.NumberLine` that influences both axes." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:8 msgid "Arguments to be passed to :class:`~.NumberLine` that influence the x-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:9 msgid "Arguments to be passed to :class:`~.NumberLine` that influence the y-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:10 msgid "Whether or not to include the tips on both axes." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:11 msgid "Additional arguments to be passed to :class:`CoordinateSystem` and :class:`~.VGroup`." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes:14 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:16 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:21 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.point_to_coords:11 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.Axes.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.Axes.rst:23::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:1 msgid "Accepts coordinates from the axes and returns a point with respect to the scene." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.Axes.rst:23::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.get_axes:1 msgid "Gets the axes." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.Axes.rst:23::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:1 msgid "Draws a line graph." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.Axes.rst:23::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.point_to_coords:1 msgid "Accepts a point from the scene and returns its coordinates with respect to the axes." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.Axes.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:3 msgid "The coordinates. Each coord is passed as a separate argument: ``ax.coords_to_point(1, 2, 3)``. Also accepts a list of coordinates ``ax.coords_to_point( [x_0, x_1, ...], [y_0, y_1, ...], ... )`` ``ax.coords_to_point( [[x_0, y_0, z_0], [x_1, y_1, z_1]] )``" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:3 msgid "The coordinates. Each coord is passed as a separate argument: ``ax.coords_to_point(1, 2, 3)``." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:5 msgid "Also accepts a list of coordinates" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:7 msgid "``ax.coords_to_point( [x_0, x_1, ...], [y_0, y_1, ...], ... )``" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:9 msgid "``ax.coords_to_point( [[x_0, y_0, z_0], [x_1, y_1, z_1]] )``" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.get_axes:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.point_to_coords:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:11 msgid "A point with respect to the scene's coordinate system. The shape of the array will be similar to the shape of the input." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.coords_to_point:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.get_axes:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.point_to_coords:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.get_axes:3 msgid "A pair of axes." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:3 msgid "The graph connects the vertices formed from zipping ``x_values``, ``y_values`` and ``z_values``. Also adds :class:`Dots <.Dot>` at the vertices if ``add_vertex_dots`` is set to ``True``." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:7 msgid "Iterable of values along the x-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:8 msgid "Iterable of values along the y-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:9 msgid "Iterable of values (zeros if z_values is None) along the z-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:10 msgid "Color for the line graph." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:11 msgid "Whether or not to add :class:`~.Dot` at each vertex." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:12 msgid "Radius for the :class:`~.Dot` at each vertex." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:13 msgid "Style arguments to be passed into :class:`~.Dot` at each vertex." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:14 msgid "Additional arguments to be passed into :class:`~.VMobject`." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.plot_line_graph:16 msgid "A VDict containing both the line and dots (if specified). The line can be accessed with: ``line_graph[\"line_graph\"]``. The dots can be accessed with: ``line_graph[\"vertex_dots\"]``." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.Axes.point_to_coords:3 msgid "The point, i.e. ``RIGHT`` or ``[0, 1, 0]``. Also accepts a list of points as ``[RIGHT, [0, 1, 0]]``." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.rst:2 msgid "ComplexPlane" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.rst:4 msgid "Qualified name: ``manim.mobject.graphing.coordinate\\_systems.ComplexPlane``" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane:1 msgid "Bases: :py:class:`manim.mobject.graphing.coordinate_systems.NumberPlane`" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane:1 msgid "A :class:`~.NumberPlane` specialized for use with complex numbers." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.rst:25::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.add_coordinates:1 msgid "Adds the labels produced from :meth:`~.NumberPlane.get_coordinate_labels` to the plane." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.rst:25::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.get_coordinate_labels:1 msgid "Generates the :class:`~.DecimalNumber` mobjects for the coordinates of the plane." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.rst:25::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.n2p:1 msgid "Abbreviation for :meth:`number_to_point`." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.rst:25::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.number_to_point:1 msgid "Accepts a float/complex number and returns the equivalent point on the plane." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.rst:25::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.p2n:1 msgid "Abbreviation for :meth:`point_to_number`." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.rst:25::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.point_to_number:1 msgid "Accepts a point and returns a complex number equivalent to that point on the plane." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ComplexPlane.rst:27 msgid "Attributes" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.add_coordinates:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.add_coordinates:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.add_coordinates:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.add_coordinates:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.add_coordinates:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.add_coordinates:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.get_coordinate_labels:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.n2p:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.number_to_point:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.p2n:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.point_to_number:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.add_coordinates:3 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.get_coordinate_labels:3 msgid "An iterable of floats/complex numbers. Floats are positioned along the x-axis, complex numbers along the y-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.add_coordinates:4 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.get_coordinate_labels:4 msgid "Additional arguments to be passed to :meth:`~.NumberLine.get_number_mobject`, i.e. :class:`~.DecimalNumber`." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.get_coordinate_labels:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.number_to_point:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.point_to_number:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.get_coordinate_labels:6 msgid "A :class:`~.VGroup` containing the positioned label mobjects." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.get_coordinate_labels:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.n2p:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.number_to_point:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.p2n:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.point_to_number:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.number_to_point:3 msgid "The number. Can be a float or a complex number." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.number_to_point:5 msgid "The point on the plane." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ComplexPlane.point_to_number:3 msgid "The point in manim's coordinate-system" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.coordinate_systems.NumberPlane.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.NumberPlane.rst:2 msgid "NumberPlane" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.NumberPlane.rst:4 msgid "Qualified name: ``manim.mobject.graphing.coordinate\\_systems.NumberPlane``" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:1 msgid "Bases: :py:class:`manim.mobject.graphing.coordinate_systems.Axes`" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:1 msgid "Creates a cartesian plane with background lines." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:3 msgid "The ``[x_min, x_max, x_step]`` values of the plane in the horizontal direction." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:4 msgid "The ``[y_min, y_max, y_step]`` values of the plane in the vertical direction." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:5 msgid "The width of the plane." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:6 msgid "The height of the plane." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:7 msgid "Arguments that influence the construction of the background lines of the plane." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:8 msgid "Similar to :attr:`background_line_style`, affects the construction of the scene's background lines." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:9 msgid "Determines the number of boxes within the background lines: :code:`2` = 4 boxes, :code:`3` = 9 boxes." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:10 msgid "Currently non-functional." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:11 msgid "Additional arguments to be passed to :class:`Axes`." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:14 msgid "If :attr:`x_length` or :attr:`y_length` are not defined, they are automatically calculated such that one unit on each axis is one Manim unit long." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.NumberPlane:18 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.NumberPlane.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.NumberPlane.rst:23 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.NumberPlane.rst:34::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.NumberPlane.rst:34::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.NumberPlane.rst:34::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.NumberPlane.rst:34::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.coordinate_systems.PolarPlane.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.PolarPlane.rst:2 msgid "PolarPlane" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.PolarPlane.rst:4 msgid "Qualified name: ``manim.mobject.graphing.coordinate\\_systems.PolarPlane``" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:1 msgid "Bases: :py:class:`manim.mobject.graphing.coordinate_systems.Axes`" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:1 msgid "Creates a polar plane with background lines." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.add_coordinates:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.get_coordinate_labels:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:3 msgid "The number of divisions in the azimuth (also known as the `angular coordinate` or `polar angle`). If ``None`` is specified then it will use the default specified by ``azimuth_units``: - ``\"PI radians\"`` or ``\"TAU radians\"``: 20 - ``\"degrees\"``: 36 - ``\"gradians\"``: 40 - ``None``: 1 A non-integer value will result in a partial division at the end of the circle." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:3 msgid "The number of divisions in the azimuth (also known as the `angular coordinate` or `polar angle`). If ``None`` is specified then it will use the default specified by ``azimuth_units``:" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:6 msgid "``\"PI radians\"`` or ``\"TAU radians\"``: 20" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:7 msgid "``\"degrees\"``: 36" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:8 msgid "``\"gradians\"``: 40" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:9 msgid "``None``: 1" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:11 msgid "A non-integer value will result in a partial division at the end of the circle." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:12 msgid "The diameter of the plane." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:13 msgid "The distance between faded radius lines." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:14 msgid "The maximum value of the radius." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:15 msgid "Specifies a default labelling system for the azimuth. Choices are: - ``\"PI radians\"``: Fractional labels in the interval :math:`\\left[0, 2\\pi\\right]` with :math:`\\pi` as a constant. - ``\"TAU radians\"``: Fractional labels in the interval :math:`\\left[0, \\tau\\right]` (where :math:`\\tau = 2\\pi`) with :math:`\\tau` as a constant. - ``\"degrees\"``: Decimal labels in the interval :math:`\\left[0, 360\\right]` with a degree (:math:`^{\\circ}`) symbol. - ``\"gradians\"``: Decimal labels in the interval :math:`\\left[0, 400\\right]` with a superscript \"g\" (:math:`^{g}`). - ``None``: Decimal labels in the interval :math:`\\left[0, 1\\right]`." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:15 msgid "Specifies a default labelling system for the azimuth. Choices are:" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:17 msgid "``\"PI radians\"``: Fractional labels in the interval :math:`\\left[0, 2\\pi\\right]` with :math:`\\pi` as a constant." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:18 msgid "``\"TAU radians\"``: Fractional labels in the interval :math:`\\left[0, \\tau\\right]` (where :math:`\\tau = 2\\pi`) with :math:`\\tau` as a constant." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:19 msgid "``\"degrees\"``: Decimal labels in the interval :math:`\\left[0, 360\\right]` with a degree (:math:`^{\\circ}`) symbol." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:20 msgid "``\"gradians\"``: Decimal labels in the interval :math:`\\left[0, 400\\right]` with a superscript \"g\" (:math:`^{g}`)." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:21 msgid "``None``: Decimal labels in the interval :math:`\\left[0, 1\\right]`." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:22 msgid "If the ``azimuth_units`` choice has fractional labels, choose whether to combine the constant in a compact form :math:`\\tfrac{xu}{y}` as opposed to :math:`\\tfrac{x}{y}u`, where :math:`u` is the constant." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:25 msgid "The angle offset of the azimuth, expressed in radians." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:26 msgid "The direction of the azimuth. - ``\"CW\"``: Clockwise. - ``\"CCW\"``: Anti-clockwise." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:26 msgid "The direction of the azimuth." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:28 msgid "``\"CW\"``: Clockwise." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:29 msgid "``\"CCW\"``: Anti-clockwise." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:30 msgid "The buffer for the azimuth labels." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:31 msgid "The font size of the azimuth labels." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:32 msgid "The axis config for the radius." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane:35 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.PolarPlane.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.PolarPlane.rst:25::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.add_coordinates:1 msgid "Adds the coordinates." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.PolarPlane.rst:25::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.get_axes:1 msgid "Gets the axes." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.PolarPlane.rst:25::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.get_coordinate_labels:1 msgid "Gets labels for the coordinates" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.PolarPlane.rst:27 msgid "Attributes" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.add_coordinates:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.add_coordinates:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.add_coordinates:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.add_coordinates:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.add_coordinates:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.add_coordinates:3 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.get_coordinate_labels:3 msgid "Iterable of values along the radius, by default None." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.add_coordinates:4 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.get_coordinate_labels:4 msgid "Iterable of values along the azimuth, by default None." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.get_axes:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.get_coordinate_labels:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.get_axes:3 msgid "A pair of axes." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.get_axes:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.PolarPlane.get_coordinate_labels:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.coordinate_systems.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.rst:2 msgid "coordinate\\_systems" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems:1 msgid "Mobjects that represent coordinate systems." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.rst:30::1 msgid "Creates a set of axes." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.rst:30::1 msgid "A :class:`~.NumberPlane` specialized for use with complex numbers." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.rst:30::1 msgid "Abstract base class for Axes and NumberPlane." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.rst:30::1 msgid "Creates a cartesian plane with background lines." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.rst:30::1 msgid "Creates a polar plane with background lines." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.coordinate_systems.ThreeDAxes.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ThreeDAxes.rst:2 msgid "ThreeDAxes" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ThreeDAxes.rst:4 msgid "Qualified name: ``manim.mobject.graphing.coordinate\\_systems.ThreeDAxes``" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:1 msgid "Bases: :py:class:`manim.mobject.graphing.coordinate_systems.Axes`" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:1 msgid "A 3-dimensional set of axes." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:0 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:3 msgid "The ``[x_min, x_max, x_step]`` values of the x-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:4 msgid "The ``[y_min, y_max, y_step]`` values of the y-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:5 msgid "The ``[z_min, z_max, z_step]`` values of the z-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:6 msgid "The length of the x-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:7 msgid "The length of the y-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:8 msgid "The length of the z-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:9 msgid "Arguments to be passed to :class:`~.NumberLine` that influence the z-axis." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:10 msgid "The direction of the normal." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:11 msgid "The number of pieces used to construct the axes." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:12 msgid "The direction of the light source." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:13 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:14 msgid "Currently non-functional." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes:15 msgid "Additional arguments to be passed to :class:`Axes`." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ThreeDAxes.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ThreeDAxes.rst:20::1 #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:1 msgid "Generate a z-axis label." msgstr "" #: ../../source/reference/manim.mobject.graphing.coordinate_systems.ThreeDAxes.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:3 msgid "The label. Defaults to :class:`~.MathTex` for ``str`` and ``float`` inputs." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:4 msgid "The edge of the x-axis to which the label will be added, by default ``UR``." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:5 msgid "Allows for further positioning of the label from an edge, by default ``UR``." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:6 msgid "The distance of the label from the line." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:7 msgid "The angle at which to rotate the label, by default ``PI/2``." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:8 msgid "The axis about which to rotate the label, by default ``RIGHT``." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:10 msgid "The positioned label." msgstr "" #: ../../../manim/mobject/graphing/coordinate_systems.py:docstring of manim.mobject.graphing.coordinate_systems.ThreeDAxes.get_z_axis_label:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.functions.FunctionGraph.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.functions.FunctionGraph.rst:2 msgid "FunctionGraph" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.FunctionGraph.rst:4 msgid "Qualified name: ``manim.mobject.graphing.functions.FunctionGraph``" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.FunctionGraph:1 msgid "Bases: :py:class:`manim.mobject.graphing.functions.ParametricFunction`" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.FunctionGraph:1 msgid "A :class:`ParametricFunction` that spans the length of the scene by default." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.FunctionGraph:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.FunctionGraph.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.FunctionGraph.rst:23 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.FunctionGraph.rst:34::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.FunctionGraph.rst:34::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.FunctionGraph.rst:34::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.FunctionGraph.rst:34::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.functions.ImplicitFunction.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.functions.ImplicitFunction.rst:2 msgid "ImplicitFunction" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.ImplicitFunction.rst:4 msgid "Qualified name: ``manim.mobject.graphing.functions.ImplicitFunction``" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:1 msgid "An implicit function." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:3 msgid "The implicit function in the form ``f(x, y) = 0``." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:4 msgid "The x min and max of the function." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:5 msgid "The y min and max of the function." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:6 msgid "The minimum depth of the function to calculate." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:7 msgid "The maximum number of quads to use." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:8 msgid "Whether or not to smoothen the curves." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:9 msgid "Additional parameters to pass into :class:`VMobject`" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:12 msgid "A small ``min_depth`` :math:`d` means that some small details might be ignored if they don't cross an edge of one of the :math:`4^d` uniform quads." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:16 msgid "The value of ``max_quads`` strongly corresponds to the quality of the curve, but a higher number of quads may take longer to render." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction:21 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.ImplicitFunction.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.ImplicitFunction.rst:21::1 #: ../../source/reference/manim.mobject.graphing.functions.ImplicitFunction.rst:21::1 #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction.generate_points:1 #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction.generate_points:1 msgid "Initializes :attr:`points` and therefore the shape." msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.ImplicitFunction.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction.generate_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ImplicitFunction.generate_points:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.functions.ParametricFunction.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.functions.ParametricFunction.rst:2 msgid "ParametricFunction" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.ParametricFunction.rst:4 msgid "Qualified name: ``manim.mobject.graphing.functions.ParametricFunction``" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:1 msgid "A parametric curve." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:3 msgid "The function to be plotted in the form of ``(lambda x: x**2)``" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:4 msgid "Determines the length that the function spans. By default ``[0, 1]``" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:5 msgid "Scaling class applied to the points of the function. Default of :class:`~.LinearBase`." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:6 msgid "Whether to interpolate between the points of the function after they have been created. (Will have odd behaviour with a low number of points)" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:8 msgid "Whether to pass in the generated t value array to the function as ``[t_0, t_1, ...]``. Only use this if your function supports it. Output should be a numpy array of shape ``[[x_0, x_1, ...], [y_0, y_1, ...], [z_0, z_1, ...]]`` but ``z`` can also be 0 if the Axes is 2D" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:12 msgid "Values of t at which the function experiences discontinuity." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:13 msgid "The left and right tolerance for the discontinuities." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:16 msgid "Examples" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction:46 msgid "If your function has discontinuities, you'll have to specify the location of the discontinuities manually. See the following example for guidance." msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.ParametricFunction.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.ParametricFunction.rst:23::1 #: ../../source/reference/manim.mobject.graphing.functions.ParametricFunction.rst:23::1 #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction.generate_points:1 #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction.generate_points:1 msgid "Initializes :attr:`points` and therefore the shape." msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.ParametricFunction.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction.generate_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions.ParametricFunction.generate_points:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.functions.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.functions.rst:2 msgid "functions" msgstr "" #: ../../../manim/mobject/graphing/functions.py:docstring of manim.mobject.graphing.functions:1 msgid "Mobjects representing function graphs." msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.rst:24::1 msgid "A :class:`ParametricFunction` that spans the length of the scene by default." msgstr "" #: ../../source/reference/manim.mobject.graphing.functions.rst:24::1 msgid "An implicit function." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.number_line.NumberLine.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:2 msgid "NumberLine" msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:4 msgid "Qualified name: ``manim.mobject.graphing.number\\_line.NumberLine``" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:1 msgid "Bases: :py:class:`manim.mobject.geometry.line.Line`" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:1 msgid "Creates a number line with tick marks." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_numbers:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_number_mobject:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.n2p:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.number_to_point:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.p2n:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.point_to_number:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:3 msgid "The ``[x_min, x_max, x_step]`` values to create the line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:4 msgid "The length of the number line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:5 msgid "The distance between each tick of the line. Overwritten by :attr:`length`, if specified." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:6 msgid "Whether to include ticks on the number line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:7 msgid "The length of each tick mark." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:8 msgid "An iterable of specific values with elongated ticks." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:9 msgid "Influences how many times larger elongated ticks are than regular ticks (2 = 2x)." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:10 msgid "The angle (in radians) at which the line is rotated." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:11 msgid "The thickness of the line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:12 msgid "Whether to add a tip to the end of the line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:13 msgid "The width of the tip." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:14 msgid "The height of the tip." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:15 msgid "Whether to add numbers to the tick marks. The number of decimal places is determined by the step size, this default can be overridden by ``decimal_number_config``." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:17 msgid "The way the ``x_range`` is value is scaled, i.e. :class:`~.LogBase` for a logarithmic numberline. Defaults to :class:`~.LinearBase`." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:18 msgid "The size of the label mobjects. Defaults to 36." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:19 msgid "The specific position to which label mobjects are added on the line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:20 msgid "Determines the mobject class that will be used to construct the labels of the number line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:21 msgid "The distance between the line and the label mobject." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:22 msgid "Arguments that can be passed to :class:`~.numbers.DecimalNumber` to influence number mobjects." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:23 msgid "An explicit iterable of numbers to not be added to the number line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:24 msgid "An explicit iterable of numbers to add to the number line" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:25 msgid "Additional arguments to be passed to :class:`~.Line`." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:29 msgid "Number ranges that include both negative and positive values will be generated from the 0 point, and may not include a tick at the min / max values as the tick locations are dependent on the step size." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine:34 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.number_to_point:10 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.point_to_number:10 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:36::1 msgid "Adds specifically positioned labels to the :class:`~.NumberLine` using a ``dict``." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:36::1 msgid "Adds :class:`~.DecimalNumber` mobjects representing their position at each tick of the number line." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:36::1 msgid "Adds ticks to the number line." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:36::1 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_number_mobject:1 msgid "Generates a positioned :class:`~.DecimalNumber` mobject generated according to ``label_constructor``." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:36::1 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick:1 msgid "Generates a tick and positions it along the number line." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:36::1 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick_range:1 msgid "Generates the range of values on which labels are plotted based on the ``x_range`` attribute of the number line." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:36::1 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.n2p:1 msgid "Abbreviation for :meth:`~.NumberLine.number_to_point`." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:36::1 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.number_to_point:1 msgid "Accepts a value along the number line and returns a point with respect to the scene." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:36::1 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.p2n:1 msgid "Abbreviation for :meth:`~.NumberLine.point_to_number`." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:36::1 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.point_to_number:1 msgid "Accepts a point with respect to the scene and returns a float along the number line." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.NumberLine.rst:38 msgid "Attributes" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:1 msgid "Adds specifically positioned labels to the :class:`~.NumberLine` using a ``dict``. The labels can be accessed after creation via ``self.labels``." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:4 msgid "A dictionary consisting of the position along the number line and the mobject to be added: ``{1: Tex(\"Monday\"), 3: Tex(\"Tuesday\")}``. :attr:`label_constructor` will be used to construct the labels if the value is not a mobject (``str`` or ``float``)." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:7 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_number_mobject:5 msgid "Determines the direction at which the label is positioned next to the line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:8 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_number_mobject:6 msgid "The distance of the label from the line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:9 msgid "The font size of the mobject to be positioned." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:10 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_numbers:10 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_number_mobject:8 msgid "The :class:`~.VMobject` class that will be used to construct the label. Defaults to the ``label_constructor`` attribute of the number line if not specified." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:0 msgid "Raises" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_labels:14 msgid "If the label does not have a ``font_size`` attribute, an ``AttributeError`` is raised." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_numbers:1 msgid "Adds :class:`~.DecimalNumber` mobjects representing their position at each tick of the number line. The numbers can be accessed after creation via ``self.numbers``." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_numbers:5 msgid "An iterable of the values used to position and create the labels. Defaults to the output produced by :meth:`~.NumberLine.get_tick_range`" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_numbers:7 msgid "A list of values to exclude from :attr:`x_values`." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_numbers:8 msgid "The font size of the labels. Defaults to the ``font_size`` attribute of the number line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.add_ticks:1 msgid "Adds ticks to the number line. Ticks can be accessed after creation via ``self.ticks``." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_number_mobject:4 msgid "The x-value at which the mobject should be positioned." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_number_mobject:7 msgid "The font size of the label mobject." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_number_mobject:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick_range:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.number_to_point:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.point_to_number:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_number_mobject:12 msgid "The positioned mobject." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_number_mobject:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick_range:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.n2p:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.number_to_point:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.p2n:0 #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.point_to_number:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick:3 msgid "The position of the tick." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick:4 msgid "The factor by which the tick is scaled." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick:6 msgid "A positioned tick." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.get_tick_range:4 msgid "A numpy array of floats represnting values along the number line." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.number_to_point:4 msgid "The value to be transformed into a coordinate. Or a list of values." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.number_to_point:6 msgid "A point with respect to the scene's coordinate system. Or a list of points." msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.NumberLine.point_to_number:4 msgid "A sequence of values consisting of ``(x_coord, y_coord, z_coord)``." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.number_line.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.number_line.rst:2 msgid "number\\_line" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line:1 msgid "Mobject representing a number line." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.rst:22::1 msgid "Creates a number line with tick marks." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.number_line.UnitInterval.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.number_line.UnitInterval.rst:2 msgid "UnitInterval" msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.UnitInterval.rst:4 msgid "Qualified name: ``manim.mobject.graphing.number\\_line.UnitInterval``" msgstr "" #: ../../../manim/mobject/graphing/number_line.py:docstring of manim.mobject.graphing.number_line.UnitInterval:1 msgid "Bases: :py:class:`manim.mobject.graphing.number_line.NumberLine`" msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.UnitInterval.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.UnitInterval.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.UnitInterval.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.UnitInterval.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.UnitInterval.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.graphing.number_line.UnitInterval.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.rst:2 msgid "graphing" msgstr "" #: ../../../manim/mobject/graphing/__init__.py:docstring of manim.mobject.graphing:1 msgid "Coordinate systems and function graphing related mobjects." msgstr "" #: ../../../manim/mobject/graphing/__init__.py:docstring of manim.mobject.graphing:4 msgid "Modules" msgstr "" #: ../../../manim/mobject/graphing/__init__.py:docstring of manim.mobject.graphing:14::1 msgid "Mobjects that represent coordinate systems." msgstr "" #: ../../../manim/mobject/graphing/__init__.py:docstring of manim.mobject.graphing:14::1 msgid "Mobjects representing function graphs." msgstr "" #: ../../../manim/mobject/graphing/__init__.py:docstring of manim.mobject.graphing:14::1 msgid "Mobject representing a number line." msgstr "" #: ../../../manim/mobject/graphing/__init__.py:docstring of manim.mobject.graphing:14::1 msgid "Mobjects representing objects from probability theory and statistics." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.probability.BarChart.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.probability.BarChart.rst:2 msgid "BarChart" msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.BarChart.rst:4 msgid "Qualified name: ``manim.mobject.graphing.probability.BarChart``" msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:1 msgid "Bases: :py:class:`manim.mobject.graphing.coordinate_systems.Axes`" msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:1 msgid "Creates a bar chart. Inherits from :class:`~.Axes`, so it shares its methods and attributes. Each axis inherits from :class:`~.NumberLine`, so pass in ``x_axis_config``/``y_axis_config`` to control their attributes." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:0 #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.change_bar_values:0 #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.get_bar_labels:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:5 msgid "A sequence of values that determines the height of each bar. Accepts negative values." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:6 msgid "A sequence of names for each bar. Does not have to match the length of ``values``." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:7 msgid "The y_axis range of values. If ``None``, the range will be calculated based on the min/max of ``values`` and the step will be calculated based on ``y_length``." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:9 msgid "The length of the x-axis. If ``None``, it is automatically calculated based on the number of values and the width of the screen." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:11 msgid "The length of the y-axis." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:12 msgid "The color for the bars. Accepts a sequence of colors (can contain just one item). If the length of``bar_colors`` does not match that of ``values``, intermediate colors will be automatically determined." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:15 msgid "The length of a bar. Must be between 0 and 1." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:16 msgid "The fill opacity of the bars." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:17 msgid "The stroke width of the bars." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart:20 #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.change_bar_values:8 #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.get_bar_labels:10 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.BarChart.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.BarChart.rst:21::1 #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.change_bar_values:1 msgid "Updates the height of the bars of the chart." msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.BarChart.rst:21::1 msgid "Annotates each bar with its corresponding value." msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.BarChart.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.change_bar_values:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.change_bar_values:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.change_bar_values:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.change_bar_values:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.change_bar_values:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.change_bar_values:3 msgid "The values that will be used to update the height of the bars. Does not have to match the number of bars." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.change_bar_values:5 msgid "Whether to re-initalize the colors of the bars based on ``self.bar_colors``." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.get_bar_labels:1 msgid "Annotates each bar with its corresponding value. Use ``self.bar_labels`` to access the labels after creation." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.get_bar_labels:4 msgid "The color of each label. By default ``None`` and is based on the parent's bar color." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.get_bar_labels:5 msgid "The font size of each label." msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.BarChart.get_bar_labels:6 msgid "The distance from each label to its bar. By default 0.4." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.probability.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.probability.rst:2 msgid "probability" msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability:1 msgid "Mobjects representing objects from probability theory and statistics." msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.rst:22::1 msgid "Creates a bar chart." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.probability.SampleSpace.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.probability.SampleSpace.rst:2 msgid "SampleSpace" msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.SampleSpace.rst:4 msgid "Qualified name: ``manim.mobject.graphing.probability.SampleSpace``" msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.SampleSpace:1 msgid "Bases: :py:class:`manim.mobject.geometry.polygram.Rectangle`" msgstr "" #: ../../../manim/mobject/graphing/probability.py:docstring of manim.mobject.graphing.probability.SampleSpace:2 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.SampleSpace.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.SampleSpace.rst:34 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.SampleSpace.rst:45::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.SampleSpace.rst:45::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.SampleSpace.rst:45::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.graphing.probability.SampleSpace.rst:45::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.scale.LinearBase.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.scale.LinearBase.rst:2 msgid "LinearBase" msgstr "" #: ../../source/reference/manim.mobject.graphing.scale.LinearBase.rst:4 msgid "Qualified name: ``manim.mobject.graphing.scale.LinearBase``" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase:1 msgid "Bases: :py:class:`manim.mobject.graphing.scale._ScaleBase`" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase:1 msgid "The default scaling class." msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase:0 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase.function:0 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase.inverse_function:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase:3 msgid "The slope of the linear function, by default 1.0" msgstr "" #: ../../source/reference/manim.mobject.graphing.scale.LinearBase.rst:14 msgid "Methods" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase.function:1::1 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase.function:1 msgid "Multiplies the value by the scale factor." msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase.function:1::1 msgid "Inverse of function." msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase.function:3 msgid "Value to be multiplied by the scale factor." msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase.function:0 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase.inverse_function:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LinearBase.inverse_function:1 msgid "Inverse of function. Divides the value by the scale factor." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.scale.LogBase.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.scale.LogBase.rst:2 msgid "LogBase" msgstr "" #: ../../source/reference/manim.mobject.graphing.scale.LogBase.rst:4 msgid "Qualified name: ``manim.mobject.graphing.scale.LogBase``" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase:1 msgid "Bases: :py:class:`manim.mobject.graphing.scale._ScaleBase`" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase:1 msgid "Scale for logarithmic graphs/functions." msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase:0 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.function:0 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.get_custom_labels:0 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.inverse_function:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase:3 msgid "The base of the log, by default 10." msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase:4 msgid "For use with :class:`~.Axes`: Whetherer or not to include ``LaTeX`` axis labels, by default True." msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.graphing.scale.LogBase.rst:14 msgid "Methods" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.function:1::1 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.function:1 msgid "Scales the value to fit it to a logarithmic scale.``self.function(5)==10**5``" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.function:1::1 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.get_custom_labels:1 msgid "Produces custom :class:`~.Integer` labels in the form of ``10^2``." msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.function:1::1 msgid "Inverse of ``function``." msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.function:0 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.get_custom_labels:0 #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.inverse_function:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.get_custom_labels:3 msgid "The iterable of values used to create the labels. Determines the exponent." msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.get_custom_labels:4 msgid "The number of decimal places to include in the exponent" msgstr "" #: ../../../manim/mobject/graphing/scale.py:docstring of manim.mobject.graphing.scale.LogBase.get_custom_labels:5 msgid "Additional arguments to be passed to :class:`~.Integer`." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.graphing.scale.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.graphing.scale.rst:2 msgid "scale" msgstr "" #: ../../source/reference/manim.mobject.graphing.scale.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.graphing.scale.rst:22::1 msgid "The default scaling class." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.logo.ManimBanner.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.logo.ManimBanner.rst:2 msgid "ManimBanner" msgstr "" #: ../../source/reference/manim.mobject.logo.ManimBanner.rst:4 msgid "Qualified name: ``manim.mobject.logo.ManimBanner``" msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner:1 msgid "Convenience class representing Manim's banner." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner:3 msgid "Can be animated using custom methods." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner:0 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:0 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:0 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.scale:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner:5 msgid "If ``True`` (the default), the dark theme version of the logo (with light text font) will be rendered. Otherwise, if ``False``, the light theme version (with dark text font) is used." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner:10 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:23 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.logo.ManimBanner.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.logo.ManimBanner.rst:22::1 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:1 msgid "The creation animation for Manim's logo." msgstr "" #: ../../source/reference/manim.mobject.logo.ManimBanner.rst:22::1 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:1 msgid "An animation that expands Manim's logo into its banner." msgstr "" #: ../../source/reference/manim.mobject.logo.ManimBanner.rst:22::1 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.scale:1 msgid "Scale the banner by the specified scale factor." msgstr "" #: ../../source/reference/manim.mobject.logo.ManimBanner.rst:24 msgid "Attributes" msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:3 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:16 msgid "The run time of the animation." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:0 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:0 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.scale:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:5 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:19 msgid "An animation to be used in a :meth:`.Scene.play` call." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.create:0 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:0 #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.scale:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:3 msgid "The returned animation transforms the banner from its initial state (representing Manim's logo with just the icons) to its expanded state (showing the full name together with the icons)." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:7 msgid "See the class documentation for how to use this." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:11 msgid "Before calling this method, the text \"anim\" is not a submobject of the banner object. After the expansion, it is added as a submobject so subsequent animations to the banner object apply to the text \"anim\" as well." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.expand:17 msgid "The direction in which the logo is expanded." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.scale:3 msgid "The factor used for scaling the banner." msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo.ManimBanner.scale:5 msgid "The scaled banner." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.logo.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.logo.rst:2 msgid "logo" msgstr "" #: ../../../manim/mobject/logo.py:docstring of manim.mobject.logo:1 msgid "Utilities for Manim's logo and banner." msgstr "" #: ../../source/reference/manim.mobject.logo.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.matrix.DecimalMatrix.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.matrix.DecimalMatrix.rst:2 msgid "DecimalMatrix" msgstr "" #: ../../source/reference/manim.mobject.matrix.DecimalMatrix.rst:4 msgid "Qualified name: ``manim.mobject.matrix.DecimalMatrix``" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.DecimalMatrix:1 msgid "Bases: :py:class:`manim.mobject.matrix.Matrix`" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.DecimalMatrix:1 msgid "A mobject that displays a matrix with decimal entries on the screen." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.DecimalMatrix:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.DecimalMatrix:17 msgid "Will round/truncate the decimal places as per the provided config." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.DecimalMatrix:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.DecimalMatrix:19 msgid "A numpy 2d array or list of lists" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.DecimalMatrix:21 msgid "Mobject to use, by default DecimalNumber" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.DecimalMatrix:23 msgid "Config for the desired mobject, by default {\"num_decimal_places\": 1}" msgstr "" #: ../../source/reference/manim.mobject.matrix.DecimalMatrix.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.matrix.DecimalMatrix.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.matrix.DecimalMatrix.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.matrix.DecimalMatrix.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.matrix.DecimalMatrix.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.matrix.DecimalMatrix.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.matrix.IntegerMatrix.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.matrix.IntegerMatrix.rst:2 msgid "IntegerMatrix" msgstr "" #: ../../source/reference/manim.mobject.matrix.IntegerMatrix.rst:4 msgid "Qualified name: ``manim.mobject.matrix.IntegerMatrix``" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.IntegerMatrix:1 msgid "Bases: :py:class:`manim.mobject.matrix.Matrix`" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.IntegerMatrix:1 msgid "A mobject that displays a matrix with integer entries on the screen." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.IntegerMatrix:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.IntegerMatrix:16 msgid "Will round if there are decimal entries in the matrix." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.IntegerMatrix:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.IntegerMatrix:18 msgid "A numpy 2d array or list of lists" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.IntegerMatrix:20 msgid "Mobject to use, by default Integer" msgstr "" #: ../../source/reference/manim.mobject.matrix.IntegerMatrix.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.matrix.IntegerMatrix.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.matrix.IntegerMatrix.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.matrix.IntegerMatrix.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.matrix.IntegerMatrix.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.matrix.IntegerMatrix.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.matrix.Matrix.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:2 msgid "Matrix" msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:4 msgid "Qualified name: ``manim.mobject.matrix.Matrix``" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:1 msgid "A mobject that displays a matrix on the screen." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:4 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_brackets:7 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_columns:7 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_entries:7 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_rows:7 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_column_colors:10 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_row_colors:10 msgid "Examples" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:5 msgid "The first example shows a variety of uses of this module while the second example exlpains the use of the options `add_background_rectangles_to_entries` and `include_background_rectangle`." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_column_colors:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_row_colors:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:56 msgid "A numpy 2d array or list of lists." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:57 msgid "Vertical distance between elements, by default 0.8." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:58 msgid "Horizontal distance between elements, by default 1.3." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:59 msgid "Distance of the brackets from the matrix, by default ``MED_SMALL_BUFF``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:60 msgid "Height of the brackets, by default ``MED_SMALL_BUFF``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:61 msgid "``True`` if should add backgraound rectangles to entries, by default ``False``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:62 msgid "``True`` if should include background rectangle, by default ``False``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:63 msgid "The mobject class used to construct the elements, by default :class:`~.MathTex`." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:64 msgid "Additional arguments to be passed to the constructor in ``element_to_mobject``, by default ``{}``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:66 msgid "The corner to which elements are aligned, by default ``DR``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:67 msgid "The left bracket type, by default ``\"[\"``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:68 msgid "The right bracket type, by default ``\"]\"``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:69 msgid "``True`` if should stretch the brackets to fit the height of matrix contents, by default ``True``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix:70 msgid "Additional arguments to be passed to :class:`~.MathTex` when constructing the brackets." msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:27::1 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.add_background_to_entries:1 msgid "Add a black background rectangle to the matrix, see above for an example." msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:27::1 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_brackets:1 msgid "Return the bracket mobjects." msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:27::1 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_columns:1 msgid "Return columns of the matrix as VGroups." msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:27::1 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_entries:1 msgid "Return the individual entries of the matrix." msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:27::1 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_mob_matrix:1 msgid "Return the underlying mob matrix mobjects." msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:27::1 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_rows:1 msgid "Return rows of the matrix as VGroups." msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:27::1 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_column_colors:1 msgid "Set individual colors for each columns of the matrix." msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:27::1 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_row_colors:1 msgid "Set individual colors for each row of the matrix." msgstr "" #: ../../source/reference/manim.mobject.matrix.Matrix.rst:29 msgid "Attributes" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.add_background_to_entries:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.add_background_to_entries:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.add_background_to_entries:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.add_background_to_entries:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.add_background_to_entries:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.add_background_to_entries:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_brackets:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_columns:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_entries:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_mob_matrix:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_rows:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_column_colors:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_row_colors:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.add_background_to_entries:4 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_column_colors:6 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_row_colors:6 msgid "The current matrix object (self)." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.add_background_to_entries:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_brackets:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_columns:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_entries:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_mob_matrix:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_rows:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_column_colors:0 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_row_colors:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_brackets:3 msgid "Each VGroup contains a bracket" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_brackets:4 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_columns:4 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_mob_matrix:4 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_rows:4 msgid "List[:class:`~.VGroup`]" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_columns:3 msgid "Each VGroup contains a column of the matrix." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_entries:3 msgid "VGroup containing entries of the matrix." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_mob_matrix:3 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.get_rows:3 msgid "Each VGroup contains a row of the matrix." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.Matrix.set_column_colors:3 msgid "The list of colors; each color specified corresponds to a column." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.matrix.MobjectMatrix.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.matrix.MobjectMatrix.rst:2 msgid "MobjectMatrix" msgstr "" #: ../../source/reference/manim.mobject.matrix.MobjectMatrix.rst:4 msgid "Qualified name: ``manim.mobject.matrix.MobjectMatrix``" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:1 msgid "Bases: :py:class:`manim.mobject.matrix.Matrix`" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:1 msgid "A mobject that displays a matrix of mobject entries on the screen." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:17 msgid "A numpy 2d array or list of lists." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:18 msgid "Vertical distance between elements, by default 0.8." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:19 msgid "Horizontal distance between elements, by default 1.3." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:20 msgid "Distance of the brackets from the matrix, by default ``MED_SMALL_BUFF``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:21 msgid "Height of the brackets, by default ``MED_SMALL_BUFF``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:22 msgid "``True`` if should add backgraound rectangles to entries, by default ``False``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:23 msgid "``True`` if should include background rectangle, by default ``False``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:24 msgid "The mobject class used to construct the elements, by default :class:`~.MathTex`." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:25 msgid "Additional arguments to be passed to the constructor in ``element_to_mobject``, by default ``{}``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:27 msgid "The corner to which elements are aligned, by default ``DR``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:28 msgid "The left bracket type, by default ``\"[\"``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:29 msgid "The right bracket type, by default ``\"]\"``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:30 msgid "``True`` if should stretch the brackets to fit the height of matrix contents, by default ``True``." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.MobjectMatrix:31 msgid "Additional arguments to be passed to :class:`~.MathTex` when constructing the brackets." msgstr "" #: ../../source/reference/manim.mobject.matrix.MobjectMatrix.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.matrix.MobjectMatrix.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.matrix.MobjectMatrix.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.matrix.MobjectMatrix.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.matrix.MobjectMatrix.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.matrix.MobjectMatrix.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.matrix.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.matrix.rst:2 msgid "matrix" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix:1 msgid "Mobjects representing matrices." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix:4 #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.get_det_text:16 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.matrix.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.matrix.rst:32::1 msgid "A mobject that displays a matrix with decimal entries on the screen." msgstr "" #: ../../source/reference/manim.mobject.matrix.rst:32::1 msgid "A mobject that displays a matrix with integer entries on the screen." msgstr "" #: ../../source/reference/manim.mobject.matrix.rst:32::1 msgid "A mobject that displays a matrix on the screen." msgstr "" #: ../../source/reference/manim.mobject.matrix.rst:32::1 msgid "A mobject that displays a matrix of mobject entries on the screen." msgstr "" #: ../../source/reference/manim.mobject.matrix.rst:35 msgid "Functions" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.get_det_text:1 msgid "Helper function to create determinant." msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.get_det_text:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.get_det_text:3 msgid "The matrix whose determinant is to be created" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.get_det_text:5 msgid "The value of the determinant of the matrix" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.get_det_text:7 msgid "The background rectangle" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.get_det_text:9 msgid "The scale of the text `det` w.r.t the matrix" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.get_det_text:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.get_det_text:12 msgid "A VGroup containing the determinant" msgstr "" #: ../../../manim/mobject/matrix.py:docstring of manim.mobject.matrix.get_det_text:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.mobject.Group.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.mobject.Group.rst:2 msgid "Group" msgstr "" #: ../../source/reference/manim.mobject.mobject.Group.rst:4 msgid "Qualified name: ``manim.mobject.mobject.Group``" msgstr "" #: ../../../manim/mobject/mobject.py:docstring of manim.mobject.mobject.Group:1 msgid "Bases: :py:class:`manim.mobject.mobject.Mobject`" msgstr "" #: ../../../manim/mobject/mobject.py:docstring of manim.mobject.mobject.Group:1 msgid "Groups together multiple :class:`Mobjects <.Mobject>`." msgstr "" #: ../../../manim/mobject/mobject.py:docstring of manim.mobject.mobject.Group:4 msgid "Notes" msgstr "" #: ../../../manim/mobject/mobject.py:docstring of manim.mobject.mobject.Group:5 msgid "When adding the same mobject more than once, repetitions are ignored. Use :meth:`.Mobject.copy` to create a separate copy which can then be added to the group." msgstr "" #: ../../source/reference/manim.mobject.mobject.Group.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.mobject.Group.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.mobject.Group.rst:28::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.mobject.Group.rst:28::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.mobject.Group.rst:28::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.mobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.mobject.rst:2 msgid "mobject" msgstr "" #: ../../../manim/mobject/mobject.py:docstring of manim.mobject.mobject:1 msgid "Base classes for objects that can be displayed." msgstr "" #: ../../source/reference/manim.mobject.mobject.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.mobject.rst:28::1 msgid "Groups together multiple :class:`Mobjects <.Mobject>`." msgstr "" #: ../../source/reference/manim.mobject.mobject.rst:28::1 msgid "Mathematical Object: base class for objects that can be displayed on screen." msgstr "" #: ../../source/reference/manim.mobject.mobject.rst:31 msgid "Functions" msgstr "" #: ../../../manim/mobject/mobject.py:docstring of manim.mobject.mobject.override_animate:1 msgid "Decorator for overriding method animations." msgstr "" #: ../../../manim/mobject/mobject.py:docstring of manim.mobject.mobject.override_animate:3 msgid "This allows to specify a method (returning an :class:`~.Animation`) which is called when the decorated method is used with the ``.animate`` syntax for animating the application of a method." msgstr "" #: ../../../manim/mobject/mobject.py:docstring of manim.mobject.mobject.override_animate:13 msgid "Overridden methods cannot be combined with normal or other overridden methods using method chaining with the ``.animate`` syntax." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.mobject_update_utils.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.number_line.NumberLine.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.number_line.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.number_line.UnitInterval.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.numbers.DecimalNumber.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.numbers.Integer.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.numbers.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.numbers.Variable.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.polyhedra.Dodecahedron.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.polyhedra.Icosahedron.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.polyhedra.Octahedron.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.polyhedra.Polyhedron.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.polyhedra.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.polyhedra.Tetrahedron.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.probability.BarChart.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.probability.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.probability.SampleSpace.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.shape_matchers.BackgroundRectangle.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.shape_matchers.Cross.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.shape_matchers.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.shape_matchers.SurroundingRectangle.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.shape_matchers.Underline.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.brace.ArcBrace.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.brace.ArcBrace.rst:2 msgid "ArcBrace" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.ArcBrace.rst:4 msgid "Qualified name: ``manim.mobject.svg.brace.ArcBrace``" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.ArcBrace:1 msgid "Bases: :py:class:`manim.mobject.svg.brace.Brace`" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.ArcBrace:1 msgid "Creates a :class:`~Brace` that wraps around an :class:`~.Arc`." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.ArcBrace:3 msgid "The direction parameter allows the brace to be applied from outside or inside the arc." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.ArcBrace:7 msgid "The :class:`ArcBrace` is smaller for arcs with smaller radii." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.ArcBrace:10 msgid "The :class:`ArcBrace` is initially a vertical :class:`Brace` defined by the length of the :class:`~.Arc`, but is scaled down to match the start and end angles. An exponential function is then applied after it is shifted based on the radius of the arc." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.ArcBrace:15 msgid "The scaling effect is not applied for arcs with radii smaller than 1 to prevent over-scaling." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.ArcBrace:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.ArcBrace:18 msgid "The :class:`~.Arc` that wraps around the :class:`Brace` mobject." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.ArcBrace:19 msgid "The direction from which the brace faces the arc. ``LEFT`` for inside the arc, and ``RIGHT`` for the outside." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.ArcBrace:23 msgid "Example" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.ArcBrace.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.ArcBrace.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.ArcBrace.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.ArcBrace.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.ArcBrace.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.ArcBrace.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.brace.Brace.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.brace.Brace.rst:2 msgid "Brace" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.Brace.rst:4 msgid "Qualified name: ``manim.mobject.svg.brace.Brace``" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace:1 msgid "Bases: :py:class:`manim.mobject.svg.svg_path.SVGPathMobject`" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace:1 msgid "Takes a mobject and draws a brace adjacent to it." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace:3 msgid "Passing a direction vector determines the direction from which the brace is drawn. By default it is drawn from below." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace:6 msgid "The mobject adjacent to which the brace is placed." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace:8 msgid "The direction from which the brace faces the mobject." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace:13 #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:6 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.Brace.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.Brace.rst:24::1 msgid "Uses :func:`~.space_ops.shoelace_direction` to calculate the direction." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.Brace.rst:26 msgid "Attributes" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:1 msgid "Uses :func:`~.space_ops.shoelace_direction` to calculate the direction. The direction of points determines in which direction the object is drawn, clockwise or counterclockwise." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:7 msgid "The default direction of a :class:`~.Circle` is counterclockwise::" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:13 msgid "Either ``\"CW\"`` or ``\"CCW\"``." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.Brace.get_direction:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.brace.BraceBetweenPoints.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.brace.BraceBetweenPoints.rst:2 msgid "BraceBetweenPoints" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceBetweenPoints.rst:4 msgid "Qualified name: ``manim.mobject.svg.brace.BraceBetweenPoints``" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.BraceBetweenPoints:1 msgid "Bases: :py:class:`manim.mobject.svg.brace.Brace`" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.BraceBetweenPoints:1 msgid "Similar to Brace, but instead of taking a mobject it uses 2 points to place the brace." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.BraceBetweenPoints:4 msgid "A fitting direction for the brace is computed, but it still can be manually overridden. If the points go from left to right, the brace is drawn from below. Swapping the points places the brace on the opposite side." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.BraceBetweenPoints:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.BraceBetweenPoints:9 msgid "The first point." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.BraceBetweenPoints:10 msgid "The second point." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.BraceBetweenPoints:11 msgid "The direction from which the brace faces towards the points." msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.BraceBetweenPoints:14 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceBetweenPoints.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceBetweenPoints.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceBetweenPoints.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceBetweenPoints.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceBetweenPoints.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceBetweenPoints.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.brace.BraceLabel.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.brace.BraceLabel.rst:2 msgid "BraceLabel" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceLabel.rst:4 msgid "Qualified name: ``manim.mobject.svg.brace.BraceLabel``" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.BraceLabel:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceLabel.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceLabel.rst:25 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceLabel.rst:36::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceLabel.rst:36::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceLabel.rst:36::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceLabel.rst:36::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.brace.BraceText.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.brace.BraceText.rst:2 msgid "BraceText" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceText.rst:4 msgid "Qualified name: ``manim.mobject.svg.brace.BraceText``" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace.BraceText:1 msgid "Bases: :py:class:`manim.mobject.svg.brace.BraceLabel`" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceText.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceText.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceText.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceText.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceText.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.BraceText.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.brace.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.brace.rst:2 msgid "brace" msgstr "" #: ../../../manim/mobject/svg/brace.py:docstring of manim.mobject.svg.brace:1 msgid "Mobject representing curly braces." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.svg.brace.rst:28::1 msgid "Creates a :class:`~Brace` that wraps around an :class:`~.Arc`." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.rst:28::1 msgid "Takes a mobject and draws a brace adjacent to it." msgstr "" #: ../../source/reference/manim.mobject.svg.brace.rst:28::1 msgid "Similar to Brace, but instead of taking a mobject it uses 2 points to place the brace." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.code_mobject.Code.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.code_mobject.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.rst:2 msgid "svg" msgstr "" #: ../../../manim/mobject/svg/__init__.py:docstring of manim.mobject.svg:1 msgid "Mobjects related to SVG images." msgstr "" #: ../../../manim/mobject/svg/__init__.py:docstring of manim.mobject.svg:4 msgid "Modules" msgstr "" #: ../../../manim/mobject/svg/__init__.py:docstring of manim.mobject.svg:13::1 msgid "Mobject representing curly braces." msgstr "" #: ../../../manim/mobject/svg/__init__.py:docstring of manim.mobject.svg:13::1 msgid "Utility functions for parsing SVG styles." msgstr "" #: ../../../manim/mobject/svg/__init__.py:docstring of manim.mobject.svg:13::1 msgid "Mobjects generated from an SVG file." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.style_utils.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.style_utils.rst:2 msgid "style\\_utils" msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils:1 msgid "Utility functions for parsing SVG styles." msgstr "" #: ../../source/reference/manim.mobject.svg.style_utils.rst:20 msgid "Functions" msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.cascade_element_style:1 msgid "Collect the element's style attributes based upon both its inheritance and its own attributes." msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.cascade_element_style:3 msgid "SVG uses cascading element styles. A closer ancestor's style takes precedence over a more distant ancestor's style. In order to correctly calculate the styles, the attributes are passed down through the inheritance tree, updating where necessary." msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.cascade_element_style:7 msgid "Note that this method only copies the values and does not parse them. See :meth:`parse_color_string` for converting from SVG attributes to manim keyword arguments." msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.cascade_element_style:0 #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.fill_default_values:0 #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_color_string:0 #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_style:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.cascade_element_style:10 msgid "Element of the SVG parse tree" msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.cascade_element_style:12 msgid "Dictionary of SVG attributes inherited from the parent element." msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.cascade_element_style:0 #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.fill_default_values:0 #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_color_string:0 #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_style:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.cascade_element_style:15 msgid "Dictionary mapping svg attributes to values with `element`'s values overriding inherited values." msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.cascade_element_style:0 #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.fill_default_values:0 #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_color_string:0 #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_style:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.fill_default_values:1 msgid "Fill in the default values for properties of SVG elements, if they are not currently set in the style dictionary." msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.fill_default_values:4 msgid "Style dictionary with SVG property names. Some may be missing." msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.fill_default_values:7 msgid "Style attributes; none are missing." msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_color_string:1 msgid "Handle the SVG-specific color strings and convert them to HTML #rrggbb format." msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_color_string:3 msgid "String in any web-compatible format" msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_color_string:6 msgid "Hexadecimal color string in the format `#rrggbb`" msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_style:1 msgid "Convert a dictionary of SVG attributes to Manim VMobject keyword arguments." msgstr "" #: ../../../manim/mobject/svg/style_utils.py:docstring of manim.mobject.svg.style_utils.parse_style:3 msgid "Style attributes as a string-to-string dictionary. Keys are valid SVG element attributes (fill, stroke, etc)" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.svg_mobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.svg_mobject.rst:2 msgid "svg\\_mobject" msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject:1 msgid "Mobjects generated from an SVG file." msgstr "" #: ../../source/reference/manim.mobject.svg.svg_mobject.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.svg_mobject.SVGMobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.svg_mobject.SVGMobject.rst:2 msgid "SVGMobject" msgstr "" #: ../../source/reference/manim.mobject.svg.svg_mobject.SVGMobject.rst:4 msgid "Qualified name: ``manim.mobject.svg.svg\\_mobject.SVGMobject``" msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:1 msgid "A SVGMobject is a Vector Mobject constructed from an SVG (or XDV) file." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:3 msgid "SVGMobjects are constructed from the XML data within the SVG file structure. As such, subcomponents from the XML data can be accessed via the submobjects attribute. There is varying amounts of support for SVG elements, experiment with SVG files at your own peril." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:9 msgid "Examples" msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:16 msgid "The file's path name. When possible, the full path is preferred but a relative path may be used as well. Relative paths are relative to the directory specified by the `--assets_dir` command line argument." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:21 msgid "Whether the SVGMobject should be centered to the origin. Defaults to `True`." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:23 msgid "Specify the final height of the SVG file. Defaults to 2 units." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:25 msgid "Specify the width the SVG file should occupy. Defaults to `None`." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:27 msgid "Whether the hierarchies of VGroups generated should be flattened. Defaults to `True`." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:29 msgid "The stroke width of the outer edge of an SVG path element. Defaults to `4`." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject:31 msgid "Specifies the opacity of the image. `1` is opaque, `0` is transparent. Defaults to `1`." msgstr "" #: ../../source/reference/manim.mobject.svg.svg_mobject.SVGMobject.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.svg.svg_mobject.SVGMobject.rst:23::1 #: ../../source/reference/manim.mobject.svg.svg_mobject.SVGMobject.rst:23::1 msgid "Called by the Mobject abstract base class." msgstr "" #: ../../source/reference/manim.mobject.svg.svg_mobject.SVGMobject.rst:23::1 #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject.init_colors:1 msgid "Initializes the colors." msgstr "" #: ../../source/reference/manim.mobject.svg.svg_mobject.SVGMobject.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject.generate_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject.generate_points:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject.generate_points:1 #: ../../../manim/mobject/svg/svg_mobject.py:docstring of manim.mobject.svg.svg_mobject.SVGMobject.generate_points:1 msgid "Called by the Mobject abstract base class. Responsible for generating the SVGMobject's points from XML tags, populating self.mobjects, and any submobjects within self.mobjects." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.svg_path.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.svg_path.rst:2 msgid "svg\\_path" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path:1 msgid "Mobjects generated from an SVG pathstring." msgstr "" #: ../../source/reference/manim.mobject.svg.svg_path.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.svg.svg_path.rst:29 msgid "Functions" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.correct_out_of_range_radii:1 msgid "Correction of out-of-range radii." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.correct_out_of_range_radii:3 msgid "See: https://www.w3.org/TR/SVG11/implnote.html#ArcCorrectionOutOfRangeRadii" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.elliptical_arc_to_cubic_bezier:1 msgid "Generate cubic bezier points to approximate SVG elliptical arc." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.elliptical_arc_to_cubic_bezier:3 msgid "See: http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.get_elliptical_arc_center_parameters:1 msgid "Conversion from endpoint to center parameterization." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.get_elliptical_arc_center_parameters:3 msgid "See: https://www.w3.org/TR/SVG11/implnote.html#ArcConversionEndpointToCenter" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.grouped:1 msgid "Group iterable into arrays of n items." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.string_to_numbers:1 msgid "Parse the SVG string representing a sequence of numbers into an array of floats." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.string_to_numbers:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.string_to_numbers:3 msgid "String representing a sequence of numbers, separated by commas, spaces, etc." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.string_to_numbers:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.string_to_numbers:6 msgid "List of float values parsed out of the string." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.string_to_numbers:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.vector_angle:1 msgid "Calculate the dot product angle between two vectors." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.svg_path.SVGPathMobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.svg.svg_path.SVGPathMobject.rst:2 msgid "SVGPathMobject" msgstr "" #: ../../source/reference/manim.mobject.svg.svg_path.SVGPathMobject.rst:4 msgid "Qualified name: ``manim.mobject.svg.svg\\_path.SVGPathMobject``" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../source/reference/manim.mobject.svg.svg_path.SVGPathMobject.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.svg.svg_path.SVGPathMobject.rst:26::1 #: ../../source/reference/manim.mobject.svg.svg_path.SVGPathMobject.rst:26::1 #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.generate_points:1 #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.generate_points:1 msgid "Generates points from a given an SVG ``d`` attribute." msgstr "" #: ../../source/reference/manim.mobject.svg.svg_path.SVGPathMobject.rst:26::1 #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.get_original_path_string:1 msgid "A simple getter for the path's ``d`` attribute." msgstr "" #: ../../source/reference/manim.mobject.svg.svg_path.SVGPathMobject.rst:26::1 #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.get_path_commands:1 msgid "Returns a list of possible path commands used within an SVG ``d`` attribute." msgstr "" #: ../../source/reference/manim.mobject.svg.svg_path.SVGPathMobject.rst:26::1 #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.handle_command:1 msgid "Core logic for handling each of the various path commands." msgstr "" #: ../../source/reference/manim.mobject.svg.svg_path.SVGPathMobject.rst:26::1 #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.string_to_points:1 msgid "Convert an SVG command string into a sequence of absolute-positioned control points." msgstr "" #: ../../source/reference/manim.mobject.svg.svg_path.SVGPathMobject.rst:28 msgid "Attributes" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.generate_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.generate_points:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.get_path_commands:4 msgid "See: https://svgwg.org/svg2-draft/paths.html#DProperty for further details on what each path command does." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.get_path_commands:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.get_path_commands:7 msgid "The various upper and lower cased path commands." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.get_path_commands:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.get_path_commands:8 msgid "List[:class:`str`]" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.string_to_points:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.string_to_points:3 msgid "A string containing a single uppercase letter representing the SVG command." msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.string_to_points:5 msgid "Whether the command is relative to the end of the previous command" msgstr "" #: ../../../manim/mobject/svg/svg_path.py:docstring of manim.mobject.svg.svg_path.SVGPathMobject.string_to_points:7 msgid "A string that contains many comma- or space-separated numbers that defined the control points. Different commands require different numbers of numbers as arguments." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.tex_mobject.BulletedList.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.tex_mobject.MathTex.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.tex_mobject.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.tex_mobject.SingleStringMathTex.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.tex_mobject.Tex.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.tex_mobject.TexSymbol.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.tex_mobject.Title.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.text_mobject.MarkupText.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.text_mobject.Paragraph.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.text_mobject.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.svg.text_mobject.Text.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.table.DecimalTable.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.table.DecimalTable.rst:2 msgid "DecimalTable" msgstr "" #: ../../source/reference/manim.mobject.table.DecimalTable.rst:4 msgid "Qualified name: ``manim.mobject.table.DecimalTable``" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.DecimalTable:1 msgid "Bases: :py:class:`manim.mobject.table.Table`" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.DecimalTable:1 msgid "A specialized :class:`~.Table` mobject for use with :class:`~.DecimalNumber` to display decimal entries." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.DecimalTable:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.DecimalTable:19 msgid "Special case of :class:`~.Table` with ``element_to_mobject`` set to :class:`~.DecimalNumber`. By default, ``num_decimal_places`` is set to 1. Will round/truncate the decimal places based on the provided ``element_to_mobject_config``." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.DecimalTable:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.DecimalTable:23 msgid "A 2D array, or a list of lists. Content of the table must be valid input for :class:`~.DecimalNumber`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.DecimalTable:25 msgid "The :class:`~.Mobject` class applied to the table entries. Set as :class:`~.DecimalNumber`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.DecimalTable:26 msgid "Element to mobject config, here set as {\"num_decimal_places\": 1}." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.DecimalTable:27 msgid "Additional arguments to be passed to :class:`~.Table`." msgstr "" #: ../../source/reference/manim.mobject.table.DecimalTable.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.table.DecimalTable.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.table.DecimalTable.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.table.DecimalTable.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.table.DecimalTable.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.table.DecimalTable.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.table.IntegerTable.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.table.IntegerTable.rst:2 msgid "IntegerTable" msgstr "" #: ../../source/reference/manim.mobject.table.IntegerTable.rst:4 msgid "Qualified name: ``manim.mobject.table.IntegerTable``" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.IntegerTable:1 msgid "Bases: :py:class:`manim.mobject.table.Table`" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.IntegerTable:1 msgid "A specialized :class:`~.Table` mobject for use with :class:`~.Integer`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.IntegerTable:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.IntegerTable:24 msgid "Special case of :class:`~.Table` with `element_to_mobject` set to :class:`~.Integer`. Will round if there are decimal entries in the table." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.IntegerTable:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.IntegerTable:27 msgid "A 2d array or list of lists. Content of the table has to be valid input for :class:`~.Integer`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.IntegerTable:29 msgid "The :class:`~.Mobject` class applied to the table entries. Set as :class:`~.Integer`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.IntegerTable:30 msgid "Additional arguments to be passed to :class:`~.Table`." msgstr "" #: ../../source/reference/manim.mobject.table.IntegerTable.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.table.IntegerTable.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.table.IntegerTable.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.table.IntegerTable.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.table.IntegerTable.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.table.IntegerTable.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.table.MathTable.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.table.MathTable.rst:2 msgid "MathTable" msgstr "" #: ../../source/reference/manim.mobject.table.MathTable.rst:4 msgid "Qualified name: ``manim.mobject.table.MathTable``" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MathTable:1 msgid "Bases: :py:class:`manim.mobject.table.Table`" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MathTable:1 msgid "A specialized :class:`~.Table` mobject for use with LaTeX." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MathTable:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MathTable:18 msgid "Special case of :class:`~.Table` with `element_to_mobject` set to :class:`~.MathTex`. Every entry in `table` is set in a Latex `align` environment." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MathTable:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MathTable:21 msgid "A 2d array or list of lists. Content of the table have to be valid input for :class:`~.MathTex`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MathTable:23 msgid "The :class:`~.Mobject` class applied to the table entries. Set as :class:`~.MathTex`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MathTable:24 msgid "Additional arguments to be passed to :class:`~.Table`." msgstr "" #: ../../source/reference/manim.mobject.table.MathTable.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.table.MathTable.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.table.MathTable.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.table.MathTable.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.table.MathTable.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.table.MathTable.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.table.MobjectTable.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.table.MobjectTable.rst:2 msgid "MobjectTable" msgstr "" #: ../../source/reference/manim.mobject.table.MobjectTable.rst:4 msgid "Qualified name: ``manim.mobject.table.MobjectTable``" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MobjectTable:1 msgid "Bases: :py:class:`manim.mobject.table.Table`" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MobjectTable:1 msgid "A specialized :class:`~.Table` mobject for use with :class:`~.Mobject`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MobjectTable:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MobjectTable:26 msgid "Special case of :class:`~.Table` with ``element_to_mobject`` set to an identity function. Here, every item in ``table`` must already be of type :class:`~.Mobject`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MobjectTable:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MobjectTable:29 msgid "A 2D array or list of lists. Content of the table must be of type :class:`~.Mobject`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MobjectTable:30 msgid "The :class:`~.Mobject` class applied to the table entries. Set as ``lambda m : m`` to return itself." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.MobjectTable:31 msgid "Additional arguments to be passed to :class:`~.Table`." msgstr "" #: ../../source/reference/manim.mobject.table.MobjectTable.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.table.MobjectTable.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.table.MobjectTable.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.table.MobjectTable.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.table.MobjectTable.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.table.MobjectTable.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.table.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.table.rst:2 msgid "table" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table:1 msgid "Mobjects representing tables." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.table.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.table.rst:28::1 msgid "A specialized :class:`~.Table` mobject for use with :class:`~.DecimalNumber` to display decimal entries." msgstr "" #: ../../source/reference/manim.mobject.table.rst:28::1 msgid "A specialized :class:`~.Table` mobject for use with :class:`~.Integer`." msgstr "" #: ../../source/reference/manim.mobject.table.rst:28::1 msgid "A specialized :class:`~.Table` mobject for use with LaTeX." msgstr "" #: ../../source/reference/manim.mobject.table.rst:28::1 msgid "A specialized :class:`~.Table` mobject for use with :class:`~.Mobject`." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.table.Table.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.table.Table.rst:2 msgid "Table" msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:4 msgid "Qualified name: ``manim.mobject.table.Table``" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:1 msgid "A mobject that displays a table on the screen." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:4 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_highlighted_cell:10 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:15 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_cell:12 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_col_labels:7 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_columns:7 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries:12 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries_without_labels:12 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_highlighted_cell:10 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_horizontal_lines:7 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_labels:7 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_row_labels:7 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_rows:7 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_vertical_lines:7 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.scale:15 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.set_column_colors:6 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.set_row_colors:6 msgid "Examples" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_background_to_entries:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_highlighted_cell:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_cell:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries_without_labels:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_highlighted_cell:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.scale:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.set_column_colors:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.set_row_colors:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:62 msgid "A 2D array or list of lists. Content of the table has to be a valid input for the callable set in ``element_to_mobject``." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:64 msgid "List of :class:`~.VMobject` representing the labels of each row." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:65 msgid "List of :class:`~.VMobject` representing the labels of each column." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:66 msgid "The top-left entry of the table, can only be specified if row and column labels are given." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:68 msgid "Vertical buffer passed to :meth:`~.Mobject.arrange_in_grid`, by default 0.8." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:69 msgid "Horizontal buffer passed to :meth:`~.Mobject.arrange_in_grid`, by default 1.3." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:70 msgid "``True`` if the table should include outer lines, by default False." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:71 msgid "``True`` if background rectangles should be added to entries, by default ``False``." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:72 msgid "Background color of entries if ``add_background_rectangles_to_entries`` is ``True``." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:73 msgid "``True`` if the table should have a background rectangle, by default ``False``." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:74 msgid "Background color of table if ``include_background_rectangle`` is ``True``." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:75 msgid "The :class:`~.Mobject` class applied to the table entries. by default :class:`~.Paragraph`. For common choices, see :mod:`~.text_mobject`/:mod:`~.tex_mobject`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:76 msgid "Custom configuration passed to :attr:`element_to_mobject`, by default {}." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:77 msgid "Dict passed to :meth:`~.Mobject.arrange_in_grid`, customizes the arrangement of the table." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:78 msgid "Dict passed to :class:`~.Line`, customizes the lines of the table." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table:79 msgid "Additional arguments to be passed to :class:`~.VGroup`." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_background_to_entries:1 msgid "Adds a black :class:`~.BackgroundRectangle` to each entry of the table." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_highlighted_cell:1 msgid "Highlights one cell at a specific position on the table by adding a :class:`~.BackgroundRectangle`." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:1 msgid "Customized create-type function for tables." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_cell:1 msgid "Returns one specific cell as a rectangular :class:`~.Polygon` without the entry." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_col_labels:1 msgid "Return the column labels of the table." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_columns:1 msgid "Return columns of the table as a :class:`~.VGroup` of :class:`~.VGroup`." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries:1 msgid "Return the individual entries of the table (including labels) or one specific entry if the parameter, ``pos``, is set." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries_without_labels:1 msgid "Return the individual entries of the table (without labels) or one specific entry if the parameter, ``pos``, is set." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_highlighted_cell:1 msgid "Returns a :class:`~.BackgroundRectangle` of the cell at the given position." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_horizontal_lines:1 msgid "Return the horizontal lines of the table." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_labels:1 msgid "Returns the labels of the table." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_row_labels:1 msgid "Return the row labels of the table." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_rows:1 msgid "Return the rows of the table as a :class:`~.VGroup` of :class:`~.VGroup`." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_vertical_lines:1 msgid "Return the vertical lines of the table." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.scale:1 msgid "Scale the size by a factor." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.set_column_colors:1 msgid "Set individual colors for each column of the table." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:36::1 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.set_row_colors:1 msgid "Set individual colors for each row of the table." msgstr "" #: ../../source/reference/manim.mobject.table.Table.rst:38 msgid "Attributes" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_background_to_entries:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_background_to_entries:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_background_to_entries:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_background_to_entries:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_background_to_entries:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_background_to_entries:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_highlighted_cell:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_cell:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_col_labels:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_columns:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries_without_labels:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_highlighted_cell:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_horizontal_lines:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_labels:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_row_labels:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_rows:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_vertical_lines:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.scale:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.set_column_colors:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.set_row_colors:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_highlighted_cell:3 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_cell:3 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries:4 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_highlighted_cell:3 msgid "The position of a specific entry on the table. ``(1,1)`` being the top left entry of the table." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_highlighted_cell:5 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_highlighted_cell:5 msgid "The color used to highlight the cell." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.add_highlighted_cell:6 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_highlighted_cell:6 msgid "Additional arguments to be passed to :class:`~.BackgroundRectangle`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:3 msgid "The run time of the line creation and the writing of the elements." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:4 msgid "The lag ratio of the animation." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:5 msgid "The animation style of the table lines, see :mod:`~.creation` for examples." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:6 msgid "The animation style of the table labels, see :mod:`~.creation` for examples." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:7 msgid "The animation style of the table elements, see :mod:`~.creation` for examples." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:8 msgid "Further arguments passed to the creation animations." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_cell:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_col_labels:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_columns:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries_without_labels:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_horizontal_lines:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_labels:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_row_labels:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_rows:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_vertical_lines:0 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.scale:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.create:11 msgid "AnimationGroup containing creation of the lines and of the elements." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_cell:5 msgid "Additional arguments to be passed to :class:`~.Polygon`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_cell:8 msgid "Polygon mimicking one specific cell of the Table." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_col_labels:3 msgid "VGroup containing the column labels of the table." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_columns:3 msgid ":class:`~.VGroup` containing each column in a :class:`~.VGroup`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries:7 msgid ":class:`~.VGroup` containing all entries of the table (including labels) or the :class:`~.VMobject` at the given position if ``pos`` is set." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries:9 #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries_without_labels:9 msgid "Union[:class:`~.VMobject`, :class:`~.VGroup`]" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries_without_labels:4 msgid "The position of a specific entry on the table. ``(1,1)`` being the top left entry of the table (without labels)." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_entries_without_labels:7 msgid ":class:`~.VGroup` containing all entries of the table (without labels) or the :class:`~.VMobject` at the given position if ``pos`` is set." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_horizontal_lines:3 msgid ":class:`~.VGroup` containing all the horizontal lines of the table." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_labels:3 msgid ":class:`~.VGroup` containing all the labels of the table." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_row_labels:3 msgid ":class:`~.VGroup` containing the row labels of the table." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_rows:3 msgid ":class:`~.VGroup` containing each row in a :class:`~.VGroup`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.get_vertical_lines:3 msgid ":class:`~.VGroup` containing all the vertical lines of the table." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.scale:3 msgid "Default behavior is to scale about the center of the mobject." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.scale:5 msgid "The scaling factor :math:`\\alpha`. If :math:`0 < |\\alpha| < 1`, the mobject will shrink, and for :math:`|\\alpha| > 1` it will grow. Furthermore, if :math:`\\alpha < 0`, the mobject is also flipped." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.scale:8 msgid "Additional keyword arguments passed to :meth:`apply_points_function_about_point`." msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.scale:11 msgid "``self``" msgstr "" #: ../../../manim/mobject/table.py:docstring of manim.mobject.table.Table.set_column_colors:3 msgid "An iterable of colors; each color corresponds to a column." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.code_mobject.Code.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.code_mobject.Code.rst:2 msgid "Code" msgstr "" #: ../../source/reference/manim.mobject.text.code_mobject.Code.rst:4 msgid "Qualified name: ``manim.mobject.text.code\\_mobject.Code``" msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:1 msgid "A highlighted source code listing." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:3 msgid "An object ``listing`` of :class:`.Code` is a :class:`.VGroup` consisting of three objects:" msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:6 msgid "The background, ``listing.background_mobject``. This is either a :class:`.Rectangle` (if the listing has been initialized with ``background=\"rectangle\"``, the default option) or a :class:`.VGroup` resembling a window (if ``background=\"window\"`` has been passed)." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:11 msgid "The line numbers, ``listing.line_numbers`` (a :class:`.Paragraph` object)." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:14 msgid "The highlighted code itself, ``listing.code`` (a :class:`.Paragraph` object)." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:19 msgid "Using a :class:`.Transform` on text with leading whitespace (and in this particular case: code) can look `weird `_. Consider using :meth:`remove_invisible_chars` to resolve this issue." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:25 msgid "Examples" msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:26 msgid "Normal usage::" msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:39 msgid "We can also render code passed as a string (but note that the language has to be specified in this case):" msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:60 msgid "Name of the code file to display." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:62 msgid "If ``file_name`` is not specified, a code string can be passed directly." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:65 msgid "Number of space characters corresponding to a tab character. Defaults to 3." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:67 msgid "Amount of space between lines in relation to font size. Defaults to 0.3, which means 30% of font size." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:69 msgid "A number which scales displayed code. Defaults to 24." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:71 msgid "The name of the text font to be used. Defaults to ``\"Monospac821 BT\"``." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:73 msgid "Stroke width for text. 0 is recommended, and the default." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:75 msgid "Inner margin of text from the background. Defaults to 0.3." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:77 msgid "\"Indentation chars\" refers to the spaces/tabs at the beginning of a given code line. Defaults to ``\" \"`` (spaces)." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:79 msgid "Defines the background's type. Currently supports only ``\"rectangle\"`` (default) and ``\"window\"``." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:81 msgid "Defines the stroke width of the background. Defaults to 1." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:83 msgid "Defines the stroke color for the background. Defaults to ``WHITE``." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:85 msgid "Defines the corner radius for the background. Defaults to 0.2." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:87 msgid "Defines whether line numbers should be inserted in displayed code. Defaults to ``True``." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:89 msgid "Defines the first line's number in the line count. Defaults to 1." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:91 msgid "Defines the spacing between line numbers and displayed code. Defaults to 0.4." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:93 msgid "Defines the style type of displayed code. You can see possible names of styles in with :attr:`styles_list`. Defaults to ``\"vim\"``." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:95 msgid "Specifies the programming language the given code was written in. If ``None`` (the default), the language will be automatically detected. For the list of possible options, visit https://pygments.org/docs/lexers/ and look for 'aliases or short names'." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:100 msgid "Defines whether to generate highlighted html code to the folder `assets/codes/generated_html_files`. Defaults to `False`." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:105 msgid "The background of the code listing." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:0 #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:0 #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:0 msgid "type" msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:111 msgid "The line numbers for the code listing. Empty, if ``insert_line_no=False`` has been specified." msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject.Code:118 msgid "The highlighted code." msgstr "" #: ../../source/reference/manim.mobject.text.code_mobject.Code.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.code_mobject.Code.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.text.code_mobject.Code.rst:33::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.text.code_mobject.Code.rst:33::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.code_mobject.Code.rst:33::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.text.code_mobject.Code.rst:33::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.code_mobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.code_mobject.rst:2 msgid "code\\_mobject" msgstr "" #: ../../../manim/mobject/text/code_mobject.py:docstring of manim.mobject.text.code_mobject:1 msgid "Mobject representing highlighted source code listings." msgstr "" #: ../../source/reference/manim.mobject.text.code_mobject.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.numbers.DecimalNumber.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.numbers.DecimalNumber.rst:2 msgid "DecimalNumber" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.DecimalNumber.rst:4 msgid "Qualified name: ``manim.mobject.text.numbers.DecimalNumber``" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber:1 msgid "An mobject representing a decimal number." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.DecimalNumber.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.DecimalNumber.rst:22::1 #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber.set_value:1 msgid "Set the value of the :class:`~.DecimalNumber` to a new number." msgstr "" #: ../../source/reference/manim.mobject.text.numbers.DecimalNumber.rst:24 msgid "Attributes" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber.font_size:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber.font_size:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber.font_size:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber.font_size:1::1 #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber.font_size:1 msgid "The font size of the tex mobject." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber.font_size:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber.font_size:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber:0 #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.DecimalNumber.set_value:0 msgid "Parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.numbers.Integer.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.numbers.Integer.rst:2 msgid "Integer" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Integer.rst:4 msgid "Qualified name: ``manim.mobject.text.numbers.Integer``" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Integer:1 msgid "Bases: :py:class:`manim.mobject.text.numbers.DecimalNumber`" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Integer:1 msgid "A class for displaying Integers." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Integer:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Integer.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Integer.rst:22 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Integer.rst:34::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Integer.rst:34::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Integer.rst:34::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Integer.rst:34::1 msgid "The font size of the tex mobject." msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Integer.rst:34::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.numbers.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.numbers.rst:2 msgid "numbers" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers:1 msgid "Mobjects representing numbers." msgstr "" #: ../../source/reference/manim.mobject.text.numbers.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.rst:24::1 msgid "An mobject representing a decimal number." msgstr "" #: ../../source/reference/manim.mobject.text.numbers.rst:24::1 msgid "A class for displaying Integers." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.numbers.Variable.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.numbers.Variable.rst:2 msgid "Variable" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Variable.rst:4 msgid "Qualified name: ``manim.mobject.text.numbers.Variable``" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:1 msgid "A class for displaying text that shows \"label = value\" with the value continuously updated from a :class:`~.ValueTracker`." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:4 msgid "The initial value you need to keep track of and display." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:6 msgid "The label for your variable. Raw strings are convertex to :class:`~.MathTex` objects." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:8 msgid "The class used for displaying the number. Defaults to :class:`DecimalNumber`." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:10 msgid "The number of decimal places to display in your variable. Defaults to 2. If `var_type` is an :class:`Integer`, this parameter is ignored." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:13 msgid "Other arguments to be passed to `~.Mobject`." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:18 msgid "The label for your variable, for example ``x = ...``." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:0 #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:0 #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:0 msgid "type" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:20 msgid "Union[:class:`str`, :class:`~.Tex`, :class:`~.MathTex`, :class:`~.Text`, :class:`~.TexSymbol`, :class:`~.SingleStringMathTex`]" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:24 msgid "Useful in updating the value of your variable on-screen." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:30 msgid "The tex for the value of your variable." msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:32 msgid "Union[:class:`DecimalNumber`, :class:`Integer`]" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:35 msgid "Examples" msgstr "" #: ../../../manim/mobject/text/numbers.py:docstring of manim.mobject.text.numbers.Variable:36 msgid "Normal usage::" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Variable.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Variable.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Variable.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Variable.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Variable.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.text.numbers.Variable.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.rst:2 msgid "text" msgstr "" #: ../../../manim/mobject/text/__init__.py:docstring of manim.mobject.text:1 msgid "Mobjects used to display Text using Pango or LaTeX." msgstr "" #: ../../../manim/mobject/text/__init__.py:docstring of manim.mobject.text:4 msgid "Modules" msgstr "" #: ../../../manim/mobject/text/__init__.py:docstring of manim.mobject.text:13::1 msgid "Mobject representing highlighted source code listings." msgstr "" #: ../../../manim/mobject/text/__init__.py:docstring of manim.mobject.text:13::1 msgid "Mobjects representing numbers." msgstr "" #: ../../../manim/mobject/text/__init__.py:docstring of manim.mobject.text:13::1 msgid "Mobjects representing text rendered using LaTeX." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.tex_mobject.BulletedList.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.tex_mobject.BulletedList.rst:2 msgid "BulletedList" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.BulletedList.rst:4 msgid "Qualified name: ``manim.mobject.text.tex\\_mobject.BulletedList``" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.BulletedList:1 msgid "Bases: :py:class:`manim.mobject.text.tex_mobject.Tex`" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.BulletedList:2 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.BulletedList.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.BulletedList.rst:22 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.BulletedList.rst:34::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.BulletedList.rst:34::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.BulletedList.rst:34::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.BulletedList.rst:34::1 msgid "The font size of the tex mobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.BulletedList.rst:34::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.tex_mobject.MathTex.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.tex_mobject.MathTex.rst:2 msgid "MathTex" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.MathTex.rst:4 msgid "Qualified name: ``manim.mobject.text.tex\\_mobject.MathTex``" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.MathTex:1 msgid "Bases: :py:class:`manim.mobject.text.tex_mobject.SingleStringMathTex`" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.MathTex:1 msgid "A string compiled with LaTeX in math mode." msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.MathTex:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.MathTex:14 msgid "Tests" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.MathTex:15 msgid "Check that creating a :class:`~.MathTex` works::" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.MathTex:20 msgid "Check that double brace group splitting works correctly::" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.MathTex.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.MathTex.rst:28 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.MathTex.rst:40::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.MathTex.rst:40::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.MathTex.rst:40::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.MathTex.rst:40::1 msgid "The font size of the tex mobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.MathTex.rst:40::1 msgid "The height of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.MathTex.rst:40::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.tex_mobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.tex_mobject.rst:2 msgid "tex\\_mobject" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject:1 msgid "Mobjects representing text rendered using LaTeX." msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject:5 msgid "See the corresponding tutorial :ref:`rendering-with-latex`" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject:9 msgid "Just as you can use :class:`~.Text` (from the module :mod:`~.text_mobject`) to add text to your videos, you can use :class:`~.Tex` and :class:`~.MathTex` to insert LaTeX." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.rst:0 #: ../../source/reference/manim.mobject.text.tex_mobject.rst:0 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.rst:30::1 msgid "A string compiled with LaTeX in math mode." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.rst:30::1 msgid "Elementary building block for rendering text with LaTeX." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.rst:30::1 msgid "A string compiled with LaTeX in normal mode." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.rst:30::1 msgid "Purely a renaming of SVGPathMobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.tex_mobject.SingleStringMathTex.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.tex_mobject.SingleStringMathTex.rst:2 msgid "SingleStringMathTex" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.SingleStringMathTex.rst:4 msgid "Qualified name: ``manim.mobject.text.tex\\_mobject.SingleStringMathTex``" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex:1 msgid "Bases: :py:class:`manim.mobject.svg.svg_mobject.SVGMobject`" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex:1 msgid "Elementary building block for rendering text with LaTeX." msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex:4 msgid "Tests" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex:5 msgid "Check that creating a :class:`~.SingleStringMathTex` object works::" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.SingleStringMathTex.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.SingleStringMathTex.rst:22::1 #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex.init_colors:1 msgid "Initializes the colors." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.SingleStringMathTex.rst:24 msgid "Attributes" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex.font_size:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex.font_size:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex.font_size:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex.font_size:1::1 #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex.font_size:1 msgid "The font size of the tex mobject." msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex.font_size:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex.font_size:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.SingleStringMathTex:0 msgid "Parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.tex_mobject.Tex.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.tex_mobject.Tex.rst:2 msgid "Tex" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Tex.rst:4 msgid "Qualified name: ``manim.mobject.text.tex\\_mobject.Tex``" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.Tex:1 msgid "Bases: :py:class:`manim.mobject.text.tex_mobject.MathTex`" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.Tex:1 msgid "A string compiled with LaTeX in normal mode." msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.Tex:4 msgid "Tests" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.Tex:5 msgid "Check whether writing a LaTeX string works::" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Tex.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Tex.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Tex.rst:33::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Tex.rst:33::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Tex.rst:33::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Tex.rst:33::1 msgid "The font size of the tex mobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Tex.rst:33::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.tex_mobject.TexSymbol.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.tex_mobject.TexSymbol.rst:2 msgid "TexSymbol" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.TexSymbol.rst:4 msgid "Qualified name: ``manim.mobject.text.tex\\_mobject.TexSymbol``" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.TexSymbol:1 msgid "Bases: :py:class:`manim.mobject.svg.svg_path.SVGPathMobject`" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.TexSymbol:1 msgid "Purely a renaming of SVGPathMobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.TexSymbol.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.TexSymbol.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.TexSymbol.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.TexSymbol.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.TexSymbol.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.TexSymbol.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.tex_mobject.Title.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.tex_mobject.Title.rst:2 msgid "Title" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Title.rst:4 msgid "Qualified name: ``manim.mobject.text.tex\\_mobject.Title``" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.Title:1 msgid "Bases: :py:class:`manim.mobject.text.tex_mobject.Tex`" msgstr "" #: ../../../manim/mobject/text/tex_mobject.py:docstring of manim.mobject.text.tex_mobject.Title:2 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Title.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Title.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Title.rst:33::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Title.rst:33::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Title.rst:33::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Title.rst:33::1 msgid "The font size of the tex mobject." msgstr "" #: ../../source/reference/manim.mobject.text.tex_mobject.Title.rst:33::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.text_mobject.MarkupText.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.text_mobject.MarkupText.rst:2 msgid "MarkupText" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.MarkupText.rst:4 msgid "Qualified name: ``manim.mobject.text.text\\_mobject.MarkupText``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:1 msgid "Bases: :py:class:`manim.mobject.svg.svg_mobject.SVGMobject`" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:1 msgid "Display (non-LaTeX) text rendered using `Pango `_." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:3 msgid "Text objects behave like a :class:`.VGroup`-like iterable of all characters in the given text. In particular, slicing is possible." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:6 msgid "**What is PangoMarkup?**" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:8 msgid "PangoMarkup is a small markup language like html and it helps you avoid using \"range of characters\" while coloring or styling a piece a Text. You can use this language with :class:`~.MarkupText`." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:12 msgid "A simple example of a marked-up string might be::" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:16 msgid "and it can be used with :class:`~.MarkupText` as" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:26 msgid "A more elaborate example would be:" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:42 msgid "PangoMarkup can also contain XML features such as numeric character entities such as ``©`` for © can be used too." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:45 msgid "The most general markup tag is ````, then there are some convenience tags." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:48 msgid "Here is a list of supported tags:" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:50 msgid "``bold``, ``italic`` and ``bold+italic``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:51 msgid "``
    underline
`` and ``strike through``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:52 msgid "``typewriter font``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:53 msgid "``bigger font`` and ``smaller font``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:54 msgid "``superscript`` and ``subscript``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:55 msgid "``double underline``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:56 msgid "``error underline``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:57 msgid "``overline``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:58 msgid "``strikethrough``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:59 msgid "``temporary change of font``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:60 msgid "``temporary change of color``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:61 msgid "``temporary change of color``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:62 msgid "``temporary gradient``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:64 msgid "For ```` markup, colors can be specified either as hex triples like ``#aabbcc`` or as named CSS colors like ``AliceBlue``. The ```` tag is handled by Manim rather than Pango, and supports hex triplets or Manim constants like ``RED`` or ``RED_A``. If you want to use Manim constants like ``RED_A`` together with ````, you will need to use Python's f-String syntax as follows::" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:76 msgid "If your text contains ligatures, the :class:`MarkupText` class may incorrectly determine the first and last letter when creating the gradient. This is due to the fact that ``fl`` are two separate characters, but might be set as one single glyph - a ligature. If your language does not depend on ligatures, consider setting ``disable_ligatures`` to ``True``. If you must use ligatures, the ``gradient`` tag supports an optional attribute ``offset`` which can be used to compensate for that error." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:84 msgid "For example:" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:86 msgid "``example`` to *start* the gradient one letter earlier" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:87 msgid "``example`` to *end* the gradient one letter earlier" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:88 msgid "``example`` to *start* the gradient two letters earlier and *end* it one letter earlier" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:90 msgid "Specifying a second offset may be necessary if the text to be colored does itself contain ligatures. The same can happen when using HTML entities for special chars." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:94 msgid "When using ``underline``, ``overline`` or ``strikethrough`` together with ```` tags, you will also need to use the offset, because underlines are additional paths in the final :class:`SVGMobject`. Check out the following example." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:99 msgid "Escaping of special characters: ``>`` **should** be written as ``>`` whereas ``<`` and ``&`` *must* be written as ``<`` and ``&``." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:103 msgid "You can find more information about Pango markup formatting at the corresponding documentation page: `Pango Markup `_. Please be aware that not all features are supported by this class and that the ```` tag mentioned above is not supported by Pango." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:109 msgid "The text that needs to be created as mobject." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:110 msgid "The fill opacity, with 1 meaning opaque and 0 meaning transparent." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:111 msgid "Stroke width." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:112 msgid "Font size." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:113 msgid "Line spacing." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:114 msgid "Global font setting for the entire text. Local overrides are possible." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:115 msgid "Global slant setting, e.g. `NORMAL` or `ITALIC`. Local overrides are possible." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:116 msgid "Global weight setting, e.g. `NORMAL` or `BOLD`. Local overrides are possible." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:117 msgid "Global gradient setting. Local overrides are possible." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:119 msgid "The text displayed in form of a :class:`.VGroup`-like mobject." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:123 msgid "Examples" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:224 msgid "As :class:`MarkupText` uses Pango to render text, rendering non-English characters is easily possible:" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:243 msgid "You can justify the text by passing :attr:`justify` parameter." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:278 msgid "Tests" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.MarkupText:279 msgid "Check that the creation of :class:`~.MarkupText` works::" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.MarkupText.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.MarkupText.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.MarkupText.rst:33::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.MarkupText.rst:33::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.MarkupText.rst:33::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.MarkupText.rst:33::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.text_mobject.Paragraph.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.text_mobject.Paragraph.rst:2 msgid "Paragraph" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Paragraph.rst:4 msgid "Qualified name: ``manim.mobject.text.text\\_mobject.Paragraph``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Paragraph:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Paragraph:1 msgid "Display a paragraph of text." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Paragraph:3 msgid "For a given :class:`.Paragraph` ``par``, the attribute ``par.chars`` is a :class:`.VGroup` containing all the lines. In this context, every line is constructed as a :class:`.VGroup` of characters contained in the line." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Paragraph:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Paragraph:8 msgid "Represents the spacing between lines. Defaults to -1, which means auto." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Paragraph:9 msgid "Defines the alignment of paragraph. Defaults to None. Possible values are \"left\", \"right\" or \"center\"." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Paragraph:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Paragraph:12 msgid "Examples" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Paragraph:13 msgid "Normal usage::" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Paragraph:20 msgid "Remove unwanted invisible characters::" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Paragraph.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Paragraph.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Paragraph.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Paragraph.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Paragraph.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Paragraph.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.text_mobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.text_mobject.rst:2 msgid "text\\_mobject" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject:1 msgid "Mobjects used for displaying (non-LaTeX) text." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject:4 msgid "Just as you can use :class:`~.Tex` and :class:`~.MathTex` (from the module :mod:`~.tex_mobject`) to insert LaTeX to your videos, you can use :class:`~.Text` to to add normal text." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject:9 msgid "See the corresponding tutorial :ref:`rendering-with-latex`" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject:12 msgid "The simplest way to add text to your animations 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 `مرحبا بالعالم`." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject:16 #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:13 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.rst:30::1 #: ../../source/reference/manim.mobject.text.text_mobject.rst:30::1 msgid "Display (non-LaTeX) text rendered using `Pango `_." msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.rst:30::1 msgid "Display a paragraph of text." msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.rst:33 msgid "Functions" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:1 msgid "Temporarily add a font file to Pango's search path." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:3 msgid "This searches for the font_file at various places. The order it searches it described below." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:5 msgid "Absolute path." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:6 msgid "In ``assets/fonts`` folder." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:7 msgid "In ``font/`` folder." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:8 msgid "In the same directory." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:0 #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:0 #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.remove_invisible_chars:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:10 msgid "The font file to add." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:14 msgid "Use ``with register_font(...)`` to add a font file to search path." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:0 msgid "Raises" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:22 msgid "If the font doesn't exists." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:23 msgid "If this method is used on macOS." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.register_font:24 msgid "This method is available for macOS for ``ManimPango>=v0.2.3``. Using this method with previous releases will raise an :class:`AttributeError` on macOS." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.remove_invisible_chars:1 msgid "Function to remove unwanted invisible characters from some mobjects." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.remove_invisible_chars:3 msgid "Any SVGMobject from which we want to remove unwanted invisible characters." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.remove_invisible_chars:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.remove_invisible_chars:5 msgid "The SVGMobject without unwanted invisible characters." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.remove_invisible_chars:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.text.text_mobject.Text.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.text.text_mobject.Text.rst:2 msgid "Text" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Text.rst:4 msgid "Qualified name: ``manim.mobject.text.text\\_mobject.Text``" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:1 msgid "Bases: :py:class:`manim.mobject.svg.svg_mobject.SVGMobject`" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:1 msgid "Display (non-LaTeX) text rendered using `Pango `_." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:3 msgid "Text objects behave like a :class:`.VGroup`-like iterable of all characters in the given text. In particular, slicing is possible." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:6 msgid "The text that needs to be created as a mobject." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:8 msgid "The mobject-like :class:`.VGroup`." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:12 msgid "Examples" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:61 msgid "As :class:`Text` uses Pango to render text, rendering non-English characters is easily possible:" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:94 msgid "Tests" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text:95 msgid "Check that the creation of :class:`~.Text` works::" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Text.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Text.rst:20::1 #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text.init_colors:1 msgid "Initializes the colors." msgstr "" #: ../../source/reference/manim.mobject.text.text_mobject.Text.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text.init_colors:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text.init_colors:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text.init_colors:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text.init_colors:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/text/text_mobject.py:docstring of manim.mobject.text.text_mobject.Text.init_colors:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.polyhedra.Dodecahedron.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.polyhedra.Dodecahedron.rst:2 msgid "Dodecahedron" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Dodecahedron.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.polyhedra.Dodecahedron``" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Dodecahedron:1 msgid "Bases: :py:class:`manim.mobject.three_d.polyhedra.Polyhedron`" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Dodecahedron:1 msgid "A dodecahedron, one of the five platonic solids. It has 12 faces, 30 edges and 20 vertices." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Dodecahedron:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Dodecahedron:3 msgid "The length of an edge between any two vertices." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Dodecahedron:6 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Dodecahedron.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Dodecahedron.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Dodecahedron.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Dodecahedron.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Dodecahedron.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Dodecahedron.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.polyhedra.Icosahedron.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.polyhedra.Icosahedron.rst:2 msgid "Icosahedron" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Icosahedron.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.polyhedra.Icosahedron``" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Icosahedron:1 msgid "Bases: :py:class:`manim.mobject.three_d.polyhedra.Polyhedron`" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Icosahedron:1 msgid "An icosahedron, one of the five platonic solids. It has 20 faces, 30 edges and 12 vertices." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Icosahedron:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Icosahedron:3 msgid "The length of an edge between any two vertices." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Icosahedron:6 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Icosahedron.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Icosahedron.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Icosahedron.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Icosahedron.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Icosahedron.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Icosahedron.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.polyhedra.Octahedron.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.polyhedra.Octahedron.rst:2 msgid "Octahedron" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Octahedron.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.polyhedra.Octahedron``" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Octahedron:1 msgid "Bases: :py:class:`manim.mobject.three_d.polyhedra.Polyhedron`" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Octahedron:1 msgid "An octahedron, one of the five platonic solids. It has 8 faces, 12 edges and 6 vertices." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Octahedron:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Octahedron:3 msgid "The length of an edge between any two vertices." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Octahedron:6 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Octahedron.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Octahedron.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Octahedron.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Octahedron.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Octahedron.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Octahedron.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.polyhedra.Polyhedron.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.polyhedra.Polyhedron.rst:2 msgid "Polyhedron" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Polyhedron.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.polyhedra.Polyhedron``" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:1 msgid "An abstract polyhedra class." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:3 msgid "In this implementation, polyhedra are defined with a list of vertex coordinates in space, and a list of faces. This implementation mirrors that of a standard polyhedral data format (OFF, object file format)." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:0 #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.create_faces:0 #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.get_edges:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:6 msgid "A list of coordinates of the corresponding vertices in the polyhedron. Each coordinate will correspond to a vertex. The vertices are indexed with the usual indexing of Python." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:8 msgid "A list of faces. Each face is a sublist containing the indices of the vertices that form the corners of that face." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:9 msgid "Configuration for the polygons representing the faces of the polyhedron." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:10 msgid "Configuration for the graph containing the vertices and edges of the polyhedron." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:13 msgid "Examples" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:14 msgid "To understand how to create a custom polyhedra, let's use the example of a rather simple one - a square pyramid." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:39 msgid "In defining the polyhedron above, we first defined the coordinates of the vertices. These are the corners of the square base, given as the first four coordinates in the vertex list, and the apex, the last coordinate in the list." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:43 msgid "Next, we define the faces of the polyhedron. The triangular surfaces of the pyramid are polygons with two adjacent vertices in the base and the vertex at the apex as corners. We thus define these surfaces in the first four elements of our face list. The last element defines the base of the pyramid." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron:47 msgid "The graph and faces of polyhedra can also be accessed and modified directly, after instantiation. They are stored in the `graph` and `faces` attributes respectively." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Polyhedron.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Polyhedron.rst:23::1 #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.create_faces:1 msgid "Creates VGroup of faces from a list of face coordinates." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Polyhedron.rst:23::1 msgid "Extracts the coordinates of the vertices in the graph." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Polyhedron.rst:23::1 #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.get_edges:1 msgid "Creates list of cyclic pairwise tuples." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Polyhedron.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.create_faces:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.create_faces:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.create_faces:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.create_faces:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.create_faces:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.create_faces:0 #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.extract_face_coords:0 #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Polyhedron.get_edges:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.polyhedra.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.polyhedra.rst:2 msgid "polyhedra" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra:1 msgid "General polyhedral class and platonic solids." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.rst:28::1 msgid "A dodecahedron, one of the five platonic solids." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.rst:28::1 msgid "An icosahedron, one of the five platonic solids." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.rst:28::1 msgid "An octahedron, one of the five platonic solids." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.rst:28::1 msgid "An abstract polyhedra class." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.polyhedra.Tetrahedron.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.polyhedra.Tetrahedron.rst:2 msgid "Tetrahedron" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Tetrahedron.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.polyhedra.Tetrahedron``" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Tetrahedron:1 msgid "Bases: :py:class:`manim.mobject.three_d.polyhedra.Polyhedron`" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Tetrahedron:1 msgid "A tetrahedron, one of the five platonic solids. It has 4 faces, 6 edges, and 4 vertices." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Tetrahedron:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Tetrahedron:3 msgid "The length of an edge between any two vertices." msgstr "" #: ../../../manim/mobject/three_d/polyhedra.py:docstring of manim.mobject.three_d.polyhedra.Tetrahedron:6 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Tetrahedron.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Tetrahedron.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Tetrahedron.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Tetrahedron.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Tetrahedron.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.three_d.polyhedra.Tetrahedron.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.rst:2 msgid "three\\_d" msgstr "" #: ../../../manim/mobject/three_d/__init__.py:docstring of manim.mobject.three_d:1 #: ../../../manim/mobject/three_d/__init__.py:docstring of manim.mobject.three_d:12::1 msgid "Three-dimensional mobjects." msgstr "" #: ../../../manim/mobject/three_d/__init__.py:docstring of manim.mobject.three_d:4 msgid "Modules" msgstr "" #: ../../../manim/mobject/three_d/__init__.py:docstring of manim.mobject.three_d:12::1 msgid "General polyhedral class and platonic solids." msgstr "" #: ../../../manim/mobject/three_d/__init__.py:docstring of manim.mobject.three_d:12::1 msgid "Utility functions for three-dimensional mobjects." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_d_utils.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_d_utils.rst:2 msgid "three\\_d\\_utils" msgstr "" #: ../../../manim/mobject/three_d/three_d_utils.py:docstring of manim.mobject.three_d.three_d_utils:1 msgid "Utility functions for three-dimensional mobjects." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.Arrow3D.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Arrow3D.rst:2 msgid "Arrow3D" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Arrow3D.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.Arrow3D``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Arrow3D:1 msgid "Bases: :py:class:`manim.mobject.three_d.three_dimensions.Line3D`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Arrow3D:1 msgid "An arrow made out of a cylindrical line and a conical tip." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Arrow3D:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Arrow3D:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Arrow3D:15 msgid "The start position of the arrow." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Arrow3D:17 msgid "The end position of the arrow." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Arrow3D:19 msgid "The thickness of the arrow." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Arrow3D:21 msgid "The height of the conical tip." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Arrow3D:23 msgid "The base radius of the conical tip." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Arrow3D.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Arrow3D.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Arrow3D.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Arrow3D.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Arrow3D.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Arrow3D.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.Cone.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cone.rst:2 msgid "Cone" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cone.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.Cone``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:1 msgid "Bases: :py:class:`manim.mobject.three_d.three_dimensions.Surface`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:1 msgid "A circular cone. Can be defined using 2 parameters: its height, and its base radius. The polar angle, theta, can be calculated using arctan(base_radius / height) The spherical radius, r, is calculated using the pythagorean theorem." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:8 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.get_direction:6 msgid "Examples" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:19 msgid "The base radius from which the cone tapers." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:21 msgid "The height measured from the plane formed by the base_radius to the apex of the cone." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:23 msgid "The direction of the apex." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:25 msgid "Whether to show the base plane or not." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:27 msgid "The azimuthal angle to start and end at." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:29 msgid "The radius at the apex." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone:31 msgid "Show checkerboard grid texture on the cone." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cone.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cone.rst:22::1 msgid "Converts from spherical coordinates to cartesian." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cone.rst:22::1 msgid "Uses :func:`~.space_ops.shoelace_direction` to calculate the direction." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cone.rst:24 msgid "Attributes" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.func:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.func:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.func:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.func:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.func:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.func:1 msgid "Converts from spherical coordinates to cartesian. :param u: The radius. :type u: :class:`float` :param v: The azimuthal angle. :type v: :class:`float`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.get_direction:1 msgid "Uses :func:`~.space_ops.shoelace_direction` to calculate the direction. The direction of points determines in which direction the object is drawn, clockwise or counterclockwise." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.get_direction:7 msgid "The default direction of a :class:`~.Circle` is counterclockwise::" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.get_direction:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.get_direction:13 msgid "Either ``\"CW\"`` or ``\"CCW\"``." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cone.get_direction:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.Cube.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cube.rst:2 msgid "Cube" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cube.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.Cube``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cube:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cube.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cube.rst:21::1 #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cube.rst:21::1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cube.generate_points:1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cube.generate_points:1 msgid "Initializes :attr:`points` and therefore the shape." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cube.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cube.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cube.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cube.generate_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cube.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cube.generate_points:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.Cylinder.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cylinder.rst:2 msgid "Cylinder" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cylinder.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.Cylinder``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder:1 msgid "Bases: :py:class:`manim.mobject.three_d.three_dimensions.Surface`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder:1 msgid "A cylinder, defined by its height, radius and direction," msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder:15 msgid "The radius of the cylinder." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder:17 msgid "The height of the cylinder." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder:19 msgid "The direction of the central axis of the cylinder." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder:21 msgid "The height along the height axis (given by direction) to start and end on." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder:23 msgid "Whether to show the end caps or not." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cylinder.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cylinder.rst:23::1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder.add_bases:1 msgid "Adds the end caps of the cylinder." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cylinder.rst:23::1 msgid "Converts from cylindrical coordinates to cartesian." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cylinder.rst:23::1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder.get_direction:1 msgid "Returns the direction of the central axis of the cylinder." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Cylinder.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder.add_bases:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder.add_bases:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder.add_bases:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder.add_bases:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Cylinder.add_bases:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.Dot3D.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Dot3D.rst:2 msgid "Dot3D" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Dot3D.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.Dot3D``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Dot3D:1 msgid "Bases: :py:class:`manim.mobject.three_d.three_dimensions.Sphere`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Dot3D:1 msgid "A spherical dot." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Dot3D:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Dot3D:3 msgid "The location of the dot." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Dot3D:5 msgid "The radius of the dot." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Dot3D:7 msgid "The color of the :class:`Dot3D`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Dot3D:11 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Dot3D.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Dot3D.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Dot3D.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Dot3D.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Dot3D.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Dot3D.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.Line3D.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Line3D.rst:2 msgid "Line3D" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Line3D.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.Line3D``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D:1 msgid "Bases: :py:class:`manim.mobject.three_d.three_dimensions.Cylinder`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D:1 msgid "A cylindrical line, for use in ThreeDScene." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D:4 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.parallel_to:9 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.perpendicular_to:9 msgid "Examples" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D:0 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.parallel_to:0 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.perpendicular_to:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D:15 msgid "The start position of the line." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D:17 msgid "The end position of the line." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D:19 msgid "The thickness of the line." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Line3D.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Line3D.rst:25::1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.get_end:1 msgid "Returns the point, where the stroke that surrounds the :class:`~.Mobject` ends." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Line3D.rst:25::1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.get_start:1 msgid "Returns the point, where the stroke that surrounds the :class:`~.Mobject` starts." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Line3D.rst:25::1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.parallel_to:1 msgid "Returns a line parallel to another line going through a given point." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Line3D.rst:25::1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.perpendicular_to:1 msgid "Returns a line perpendicular to another line going through a given point." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Line3D.rst:25::1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.set_start_and_end_attrs:1 msgid "Sets the start and end points of the line." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Line3D.rst:27 msgid "Attributes" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.get_end:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.get_end:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.get_end:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.get_end:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.get_end:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.parallel_to:4 msgid "The line to be parallel to." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.parallel_to:5 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.perpendicular_to:5 msgid "The point to pass through." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.parallel_to:6 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.perpendicular_to:6 msgid "Additional parameters to be passed to the class." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Line3D.perpendicular_to:4 msgid "The line to be perpendicular to." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.rst:2 msgid "three\\_dimensions" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions:1 msgid "Three-dimensional mobjects." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.rst:40::1 msgid "An arrow made out of a cylindrical line and a conical tip." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.rst:40::1 msgid "A circular cone." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.rst:40::1 msgid "A cylinder, defined by its height, radius and direction," msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.rst:40::1 msgid "A spherical dot." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.rst:40::1 msgid "A cylindrical line, for use in ThreeDScene." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.rst:40::1 msgid "A cuboid." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.rst:40::1 msgid "A mobject representing a three-dimensional sphere." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.rst:40::1 msgid "Creates a Parametric Surface using a checkerboard pattern." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.Prism.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Prism.rst:2 msgid "Prism" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Prism.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.Prism``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Prism:1 msgid "Bases: :py:class:`manim.mobject.three_d.three_dimensions.Cube`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Prism:1 msgid "A cuboid." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Prism:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Prism.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Prism.rst:20::1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Prism.generate_points:1 msgid "Initializes :attr:`points` and therefore the shape." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Prism.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Prism.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Prism.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Prism.generate_points:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Prism.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Prism.generate_points:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.Sphere.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Sphere.rst:2 msgid "Sphere" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Sphere.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.Sphere``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Sphere:1 msgid "Bases: :py:class:`manim.mobject.three_d.three_dimensions.Surface`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Sphere:1 msgid "A mobject representing a three-dimensional sphere." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Sphere:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Sphere.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Sphere.rst:22 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Sphere.rst:33::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Sphere.rst:33::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Sphere.rst:33::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Sphere.rst:33::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.Surface.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Surface.rst:2 msgid "Surface" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Surface.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.Surface``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface:1 msgid "Creates a Parametric Surface using a checkerboard pattern." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface:0 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface:3 msgid "The function that defines the surface." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface:4 msgid "The range of the ``u`` variable: ``(u_min, u_max)``." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface:5 msgid "The range of the ``v`` variable: ``(v_min, v_max)``." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface:6 msgid "The number of samples taken of the surface. A tuple can be used to define different resolutions for ``u`` and ``v`` respectively." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface:0 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface:11 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:12 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Surface.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Surface.rst:21::1 #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:1 msgid "Sets the color of each mobject of a parametric surface to a color relative to its axis-value" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Surface.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:3 msgid "The axes for the parametric surface, which will be used to map axis-values to colors." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:4 msgid "A list of colors, ordered from lower axis-values to higher axis-values. If a list of tuples is passed containing colors paired with numbers, then those numbers will be used as the pivots." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:6 msgid "The chosen axis to use for the color mapping. (0 = x, 1 = y, 2 = z)" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Surface.set_fill_by_value:8 msgid "The parametric surface with a gradient applied by value. For chaining." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.ThreeDVMobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.ThreeDVMobject.rst:2 msgid "ThreeDVMobject" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.ThreeDVMobject.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.ThreeDVMobject``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.ThreeDVMobject:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.ThreeDVMobject.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.ThreeDVMobject.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.ThreeDVMobject.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.ThreeDVMobject.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.ThreeDVMobject.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.ThreeDVMobject.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d.three_dimensions.Torus.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Torus.rst:2 msgid "Torus" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Torus.rst:4 msgid "Qualified name: ``manim.mobject.three\\_d.three\\_dimensions.Torus``" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Torus:1 msgid "Bases: :py:class:`manim.mobject.three_d.three_dimensions.Surface`" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Torus:1 msgid "A torus." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Torus:4 msgid "Examples" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Torus:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Torus:15 msgid "Distance from the center of the tube to the center of the torus." msgstr "" #: ../../../manim/mobject/three_d/three_dimensions.py:docstring of manim.mobject.three_d.three_dimensions.Torus:17 msgid "Radius of the tube." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Torus.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Torus.rst:22 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Torus.rst:33::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Torus.rst:33::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Torus.rst:33::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.three_d.three_dimensions.Torus.rst:33::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_d_utils.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.Arrow3D.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.Cone.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.Cube.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.Cylinder.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.Dot3D.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.Line3D.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.ParametricSurface.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.Prism.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.Sphere.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.Surface.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.ThreeDVMobject.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.three_dimensions.Torus.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.image_mobject.AbstractImageMobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.image_mobject.AbstractImageMobject.rst:2 msgid "AbstractImageMobject" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.AbstractImageMobject.rst:4 msgid "Qualified name: ``manim.mobject.types.image\\_mobject.AbstractImageMobject``" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject:1 msgid "Bases: :py:class:`manim.mobject.mobject.Mobject`" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject:1 msgid "Automatically filters out black pixels" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject:0 #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.set_resampling_algorithm:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject:3 msgid "At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best. This is a custom parameter of ImageMobject so that rendering a scene with e.g. the ``--quality low`` or ``--quality medium`` flag for faster rendering won't effect the position of the image on the screen." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.AbstractImageMobject.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.AbstractImageMobject.rst:23::1 #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.reset_points:1 msgid "Sets :attr:`points` to be an empty array." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.AbstractImageMobject.rst:23::1 msgid "Condition is function which takes in one arguments, (x, y, z)." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.AbstractImageMobject.rst:23::1 msgid "Sets the interpolation method for upscaling the image." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.AbstractImageMobject.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.reset_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.reset_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.reset_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.reset_points:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.set_color:1 msgid "Condition is function which takes in one arguments, (x, y, z). Here it just recurses to submobjects, but in subclasses this should be further implemented based on the the inner workings of color" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.set_resampling_algorithm:1 msgid "Sets the interpolation method for upscaling the image. By default the image is interpolated using bicubic algorithm. This method lets you change it. Interpolation is done internally using Pillow, and the function besides the string constants describing the algorithm accepts the Pillow integer constants." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.set_resampling_algorithm:11 msgid "* 'bicubic' or 'cubic' * 'nearest' or 'none' * 'box' * 'bilinear' or 'linear' * 'hamming' * 'lanczos' or 'antialias'" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.set_resampling_algorithm:12 msgid "'bicubic' or 'cubic'" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.set_resampling_algorithm:13 msgid "'nearest' or 'none'" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.set_resampling_algorithm:14 msgid "'box'" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.set_resampling_algorithm:15 msgid "'bilinear' or 'linear'" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.AbstractImageMobject.set_resampling_algorithm:16 msgid "'hamming'" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.image_mobject.ImageMobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobject.rst:2 msgid "ImageMobject" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobject.rst:4 msgid "Qualified name: ``manim.mobject.types.image\\_mobject.ImageMobject``" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject:1 msgid "Bases: :py:class:`manim.mobject.types.image_mobject.AbstractImageMobject`" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject:1 msgid "Displays an Image from a numpy array or a file." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject:0 #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.fade:0 #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.interpolate_color:0 #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.set_opacity:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject:3 msgid "At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best. This is a custom parameter of ImageMobject so that rendering a scene with e.g. the ``--quality low`` or ``--quality medium`` flag for faster rendering won't effect the position of the image on the screen." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject:11 msgid "Example" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject:22 msgid "Changing interpolation style:" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobject.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobject.rst:25::1 #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.fade:1 msgid "Sets the image's opacity using a 1 - alpha relationship." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobject.rst:25::1 #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.get_pixel_array:1 msgid "A simple getter method." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobject.rst:25::1 #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.interpolate_color:1 msgid "Interpolates an array of pixel color values into another array of equal size." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobject.rst:25::1 msgid "Condition is function which takes in one arguments, (x, y, z)." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobject.rst:25::1 #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.set_opacity:1 msgid "Sets the image's opacity." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobject.rst:27 msgid "Attributes" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.fade:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.fade:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.fade:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.fade:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.fade:3 msgid "The alpha value of the object, 1 being transparent and 0 being opaque." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.fade:6 msgid "Whether the submobjects of the ImageMobject should be affected." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.interpolate_color:4 msgid "The ImageMobject to transform from." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.interpolate_color:6 msgid "The ImageMobject to transform into." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.interpolate_color:8 msgid "Used to track the lerp relationship. Not opacity related." msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobject.set_color:1 msgid "Condition is function which takes in one arguments, (x, y, z). Here it just recurses to submobjects, but in subclasses this should be further implemented based on the the inner workings of color" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.image_mobject.ImageMobjectFromCamera.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobjectFromCamera.rst:2 msgid "ImageMobjectFromCamera" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobjectFromCamera.rst:4 msgid "Qualified name: ``manim.mobject.types.image\\_mobject.ImageMobjectFromCamera``" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject.ImageMobjectFromCamera:1 msgid "Bases: :py:class:`manim.mobject.types.image_mobject.AbstractImageMobject`" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobjectFromCamera.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobjectFromCamera.rst:24 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobjectFromCamera.rst:31::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobjectFromCamera.rst:31::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.ImageMobjectFromCamera.rst:31::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.image_mobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.image_mobject.rst:2 msgid "image\\_mobject" msgstr "" #: ../../../manim/mobject/types/image_mobject.py:docstring of manim.mobject.types.image_mobject:1 msgid "Mobjects representing raster images." msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.rst:24::1 msgid "Automatically filters out black pixels" msgstr "" #: ../../source/reference/manim.mobject.types.image_mobject.rst:24::1 msgid "Displays an Image from a numpy array or a file." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.point_cloud_mobject.Mobject1D.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject1D.rst:2 msgid "Mobject1D" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject1D.rst:4 msgid "Qualified name: ``manim.mobject.types.point\\_cloud\\_mobject.Mobject1D``" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.Mobject1D:1 msgid "Bases: :py:class:`manim.mobject.types.point_cloud_mobject.PMobject`" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject1D.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject1D.rst:22 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject1D.rst:29::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject1D.rst:29::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject1D.rst:29::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.point_cloud_mobject.Mobject2D.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject2D.rst:2 msgid "Mobject2D" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject2D.rst:4 msgid "Qualified name: ``manim.mobject.types.point\\_cloud\\_mobject.Mobject2D``" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.Mobject2D:1 msgid "Bases: :py:class:`manim.mobject.types.point_cloud_mobject.PMobject`" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject2D.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject2D.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject2D.rst:28::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject2D.rst:28::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Mobject2D.rst:28::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.point_cloud_mobject.PGroup.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PGroup.rst:2 msgid "PGroup" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PGroup.rst:4 msgid "Qualified name: ``manim.mobject.types.point\\_cloud\\_mobject.PGroup``" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PGroup:1 msgid "Bases: :py:class:`manim.mobject.types.point_cloud_mobject.PMobject`" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PGroup:2 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PGroup.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PGroup.rst:22 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PGroup.rst:29::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PGroup.rst:29::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PGroup.rst:29::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.point_cloud_mobject.PMobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:2 msgid "PMobject" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:4 msgid "Qualified name: ``manim.mobject.types.point\\_cloud\\_mobject.PMobject``" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject:1 msgid "Bases: :py:class:`manim.mobject.mobject.Mobject`" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject:1 msgid "A disc made of a cloud of Dots" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:40::1 #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.add_points:1 msgid "Add points." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:40::1 #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.get_color:1 msgid "Returns the color of the :class:`~.Mobject`" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:40::1 msgid "The simplest :class:`~.Mobject` to be transformed to or from self." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:40::1 #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.reset_points:1 msgid "Sets :attr:`points` to be an empty array." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:40::1 msgid "Condition is function which takes in one arguments, (x, y, z)." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:40::1 #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.sort_points:1 msgid "Function is any map from R^3 to R" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:40::1 #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.thin_out:1 msgid "Removes all but every nth point for n = factor" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PMobject.rst:42 msgid "Attributes" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.add_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.add_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.add_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.add_points:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.add_points:3 msgid "Points must be a Nx3 numpy array. Rgbas must be a Nx4 numpy array if it is not None." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PMobject.get_point_mobject:1 msgid "The simplest :class:`~.Mobject` to be transformed to or from self. Should by a point of the appropriate type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.point_cloud_mobject.Point.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Point.rst:2 msgid "Point" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Point.rst:4 msgid "Qualified name: ``manim.mobject.types.point\\_cloud\\_mobject.Point``" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.Point:1 msgid "Bases: :py:class:`manim.mobject.types.point_cloud_mobject.PMobject`" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.Point:2 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Point.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Point.rst:21::1 #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.Point.generate_points:1 msgid "Initializes :attr:`points` and therefore the shape." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.Point.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.Point.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.Point.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.Point.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.Point.generate_points:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.point_cloud_mobject.PointCloudDot.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PointCloudDot.rst:2 msgid "PointCloudDot" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PointCloudDot.rst:4 msgid "Qualified name: ``manim.mobject.types.point\\_cloud\\_mobject.PointCloudDot``" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PointCloudDot:1 msgid "Bases: :py:class:`manim.mobject.types.point_cloud_mobject.Mobject1D`" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PointCloudDot:1 msgid "A disc made of a cloud of Dots .. rubric:: Examples" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PointCloudDot.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PointCloudDot.rst:21::1 #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PointCloudDot.generate_points:1 msgid "Initializes :attr:`points` and therefore the shape." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.PointCloudDot.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PointCloudDot.generate_points:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PointCloudDot.generate_points:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PointCloudDot.generate_points:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject.PointCloudDot.generate_points:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.point_cloud_mobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.rst:2 msgid "point\\_cloud\\_mobject" msgstr "" #: ../../../manim/mobject/types/point_cloud_mobject.py:docstring of manim.mobject.types.point_cloud_mobject:1 msgid "Mobjects representing point clouds." msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.rst:30::0 #: ../../source/reference/manim.mobject.types.point_cloud_mobject.rst:30::0 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.types.point_cloud_mobject.rst:30::1 msgid "A disc made of a cloud of Dots" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.rst:2 msgid "types" msgstr "" #: ../../../manim/mobject/types/__init__.py:docstring of manim.mobject.types:1 msgid "Specialized mobject base classes." msgstr "" #: ../../../manim/mobject/types/__init__.py:docstring of manim.mobject.types:4 msgid "Modules" msgstr "" #: ../../../manim/mobject/types/__init__.py:docstring of manim.mobject.types:12::1 msgid "Mobjects representing raster images." msgstr "" #: ../../../manim/mobject/types/__init__.py:docstring of manim.mobject.types:12::1 msgid "Mobjects representing point clouds." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects.rst:2 msgid "CurvesAsSubmobjects" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects.rst:4 msgid "Qualified name: ``manim.mobject.types.vectorized\\_mobject.CurvesAsSubmobjects``" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects:1 msgid "Convert a curve's elements to submobjects." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects:4 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.CurvesAsSubmobjects.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.vectorized_mobject.DashedVMobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.vectorized_mobject.DashedVMobject.rst:2 msgid "DashedVMobject" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.DashedVMobject.rst:4 msgid "Qualified name: ``manim.mobject.types.vectorized\\_mobject.DashedVMobject``" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.DashedVMobject:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.DashedVMobject:1 msgid "A :class:`VMobject` composed of dashes instead of lines." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.DashedVMobject:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.DashedVMobject:3 msgid "The object that will get dashed" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.DashedVMobject:4 msgid "Number of dashes to add." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.DashedVMobject:5 msgid "Ratio of dash to empty space." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.DashedVMobject:6 msgid "Shifts the starting point of dashes along the path. Value 1 shifts by one full dash length." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.DashedVMobject:8 msgid "If ``True``, dashes will be (approximately) equally long. If ``False``, dashes will be split evenly in the curve's input t variable (legacy behavior)." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.DashedVMobject:13 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.DashedVMobject.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.DashedVMobject.rst:21 msgid "Attributes" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.DashedVMobject.rst:32::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.DashedVMobject.rst:32::1 msgid "The depth of the mobject." msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.DashedVMobject.rst:32::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.DashedVMobject.rst:32::1 msgid "The height of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.vectorized_mobject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.vectorized_mobject.rst:2 msgid "vectorized\\_mobject" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject:1 msgid "Mobjects that use vector graphics." msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.rst:30::1 msgid "Convert a curve's elements to submobjects." msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.rst:30::1 msgid "A :class:`VMobject` composed of dashes instead of lines." msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.rst:30::1 msgid "A VGroup-like class, also offering submobject access by key, like a python dict" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.rst:30::1 msgid "A group of vectorized mobjects." msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.rst:30::1 msgid "A vectorized mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.vectorized_mobject.VDict.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VDict.rst:2 msgid "VDict" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VDict.rst:4 msgid "Qualified name: ``manim.mobject.types.vectorized\\_mobject.VDict``" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:1 msgid "A VGroup-like class, also offering submobject access by key, like a python dict" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:0 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:0 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add_key_value_pair:0 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.remove:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:4 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:6 msgid "The parameter specifying the key-value mapping of keys and mobjects." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:6 msgid "Whether to also display the key associated with the mobject. This might be useful when debugging, especially when there are a lot of mobjects in the :class:`VDict`. Defaults to False." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:11 msgid "Other arguments to be passed to `Mobject`." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:16 msgid "Whether to also display the key associated with the mobject. This might be useful when debugging, especially when there are a lot of mobjects in the :class:`VDict`. When displayed, the key is towards the left of the mobject. Defaults to False." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:0 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:0 msgid "type" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:27 msgid "Is the actual python dictionary that is used to bind the keys to the mobjects." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict:33 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:13 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add_key_value_pair:14 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.get_all_submobjects:7 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.remove:13 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VDict.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VDict.rst:23::1 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:1 msgid "Adds the key-value pairs to the :class:`VDict` object." msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VDict.rst:23::1 msgid "A utility function used by :meth:`add` to add the key-value pair to :attr:`submob_dict`." msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VDict.rst:23::1 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.get_all_submobjects:1 msgid "To get all the submobjects associated with a particular :class:`VDict` object" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VDict.rst:23::1 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.remove:1 msgid "Removes the mobject from the :class:`VDict` object having the key `key`" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VDict.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:3 msgid "Also, it internally adds the value to the `submobjects` :class:`list` of :class:`~.Mobject`, which is responsible for actual on-screen display." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:0 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.get_all_submobjects:0 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.remove:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:9 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.remove:9 msgid "Returns the :class:`VDict` object on which this method was called." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:0 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add_key_value_pair:0 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.get_all_submobjects:0 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.remove:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add:14 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add_key_value_pair:15 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.get_all_submobjects:8 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.remove:14 msgid "Normal usage::" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add_key_value_pair:1 msgid "A utility function used by :meth:`add` to add the key-value pair to :attr:`submob_dict`. Not really meant to be used externally." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add_key_value_pair:4 msgid "The key of the submobject to be added." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add_key_value_pair:6 msgid "The mobject associated with the key" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add_key_value_pair:0 msgid "Raises" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.add_key_value_pair:11 msgid "If the value is not an instance of VMobject" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.get_all_submobjects:3 msgid "All the submobjects associated with the :class:`VDict` object" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VDict.remove:3 msgid "Also, it internally removes the mobject from the `submobjects` :class:`list` of :class:`~.Mobject`, (which is responsible for removing it from the screen)" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.vectorized_mobject.VectorizedPoint.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VectorizedPoint.rst:2 msgid "VectorizedPoint" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VectorizedPoint.rst:4 msgid "Qualified name: ``manim.mobject.types.vectorized\\_mobject.VectorizedPoint``" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VectorizedPoint:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VectorizedPoint.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VectorizedPoint.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VMobject:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VMobject:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VMobject:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VMobject:1::1 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VectorizedPoint.height:1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VMobject:1::1 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VectorizedPoint.width:1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VectorizedPoint.height:0 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VectorizedPoint.width:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VectorizedPoint.height:6 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VectorizedPoint.width:6 msgid "Examples" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.types.vectorized_mobject.VGroup.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VGroup.rst:2 msgid "VGroup" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VGroup.rst:4 msgid "Qualified name: ``manim.mobject.types.vectorized\\_mobject.VGroup``" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VMobject`" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup:1 msgid "A group of vectorized mobjects." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup:3 msgid "This can be used to group multiple :class:`~.VMobject` instances together in order to scale, move, ... them together." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup:7 msgid "Notes" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup:8 msgid "When adding the same mobject more than once, repetitions are ignored. Use :meth:`.Mobject.copy` to create a separate copy which can then be added to the group." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup:13 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:11 msgid "Examples" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup:14 msgid "To add :class:`~.VMobject`s to a :class:`~.VGroup`, you can either use the :meth:`~.VGroup.add` method, or use the `+` and `+=` operators. Similarly, you can subtract elements of a VGroup via :meth:`~.VGroup.remove` method, or `-` and `-=` operators:" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VGroup.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VGroup.rst:20::1 #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:1 msgid "Checks if all passed elements are an instance of VMobject and then add them to submobjects" msgstr "" #: ../../source/reference/manim.mobject.types.vectorized_mobject.VGroup.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:3 msgid "List of VMobject to add" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/types/vectorized_mobject.py:docstring of manim.mobject.types.vectorized_mobject.VGroup.add:0 msgid "Raises" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.value_tracker.ComplexValueTracker.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.value_tracker.ComplexValueTracker.rst:2 msgid "ComplexValueTracker" msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ComplexValueTracker.rst:4 msgid "Qualified name: ``manim.mobject.value\\_tracker.ComplexValueTracker``" msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ComplexValueTracker:1 msgid "Bases: :py:class:`manim.mobject.value_tracker.ValueTracker`" msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ComplexValueTracker:1 msgid "Tracks a complex-valued parameter." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ComplexValueTracker:3 msgid "When the value is set through :attr:`animate`, the value will take a straight path from the source point to the destination point." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ComplexValueTracker:7 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ComplexValueTracker.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ComplexValueTracker.rst:21::1 #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ComplexValueTracker.get_value:1 msgid "Get the current value of this value tracker as a complex number." msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ComplexValueTracker.rst:21::1 #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ComplexValueTracker.set_value:1 msgid "Sets a new complex value to the ComplexValueTracker" msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ComplexValueTracker.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ComplexValueTracker.get_value:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ComplexValueTracker.get_value:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ComplexValueTracker.get_value:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ComplexValueTracker.get_value:1::1 msgid "The width of the mobject." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.value_tracker.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.value_tracker.rst:2 msgid "value\\_tracker" msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker:1 msgid "Simple mobjects that can be used for storing (and updating) a value." msgstr "" #: ../../source/reference/manim.mobject.value_tracker.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.value_tracker.rst:22::1 msgid "Tracks a complex-valued parameter." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.value_tracker.ValueTracker.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.value_tracker.ValueTracker.rst:2 msgid "ValueTracker" msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ValueTracker.rst:4 msgid "Qualified name: ``manim.mobject.value\\_tracker.ValueTracker``" msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker:1 msgid "Bases: :py:class:`manim.mobject.mobject.Mobject`" msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker:1 msgid "A mobject that can be used for tracking (real-valued) parameters. Useful for animating parameter changes." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker:4 msgid "Not meant to be displayed. Instead the position encodes some number, often one which another animation or continual_animation uses for its update function, and by treating it as a mobject it can still be animated and manipulated just like anything else." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker:9 msgid "This value changes continuously when animated using the :attr:`animate` syntax." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker:12 msgid "Examples" msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker:41 msgid "You can also link ValueTrackers to updaters. In this case, you have to make sure that the ValueTracker is added to the scene by ``add``" msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ValueTracker.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ValueTracker.rst:23::1 #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker.get_value:1 msgid "Get the current value of this ValueTracker." msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ValueTracker.rst:23::1 #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker.increment_value:1 msgid "Increments (adds) a scalar value to the ValueTracker" msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ValueTracker.rst:23::1 #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker.interpolate:1 msgid "Turns self into an interpolation between mobject1 and mobject2." msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ValueTracker.rst:23::1 #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker.set_value:1 msgid "Sets a new scalar value to the ValueTracker" msgstr "" #: ../../source/reference/manim.mobject.value_tracker.ValueTracker.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker.get_value:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker.get_value:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker.get_value:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker.get_value:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/value_tracker.py:docstring of manim.mobject.value_tracker.ValueTracker.get_value:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.vector_field.ArrowVectorField.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.vector_field.ArrowVectorField.rst:2 msgid "ArrowVectorField" msgstr "" #: ../../source/reference/manim.mobject.vector_field.ArrowVectorField.rst:4 msgid "Qualified name: ``manim.mobject.vector\\_field.ArrowVectorField``" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:1 msgid "Bases: :py:class:`manim.mobject.vector_field.VectorField`" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:1 msgid "A :class:`VectorField` represented by a set of change vectors." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:3 msgid "Vector fields are always based on a function defining the :class:`~.Vector` at every position. The values of this functions is displayed as a grid of vectors. By default the color of each vector is determined by it's magnitude. Other color schemes can be used however." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField.get_vector:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:8 msgid "The function defining the rate of change at every position of the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:9 msgid "The color of the vector field. If set, position-specific coloring is disabled." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:10 msgid "A function mapping a vector to a single value. This value gives the position in the color gradient defined using `min_color_scheme_value`, `max_color_scheme_value` and `colors`." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:11 msgid "The value of the color_scheme function to be mapped to the first color in `colors`. Lower values also result in the first color of the gradient." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:12 msgid "The value of the color_scheme function to be mapped to the last color in `colors`. Higher values also result in the last color of the gradient." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:13 msgid "The colors defining the color gradient of the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:14 msgid "A sequence of x_min, x_max, delta_x" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:15 msgid "A sequence of y_min, y_max, delta_y" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:16 msgid "A sequence of z_min, z_max, delta_z" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:17 msgid "Enables three_dimensions. Default set to False, automatically turns True if z_range is not None." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:19 msgid "The function determining the displayed size of the vectors. The actual size of the vector is passed, the returned value will be used as display size for the vector. By default this is used to cap the displayed size of vectors to reduce the clutter." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:22 msgid "The opacity of the arrows." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:23 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField.get_vector:8 msgid "Additional arguments to be passed to the :class:`~.Vector` constructor" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:24 msgid "Additional arguments to be passed to the :class:`~.VGroup` constructor" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField:28 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.vector_field.ArrowVectorField.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.vector_field.ArrowVectorField.rst:20::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField.get_vector:1 msgid "Creates a vector in the vector field." msgstr "" #: ../../source/reference/manim.mobject.vector_field.ArrowVectorField.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField.get_vector:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField.get_vector:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField.get_vector:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField.get_vector:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField.get_vector:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.ArrowVectorField.get_vector:3 msgid "The created vector is based on the function of the vector field and is rooted in the given point. Color and length fit the specifications of this vector field." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.vector_field.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.vector_field.rst:2 msgid "vector\\_field" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field:1 msgid "Mobjects representing vector fields." msgstr "" #: ../../source/reference/manim.mobject.vector_field.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.mobject.vector_field.rst:24::1 msgid "A :class:`VectorField` represented by a set of change vectors." msgstr "" #: ../../source/reference/manim.mobject.vector_field.rst:24::1 msgid "StreamLines represent the flow of a :class:`VectorField` using the trace of moving agents." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.vector_field.StreamLines.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.vector_field.StreamLines.rst:2 msgid "StreamLines" msgstr "" #: ../../source/reference/manim.mobject.vector_field.StreamLines.rst:4 msgid "Qualified name: ``manim.mobject.vector\\_field.StreamLines``" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:1 msgid "Bases: :py:class:`manim.mobject.vector_field.VectorField`" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:1 msgid "StreamLines represent the flow of a :class:`VectorField` using the trace of moving agents." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:3 msgid "Vector fields are always based on a function defining the vector at every position. The values of this functions is displayed by moving many agents along the vector field and showing their trace." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.start_animation:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:7 msgid "The function defining the rate of change at every position of the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:8 msgid "The color of the vector field. If set, position-specific coloring is disabled." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:9 msgid "A function mapping a vector to a single value. This value gives the position in the color gradient defined using `min_color_scheme_value`, `max_color_scheme_value` and `colors`." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:10 msgid "The value of the color_scheme function to be mapped to the first color in `colors`. Lower values also result in the first color of the gradient." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:11 msgid "The value of the color_scheme function to be mapped to the last color in `colors`. Higher values also result in the last color of the gradient." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:12 msgid "The colors defining the color gradient of the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:13 msgid "A sequence of x_min, x_max, delta_x" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:14 msgid "A sequence of y_min, y_max, delta_y" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:15 msgid "A sequence of z_min, z_max, delta_z" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:16 msgid "Enables three_dimensions. Default set to False, automatically turns True if z_range is not None." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:18 msgid "The amount by which the starting position of each agent is altered along each axis. Defaults to :code:`delta_y / 2` if not defined." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:19 msgid "The number of agents generated at each starting point." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:20 msgid "The factor by which the distance an agent moves per step is stretched. Lower values result in a better approximation of the trajectories in the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:21 msgid "The time the agents get to move in the vector field. Higher values therefore result in longer stream lines. However, this whole time gets simulated upon creation." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:22 msgid "The maximum number of anchors per line. Lines with more anchors get reduced in complexity, not in length." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:23 msgid "The distance agents can move out of the generation area before being terminated." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:24 msgid "The stroke with of the stream lines." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:25 msgid "The opacity of the stream lines." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines:28 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:14 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.end_animation:11 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.start_animation:13 msgid "Examples" msgstr "" #: ../../source/reference/manim.mobject.vector_field.StreamLines.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.vector_field.StreamLines.rst:22::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:10 msgid "The creation animation of the stream lines." msgstr "" #: ../../source/reference/manim.mobject.vector_field.StreamLines.rst:22::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.end_animation:1 msgid "End the stream line animation smoothly." msgstr "" #: ../../source/reference/manim.mobject.vector_field.StreamLines.rst:22::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.start_animation:1 msgid "Animates the stream lines using an updater." msgstr "" #: ../../source/reference/manim.mobject.vector_field.StreamLines.rst:24 msgid "Attributes" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:3 msgid "The stream lines appear in random order." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:5 msgid "The lag ratio of the animation. If undefined, it will be selected so that the total animation length is 1.5 times the run time of each stream line creation." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:7 msgid "The run time of every single stream line creation. The runtime of the whole animation might be longer due to the `lag_ratio`. If undefined, the virtual time of the stream lines is used as run time." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.end_animation:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.create:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.end_animation:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.start_animation:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.end_animation:3 msgid "Returns an animation resulting in fully displayed stream lines without a noticeable cut." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.end_animation:5 msgid "The animation fading out the running stream animation." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.end_animation:0 msgid "Raises" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.end_animation:8 msgid "if no stream line animation is running" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.start_animation:3 msgid "The stream lines will continuously flow" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.start_animation:5 msgid "If `True` the animation is initialized line by line. Otherwise it starts with all lines shown." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.start_animation:7 msgid "At `flow_speed=1` the distance the flow moves per second is equal to the magnitude of the vector field along its path. The speed value scales the speed of this flow." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.start_animation:8 msgid "The proportion of the stream line shown while being animated" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.StreamLines.start_animation:9 msgid "The rate function of each stream line flashing" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.mobject.vector_field.VectorField.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:2 msgid "VectorField" msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:4 msgid "Qualified name: ``manim.mobject.vector\\_field.VectorField``" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:1 msgid "Bases: :py:class:`manim.mobject.types.vectorized_mobject.VGroup`" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:1 msgid "A vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:3 msgid "Vector fields are based on a function defining a vector at every position. This class does by default not include any visible elements but provides methods to move other :class:`~.Mobject` s along the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.fit_to_coordinate_system:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_colored_background_image:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_nudge_updater:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_vectorized_rgba_gradient_function:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge_submobjects:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.shift_func:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.start_submobject_movement:0 msgid "Parameters" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:7 msgid "The function defining the rate of change at every position of the `VectorField`." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:8 msgid "The color of the vector field. If set, position-specific coloring is disabled." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:9 msgid "A function mapping a vector to a single value. This value gives the position in the color gradient defined using `min_color_scheme_value`, `max_color_scheme_value` and `colors`." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:10 msgid "The value of the color_scheme function to be mapped to the first color in `colors`. Lower values also result in the first color of the gradient." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:11 msgid "The value of the color_scheme function to be mapped to the last color in `colors`. Higher values also result in the last color of the gradient." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:12 msgid "The colors defining the color gradient of the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField:13 msgid "Additional arguments to be passed to the :class:`~.VGroup` constructor" msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:29::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.fit_to_coordinate_system:1 msgid "Scale the vector field to fit a coordinate system." msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:29::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_colored_background_image:1 msgid "Generate an image that displays the vector field." msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:29::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_nudge_updater:1 msgid "Get an update function to move a :class:`~.Mobject` along the vector field." msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:29::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_vectorized_rgba_gradient_function:1 msgid "Generates a gradient of rgbas as a numpy array" msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:29::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge:1 msgid "Nudge a :class:`~.Mobject` along the vector field." msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:29::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge_submobjects:1 msgid "Apply a nudge along the vector field to all submobjects." msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:29::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:1 msgid "Scale a vector field function." msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:29::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.shift_func:1 msgid "Shift a vector field function." msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:29::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.start_submobject_movement:1 msgid "Start continuously moving all submobjects along the vector field." msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:29::1 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.stop_submobject_movement:1 msgid "Stops the continuous movement started using :meth:`start_submobject_movement`." msgstr "" #: ../../source/reference/manim.mobject.vector_field.VectorField.rst:31 msgid "Attributes" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.fit_to_coordinate_system:1::1 msgid "Used to animate the application of any method of :code:`self`." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.fit_to_coordinate_system:1::1 msgid "The depth of the mobject." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.fit_to_coordinate_system:1::1 msgid "If there are multiple colors (for gradient) this returns the first one" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.fit_to_coordinate_system:1::1 msgid "The height of the mobject." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.fit_to_coordinate_system:1::1 msgid "The width of the mobject." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.fit_to_coordinate_system:3 msgid "This method is useful when the vector field is defined in a coordinate system different from the one used to display the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.fit_to_coordinate_system:6 msgid "This method can only be used once because it transforms the origin of each vector." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.fit_to_coordinate_system:8 msgid "The coordinate system to fit the vector field to." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_colored_background_image:3 msgid "The color at each position is calculated by passing the positing through a series of steps: Calculate the vector field function at that position, map that vector to a single value using `self.color_scheme` and finally generate a color from that value using the color gradient." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_colored_background_image:9 msgid "The stepsize at which pixels get included in the image. Lower values give more accurate results, but may take a long time to compute." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_colored_background_image:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_nudge_updater:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge_submobjects:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.shift_func:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.start_submobject_movement:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.stop_submobject_movement:0 msgid "Returns" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_colored_background_image:12 msgid "The vector field image." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_colored_background_image:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_nudge_updater:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_vectorized_rgba_gradient_function:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge_submobjects:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.shift_func:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.start_submobject_movement:0 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.stop_submobject_movement:0 msgid "Return type" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_nudge_updater:3 msgid "When used with :meth:`~.Mobject.add_updater`, the mobject will move along the vector field, where its speed is determined by the magnitude of the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_nudge_updater:5 msgid "At `speed=1` the distance a mobject moves per second is equal to the magnitude of the vector field along its path. The speed value scales the speed of such a mobject." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_nudge_updater:6 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge_submobjects:7 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.start_submobject_movement:6 msgid "Whether to move the mobject along the vector field. See :meth:`nudge` for details." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_nudge_updater:8 msgid "The update function." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_vectorized_rgba_gradient_function:3 msgid "start value used for inverse interpolation at :func:`~.inverse_interpolate`" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_vectorized_rgba_gradient_function:4 msgid "end value used for inverse interpolation at :func:`~.inverse_interpolate`" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.get_vectorized_rgba_gradient_function:5 msgid "list of colors to generate the gradient" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge:3 msgid "The mobject to move along the vector field" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge:4 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge_submobjects:3 msgid "A scalar to the amount the mobject is moved along the vector field. The actual distance is based on the magnitude of the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge:6 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge_submobjects:5 msgid "The amount of steps the whole nudge is divided into. Higher values give more accurate approximations." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge:8 msgid "Whether to move the mobject along the vector field. If `False` the vector field takes effect on the center of the given :class:`~.Mobject`. If `True` the vector field takes effect on the points of the individual points of the :class:`~.Mobject`, potentially distorting it." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge:14 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge_submobjects:9 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.start_submobject_movement:8 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.stop_submobject_movement:3 msgid "This vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.nudge:18 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:7 msgid "Examples" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:3 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.shift_func:3 msgid "The function defining a vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:4 msgid "The scalar to be applied to the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:21 msgid "The scaled vector field function." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.scale_func:22 #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.shift_func:7 msgid "`Callable[[np.ndarray], np.ndarray]`" msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.shift_func:4 msgid "The shift to be applied to the vector field." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.shift_func:6 msgid "The shifted vector field function." msgstr "" #: ../../../manim/mobject/vector_field.py:docstring of manim.mobject.vector_field.VectorField.start_submobject_movement:3 msgid "Calling this method multiple times will result in removing the previous updater created by this method." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.moving_camera_scene.MovingCameraScene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.moving_camera_scene.MovingCameraScene.rst:2 msgid "MovingCameraScene" msgstr "" #: ../../source/reference/manim.scene.moving_camera_scene.MovingCameraScene.rst:4 msgid "Qualified name: ``manim.scene.moving\\_camera\\_scene.MovingCameraScene``" msgstr "" #: ../../../manim/scene/moving_camera_scene.py:docstring of manim.scene.moving_camera_scene.MovingCameraScene:1 msgid "Bases: :py:class:`manim.scene.scene.Scene`" msgstr "" #: ../../../manim/scene/moving_camera_scene.py:docstring of manim.scene.moving_camera_scene.MovingCameraScene:1 msgid "This is a Scene, with special configurations and properties that make it suitable for cases where the camera must be moved around." msgstr "" #: ../../source/reference/manim.scene.moving_camera_scene.MovingCameraScene.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.scene.moving_camera_scene.MovingCameraScene.rst:20::1 #: ../../../manim/scene/moving_camera_scene.py:docstring of manim.scene.moving_camera_scene.MovingCameraScene.get_moving_mobjects:1 msgid "This method returns a list of all of the Mobjects in the Scene that are moving, that are also in the animations passed." msgstr "" #: ../../source/reference/manim.scene.moving_camera_scene.MovingCameraScene.rst:22 msgid "Attributes" msgstr "" #: ../../../manim/scene/moving_camera_scene.py:docstring of manim.scene.moving_camera_scene.MovingCameraScene.get_moving_mobjects:0 msgid "Parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.moving_camera_scene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.moving_camera_scene.rst:2 msgid "moving\\_camera\\_scene" msgstr "" #: ../../../manim/scene/moving_camera_scene.py:docstring of manim.scene.moving_camera_scene:1 msgid "A scene whose camera can be moved around." msgstr "" #: ../../../manim/scene/moving_camera_scene.py:docstring of manim.scene.moving_camera_scene:9 msgid "Examples" msgstr "" #: ../../source/reference/manim.scene.moving_camera_scene.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.reconfigurable_scene.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.scene.reconfigurable_scene.ReconfigurableScene.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.scene.sample_space_scene.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.scene.sample_space_scene.SampleSpaceScene.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.scene.scene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.scene.rst:2 msgid "scene" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene:1 msgid "Basic canvas for animations." msgstr "" #: ../../source/reference/manim.scene.scene.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.scene.scene.rst:22::1 msgid "A class to handle rerunning a Scene after the input file is modified." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.scene.RerunSceneHandler.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.scene.RerunSceneHandler.rst:2 msgid "RerunSceneHandler" msgstr "" #: ../../source/reference/manim.scene.scene.RerunSceneHandler.rst:4 msgid "Qualified name: ``manim.scene.scene.RerunSceneHandler``" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.RerunSceneHandler:1 msgid "Bases: :py:class:`watchdog.events.FileSystemEventHandler`" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.RerunSceneHandler:1 msgid "A class to handle rerunning a Scene after the input file is modified." msgstr "" #: ../../source/reference/manim.scene.scene.RerunSceneHandler.rst:14 msgid "Methods" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.RerunSceneHandler.on_modified:1::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.RerunSceneHandler.on_modified:1 msgid "Called when a file or directory is modified." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.RerunSceneHandler.on_modified:0 msgid "Parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.scene.Scene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.scene.Scene.rst:2 msgid "Scene" msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:4 msgid "Qualified name: ``manim.scene.scene.Scene``" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene:1 msgid "Bases: :py:class:`object`" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene:1 msgid "A Scene is the canvas of your animation." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene:3 msgid "The primary role of :class:`Scene` is to provide the user with tools to manage mobjects and animations. Generally speaking, a manim script consists of a class that derives from :class:`Scene` whose :meth:`Scene.construct` method is overridden by the user's code." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene:8 msgid "Mobjects are displayed on screen by calling :meth:`Scene.add` and removed from screen by calling :meth:`Scene.remove`. All mobjects currently on screen are kept in :attr:`Scene.mobjects`. Animations are played by calling :meth:`Scene.play`." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene:12 msgid "A :class:`Scene` is rendered internally by calling :meth:`Scene.render`. This in turn calls :meth:`Scene.setup`, :meth:`Scene.construct`, and :meth:`Scene.tear_down`, in that order." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene:16 msgid "It is not recommended to override the ``__init__`` method in user Scenes. For code that should be ran before a Scene is rendered, use :meth:`Scene.setup` instead." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene:20 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_sound:12 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_subcaption:12 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.construct:14 msgid "Examples" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene:21 msgid "Override the :meth:`Scene.construct` method with your code." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add:1 msgid "Mobjects will be displayed, from background to foreground in the order with which they are added." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobject:1 msgid "Adds a single mobject to the foreground, and internally to the list foreground_mobjects, and mobjects." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobjects:1 msgid "Adds mobjects to the foreground, and internally to the list foreground_mobjects, and mobjects." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_sound:1 msgid "This method is used to add a sound to the animation." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_subcaption:1 msgid "Adds an entry in the corresponding subcaption file at the current time stamp." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_updater:1 msgid "Add an update function to the scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.begin_animations:1 msgid "Start the animations of the scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_back:1 msgid "Removes the mobject from the scene and adds them to the back of the scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_front:1 msgid "Adds the passed mobjects to the scene again, pushing them to he front of the scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.clear:1 msgid "Removes all mobjects present in self.mobjects and self.foreground_mobjects from the scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animation_data:1 msgid "Given a list of animations, compile the corresponding static and moving mobjects, and gather the animation durations." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animations:1 msgid "Creates _MethodAnimations from any _AnimationBuilders and updates animation kwargs with kwargs passed to play()." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.construct:1 msgid "Add content to the Scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_attrs:1 msgid "Gets attributes of a scene given the attribute's identifier/name." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 msgid "Returns list of family-members of all mobjects in scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_moving_mobjects:1 msgid "Gets all moving mobjects in the passed animation(s)." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_restructured_mobject_list:1 msgid "Given a list of mobjects and a list of mobjects to be removed, this filters out the removable mobjects from the list of mobjects." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_run_time:1 msgid "Gets the total run time for a list of animations." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 msgid "You will hardly use this when making your own animations." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_top_level_mobjects:1 msgid "Returns all mobjects which are not submobjects." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.interactive_embed:1 msgid "Like embed(), but allows for screen interaction." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.is_current_animation_frozen_frame:1 msgid "Returns whether the current animation produces a static frame (generally a Wait)." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 msgid "Create separation here; the last section gets finished and a new one gets created." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.pause:1 msgid "Pauses the scene (i.e., displays a frozen frame)." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play:1 msgid "Plays an animation in this scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play_internal:1 msgid "This method is used to prep the animations for rendering, apply the arguments and parameters required to them, render them, and write them to the video file." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove:1 msgid "Removes mobjects in the passed list of mobjects from the scene and the foreground, by removing them from \"mobjects\" and \"foreground_mobjects\"" msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobject:1 msgid "Removes a single mobject from the foreground, and internally from the list foreground_mobjects." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobjects:1 msgid "Removes mobjects from the foreground, and internally from the list foreground_mobjects." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_updater:1 msgid "Remove an update function from the scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.render:1 msgid "Renders this Scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.restructure_mobjects:4 msgid "tl:wr" msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.setup:1 msgid "This is meant to be implemented by any scenes which are commonly subclassed, and have some common setup involved before the construct method is called." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.should_update_mobjects:1 msgid "Returns True if the mobjects of this scene should be updated." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.tear_down:1 msgid "This is meant to be implemented by any scenes which are commonly subclassed, and have some common method to be invoked before the scene ends." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.update_mobjects:1 msgid "Begins updating all mobjects in the Scene." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.update_self:1 msgid "Run all scene updater functions." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.wait:1 msgid "Plays a \"no operation\" animation." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:74::1 msgid "Like a wrapper for wait()." msgstr "" #: ../../source/reference/manim.scene.scene.Scene.rst:76 msgid "Attributes" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobject:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_sound:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_subcaption:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_updater:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_back:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_front:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animation_data:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animations:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_attrs:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_moving_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_restructured_mobject_list:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_run_time:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_time_progression:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.next_section:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.pause:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play_internal:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobject:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_updater:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.render:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.restructure_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.update_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.update_self:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.wait:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.wait_until:0 msgid "Parameters" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add:4 msgid "Mobjects to add." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobject:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_back:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_front:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.clear:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animation_data:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animations:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_attrs:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_mobject_family_members:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_moving_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_restructured_mobject_list:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_run_time:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_time_progression:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_top_level_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobject:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.restructure_mobjects:0 msgid "Returns" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add:7 msgid "The same scene after adding the Mobjects in." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobject:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_subcaption:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_updater:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.begin_animations:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_back:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_front:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.clear:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animation_data:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animations:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_attrs:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_mobject_family_members:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_moving_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_restructured_mobject_list:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_run_time:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_time_progression:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_top_level_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.is_current_animation_frozen_frame:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.next_section:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobject:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_updater:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.restructure_mobjects:0 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.should_update_mobjects:0 msgid "Return type" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobject:4 msgid "The Mobject to add to the foreground." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobject:7 msgid "The Scene, with the foreground mobject added." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobjects:4 msgid "The Mobjects to add to the foreground." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_foreground_mobjects:7 msgid "The Scene, with the foreground mobjects added." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_sound:3 msgid "The path to the sound file." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_sound:5 msgid "The offset in the sound file after which the sound can be played." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_sound:8 msgid "Amplification of the sound." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_sound:29 msgid "Download the resource for the previous example `here `_ ." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_subcaption:4 msgid "The current time stamp is obtained from ``Scene.renderer.time``." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_subcaption:6 msgid "The subcaption content." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_subcaption:7 msgid "The duration (in seconds) for which the subcaption is shown." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_subcaption:8 msgid "This offset (in seconds) is added to the starting time stamp of the subcaption." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_subcaption:13 msgid "This example illustrates both possibilities for adding subcaptions to Manimations::" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_updater:3 msgid "The scene updater functions are run every frame, and they are the last type of updaters to run." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_updater:8 msgid "When using the Cairo renderer, scene updaters that modify mobjects are not detected in the same way that mobject updaters are. To be more concrete, a mobject only modified via a scene updater will not necessarily be added to the list of *moving mobjects* and thus might not be updated every frame." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_updater:15 msgid "TL;DR: Use mobject updaters to update mobjects." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.add_updater:17 msgid "The updater function. It takes a float, which is the time difference since the last update (usually equal to the frame rate)." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_back:4 msgid "The mobject(s) to push to the back of the scene." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_back:7 msgid "The Scene, with the mobjects pushed to the back of the scene." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_front:4 msgid "The mobject(s) to bring to the front of the scene." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.bring_to_front:7 msgid "The Scene, with the mobjects brought to the front of the scene." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.clear:4 msgid "The Scene, with all of its mobjects in self.mobjects and self.foreground_mobjects removed." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animation_data:4 msgid "This also begins the animations." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animation_data:6 msgid "Whether the rendering should be skipped, by default False" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animation_data:9 msgid "None if there is nothing to play, or self otherwise." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animations:4 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animations:8 #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play:3 msgid "Animations to be played." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animations:6 msgid "Configuration for the call to play()." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.compile_animations:9 msgid "Tuple[:class:`Animation`]" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.construct:3 msgid "From within :meth:`Scene.construct`, display mobjects on screen by calling :meth:`Scene.add` and remove them from screen by calling :meth:`Scene.remove`. All mobjects currently on screen are kept in :attr:`Scene.mobjects`. Play animations by calling :meth:`Scene.play`." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.construct:9 msgid "Notes" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.construct:10 msgid "Initialization code should go in :meth:`Scene.setup`. Termination code should go in :meth:`Scene.tear_down`." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.construct:15 msgid "A typical manim script includes a class derived from :class:`Scene` with an overridden :meth:`Scene.contruct` method:" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_attrs:3 msgid "Name(s) of the argument(s) to return the attribute of." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_attrs:6 msgid "List of attributes of the passed identifiers." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_mobject_family_members:1 msgid "Returns list of family-members of all mobjects in scene. If a Circle() and a VGroup(Rectangle(),Triangle()) were added, it returns not only the Circle(), Rectangle() and Triangle(), but also the VGroup() object." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_mobject_family_members:6 msgid "List of mobject family members." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_moving_mobjects:3 msgid "The animations to check for moving mobjects." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_moving_mobjects:6 msgid "The list of mobjects that could be moving in the Animation(s)" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_restructured_mobject_list:4 msgid "The Mobjects to check." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_restructured_mobject_list:6 msgid "The list of mobjects to remove." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_restructured_mobject_list:9 msgid "The list of mobjects with the mobjects to remove removed." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_run_time:3 msgid "A list of the animations whose total ``run_time`` is to be calculated." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_run_time:7 msgid "The total ``run_time`` of all of the animations in the list." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_time_progression:1 msgid "You will hardly use this when making your own animations. This method is for Manim's internal use." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_time_progression:4 msgid "Returns a CommandLine ProgressBar whose ``fill_time`` is dependent on the ``run_time`` of an animation, the iterations to perform in that animation and a bool saying whether or not to consider the skipped animations." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_time_progression:10 msgid "The ``run_time`` of the animation." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_time_progression:12 msgid "The number of iterations in the animation." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_time_progression:14 msgid "Whether or not to show skipped animations in the progress bar." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_time_progression:17 msgid "The CommandLine Progress Bar." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.get_top_level_mobjects:3 msgid "List of top level mobjects." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.next_section:1 msgid "Create separation here; the last section gets finished and a new one gets created. ``skip_animations`` skips the rendering of all animations in this section. Refer to :doc:`the documentation` on how to use sections." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.pause:3 msgid "This is an alias for :meth:`.wait` with ``frozen_frame`` set to ``True``." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.pause:6 msgid "The duration of the pause." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play:4 msgid "The content of the external subcaption that should be added during the animation." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play:6 msgid "The duration for which the specified subcaption is added. If ``None`` (the default), the run time of the animation is taken." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play:9 msgid "An offset (in seconds) for the start time of the added subcaption." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play:11 msgid "All other keywords are passed to the renderer." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play_internal:5 msgid "Animation or mobject with mobject method and params" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.play_internal:6 msgid "named parameters affecting what was passed in ``args``, e.g. ``run_time``, ``lag_ratio`` and so on." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove:5 msgid "The mobjects to remove." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobject:4 msgid "The mobject to remove from the foreground." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobject:7 msgid "The Scene, with the foreground mobject removed." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobjects:4 msgid "The mobject(s) to remove from the foreground." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_foreground_mobjects:7 msgid "The Scene, with the foreground mobjects removed." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.remove_updater:3 msgid "The updater function to be removed." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.render:3 msgid "If true, opens scene in a file viewer." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.restructure_mobjects:2 msgid "If your scene has a Group(), and you removed a mobject from the Group, this dissolves the group and puts the rest of the mobjects directly in self.mobjects or self.foreground_mobjects." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.restructure_mobjects:6 msgid "In cases where the scene contains a group, e.g. Group(m1, m2, m3), but one of its submobjects is removed, e.g. scene.remove(m1), the list of mobjects will be edited to contain other submobjects, but not m1, e.g. it will now insert m2 and m3 to where the group once was." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.restructure_mobjects:11 msgid "The Mobject to remove." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.restructure_mobjects:13 msgid "The list of mobjects (\"mobjects\", \"foreground_mobjects\" etc) to remove from." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.restructure_mobjects:15 msgid "Whether the mobject's families should be recursively extracted." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.restructure_mobjects:18 msgid "The Scene mobject with restructured Mobjects." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.should_update_mobjects:3 msgid "In particular, this checks whether" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.should_update_mobjects:5 msgid "the :attr:`always_update_mobjects` attribute of :class:`.Scene` is set to ``True``," msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.should_update_mobjects:7 msgid "the :class:`.Scene` itself has time-based updaters attached," msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.should_update_mobjects:8 msgid "any mobject in this :class:`.Scene` has time-based updaters attached." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.should_update_mobjects:10 msgid "This is only called when a single Wait animation is played." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.update_mobjects:3 msgid "Change in time between updates. Defaults (mostly) to 1/frames_per_second" msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.update_self:3 msgid "Among all types of update functions (mobject updaters, mesh updaters, scene updaters), scene update functions are called last." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.update_self:6 msgid "Scene time since last update." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.wait:3 msgid "The run time of the animation." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.wait:4 msgid "A function without positional arguments that is evaluated every time a frame is rendered. The animation only stops when the return value of the function is truthy. Overrides any value passed to ``duration``." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.wait:7 msgid "If True, updater functions are not evaluated, and the animation outputs a frozen frame. If False, updater functions are called and frames are rendered as usual. If None (the default), the scene tries to determine whether or not the frame is frozen on its own." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.wait_until:1 msgid "Like a wrapper for wait(). You pass a function that determines whether to continue waiting, and a max wait time if that is never fulfilled." msgstr "" #: ../../../manim/scene/scene.py:docstring of manim.scene.scene.Scene.wait_until:5 msgid "The function whose boolean return value determines whether to continue waiting" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.scene_file_writer.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.scene_file_writer.rst:2 msgid "scene\\_file\\_writer" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer:1 msgid "The interface between scenes and ffmpeg." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.scene_file_writer.SceneFileWriter.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:2 msgid "SceneFileWriter" msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:4 msgid "Qualified name: ``manim.scene.scene\\_file\\_writer.SceneFileWriter``" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:1 msgid "Bases: :py:class:`object`" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:1 msgid "SceneFileWriter is the object that actually writes the animations played, into video files, using FFMPEG. This is mostly for Manim's internal use. You will rarely, if ever, have to use the methods for this class, unless tinkering with the very fabric of Manim's reality." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:9 msgid "used to segment scene" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:0 msgid "type" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:11 msgid "list of :class:`.Section`" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:15 msgid "where are section videos stored" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:17 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:23 msgid "str" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:21 msgid "name of movie without extension and basis for section video names" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:32 msgid "Some useful attributes are:" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:26 msgid "\"write_to_movie\" (bool=False)" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:27 msgid "Whether or not to write the animations into a video file." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:28 msgid "\"movie_file_extension\" (str=\".mp4\")" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:29 msgid "The file-type extension of the outputted video." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:32 msgid "\"partial_movie_files\"" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter:31 msgid "List of all the partial-movie files." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_audio_segment:1 msgid "This method adds an audio segment from an AudioSegment type object and suitable parameters." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 msgid "Adds a new partial movie file path to `scene.partial_movie_files` and current section from a hash." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_sound:1 msgid "This method adds an audio segment from a sound file." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.begin_animation:1 msgid "Used internally by manim to stream the animation to FFMPEG for displaying or writing to a file." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.clean_cache:1 msgid "Will clean the cache by removing the oldest partial_movie_files." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.close_movie_pipe:1 msgid "Used internally by Manim to gracefully stop writing to FFMPEG's input buffer" msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.combine_to_movie:1 msgid "Used internally by Manim to combine the separate partial movie files that make up a Scene into a single video file for that Scene." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.combine_to_section_videos:1 msgid "Concatenate partial movie files for each section." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.create_audio_segment:1 msgid "Creates an empty, silent, Audio Segment." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.end_animation:1 msgid "Internally used by Manim to stop streaming to FFMPEG gracefully." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 msgid "Finishes writing to the FFMPEG buffer or writing images to output directory." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.finish_last_section:1 msgid "Delete current section if it is empty." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.flush_cache_directory:1 msgid "Delete all the cached partial movie files" msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.get_resolution_directory:1 msgid "Get the name of the resolution directory directly containing the video file." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.init_audio:1 msgid "Preps the writer for adding audio to the movie." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.init_output_directories:1 msgid "Initialise output directories." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.is_already_cached:1 msgid "Will check if a file named with `hash_invocation` exists." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.next_section:1 msgid "Create segmentation cut here." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.open_movie_pipe:1 msgid "Used internally by Manim to initialise FFMPEG and begin writing to FFMPEG's input buffer." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.print_file_ready_message:1 msgid "Prints the \"File Ready\" message to STDOUT." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 msgid "The name is a misnomer." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.write_frame:1 msgid "Used internally by Manim to write a frame to the FFMPEG input buffer." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:46::1 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.write_subcaption_file:1 msgid "Writes the subcaption file." msgstr "" #: ../../source/reference/manim.scene.scene_file_writer.SceneFileWriter.rst:48 msgid "Attributes" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_audio_segment:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_partial_movie_file:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_sound:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.begin_animation:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.end_animation:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.is_already_cached:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.next_section:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.save_final_image:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.write_frame:0 msgid "Parameters" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_audio_segment:4 msgid "The audio segment to add" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_audio_segment:6 msgid "the timestamp at which the sound should be added." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_audio_segment:9 msgid "The gain of the segment from the background." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_partial_movie_file:1 msgid "Adds a new partial movie file path to `scene.partial_movie_files` and current section from a hash. This method will compute the path from the hash. In addition to that it adds the new animation to the current section." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_partial_movie_file:4 msgid "Hash of the animation." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_sound:3 msgid "The path to the sound file." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_sound:5 msgid "The timestamp at which the audio should be added." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_sound:7 msgid "The gain of the given audio segment." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.add_sound:9 msgid "This method uses add_audio_segment, so any keyword arguments used there can be referenced here." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.begin_animation:4 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.end_animation:4 msgid "Whether or not to write to a video file." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.combine_to_section_videos:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.finish_last_section:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.get_resolution_directory:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.is_already_cached:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.next_section:0 msgid "Return type" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.finish:1 msgid "Finishes writing to the FFMPEG buffer or writing images to output directory. Combines the partial movie files into the whole scene. If save_last_frame is True, saves the last frame in the default image directory." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.get_resolution_directory:4 msgid "This method gets the name of the directory that immediately contains the video file. This name is ``p``. For example, if you are rendering an 854x480 px animation at 15fps, the name of the directory that immediately contains the video, file will be ``480p15``." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.get_resolution_directory:10 msgid "The file structure should look something like::" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.get_resolution_directory:0 #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.is_already_cached:0 msgid "Returns" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.get_resolution_directory:20 msgid "The name of the directory." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.init_output_directories:4 msgid "Notes" msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.init_output_directories:5 msgid "The directories are read from ``config``, for example ``config['media_dir']``. If the target directories don't already exist, they will be created." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.is_already_cached:3 msgid "The hash corresponding to an invocation to either `scene.play` or `scene.wait`." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.is_already_cached:6 msgid "Whether the file exists." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.save_final_image:1 msgid "The name is a misnomer. This method saves the image passed to it as an in the default image directory." msgstr "" #: ../../../manim/scene/scene_file_writer.py:docstring of manim.scene.scene_file_writer.SceneFileWriter.save_final_image:4 msgid "The pixel array of the image to save." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.section.DefaultSectionType.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.section.DefaultSectionType.rst:2 msgid "DefaultSectionType" msgstr "" #: ../../source/reference/manim.scene.section.DefaultSectionType.rst:4 msgid "Qualified name: ``manim.scene.section.DefaultSectionType``" msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.DefaultSectionType:1 msgid "Bases: :py:class:`str`, :py:class:`enum.Enum`" msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.DefaultSectionType:1 msgid "The type of a section can be used for third party applications. A presentation system could for example use the types to created loops." msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.DefaultSectionType:5 msgid "Examples" msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.DefaultSectionType:6 msgid "This class can be reimplemented for more types::" msgstr "" #: ../../source/reference/manim.scene.section.DefaultSectionType.rst:16 msgid "Attributes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.section.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.section.rst:2 msgid "section" msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section:1 msgid "building blocks of segmented video API" msgstr "" #: ../../source/reference/manim.scene.section.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.scene.section.rst:22::1 msgid "The type of a section can be used for third party applications." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.section.Section.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.section.Section.rst:2 msgid "Section" msgstr "" #: ../../source/reference/manim.scene.section.Section.rst:4 msgid "Qualified name: ``manim.scene.section.Section``" msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section:1 msgid "Bases: :py:class:`object`" msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section:1 msgid "A :class:`.Scene` can be segmented into multiple Sections. Refer to :doc:`the documentation` for more info. It consists of multiple animations." msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section:0 #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.get_dict:0 msgid "Parameters" msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section:7 msgid "Can be used by a third party applications to classify different types of sections." msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section:11 msgid "Path to video file with animations belonging to section relative to sections directory. If ``None``, then the section will not be saved." msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section:16 msgid "Human readable, non-unique name for this section." msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section:20 msgid "Skip rendering the animations in this section when ``True``." msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section:24 msgid "Animations belonging to this section." msgstr "" #: ../../source/reference/manim.scene.section.Section.rst:14 msgid "Methods" msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.get_clean_partial_movie_files:1::1 #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.get_clean_partial_movie_files:1 msgid "Return all partial movie files that are not ``None``." msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.get_clean_partial_movie_files:1::1 #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.get_dict:1 msgid "Get dictionary representation with metadata of output video." msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.get_clean_partial_movie_files:1::1 #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.is_empty:1 msgid "Check whether this section is empty." msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.get_clean_partial_movie_files:0 #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.get_dict:0 #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.is_empty:0 msgid "Return type" msgstr "" #: ../../../manim/scene/section.py:docstring of manim.scene.section.Section.get_dict:3 msgid "The output from this function is used from every section to build the sections index file. The output video must have been created in the ``sections_dir`` before executing this method. This is the main part of the Segmented Video API." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.three_d_scene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.three_d_scene.rst:2 msgid "three\\_d\\_scene" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene:1 msgid "A scene suitable for rendering three-dimensional objects and animations." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.scene.three_d_scene.rst:22::1 msgid "An extension of :class:`ThreeDScene` with more settings." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.three_d_scene.SpecialThreeDScene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.three_d_scene.SpecialThreeDScene.rst:2 msgid "SpecialThreeDScene" msgstr "" #: ../../source/reference/manim.scene.three_d_scene.SpecialThreeDScene.rst:4 msgid "Qualified name: ``manim.scene.three\\_d\\_scene.SpecialThreeDScene``" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene:1 msgid "Bases: :py:class:`manim.scene.three_d_scene.ThreeDScene`" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene:1 msgid "An extension of :class:`ThreeDScene` with more settings." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene:3 msgid "It has some extra configuration for axes, spheres, and an override for low quality rendering. Further key differences are:" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene:7 msgid "The camera shades applicable 3DMobjects by default, except if rendering in low quality." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene:9 msgid "Some default params for Spheres and Axes have been added." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.SpecialThreeDScene.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.scene.three_d_scene.SpecialThreeDScene.rst:23::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_axes:1 msgid "Return a set of 3D axes." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.SpecialThreeDScene.rst:23::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_default_camera_position:1 msgid "Returns the default_angled_camera position." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.SpecialThreeDScene.rst:23::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_sphere:1 msgid "Returns a sphere with the passed keyword arguments as properties." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.SpecialThreeDScene.rst:23::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.set_camera_to_default_position:1 msgid "Sets the camera to its default position." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.SpecialThreeDScene.rst:25 msgid "Attributes" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_axes:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_default_camera_position:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_sphere:0 msgid "Returns" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_axes:3 msgid "A set of 3D axes." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_axes:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_default_camera_position:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_sphere:0 msgid "Return type" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_default_camera_position:3 msgid "Dictionary of phi, theta, focal_distance, and gamma." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_sphere:0 msgid "Parameters" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_sphere:3 msgid "Any valid parameter of :class:`~.Sphere` or :class:`~.Surface`." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.SpecialThreeDScene.get_sphere:5 msgid "The sphere object." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.three_d_scene.ThreeDScene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:2 msgid "ThreeDScene" msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:4 msgid "Qualified name: ``manim.scene.three\\_d\\_scene.ThreeDScene``" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene:1 msgid "Bases: :py:class:`manim.scene.scene.Scene`" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene:1 msgid "This is a Scene, with special configurations and properties that make it suitable for Three Dimensional Scenes." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 msgid "This method is used to prevent the rotation and movement of mobjects as the camera moves around." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 msgid "This method is used to prevent the rotation and tilting of mobjects as the camera moves around." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.begin_3dillusion_camera_rotation:1 msgid "This method creates a 3D camera rotation illusion around the current camera orientation." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.begin_ambient_camera_rotation:1 msgid "This method begins an ambient rotation of the camera about the Z_AXIS, in the anticlockwise direction" msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.get_moving_mobjects:1 msgid "This method returns a list of all of the Mobjects in the Scene that are moving, that are also in the animations passed." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.move_camera:1 msgid "This method animates the movement of the camera to the given spherical coordinates." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 msgid "This method undoes what add_fixed_in_frame_mobjects does." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 msgid "This method \"unfixes\" the orientation of the mobjects passed, meaning they will no longer be at the same angle relative to the camera." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.set_camera_orientation:1 msgid "This method sets the orientation of the camera in the scene." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.set_to_default_angled_camera_orientation:1 msgid "This method sets the default_angled_camera_orientation to the keyword arguments passed, and sets the camera to that orientation." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.stop_3dillusion_camera_rotation:1 msgid "This method stops all illusion camera rotations." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:31::1 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.stop_ambient_camera_rotation:1 msgid "This method stops all ambient camera rotation." msgstr "" #: ../../source/reference/manim.scene.three_d_scene.ThreeDScene.rst:33 msgid "Attributes" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.add_fixed_in_frame_mobjects:1 msgid "This method is used to prevent the rotation and movement of mobjects as the camera moves around. The mobject is essentially overlaid, and is not impacted by the camera's movement in any way." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.add_fixed_in_frame_mobjects:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.add_fixed_orientation_mobjects:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.begin_3dillusion_camera_rotation:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.begin_ambient_camera_rotation:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.get_moving_mobjects:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.move_camera:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.remove_fixed_in_frame_mobjects:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.remove_fixed_orientation_mobjects:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.set_camera_orientation:0 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.set_to_default_angled_camera_orientation:0 msgid "Parameters" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.add_fixed_in_frame_mobjects:6 msgid "The Mobjects whose orientation must be fixed." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.add_fixed_orientation_mobjects:1 msgid "This method is used to prevent the rotation and tilting of mobjects as the camera moves around. The mobject can still move in the x,y,z directions, but will always be at the angle (relative to the camera) that it was at when it was passed through this method.)" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.add_fixed_orientation_mobjects:7 msgid "The Mobject(s) whose orientation must be fixed." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.add_fixed_orientation_mobjects:9 msgid "Some valid kwargs are use_static_center_func : bool center_func : function" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.add_fixed_orientation_mobjects:11 msgid "Some valid kwargs are" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.add_fixed_orientation_mobjects:11 msgid "use_static_center_func : bool center_func : function" msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.begin_3dillusion_camera_rotation:4 msgid "The rate at which the camera rotation illusion should operate." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.begin_3dillusion_camera_rotation:5 msgid "The polar angle the camera should move around. Defaults to the current phi angle." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.begin_3dillusion_camera_rotation:7 msgid "The azimutal angle the camera should move around. Defaults to the current theta angle." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.begin_ambient_camera_rotation:4 msgid "The rate at which the camera should rotate about the Z_AXIS. Negative rate means clockwise rotation." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.begin_ambient_camera_rotation:7 msgid "one of 3 options: [\"theta\", \"phi\", \"gamma\"]. defaults to theta." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.get_moving_mobjects:4 msgid "The animations whose mobjects will be checked." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.move_camera:4 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.set_camera_orientation:3 msgid "The polar angle i.e the angle between Z_AXIS and Camera through ORIGIN in radians." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.move_camera:6 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.set_camera_orientation:5 msgid "The azimuthal angle i.e the angle that spins the camera around the Z_AXIS." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.move_camera:8 msgid "The radial focal_distance between ORIGIN and Camera." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.move_camera:10 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.set_camera_orientation:9 msgid "The rotation of the camera about the vector from the ORIGIN to the Camera." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.move_camera:12 msgid "The zoom factor of the camera." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.move_camera:14 #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.set_camera_orientation:13 msgid "The new center of the camera frame in cartesian coordinates." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.move_camera:16 msgid "Any other animations to be played at the same time." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.remove_fixed_in_frame_mobjects:1 msgid "This method undoes what add_fixed_in_frame_mobjects does. It allows the mobject to be affected by the movement of the camera." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.remove_fixed_in_frame_mobjects:5 msgid "The Mobjects whose position and orientation must be unfixed." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.remove_fixed_orientation_mobjects:1 msgid "This method \"unfixes\" the orientation of the mobjects passed, meaning they will no longer be at the same angle relative to the camera. This only makes sense if the mobject was passed through add_fixed_orientation_mobjects first." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.remove_fixed_orientation_mobjects:6 msgid "The Mobjects whose orientation must be unfixed." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.set_camera_orientation:7 msgid "The focal_distance of the Camera." msgstr "" #: ../../../manim/scene/three_d_scene.py:docstring of manim.scene.three_d_scene.ThreeDScene.set_camera_orientation:11 msgid "The zoom factor of the scene." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.vector_space_scene.LinearTransformationScene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:2 msgid "LinearTransformationScene" msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:4 msgid "Qualified name: ``manim.scene.vector\\_space\\_scene.LinearTransformationScene``" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:1 msgid "Bases: :py:class:`manim.scene.vector_space_scene.VectorScene`" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:1 msgid "This scene contains special methods that make it especially suitable for showing linear transformations." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_background_mobject:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_foreground_mobject:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_moving_mobject:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_special_mobjects:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_title:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_label:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_mobject:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_unit_square:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_function:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_inverse:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_inverse_transpose:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_matrix:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_nonlinear_transformation:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_transposed_matrix:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_matrix_transformation:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_moving_mobject_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_piece_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_transposed_matrix_transformation:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_unit_square:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_vector_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.write_vector_coordinates:0 msgid "Parameters" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:4 msgid "Whether or not to include the background plane in the scene." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:5 msgid "Whether or not to include the foreground plane in the scene." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:6 msgid "Parameters to be passed to :class:`NumberPlane` to adjust the background plane." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:7 msgid "Parameters to be passed to :class:`NumberPlane` to adjust the foreground plane." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:8 msgid "Whether or not to include the coordinates for the background plane." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:9 msgid "Whether to show the basis x_axis -> ``i_hat`` and y_axis -> ``j_hat`` vectors." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:10 msgid "The ``stroke_width`` of the basis vectors." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:11 msgid "The color of the ``i_hat`` vector." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:12 msgid "The color of the ``j_hat`` vector." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:13 msgid "Indicates the previous position of the basis vectors following a transformation." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene:16 msgid "Examples" msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_background_mobject:1 msgid "Adds the mobjects to the special list self.background_mobjects." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_foreground_mobject:1 msgid "Adds the mobjects to the special list self.foreground_mobjects." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_moving_mobject:1 msgid "Adds the mobject to the special list self.moving_mobject, and adds a property to the mobject called mobject.target, which keeps track of what the mobject will move to or become etc." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_special_mobjects:1 msgid "Adds mobjects to a separate list that can be tracked, if these mobjects have some extra importance." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 msgid "Adds a title, after scaling it, adding a background rectangle, moving it to the top and adding it to foreground_mobjects adding it as a local variable of self." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_label:1 msgid "Method for creating, and animating the addition of a transformable label for the vector." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_mobject:1 msgid "Adds the mobjects to the special list self.transformable_mobjects." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_unit_square:1 msgid "Adds a unit square to the scene via self.get_unit_square." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_vector:1 msgid "Adds a vector to the scene, and puts it in the special list self.moving_vectors." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_function:1 msgid "Applies the given function to each of the mobjects in self.transformable_mobjects, and plays the animation showing this." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_inverse:1 msgid "This method applies the linear transformation represented by the inverse of the passed matrix to the number plane, and each vector/similar mobject on it." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_inverse_transpose:1 msgid "Applies the inverse of the transformation represented by the given transposed matrix to the number plane and each vector/similar mobject on it." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_matrix:1 msgid "Applies the transformation represented by the given matrix to the number plane, and each vector/similar mobject on it." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_nonlinear_transformation:1 msgid "Applies the non-linear transformation represented by the given function to the number plane and each vector/similar mobject on it." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_transposed_matrix:1 msgid "Applies the transformation represented by the given transposed matrix to the number plane, and each vector/similar mobject on it." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_matrix_transformation:1 msgid "Returns a function corresponding to the linear transformation represented by the matrix passed." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 msgid "This method returns an animation that moves a mobject in \"self.moving_mobjects\" to its corresponding .target value." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 msgid "This method returns an animation that moves an arbitrary mobject in \"pieces\" to its corresponding .target value." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_transformable_label_movement:1 msgid "This method returns an animation that moves all labels in \"self.transformable_labels\" to its corresponding .target ." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_transposed_matrix_transformation:1 msgid "Returns a function corresponding to the linear transformation represented by the transposed matrix passed." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_unit_square:1 msgid "Returns a unit square for the current NumberPlane." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 msgid "This method returns an animation that moves a mobject in \"self.moving_vectors\" to its corresponding .target value." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.setup:1 msgid "This is meant to be implemented by any scenes which are commonly subclassed, and have some common setup involved before the construct method is called." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:44::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.write_vector_coordinates:1 msgid "Returns a column matrix indicating the vector coordinates, after writing them to the screen, and adding them to the special list self.foreground_mobjects" msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.LinearTransformationScene.rst:46 msgid "Attributes" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_background_mobject:4 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_mobject:4 msgid "The mobjects to add to the list." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_foreground_mobject:4 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_moving_mobject:7 msgid "The mobjects to add to the list" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_moving_mobject:9 msgid "What the moving_mobject goes to, etc." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_special_mobjects:4 msgid "The special list to which you want to add these mobjects." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_special_mobjects:7 msgid "The mobjects to add." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_title:1 msgid "Adds a title, after scaling it, adding a background rectangle, moving it to the top and adding it to foreground_mobjects adding it as a local variable of self. Returns the Scene." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_title:5 msgid "What the title should be." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_title:7 msgid "How much the title should be scaled by." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_title:9 msgid "Whether or not to animate the addition." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_title:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_label:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_unit_square:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_moving_mobject_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_piece_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_transformable_label_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_vector_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.write_vector_coordinates:0 msgid "Returns" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_title:12 msgid "The scene with the title added to it." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_title:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_label:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_unit_square:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_moving_mobject_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_piece_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_transformable_label_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_unit_square:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_vector_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.write_vector_coordinates:0 msgid "Return type" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_label:4 msgid "The vector for which the label must be added." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_label:6 msgid "The MathTex/string of the label." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_label:8 msgid "The name to give the transformation as a label." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_label:10 msgid "What the label should display after a Linear Transformation" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_label:12 msgid "Any valid keyword argument of get_vector_label" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_transformable_label:14 msgid "The MathTex of the label." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_unit_square:4 msgid "Whether or not to animate the addition with DrawBorderThenFill." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_unit_square:6 msgid "Any valid keyword arguments of self.get_unit_square()" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_unit_square:9 msgid "The unit square." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_vector:4 msgid "It can be a pre-made graphical vector, or the coordinates of one." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_vector:7 msgid "The string of the hex color of the vector. This is only taken into consideration if 'vector' is not an Arrow. Defaults to YELLOW." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_vector:11 msgid "Any valid keyword argument of VectorScene.add_vector." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.add_vector:13 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.write_vector_coordinates:5 msgid "The arrow representing the vector." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_function:5 msgid "The function that affects each point of each mobject in self.transformable_mobjects." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_function:8 msgid "Any other animations that need to be played simultaneously with this." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_function:11 msgid "Any valid keyword argument of a self.play() call." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_inverse:5 msgid "The matrix whose inverse is to be applied." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_inverse:7 msgid "Any valid keyword argument of self.apply_matrix()" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_inverse_transpose:5 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_matrix:5 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_transposed_matrix:5 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_matrix_transformation:4 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_transposed_matrix_transformation:5 msgid "The matrix." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_inverse_transpose:7 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_matrix:7 msgid "Any valid keyword argument of self.apply_transposed_matrix()" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_nonlinear_transformation:5 msgid "The function." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_nonlinear_transformation:7 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.apply_transposed_matrix:7 msgid "Any valid keyword argument of self.apply_function()" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_moving_mobject_movement:1 msgid "This method returns an animation that moves a mobject in \"self.moving_mobjects\" to its corresponding .target value. func is a function that determines where the .target goes." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_moving_mobject_movement:5 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_vector_movement:5 msgid "The function that determines where the .target of the moving mobject goes." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_moving_mobject_movement:9 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_piece_movement:9 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_transformable_label_movement:4 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_vector_movement:9 msgid "The animation of the movement." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_piece_movement:1 msgid "This method returns an animation that moves an arbitrary mobject in \"pieces\" to its corresponding .target value. If self.leave_ghost_vectors is True, ghosts of the original positions/mobjects are left on screen" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_piece_movement:6 msgid "The pieces for which the movement must be shown." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_unit_square:3 msgid "The string of the hex color code of the color wanted." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_unit_square:5 msgid "The opacity of the square" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_unit_square:7 msgid "The stroke_width in pixels of the border of the square" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.get_vector_movement:1 msgid "This method returns an animation that moves a mobject in \"self.moving_vectors\" to its corresponding .target value. func is a function that determines where the .target goes." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.LinearTransformationScene.write_vector_coordinates:7 msgid "Any valid keyword arguments of VectorScene.write_vector_coordinates" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.vector_space_scene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.vector_space_scene.rst:2 msgid "vector\\_space\\_scene" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene:1 msgid "A scene suitable for vector spaces." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.rst:22::1 msgid "This scene contains special methods that make it especially suitable for showing linear transformations." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.vector_space_scene.VectorScene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:2 msgid "VectorScene" msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:4 msgid "Qualified name: ``manim.scene.vector\\_space\\_scene.VectorScene``" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene:1 msgid "Bases: :py:class:`manim.scene.scene.Scene`" msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_axes:1 msgid "Adds a pair of Axes to the Scene." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_plane:1 msgid "Adds a NumberPlane object to the background." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_vector:1 msgid "Returns the Vector after adding it to the Plane." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 msgid "This method writes the vector as a column matrix (henceforth called the label), takes the values in it one by one, and form the corresponding lines that make up the x and y components of the vector." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vector_labels:1 msgid "Returns naming labels for the basis vectors." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vectors:1 msgid "Returns a VGroup of the Basis Vectors (1,0) and (0,1)" msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector:1 msgid "Returns an arrow on the Plane given an input numerical vector." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:1 msgid "Returns naming labels for the passed vector." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.label_vector:1 msgid "Shortcut method for creating, and animating the addition of a label for the vector." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.lock_in_faded_grid:1 msgid "This method freezes the NumberPlane and Axes that were already in the background, and adds new, manipulatable ones to the foreground." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 msgid "This method plays an animation that partially shows the entire plane moving in the direction of a particular vector." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 msgid "This method displays vector as a Vector() based vector, and then shows the corresponding lines that make up the x and y components of the vector." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:34::1 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:1 msgid "Returns a column matrix indicating the vector coordinates, after writing them to the screen." msgstr "" #: ../../source/reference/manim.scene.vector_space_scene.VectorScene.rst:36 msgid "Attributes" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_axes:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_plane:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.coords_to_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vector_labels:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vectors:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.label_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.lock_in_faded_grid:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.show_ghost_movement:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.vector_to_coords:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:0 msgid "Parameters" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_axes:3 msgid "Whether or not to animate the addition of the axes through Create." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_axes:5 msgid "The color of the axes. Defaults to WHITE." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_plane:3 msgid "Whether or not to animate the addition of the plane via Create." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_plane:5 msgid "Any valid keyword arguments accepted by NumberPlane." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_plane:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vectors:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.label_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:0 msgid "Returns" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_plane:7 msgid "The NumberPlane object." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_plane:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vectors:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.label_vector:0 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:0 msgid "Return type" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_vector:3 msgid "It can be a pre-made graphical vector, or the coordinates of one." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_vector:6 msgid "The string of the hex color of the vector. This is only taken into consideration if 'vector' is not an Arrow. Defaults to YELLOW." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_vector:10 msgid "Whether or not to animate the addition of the vector by using GrowArrow" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_vector:13 msgid "Any valid keyword argument of Arrow. These are only considered if vector is not an Arrow." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.add_vector:17 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:4 msgid "The arrow representing the vector." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.coords_to_vector:1 msgid "This method writes the vector as a column matrix (henceforth called the label), takes the values in it one by one, and form the corresponding lines that make up the x and y components of the vector. Then, an Vector() based vector is created between the lines on the Screen." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.coords_to_vector:6 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.vector_to_coords:6 msgid "The vector to show." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.coords_to_vector:8 msgid "The starting point of the location of the label of the vector that shows it numerically. Defaults to 2 * RIGHT + 2 * UP or (2,2)" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.coords_to_vector:13 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.vector_to_coords:11 msgid "Whether or not to remove whatever this method did after it's done." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vector_labels:3 msgid "Any valid keyword arguments of get_vector_label: vector, label (str,MathTex) at_tip (bool=False), direction (str=\"left\"), rotate (bool), color (str), label_scale_factor=VECTOR_LABEL_SCALE_FACTOR (int, float)," msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vector_labels:10 msgid "Any valid keyword arguments of get_vector_label:" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vector_labels:5 msgid "vector, label (str,MathTex) at_tip (bool=False), direction (str=\"left\"), rotate (bool), color (str), label_scale_factor=VECTOR_LABEL_SCALE_FACTOR (int, float)," msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vectors:3 msgid "The hex colour to use for the basis vector in the x direction" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vectors:5 msgid "The hex colour to use for the basis vector in the y direction" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_basis_vectors:8 msgid "VGroup of the Vector Mobjects representing the basis vectors." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector:3 msgid "The Vector to plot." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector:5 msgid "Any valid keyword argument of Arrow." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector:7 msgid "The Arrow representing the Vector." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:3 msgid "Vector Object for which to get the label." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:5 msgid "Whether or not to place the label at the tip of the vector." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:7 msgid "If the label should be on the \"left\" or right of the vector." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:9 msgid "Whether or not to rotate it to align it with the vector." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:11 msgid "The color to give the label." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:13 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:14 msgid "How much to scale the label by." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.get_vector_label:16 #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.label_vector:12 msgid "The MathTex of the label." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.label_vector:4 msgid "The vector for which the label must be added." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.label_vector:6 msgid "The MathTex/string of the label." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.label_vector:8 msgid "Whether or not to animate the labelling w/ Write" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.label_vector:10 msgid "Any valid keyword argument of get_vector_label" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.lock_in_faded_grid:4 msgid "The required dimness of the NumberPlane" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.lock_in_faded_grid:6 msgid "The required dimness of the Axes." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.show_ghost_movement:1 msgid "This method plays an animation that partially shows the entire plane moving in the direction of a particular vector. This is useful when you wish to convey the idea of mentally moving the entire plane in a direction, without actually moving the plane." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.show_ghost_movement:6 msgid "The vector which indicates the direction of movement." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.vector_to_coords:1 msgid "This method displays vector as a Vector() based vector, and then shows the corresponding lines that make up the x and y components of the vector. Then, a column matrix (henceforth called the label) is created near the head of the Vector." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.vector_to_coords:8 msgid "Whether or not to round the value displayed. in the vector's label to the nearest integer" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:6 msgid "Any valid keyword arguments of :meth:`~.geometry.Vector.coordinate_label`: integer_labels : :class:`bool` Whether or not to round the coordinates to integers. Default: ``True``. n_dim : :class:`int` The number of dimensions of the vector. Default: ``2``. color The color of the label. Default: ``WHITE``." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:6 msgid "Any valid keyword arguments of :meth:`~.geometry.Vector.coordinate_label`:" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:8 msgid "integer_labels : :class:`bool`" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:7 msgid "bool" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:9 msgid "Whether or not to round the coordinates to integers. Default: ``True``." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:10 msgid "n_dim : :class:`int`" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:9 msgid "int" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:11 msgid "The number of dimensions of the vector. Default: ``2``." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:13 msgid "color" msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:13 msgid "The color of the label. Default: ``WHITE``." msgstr "" #: ../../../manim/scene/vector_space_scene.py:docstring of manim.scene.vector_space_scene.VectorScene.write_vector_coordinates:15 msgid "The column matrix representing the vector." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.zoomed_scene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.zoomed_scene.rst:2 msgid "zoomed\\_scene" msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene:1 msgid "A scene supporting zooming in on a specified section." msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene:5 msgid "Examples" msgstr "" #: ../../source/reference/manim.scene.zoomed_scene.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.scene.zoomed_scene.ZoomedScene.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.scene.zoomed_scene.ZoomedScene.rst:2 msgid "ZoomedScene" msgstr "" #: ../../source/reference/manim.scene.zoomed_scene.ZoomedScene.rst:4 msgid "Qualified name: ``manim.scene.zoomed\\_scene.ZoomedScene``" msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene:1 msgid "Bases: :py:class:`manim.scene.moving_camera_scene.MovingCameraScene`" msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene:1 msgid "This is a Scene with special configurations made for when a particular part of the scene must be zoomed in on and displayed separately." msgstr "" #: ../../source/reference/manim.scene.zoomed_scene.ZoomedScene.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.scene.zoomed_scene.ZoomedScene.rst:24::1 #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.activate_zooming:1 msgid "This method is used to activate the zooming for the zoomed_camera." msgstr "" #: ../../source/reference/manim.scene.zoomed_scene.ZoomedScene.rst:24::1 msgid "Returns the Zoom factor of the Zoomed camera." msgstr "" #: ../../source/reference/manim.scene.zoomed_scene.ZoomedScene.rst:24::1 #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoom_in_animation:1 msgid "Returns the animation of camera zooming in." msgstr "" #: ../../source/reference/manim.scene.zoomed_scene.ZoomedScene.rst:24::1 #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoomed_display_pop_out_animation:1 msgid "This is the animation of the popping out of the mini-display that shows the content of the zoomed camera." msgstr "" #: ../../source/reference/manim.scene.zoomed_scene.ZoomedScene.rst:24::1 #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.setup:1 msgid "This method is used internally by Manim to setup the scene for proper use." msgstr "" #: ../../source/reference/manim.scene.zoomed_scene.ZoomedScene.rst:26 msgid "Attributes" msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.activate_zooming:0 #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoom_in_animation:0 msgid "Parameters" msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.activate_zooming:4 msgid "Whether or not to animate the activation of the zoomed camera." msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoom_factor:1 msgid "Returns the Zoom factor of the Zoomed camera. Defined as the ratio between the height of the zoomed camera and the height of the zoomed mini display. :returns: The zoom factor. :rtype: float" msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoom_in_animation:3 msgid "The run_time of the animation of the camera zooming in." msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoom_in_animation:5 msgid "Any valid keyword arguments of ApplyMethod()" msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoom_in_animation:0 #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoomed_display_pop_out_animation:0 msgid "Returns" msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoom_in_animation:7 msgid "The animation of the camera zooming in." msgstr "" #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoom_in_animation:0 #: ../../../manim/scene/zoomed_scene.py:docstring of manim.scene.zoomed_scene.ZoomedScene.get_zoomed_display_pop_out_animation:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.bezier.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.bezier.rst:2 msgid "bezier" msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier:1 msgid "Utility functions related to Bézier curves." msgstr "" #: ../../source/reference/manim.utils.bezier.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.bezier:1 msgid "Classic implementation of a bezier curve." msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.bezier:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.diag_to_matrix:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.get_smooth_handle_points:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.integer_interpolate:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.interpolate:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.inverse_interpolate:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.is_closed:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.match_interpolate:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.mid:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.partial_bezier_points:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.point_lies_on_bezier:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.proportions_along_bezier_curve_for_point:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.quadratic_bezier_remap:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.split_quadratic_bezier:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.subdivide_quadratic_bezier:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.bezier:3 msgid "points defining the desired bezier curve." msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.bezier:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.get_smooth_handle_points:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.partial_bezier_points:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.point_lies_on_bezier:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.proportions_along_bezier_curve_for_point:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.split_quadratic_bezier:0 msgid "Returns" msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.bezier:6 msgid "function describing the bezier curve." msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.bezier:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.diag_to_matrix:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.get_smooth_handle_points:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.integer_interpolate:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.interpolate:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.inverse_interpolate:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.is_closed:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.match_interpolate:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.mid:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.partial_bezier_points:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.point_lies_on_bezier:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.proportions_along_bezier_curve_for_point:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.quadratic_bezier_remap:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.split_quadratic_bezier:0 #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.subdivide_quadratic_bezier:0 msgid "Return type" msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.diag_to_matrix:1 msgid "Converts array whose rows represent diagonal entries of a matrix into the matrix itself. See scipy.linalg.solve_banded" msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.get_smooth_handle_points:1 msgid "Given some anchors (points), compute handles so the resulting bezier curve is smooth." msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.get_smooth_handle_points:3 msgid "Anchors." msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.get_smooth_handle_points:6 msgid "Computed handles." msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.integer_interpolate:1 msgid "Alpha is a float between 0 and 1. This returns an integer between start and end (inclusive) representing appropriate interpolation between them, along with a \"residue\" representing a new proportion between the returned integer and the next one of the list." msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.integer_interpolate:8 msgid "For example, if start=0, end=10, alpha=0.46, This would return (4, 0.6)." msgstr "" #: ../../../manim/utils/bezier.py:docstring of manim.utils.bezier.partial_bezier_points:1 msgid "Given an array of points which define bezier curve, and two numbers 0<=a:1 msgid "A list of pre-defined colors." msgstr "" #: ../../source/reference/manim.utils.color.rst:29 msgid "Functions" msgstr "" #: ../../../manim/utils/color.py:docstring of manim.utils.color.average_color:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.color_gradient:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.color_to_int_rgb:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.color_to_int_rgba:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.color_to_rgb:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.color_to_rgba:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.get_shaded_rgb:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.hex_to_rgb:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.interpolate_color:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.invert_color:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.rgb_to_color:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.rgb_to_hex:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.rgba_to_color:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/color.py:docstring of manim.utils.color.average_color:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.color_gradient:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.color_to_int_rgb:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.color_to_int_rgba:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.color_to_rgb:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.color_to_rgba:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.get_shaded_rgb:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.hex_to_rgb:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.interpolate_color:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.invert_color:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.random_bright_color:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.random_color:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.rgb_to_color:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.rgb_to_hex:0 #: ../../../manim/utils/color.py:docstring of manim.utils.color.rgba_to_color:0 msgid "Return type" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.commands.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.commands.rst:2 msgid "commands" msgstr "" #: ../../source/reference/manim.utils.commands.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/commands.py:docstring of manim.utils.commands.get_dir_layout:1 msgid "Get list of paths relative to dirpath of all files in dir and subdirs recursively." msgstr "" #: ../../../manim/utils/commands.py:docstring of manim.utils.commands.get_dir_layout:0 #: ../../../manim/utils/commands.py:docstring of manim.utils.commands.get_video_metadata:0 msgid "Parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.config_ops.DictAsObject.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.config_ops.DictAsObject.rst:2 msgid "DictAsObject" msgstr "" #: ../../source/reference/manim.utils.config_ops.DictAsObject.rst:4 msgid "Qualified name: ``manim.utils.config\\_ops.DictAsObject``" msgstr "" #: ../../../manim/utils/config_ops.py:docstring of manim.utils.config_ops.DictAsObject:1 msgid "Bases: :py:class:`object`" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.config_ops.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.config_ops.rst:2 msgid "config\\_ops" msgstr "" #: ../../../manim/utils/config_ops.py:docstring of manim.utils.config_ops:1 msgid "Utilities that might be useful for configuration dictionaries." msgstr "" #: ../../source/reference/manim.utils.config_ops.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.utils.config_ops.rst:29 msgid "Functions" msgstr "" #: ../../../manim/utils/config_ops.py:docstring of manim.utils.config_ops.merge_dicts_recursively:1 msgid "Creates a dict whose keyset is the union of all the input dictionaries. The value for each key is based on the first dict in the list with that key." msgstr "" #: ../../../manim/utils/config_ops.py:docstring of manim.utils.config_ops.merge_dicts_recursively:5 msgid "dicts later in the list have higher priority" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.debug.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.debug.rst:2 msgid "debug" msgstr "" #: ../../../manim/utils/debug.py:docstring of manim.utils.debug:1 msgid "Debugging utilities." msgstr "" #: ../../source/reference/manim.utils.debug.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/debug.py:docstring of manim.utils.debug.index_labels:1 msgid "Returns a :class:`~.VGroup` of :class:`~.Integer` mobjects that shows the index of each submobject." msgstr "" #: ../../../manim/utils/debug.py:docstring of manim.utils.debug.index_labels:4 msgid "Useful for working with parts of complicated mobjects." msgstr "" #: ../../../manim/utils/debug.py:docstring of manim.utils.debug.index_labels:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/debug.py:docstring of manim.utils.debug.index_labels:6 msgid "The mobject that will have its submobjects labelled." msgstr "" #: ../../../manim/utils/debug.py:docstring of manim.utils.debug.index_labels:7 msgid "The height of the labels, by default 0.15." msgstr "" #: ../../../manim/utils/debug.py:docstring of manim.utils.debug.index_labels:8 msgid "The stroke width of the outline of the labels, by default 5." msgstr "" #: ../../../manim/utils/debug.py:docstring of manim.utils.debug.index_labels:9 msgid "The stroke color of the outline of labels." msgstr "" #: ../../../manim/utils/debug.py:docstring of manim.utils.debug.index_labels:10 msgid "Additional parameters to be passed into the :class`~.Integer` mobjects used to construct the labels." msgstr "" #: ../../../manim/utils/debug.py:docstring of manim.utils.debug.index_labels:14 msgid "Examples" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.deprecation.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.deprecation.rst:2 msgid "deprecation" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation:1 msgid "Decorators for deprecating classes, functions and function parameters." msgstr "" #: ../../source/reference/manim.utils.deprecation.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:1 msgid "Decorator to mark a callable as deprecated." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:3 msgid "The decorated callable will cause a warning when used. The docstring of the deprecated callable is adjusted to indicate that this callable is deprecated." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:0 #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:6 msgid "The function to be decorated. Should not be set by the user." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:7 #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:10 msgid "The version or date since deprecation." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:8 #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:11 msgid "The version or date until removal of the deprecated callable." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:9 msgid "The identifier of the callable replacing the deprecated one." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:10 #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:12 msgid "The reason for why the callable has been deprecated." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:0 #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:0 msgid "Returns" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:12 #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:25 msgid "The decorated callable." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:0 #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:0 msgid "Return type" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:16 #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:32 msgid "Examples" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:17 #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:33 msgid "Basic usage::" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:43 msgid "You can specify additional information for a more precise warning::" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated:59 msgid "You may also use dates instead of versions::" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:1 msgid "Decorator to mark parameters of a callable as deprecated." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:3 msgid "It can also be used to automatically redirect deprecated parameter values to their replacements." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:6 msgid "The parameters to be deprecated. Can consist of: * An iterable of strings, with each element representing a parameter to deprecate * A single string, with parameter names separated by commas or spaces." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:6 msgid "The parameters to be deprecated. Can consist of:" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:8 msgid "An iterable of strings, with each element representing a parameter to deprecate" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:9 msgid "A single string, with parameter names separated by commas or spaces." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:13 msgid "A list of parameter redirections. Each redirection can be one of the following: * A tuple of two strings. The first string defines the name of the deprecated parameter; the second string defines the name of the parameter to redirect to, when attempting to use the first string. * A function performing the mapping operation. The parameter names of the function determine which parameters are used as input. The function must return a dictionary which contains the redirected arguments. Redirected parameters are also implicitly deprecated." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:13 msgid "A list of parameter redirections. Each redirection can be one of the following:" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:15 msgid "A tuple of two strings. The first string defines the name of the deprecated parameter; the second string defines the name of the parameter to redirect to, when attempting to use the first string." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:19 msgid "A function performing the mapping operation. The parameter names of the function determine which parameters are used as input. The function must return a dictionary which contains the redirected arguments." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:23 msgid "Redirected parameters are also implicitly deprecated." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:0 msgid "Raises" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:28 msgid "If no parameters are defined (neither explicitly nor implicitly)." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:29 msgid "If defined parameters are invalid python identifiers." msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:47 msgid "You can also specify additional information for a more precise warning::" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:63 msgid "Basic parameter redirection::" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:79 msgid "Redirecting using a calculated value::" msgstr "" #: ../../../manim/utils/deprecation.py:docstring of manim.utils.deprecation.deprecated_params:93 msgid "Redirecting multiple parameter values to one::" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.docbuild.manim_directive.ManimDirective.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.utils.docbuild.manim_directive.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.utils.docbuild.manim_directive.skip_manim_node.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.utils.docbuild.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.hashing.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.hashing.rst:2 msgid "hashing" msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing:1 msgid "Utilities for scene caching." msgstr "" #: ../../source/reference/manim.utils.hashing.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_hash_from_play_call:1 msgid "Take the list of animations and a list of mobjects and output their hashes. This is meant to be used for `scene.play` function." msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_hash_from_play_call:0 #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_json:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_hash_from_play_call:3 msgid "The scene object." msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_hash_from_play_call:5 msgid "The camera object used in the scene." msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_hash_from_play_call:7 msgid "The list of animations." msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_hash_from_play_call:9 msgid "The list of mobjects." msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_hash_from_play_call:0 #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_json:0 msgid "Returns" msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_hash_from_play_call:12 msgid "A string concatenation of the respective hashes of `camera_object`, `animations_list` and `current_mobjects_list`, separated by `_`." msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_hash_from_play_call:0 #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_json:0 msgid "Return type" msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_json:1 msgid "Recursively serialize `object` to JSON using the :class:`CustomEncoder` class." msgstr "" #: ../../../manim/utils/hashing.py:docstring of manim.utils.hashing.get_json:3 msgid "The dict to flatten" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.images.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.images.rst:2 msgid "images" msgstr "" #: ../../../manim/utils/images.py:docstring of manim.utils.images:1 msgid "Image manipulation utilities." msgstr "" #: ../../source/reference/manim.utils.images.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/images.py:docstring of manim.utils.images.change_to_rgba_array:1 msgid "Converts an RGB array into RGBA with the alpha value opacity maxed." msgstr "" #: ../../../manim/utils/images.py:docstring of manim.utils.images.drag_pixels:0 #: ../../../manim/utils/images.py:docstring of manim.utils.images.get_full_raster_image_path:0 #: ../../../manim/utils/images.py:docstring of manim.utils.images.invert_image:0 msgid "Parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.ipython_magic.ManimMagic.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.ipython_magic.ManimMagic.rst:2 msgid "ManimMagic" msgstr "" #: ../../source/reference/manim.utils.ipython_magic.ManimMagic.rst:4 msgid "Qualified name: ``manim.utils.ipython\\_magic.ManimMagic``" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic:1 msgid "Bases: :py:class:`IPython.core.magic.Magics`" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic:1 msgid "Create a configurable given a config config." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic:0 #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic:3 msgid "If this is empty, default values are used. If config is a :class:`Config` instance, it will be used to configure the instance." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic:7 msgid "The parent Configurable instance of this object." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic:11 msgid "Notes" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic:12 msgid "Subclasses of Configurable must call the :meth:`__init__` method of :class:`Configurable` *before* doing anything else and using :func:`super`::" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic:21 msgid "This ensures that instances will be configured properly." msgstr "" #: ../../source/reference/manim.utils.ipython_magic.ManimMagic.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.utils.ipython_magic.ManimMagic.rst:21::1 msgid "Render Manim scenes contained in IPython cells." msgstr "" #: ../../source/reference/manim.utils.ipython_magic.ManimMagic.rst:23 msgid "Attributes" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:1::1 #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:1::1 msgid "A trait whose value must be an instance of a specified class." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:1::1 msgid "A contextmanager for running a block with our cross validation lock set to True." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:1 msgid "Render Manim scenes contained in IPython cells. Works as a line or cell magic." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:6 msgid "This line and cell magic works best when used in a JupyterLab environment: while all of the functionality is available for classic Jupyter notebooks as well, it is possible that videos sometimes don't update on repeated execution of the same cell if the scene name stays the same." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:12 msgid "This problem does not occur when using JupyterLab." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:14 msgid "Please refer to ``_ for more information about JupyterLab and Jupyter notebooks." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:17 msgid "Usage in line mode::" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:21 msgid "Usage in cell mode::" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:29 msgid "Run ``%manim --help`` and ``%manim render --help`` for possible command line interface options." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:33 msgid "The maximal width of the rendered videos that are displayed in the notebook can be configured via the ``media_width`` configuration option. The default is set to ``25vw``, which is 25% of your current viewport width. To allow the output to become as large as possible, set ``config.media_width = \"100%\"``." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:38 msgid "The ``media_embed`` option will embed the image/video output in the notebook. This is generally undesirable as it makes the notebooks very large, but is required on some platforms (notably Google's CoLab, where it is automatically enabled unless suppressed by ``config.embed = False``) and needed in cases when the notebook (or converted HTML file) will be moved relative to the video locations. Use-cases include building documentation with Sphinx and JupyterBook. See also the :mod:`manim directive for Sphinx `." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:47 msgid "Examples" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:48 msgid "First make sure to put ``import manim``, or even ``from manim import *`` in a cell and evaluate it. Then, a typical Jupyter notebook cell for Manim could look as follows::" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:64 msgid "Evaluating this cell will render and display the ``BannerExample`` scene defined in the body of the cell." msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic.ManimMagic.manim:68 msgid "In case you want to hide the red box containing the output progress bar, the ``progress_bar`` config option should be set to ``None``. This can also be done by passing ``--progress_bar None`` as a CLI flag." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.ipython_magic.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.ipython_magic.rst:2 msgid "ipython\\_magic" msgstr "" #: ../../../manim/utils/ipython_magic.py:docstring of manim.utils.ipython_magic:1 msgid "Utilities for using Manim with IPython (in particular: Jupyter notebooks)" msgstr "" #: ../../source/reference/manim.utils.ipython_magic.rst:15 msgid "Classes" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.iterables.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.iterables.rst:2 msgid "iterables" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables:1 msgid "Operations on iterables." msgstr "" #: ../../source/reference/manim.utils.iterables.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_n_tuples:1 msgid "Returns the Sequence objects cyclically split into n length tuples." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_n_tuples:6 msgid "alias with n=2" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_n_tuples:9 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_pairs:6 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.batch_by_property:8 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.concatenate_lists:4 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_difference_update:4 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_update:6 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.listify:4 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even:10 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even_by_cycling:10 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.remove_nones:4 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_array:13 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_preserving_order:16 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_with_interpolation:16 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.tuplify:4 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.uniq_chain:5 msgid "Examples" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_n_tuples:10 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_pairs:7 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.batch_by_property:9 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.concatenate_lists:5 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_difference_update:5 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_update:7 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.listify:5 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even:11 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even_by_cycling:11 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.remove_nones:5 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_array:14 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_preserving_order:17 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_with_interpolation:17 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.tuplify:5 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.uniq_chain:6 msgid "Normal usage::" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_n_tuples:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_pairs:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.all_elements_are_instances:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.batch_by_property:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.concatenate_lists:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_difference_update:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_update:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even_by_cycling:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.remove_list_redundancies:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.remove_nones:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_array:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_preserving_order:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_with_interpolation:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.stretch_array_to_length:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.uniq_chain:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_n_tuples:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_pairs:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.all_elements_are_instances:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.batch_by_property:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.concatenate_lists:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_difference_update:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_update:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.listify:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even_by_cycling:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.remove_list_redundancies:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.remove_nones:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_array:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_preserving_order:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_with_interpolation:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.stretch_array_to_length:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.tuplify:0 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.uniq_chain:0 msgid "Return type" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.adjacent_pairs:1 msgid "Alias for ``adjacent_n_tuples(objects, 2)``." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.all_elements_are_instances:1 msgid "Returns ``True`` if all elements of iterable are instances of Class. False otherwise." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.batch_by_property:1 msgid "Takes in a Sequence, and returns a list of tuples, (batch, prop) such that all items in a batch have the same output when put into the Callable property_func, and such that chaining all these batches together would give the original Sequence (i.e. order is preserved)." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.concatenate_lists:1 msgid "Combines the Iterables provided as arguments into one list." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_difference_update:1 msgid "Returns a list containing all the elements of l1 not in l2." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_update:3 msgid "Used instead of ``set.update()`` to maintain order," msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.list_update:2 msgid "making sure duplicates are removed from l1, not l2. Removes overlap of l1 and l2 and then concatenates l2 unchanged." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.listify:1 msgid "Converts obj to a list intelligently." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even:2 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even_by_cycling:2 msgid "Extends the shorter of the two iterables with duplicate values until its" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even:2 msgid "length is equal to the longer iterable (favours earlier elements)." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even:7 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_preserving_order:10 msgid "cycles elements instead of favouring earlier ones" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even_by_cycling:2 msgid "length is equal to the longer iterable (cycles over shorter iterable)." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.make_even_by_cycling:7 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_array:7 msgid "favours earlier elements instead of cycling them" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.remove_list_redundancies:1 msgid "Used instead of ``list(set(l))`` to maintain order. Keeps the last occurrence of each element." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.remove_nones:1 msgid "Removes elements where bool(x) evaluates to False." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_array:2 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_preserving_order:5 #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_with_interpolation:5 msgid "Extends/truncates nparray so that ``len(result) == length``." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_array:2 msgid "The elements of nparray are cycled to achieve the desired length." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_array:10 msgid "similar cycling behaviour for balancing 2 iterables" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_preserving_order:2 msgid "The elements of nparray are duplicated to achieve the desired length (favours earlier elements)." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_preserving_order:5 msgid "Constructs a zeroes array of length if nparray is empty." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_preserving_order:13 msgid "similar earlier-favouring behaviour for balancing 2 iterables" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_with_interpolation:2 msgid "New elements are interpolated to achieve the desired length." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_with_interpolation:4 msgid "Note that if nparray's length changes, its dtype may too (e.g. int -> float: see Examples)" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_with_interpolation:10 msgid "cycles elements instead of interpolating" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.resize_with_interpolation:13 msgid "favours earlier elements instead of interpolating" msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.tuplify:1 msgid "Converts obj to a tuple intelligently." msgstr "" #: ../../../manim/utils/iterables.py:docstring of manim.utils.iterables.uniq_chain:2 msgid "Returns a generator that yields all unique elements of the Iterables" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.paths.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.paths.rst:2 msgid "paths" msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths:1 msgid "Functions determining transformation paths between sets of points." msgstr "" #: ../../source/reference/manim.utils.paths.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.clockwise_path:1 msgid "This function transforms each point by moving clockwise around a half circle." msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.clockwise_path:4 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.counterclockwise_path:4 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_arc:7 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_circles:10 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.spiral_path:7 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.straight_path:4 msgid "Examples" msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.clockwise_path:0 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.counterclockwise_path:0 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_arc:0 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_circles:0 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.spiral_path:0 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.straight_path:0 msgid "Return type" msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.counterclockwise_path:1 msgid "This function transforms each point by moving counterclockwise around a half circle." msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_arc:1 msgid "This function transforms each point by moving it along a circular arc." msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_arc:0 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_circles:0 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.spiral_path:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_arc:3 msgid "The angle each point traverses around a circular arc." msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_arc:4 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_circles:7 #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.spiral_path:4 msgid "The axis of rotation." msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_circles:1 msgid "This function transforms each point by moving it roughly along a circle, each with its own specified center." msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_circles:3 msgid "The path may be seen as each point smoothly changing its orbit from its starting position to its destination." msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_circles:5 msgid "The angle each point traverses around the quasicircle." msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.path_along_circles:6 msgid "The centers of each point's quasicircle to rotate around." msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.spiral_path:1 msgid "This function transforms each point by moving along a spiral to its destination." msgstr "" #: ../../../manim/utils/paths.py:docstring of manim.utils.paths.spiral_path:3 msgid "The angle each point traverses around a spiral." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.rate_functions.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.rate_functions.rst:2 msgid "rate\\_functions" msgstr "" #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions:1 msgid "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" msgstr "" #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions:46 msgid "There are primarily 3 kinds of standard easing functions:" msgstr "" #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions:48 msgid "Ease In - The animation has a smooth start." msgstr "" #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions:49 msgid "Ease Out - The animation has a smooth end." msgstr "" #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions:50 msgid "Ease In Out - The animation has a smooth start as well as smooth end." msgstr "" #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions:52 msgid "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." msgstr "" #: ../../source/reference/manim.utils.rate_functions.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.double_smooth:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_back:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_bounce:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_circ:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_cubic:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_elastic:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_expo:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_out_back:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_out_bounce:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_out_circ:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_out_cubic:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_out_elastic:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_out_expo:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_out_quad:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_out_quart:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_out_quint:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_out_sine:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_quad:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_quart:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_quint:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_in_sine:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_out_back:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_out_bounce:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_out_circ:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_out_cubic:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_out_elastic:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_out_expo:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_out_quad:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_out_quart:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_out_quint:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.ease_out_sine:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.exponential_decay:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.linear:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.lingering:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.not_quite_there:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.running_start:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.rush_from:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.rush_into:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.slow_into:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.smooth:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.squish_rate_func:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.there_and_back:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.there_and_back_with_pause:0 #: ../../../manim/utils/rate_functions.py:docstring of manim.utils.rate_functions.wiggle:0 msgid "Parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.scale.LinearBase.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.utils.scale.LogBase.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.utils.scale.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.utils.simple_functions.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.simple_functions.rst:2 msgid "simple\\_functions" msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions:1 msgid "A collection of simple functions." msgstr "" #: ../../source/reference/manim.utils.simple_functions.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.binary_search:1 msgid "Searches for a value in a range by repeatedly dividing the range in half." msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.binary_search:3 msgid "To be more precise, performs numerical binary search to determine the input to ``function``, between the bounds given, that outputs ``target`` to within ``tolerance`` (default of 0.0001). Returns ``None`` if no input can be found within the bounds." msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.binary_search:9 #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.clip:8 #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.get_parameters:5 msgid "Examples" msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.binary_search:10 msgid "Consider the polynomial :math:`x^2 + 3x + 1` where we search for a target value of :math:`11`. An exact solution is :math:`x = 2`." msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.binary_search:22 msgid "Searching in the interval :math:`[0, 5]` for a target value of :math:`71` does not yield a solution::" msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.binary_search:0 #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.choose:0 #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.get_parameters:0 #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.sigmoid:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.binary_search:0 #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.choose:0 #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.get_parameters:0 #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.sigmoid:0 msgid "Return type" msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.choose:1 msgid "The binomial coefficient n choose k." msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.choose:3 msgid ":math:`\\binom{n}{k}` describes the number of possible choices of :math:`k` elements from a set of :math:`n` elements." msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.choose:7 #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.sigmoid:7 msgid "References" msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.choose:8 msgid "https://en.wikipedia.org/wiki/Combination" msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.choose:9 msgid "https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.comb.html" msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.clip:1 msgid "Clips ``a`` to the interval [``min_a``, ``max_a``]." msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.clip:3 msgid "Accepts any comparable objects (i.e. those that support <, >). Returns ``a`` if it is between ``min_a`` and ``max_a``. Otherwise, whichever of ``min_a`` and ``max_a`` is closest." msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.get_parameters:1 msgid "Return the parameters of ``function`` as an ordered mapping of parameters' names to their corresponding ``Parameter`` objects." msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.sigmoid:1 msgid "Returns the output of the logistic function." msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.sigmoid:3 msgid "The logistic function, a common example of a sigmoid function, is defined as :math:`\\frac{1}{1 + e^{-x}}`." msgstr "" #: ../../../manim/utils/simple_functions.py:docstring of manim.utils.simple_functions.sigmoid:8 msgid "https://en.wikipedia.org/wiki/Sigmoid_function" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.sounds.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.sounds.rst:2 msgid "sounds" msgstr "" #: ../../../manim/utils/sounds.py:docstring of manim.utils.sounds:1 msgid "Sound-related utility functions." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.space_ops.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.space_ops.rst:2 msgid "space\\_ops" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops:1 msgid "Utility functions for two- and three-dimensional vectors." msgstr "" #: ../../source/reference/manim.utils.space_ops.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.R3_to_complex:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_axis_from_quaternion:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_between_vectors:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_of_vector:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.cartesian_to_spherical:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.center_of_mass:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.compass_directions:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.complex_to_R3:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.earclip_triangulation:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.find_intersection:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.get_unit_normal:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.get_winding_number:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.line_intersection:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.midpoint:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.norm_squared:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.normalize:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.normalize_along_axis:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.perpendicular_bisector:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_conjugate:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_from_angle_axis:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_mult:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotate_vector:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_about_z:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix_from_quaternion:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix_transpose:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix_transpose_from_quaternion:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.shoelace:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.shoelace_direction:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.spherical_to_cartesian:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.thick_diagonal:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.z_to_vector:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.R3_to_complex:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_axis_from_quaternion:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_between_vectors:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_of_vector:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.cartesian_to_spherical:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.center_of_mass:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.compass_directions:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.complex_to_R3:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.earclip_triangulation:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.find_intersection:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.get_unit_normal:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.get_winding_number:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.line_intersection:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.midpoint:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.norm_squared:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.normalize:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.normalize_along_axis:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.perpendicular_bisector:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_conjugate:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_from_angle_axis:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_mult:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotate_vector:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_about_z:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix_from_quaternion:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix_transpose:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix_transpose_from_quaternion:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.shoelace:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.shoelace_direction:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.spherical_to_cartesian:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.thick_diagonal:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.z_to_vector:0 msgid "Return type" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_axis_from_quaternion:1 msgid "Gets angle and axis from a quaternion." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_axis_from_quaternion:3 msgid "The quaternion from which we get the angle and axis." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_axis_from_quaternion:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_between_vectors:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_of_vector:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.center_of_mass:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.compass_directions:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.earclip_triangulation:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.get_unit_normal:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.line_intersection:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.midpoint:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.normalize_along_axis:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.perpendicular_bisector:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_conjugate:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_from_angle_axis:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_mult:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotate_vector:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_about_z:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix_transpose_from_quaternion:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.shoelace:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.shoelace_direction:0 msgid "Returns" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_axis_from_quaternion:5 msgid "Gives the angle and axis" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_between_vectors:1 msgid "Returns the angle between two vectors. This angle will always be between 0 and pi" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_between_vectors:4 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.get_unit_normal:3 msgid "The first vector." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_between_vectors:5 msgid "The second vector." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_between_vectors:7 msgid "The angle between the vectors." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_of_vector:1 msgid "Returns polar coordinate theta when vector is projected on xy plane." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_of_vector:3 msgid "The vector to find the angle for." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.angle_of_vector:5 msgid "The angle of the vector projected." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.cartesian_to_spherical:1 msgid "Returns an array of numbers corresponding to each polar coordinate value (distance, phi, theta)." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.cartesian_to_spherical:4 msgid "A numpy array ``[x, y, z]``." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.center_of_mass:1 msgid "Gets the center of mass of the points in space." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.center_of_mass:3 msgid "The points to find the center of mass from." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.center_of_mass:5 msgid "The center of mass of the points." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.compass_directions:1 msgid "Finds the cardinal directions using tau." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.compass_directions:3 msgid "The amount to be rotated, by default 4" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.compass_directions:4 msgid "The direction for the angle to start with, by default RIGHT" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.compass_directions:6 msgid "The angle which has been rotated." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.earclip_triangulation:1 msgid "Returns a list of indices giving a triangulation of a polygon, potentially with holes." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.earclip_triangulation:4 msgid "verts is a numpy array of points." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.earclip_triangulation:5 msgid "ring_ends is a list of indices indicating where" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.earclip_triangulation:8 msgid "A list of indices giving a triangulation of a polygon." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.find_intersection:1 msgid "Return the intersection of a line passing through p0 in direction v0 with one passing through p1 in direction v1 (or array of intersections from arrays of such points/directions). For 3d values, it returns the point on the ray p0 + v0 * t closest to the ray p1 + v1 * t" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.get_unit_normal:1 msgid "Gets the unit normal of the vectors." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.get_unit_normal:4 msgid "The second vector" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.get_unit_normal:5 msgid "[description], by default 1e-6" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.get_unit_normal:7 msgid "The normal of the two vectors." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.line_intersection:1 msgid "Returns the intersection point of two lines, each defined by a pair of distinct points lying on the line." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.line_intersection:4 msgid "A list of two points that determine the first line." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.line_intersection:5 msgid "A list of two points that determine the second line." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.line_intersection:7 msgid "The intersection points of the two lines which are intersecting." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.line_intersection:0 #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotate_vector:0 msgid "Raises" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.line_intersection:10 msgid "Error is produced if the two lines don't intersect with each other or if the coordinates don't lie on the xy-plane." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.midpoint:1 msgid "Gets the midpoint of two points." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.midpoint:3 msgid "The first point." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.midpoint:4 msgid "The second point." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.midpoint:6 msgid "The midpoint of the points" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.normalize_along_axis:1 msgid "Normalizes an array with the provided axis." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.normalize_along_axis:3 msgid "The array which has to be normalized." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.normalize_along_axis:4 msgid "The axis to be normalized to." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.normalize_along_axis:6 msgid "Array which has been normalized according to the axis." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.perpendicular_bisector:1 msgid "Returns a list of two points that correspond to the ends of the perpendicular bisector of the two points given." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.perpendicular_bisector:5 msgid "a list of two numpy array points (corresponding to the ends of a line)." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.perpendicular_bisector:7 msgid "the vector perpendicular to both the line given and the perpendicular bisector." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.perpendicular_bisector:10 msgid "A list of two numpy array points that correspond to the ends of the perpendicular bisector" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_conjugate:1 msgid "Used for finding the conjugate of the quaternion" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_conjugate:3 msgid "The quaternion for which you want to find the conjugate for." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_conjugate:5 msgid "The conjugate of the quaternion." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_from_angle_axis:1 msgid "Gets a quaternion from an angle and an axis. For more information, check `this Wikipedia page `__." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_from_angle_axis:5 msgid "The angle for the quaternion." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_from_angle_axis:6 msgid "The axis for the quaternion" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_from_angle_axis:7 msgid "Checks whether the axis is normalized, by default False" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_from_angle_axis:10 msgid "Gives back a quaternion from the angle and axis" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_mult:1 msgid "Gets the Hamilton product of the quaternions provided. For more information, check `this Wikipedia page `__." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.quaternion_mult:5 msgid "Returns a list of product of two quaternions." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:1 msgid "Generates regularly spaced vertices around a circle centered at the origin." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:3 msgid "The number of vertices" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:4 msgid "The radius of the circle that the vertices are placed on." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:5 msgid "The angle the vertices start at. If unspecified, for even ``n`` values, ``0`` will be used. For odd ``n`` values, 90 degrees is used." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:5 msgid "The angle the vertices start at." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:7 msgid "If unspecified, for even ``n`` values, ``0`` will be used. For odd ``n`` values, 90 degrees is used." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:10 msgid "* **vertices** (:class:`numpy.ndarray`) -- The regularly spaced vertices. * **start_angle** (:class:`float`) -- The angle the vertices start at." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:10 msgid "**vertices** (:class:`numpy.ndarray`) -- The regularly spaced vertices." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.regular_vertices:11 msgid "**start_angle** (:class:`float`) -- The angle the vertices start at." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotate_vector:1 msgid "Function for rotating a vector." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotate_vector:3 msgid "The vector to be rotated." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotate_vector:4 msgid "The angle to be rotated by." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotate_vector:5 msgid "The axis to be rotated, by default OUT" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotate_vector:7 msgid "The rotated vector with provided angle and axis." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotate_vector:10 msgid "If vector is not of dimension 2 or 3." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_about_z:1 msgid "Returns a rotation matrix for a given angle." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_about_z:3 msgid "Angle for the rotation matrix." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_about_z:6 msgid "Gives back the rotated matrix." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix:1 msgid "Rotation in R^3 about a specified axis of rotation." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix_transpose_from_quaternion:1 msgid "Converts the quaternion, quat, to an equivalent rotation matrix representation. For more information, check `this page `_." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix_transpose_from_quaternion:5 msgid "The quaternion which is to be converted." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.rotation_matrix_transpose_from_quaternion:7 msgid "Gives back the Rotation matrix representation, returned as a 3-by-3 matrix or 3-by-3-by-N multidimensional array." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.shoelace:1 msgid "2D implementation of the shoelace formula." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.shoelace:3 msgid "Returns signed area." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.shoelace_direction:1 msgid "Uses the area determined by the shoelace method to determine whether the input set of points is directed clockwise or counterclockwise." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.shoelace_direction:4 msgid "Either ``\"CW\"`` or ``\"CCW\"``." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.spherical_to_cartesian:1 msgid "Returns a numpy array ``[x, y, z]`` based on the spherical coordinates given." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.spherical_to_cartesian:4 msgid "A list of three floats that correspond to the following: r - The distance between the point and the origin. theta - The azimuthal angle of the point to the positive x-axis. phi - The vertical angle of the point to the positive z-axis." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.spherical_to_cartesian:4 msgid "A list of three floats that correspond to the following:" msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.spherical_to_cartesian:6 msgid "r - The distance between the point and the origin." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.spherical_to_cartesian:8 msgid "theta - The azimuthal angle of the point to the positive x-axis." msgstr "" #: ../../../manim/utils/space_ops.py:docstring of manim.utils.space_ops.spherical_to_cartesian:10 msgid "phi - The vertical angle of the point to the positive z-axis." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.strings.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim.utils.tex.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.tex.rst:2 msgid "tex" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex:1 msgid "Utilities for processing LaTeX templates." msgstr "" #: ../../source/reference/manim.utils.tex.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.utils.tex.rst:22::1 msgid "TeX templates are used for creating Tex() and MathTex() objects." msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.tex.TexTemplate.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.tex.TexTemplate.rst:2 msgid "TexTemplate" msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplate.rst:4 msgid "Qualified name: ``manim.utils.tex.TexTemplate``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:1 msgid "Bases: :py:class:`object`" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:1 msgid "TeX templates are used for creating Tex() and MathTex() objects." msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.add_to_document:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.add_to_preamble:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression_in_env:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:3 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:18 msgid "The TeX compiler to be used, e.g. ``latex``, ``pdflatex`` or ``lualatex``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:5 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:24 msgid "The output format resulting from compilation, e.g. ``.dvi`` or ``.pdf``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:7 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:30 msgid "The command defining the documentclass, e.g. ``\\documentclass[preview]{standalone}``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:9 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:36 msgid "The document's preamble, i.e. the part between ``\\documentclass`` and ``\\begin{document}``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:11 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:42 msgid "Text in the document that will be replaced by the expression to be rendered" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:13 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:48 msgid "Text (definitions, commands) to be inserted at right after ``\\begin{document}``, e.g. ``\\boldmath``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate:0 msgid "type" msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplate.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplate.rst:24::1 msgid "Adds txt to the TeX template just after \\begin{document}, e.g." msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplate.rst:24::1 msgid "Adds stuff to the TeX template's preamble (e.g." msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplate.rst:24::1 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression:1 msgid "Inserts expression verbatim into TeX template." msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplate.rst:24::1 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression_in_env:1 msgid "Inserts expression into TeX template wrapped in \\begin{environment} and \\end{environment}" msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplate.rst:26 msgid "Attributes" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.add_to_document:1 msgid "Adds txt to the TeX template just after \\begin{document}, e.g. ``\\boldmath``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.add_to_document:3 msgid "String containing the text to be added." msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.add_to_preamble:1 msgid "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." msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.add_to_preamble:3 msgid "String containing the text to be added, e.g. ``\\usepackage{hyperref}``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.add_to_preamble:5 msgid "Whether the text should be added at the beginning of the preamble, i.e. right after ``\\documentclass``. Default is to add it at the end of the preamble, i.e. right before ``\\begin{document}``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression:3 msgid "The string containing the expression to be typeset, e.g. ``$\\sqrt{2}$``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression_in_env:0 msgid "Returns" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression:6 msgid "LaTeX code based on current template, containing the given ``expression`` and ready for typesetting" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression_in_env:0 msgid "Return type" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression_in_env:3 msgid "The string containing the expression to be typeset, e.g. ``$\\\\sqrt{2}$``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplate.get_texcode_for_expression_in_env:5 msgid "The string containing the environment in which the expression should be typeset, e.g. ``align*``" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.tex.TexTemplateFromFile.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.tex.TexTemplateFromFile.rst:2 msgid "TexTemplateFromFile" msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplateFromFile.rst:4 msgid "Qualified name: ``manim.utils.tex.TexTemplateFromFile``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:1 msgid "Bases: :py:class:`manim.utils.tex.TexTemplate`" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:1 msgid "A TexTemplate object created from a template file (default: tex_template.tex)" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile.add_to_document:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile.add_to_preamble:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:3 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:35 msgid "The TeX compiler to be used, e.g. ``latex``, ``pdflatex`` or ``lualatex``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:5 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:41 msgid "The output format resulting from compilation, e.g. ``.dvi`` or ``.pdf``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:7 msgid "The command defining the documentclass, e.g. ``\\documentclass[preview]{standalone}``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:9 msgid "The document's preamble, i.e. the part between ``\\documentclass`` and ``\\begin{document}``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:11 msgid "Text in the document that will be replaced by the expression to be rendered" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:13 msgid "Text (definitions, commands) to be inserted at right after ``\\begin{document}``, e.g. ``\\boldmath``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:15 msgid "The kwargs specified can only be strings." msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:18 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:23 msgid "Path to a valid TeX template file" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:0 #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:0 msgid "type" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile:29 msgid "Content of the TeX template file" msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplateFromFile.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplateFromFile.rst:22::1 msgid "Adds txt to the TeX template just after \\begin{document}, e.g." msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplateFromFile.rst:22::1 msgid "Adds stuff to the TeX template's preamble (e.g." msgstr "" #: ../../source/reference/manim.utils.tex.TexTemplateFromFile.rst:24 msgid "Attributes" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile.add_to_document:1 msgid "Adds txt to the TeX template just after \\begin{document}, e.g. ``\\boldmath``" msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile.add_to_document:3 msgid "String containing the text to be added." msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile.add_to_preamble:1 msgid "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." msgstr "" #: ../../../manim/utils/tex.py:docstring of manim.utils.tex.TexTemplateFromFile.add_to_preamble:3 msgid "String containing the text to be added, e.g. ``\\usepackage{hyperref}``" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.tex_file_writing.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.tex_file_writing.rst:2 msgid "tex\\_file\\_writing" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing:1 msgid "Interface for writing, compiling, and converting ``.tex`` files." msgstr "" #: ../../source/reference/manim.utils.tex_file_writing.rst:20 msgid "Functions" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.compile_tex:1 msgid "Compiles a tex_file into a .dvi or a .xdv or a .pdf" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.compile_tex:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.convert_to_svg:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.generate_tex_file:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_compilation_command:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_to_svg_file:0 msgid "Parameters" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.compile_tex:3 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_compilation_command:7 msgid "File name of TeX file to be typeset." msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.compile_tex:5 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_compilation_command:3 msgid "String containing the compiler to be used, e.g. ``pdflatex`` or ``lualatex``" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.compile_tex:7 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_compilation_command:5 msgid "String containing the output format generated by the compiler, e.g. ``.dvi`` or ``.pdf``" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.compile_tex:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.convert_to_svg:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.generate_tex_file:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_compilation_command:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_to_svg_file:0 msgid "Returns" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.compile_tex:10 msgid "Path to generated output file in desired format (DVI, XDV or PDF)." msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.compile_tex:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.convert_to_svg:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.generate_tex_file:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_compilation_command:0 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_to_svg_file:0 msgid "Return type" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.convert_to_svg:1 msgid "Converts a .dvi, .xdv, or .pdf file into an svg using dvisvgm." msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.convert_to_svg:3 msgid "File name of the input file to be converted." msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.convert_to_svg:5 msgid "String containing the file extension and thus indicating the file type, e.g. ``.dvi`` or ``.pdf``" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.convert_to_svg:7 msgid "Page to be converted if input file is multi-page." msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.convert_to_svg:10 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_to_svg_file:10 msgid "Path to generated SVG file." msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.generate_tex_file:1 msgid "Takes a tex expression (and an optional tex environment), and returns a fully formed tex file ready for compilation." msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.generate_tex_file:4 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_to_svg_file:3 msgid "String containing the TeX expression to be rendered, e.g. ``\\sqrt{2}`` or ``foo``" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.generate_tex_file:6 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_to_svg_file:5 msgid "The string containing the environment in which the expression should be typeset, e.g. ``align*``" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.generate_tex_file:8 #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_to_svg_file:7 msgid "Template class used to typesetting. If not set, use default template set via `config[\"tex_template\"]`" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.generate_tex_file:11 msgid "Path to generated TeX file" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_compilation_command:1 msgid "Prepares the tex compilation command with all necessary cli flags" msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_compilation_command:9 msgid "Path to the directory where compiler output will be stored." msgstr "" #: ../../../manim/utils/tex_file_writing.py:docstring of manim.utils.tex_file_writing.tex_compilation_command:12 msgid "Compilation command according to given parameters" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.tex_templates.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.tex_templates.rst:2 msgid "tex\\_templates" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates:1 msgid "A library of LaTeX templates." msgstr "" #: ../../source/reference/manim.utils.tex_templates.rst:15 msgid "Classes" msgstr "" #: ../../source/reference/manim.utils.tex_templates.rst:22::1 msgid "A collection of TeX templates for the fonts described at http://jf.burnol.free.fr/showcase.html" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.tex_templates.TexFontTemplates.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.tex_templates.TexFontTemplates.rst:2 msgid "TexFontTemplates" msgstr "" #: ../../source/reference/manim.utils.tex_templates.TexFontTemplates.rst:4 msgid "Qualified name: ``manim.utils.tex\\_templates.TexFontTemplates``" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates:1 msgid "Bases: :py:class:`object`" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates:1 msgid "A collection of TeX templates for the fonts described at http://jf.burnol.free.fr/showcase.html" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates:3 msgid "These templates are specifically designed to allow you to typeset formulae and mathematics using different fonts. They are based on the mathastext LaTeX package." msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates:7 msgid "Examples" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates:8 msgid "Normal usage as a value for the keyword argument tex_template of Tex() and MathTex() mobjects::" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates:13 msgid "Notes" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates:14 msgid "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." msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates:20 msgid "To experiment, try to render the TexFontTemplateLibrary example scene:" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates:20 msgid "``manim path/to/manim/example_scenes/advanced_tex_fonts.py TexFontTemplateLibrary -p -ql``" msgstr "" #: ../../source/reference/manim.utils.tex_templates.TexFontTemplates.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.utils.tex_templates.TexFontTemplates.rst:21 msgid "Attributes" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1 msgid "American Typewriter" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.antykwa:1 msgid "Antykwa Półtawskiego (TX Fonts for Greek and math symbols)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.apple_chancery:1 msgid "Apple Chancery" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.auriocus_kalligraphicus:1 msgid "Auriocus Kalligraphicus (Symbol Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.baskervald_adf_fourier:1 msgid "Baskervald ADF with Fourier" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.baskerville_it:1 msgid "Baskerville (Italic)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.biolinum:1 msgid "Biolinum" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.brushscriptx:1 msgid "BrushScriptX-Italic (PX math and Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.chalkboard_se:1 msgid "Chalkboard SE" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.chalkduster:1 msgid "Chalkduster" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.comfortaa:1 msgid "Comfortaa" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.comic_sans:1 msgid "Comic Sans MS" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.droid_sans:1 msgid "Droid Sans" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.droid_sans_it:1 msgid "Droid Sans (Italic)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.droid_serif:1 msgid "Droid Serif" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.droid_serif_px_it:1 msgid "Droid Serif (PX math symbols) (Italic)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.ecf_augie:1 msgid "ECF Augie (Euler Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.ecf_jd:1 msgid "ECF JD (with TX fonts)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.ecf_skeetch:1 msgid "ECF Skeetch (CM Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.ecf_tall_paul:1 msgid "ECF Tall Paul (with Symbol font)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.ecf_webster:1 msgid "ECF Webster (with TX fonts)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.electrum_adf:1 msgid "Electrum ADF (CM Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.epigrafica:1 msgid "Epigrafica" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.fourier_utopia:1 msgid "Fourier Utopia (Fourier upright Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.french_cursive:1 msgid "French Cursive (Euler Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.gfs_bodoni:1 msgid "GFS Bodoni" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.gfs_didot:1 msgid "GFS Didot (Italic)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.gfs_neoHellenic:1 msgid "GFS NeoHellenic" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.gnu_freesans_tx:1 msgid "GNU FreeSerif (and TX fonts symbols)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.gnu_freeserif_freesans:1 msgid "GNU FreeSerif and FreeSans" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.helvetica_fourier_it:1 msgid "Helvetica with Fourier (Italic)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.latin_modern_tw:1 msgid "Latin Modern Typewriter Proportional" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.latin_modern_tw_it:1 msgid "Latin Modern Typewriter Proportional (CM Greek) (Italic)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.libertine:1 msgid "Libertine" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.libris_adf_fourier:1 msgid "Libris ADF with Fourier" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.minion_pro_myriad_pro:1 msgid "Minion Pro and Myriad Pro (and TX fonts symbols)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.minion_pro_tx:1 msgid "Minion Pro (and TX fonts symbols)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.new_century_schoolbook:1 msgid "New Century Schoolbook (Symbol Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.new_century_schoolbook_px:1 msgid "New Century Schoolbook (Symbol Greek, PX math symbols)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.noteworthy_light:1 msgid "Noteworthy Light" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.palatino:1 msgid "Palatino (Symbol Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.papyrus:1 msgid "Papyrus" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.romande_adf_fourier_it:1 msgid "Romande ADF with Fourier (Italic)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.slitex:1 msgid "SliTeX (Euler Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.times_fourier_it:1 msgid "Times with Fourier (Italic)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.urw_avant_garde:1 msgid "URW Avant Garde (Symbol Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.urw_zapf_chancery:1 msgid "URW Zapf Chancery (CM Greek)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.venturis_adf_fourier_it:1 msgid "Venturis ADF with Fourier (Italic)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.verdana_it:1 msgid "Verdana (Italic)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.vollkorn:1 msgid "Vollkorn (TX fonts for Greek and math symbols)" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexFontTemplates.american_typewriter:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexFontTemplates.vollkorn_fourier_it:1 msgid "Vollkorn with Fourier (Italic)" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim.utils.tex_templates.TexTemplateLibrary.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference/manim.utils.tex_templates.TexTemplateLibrary.rst:2 msgid "TexTemplateLibrary" msgstr "" #: ../../source/reference/manim.utils.tex_templates.TexTemplateLibrary.rst:4 msgid "Qualified name: ``manim.utils.tex\\_templates.TexTemplateLibrary``" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexTemplateLibrary:1 msgid "Bases: :py:class:`object`" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexTemplateLibrary:1 msgid "A collection of basic TeX template objects" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexTemplateLibrary:4 msgid "Examples" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexTemplateLibrary:5 msgid "Normal usage as a value for the keyword argument tex_template of Tex() and MathTex() mobjects::" msgstr "" #: ../../source/reference/manim.utils.tex_templates.TexTemplateLibrary.rst:14 msgid "Methods" msgstr "" #: ../../source/reference/manim.utils.tex_templates.TexTemplateLibrary.rst:21 msgid "Attributes" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexTemplateLibrary.ctex:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexTemplateLibrary.ctex:1 msgid "An instance of the TeX template used by 3b1b when using the use_ctex flag" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexTemplateLibrary.ctex:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexTemplateLibrary.default:1 msgid "An instance of the default TeX template in manim" msgstr "" #: ../../../manim/utils/tex_templates.py:docstring of manim.utils.tex_templates.TexTemplateLibrary.ctex:1::1 #: ../../source/docstring of manim.utils.tex_templates.TexTemplateLibrary.simple:1 msgid "An instance of a simple TeX template with only basic AMS packages loaded" msgstr "" ================================================ FILE: docs/i18n/gettext/reference/manim_directive.ManimDirective.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim_directive.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference/manim_directive.skip_manim_node.pot ================================================ ================================================ FILE: docs/i18n/gettext/reference_index/animations.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference_index/animations.rst:2 msgid "Animations" msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Animate mobjects." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Animation of a mobject boundary and tracing of points." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Tools for displaying multiple animations at once." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Animate the display or removal of a mobject from a scene." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Fading in and out of view." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Animations that introduce mobjects to scene by growing them from points." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Animations drawing attention to particular mobjects." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Animations related to movement." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Animations for changing numbers." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Animations related to rotation." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Utilities for modifying the speed at which animations are played." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Animations transforming one mobject into another." msgstr "" #: ../../source/reference_index/animations.rst:23::1 msgid "Animations that try to transform Mobjects while keeping track of identical parts." msgstr "" ================================================ FILE: docs/i18n/gettext/reference_index/cameras.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference_index/cameras.rst:2 msgid "Cameras" msgstr "" #: ../../source/reference_index/cameras.rst:13::1 msgid "A camera converts the mobjects contained in a Scene into an array of pixels." msgstr "" #: ../../source/reference_index/cameras.rst:13::1 msgid "A camera that allows mapping between objects." msgstr "" #: ../../source/reference_index/cameras.rst:13::1 msgid "A camera able to move through a scene." msgstr "" #: ../../source/reference_index/cameras.rst:13::1 msgid "A camera supporting multiple perspectives." msgstr "" ================================================ FILE: docs/i18n/gettext/reference_index/configuration.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference_index/configuration.rst:2 msgid "Configuration" msgstr "" #: ../../source/reference_index/configuration.rst:5 msgid "Module Index" msgstr "" #: ../../source/reference_index/configuration.rst:14::1 msgid "Set the global config and logger." msgstr "" #: ../../source/reference_index/configuration.rst:14::1 msgid "Utilities to create and set the config." msgstr "" ================================================ FILE: docs/i18n/gettext/reference_index/mobjects.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference_index/mobjects.rst:2 msgid "Mobjects" msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Special rectangles." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Various geometric Mobjects." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Mobjects used to represent mathematical graphs (think graph theory, not plotting)." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Coordinate systems and function graphing related mobjects." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Utilities for Manim's logo and banner." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Mobjects representing matrices." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Base classes for objects that can be displayed." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Mobjects related to SVG images." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Mobjects representing tables." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Mobjects used to display Text using Pango or LaTeX." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Three-dimensional mobjects." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Specialized mobject base classes." msgstr "" #: ../../source/reference_index/mobjects.rst:22::1 msgid "Simple mobjects that can be used for storing (and updating) a value." msgstr "" ================================================ FILE: docs/i18n/gettext/reference_index/scenes.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference_index/scenes.rst:2 msgid "Scenes" msgstr "" #: ../../source/reference_index/scenes.rst:15::1 msgid "A scene whose camera can be moved around." msgstr "" #: ../../source/reference_index/scenes.rst:15::1 msgid "building blocks of segmented video API" msgstr "" #: ../../source/reference_index/scenes.rst:15::1 msgid "Basic canvas for animations." msgstr "" #: ../../source/reference_index/scenes.rst:15::1 msgid "The interface between scenes and ffmpeg." msgstr "" #: ../../source/reference_index/scenes.rst:15::1 msgid "A scene suitable for rendering three-dimensional objects and animations." msgstr "" #: ../../source/reference_index/scenes.rst:15::1 msgid "A scene suitable for vector spaces." msgstr "" ================================================ FILE: docs/i18n/gettext/reference_index/utilities_misc.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/reference_index/utilities_misc.rst:2 msgid "Utilities and other modules" msgstr "" #: ../../source/reference_index/utilities_misc.rst:5 msgid "Module Index" msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Constant definitions." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Utility functions related to Bézier curves." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Colors and utility functions for conversion between different color models." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Utilities that might be useful for configuration dictionaries." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Decorators for deprecating classes, functions and function parameters." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Debugging utilities." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Utilities for scene caching." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Utilities for using Manim with IPython (in particular: Jupyter notebooks)" msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Image manipulation utilities." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Operations on iterables." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Functions determining transformation paths between sets of points." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "A selection of rate functions, i.e., *speed curves* for animations." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "A collection of simple functions." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Sound-related utility functions." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Utility functions for two- and three-dimensional vectors." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "Utilities for processing LaTeX templates." msgstr "" #: ../../source/reference_index/utilities_misc.rst:31::1 msgid "A library of LaTeX templates." msgstr "" ================================================ FILE: docs/i18n/gettext/tutorials/a_deeper_look.pot ================================================ ================================================ FILE: docs/i18n/gettext/tutorials/building_blocks.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/tutorials/building_blocks.rst:3 msgid "Manim's building blocks" msgstr "" #: ../../source/tutorials/building_blocks.rst:5 msgid "This document explains the building blocks of manim and will give you all the necessary tools to start producing your own videos." msgstr "" #: ../../source/tutorials/building_blocks.rst:8 msgid "Essentially, manim puts at your disposal three different concepts that you can orchestrate together to produce mathematical animations: the **mathematical object** (or **mobject** for short), the **animation**, and the **scene**. As we will see in the following sections, each of these three concepts is implemented in manim as a separate class: the :class:`.Mobject`, :class:`.Animation`, and :class:`.Scene` classes." msgstr "" #: ../../source/tutorials/building_blocks.rst:15 msgid "It is recommended that you read the tutorials :doc:`quickstart` and :doc:`output_and_config` before reading this page." msgstr "" #: ../../source/tutorials/building_blocks.rst:21 msgid "Mobjects" msgstr "" #: ../../source/tutorials/building_blocks.rst:23 msgid "Mobjects are the basic building blocks for all manim animations. Each class that derives from :class:`.Mobject` represents an object that can be displayed on the screen. For example, simple shapes such as :class:`.Circle`, :class:`.Arrow`, and :class:`.Rectangle` are all mobjects. More complicated constructs such as :class:`.Axes`, :class:`.FunctionGraph`, or :class:`.BarChart` are mobjects as well." msgstr "" #: ../../source/tutorials/building_blocks.rst:30 msgid "If you try to display an instance of :class:`.Mobject` on the screen, you will only see an empty frame. The reason is that the :class:`.Mobject` class is an abstract base class of all other mobjects, i.e. it does not have any pre-determined visual shape that can be displayed on the screen. It is only the skeleton of a thing that *could* be displayed. Therefore, you will rarely need to use plain instances of :class:`.Mobject`; instead, you will most likely create instances of its derived classes. One of these derived classes is :class:`.VMobject`. The ``V`` stands for Vectorized Mobject. In essence, a vmobject is a mobject that uses `vector graphics `_ to be displayed. Most of the time, you will be dealing with vmobjects, though we will continue to use the term \"mobject\" to refer to the class of shapes that can be displayed on the screen, as it is more general." msgstr "" #: ../../source/tutorials/building_blocks.rst:44 msgid "Any object that can be displayed on the screen is a ``mobject``, even if it is not necessarily *mathematical* in nature." msgstr "" #: ../../source/tutorials/building_blocks.rst:47 msgid "To see examples of classes derived from :class:`.Mobject`, see the :mod:`.geometry` module. Most of these are in fact derived from :class:`.VMobject` as well." msgstr "" #: ../../source/tutorials/building_blocks.rst:53 msgid "Creating and displaying mobjects" msgstr "" #: ../../source/tutorials/building_blocks.rst:55 msgid "As explained in :doc:`quickstart`, usually all of the code in a manim script is put inside the :meth:`.construct` method of a :class:`.Scene` class. To display a mobject on the screen, call the :meth:`~.Scene.add` method of the containing :class:`.Scene`. This is the principal way of displaying a mobject on the screen when it is not being animated. To remove a mobject from the screen, simply call the :meth:`~.Scene.remove` method from the containing :class:`.Scene`." msgstr "" #: ../../source/tutorials/building_blocks.rst:75 msgid "Placing mobjects" msgstr "" #: ../../source/tutorials/building_blocks.rst:77 msgid "Let's define a new :class:`.Scene` called ``Shapes`` and :meth:`~.Scene.add` some mobjects to it. This script generates a static picture that displays a circle, a square, and a triangle:" msgstr "" #: ../../source/tutorials/building_blocks.rst:96 msgid "By default, mobjects are placed at the center of coordinates, or *origin*, when they are first created. They are also given some default colors. Further, the ``Shapes`` scene places the mobjects by using the :meth:`.shift` method. The square is shifted one unit in the ``UP`` direction from the origin, while the circle and triangle are shifted one unit ``LEFT`` and ``RIGHT``, respectively." msgstr "" #: ../../source/tutorials/building_blocks.rst:102 msgid "Unlike other graphics software, manim places the center of coordinates at the center of the screen. The positive vertical direction is up, and the positive horizontal direction is right. See also the constants ``ORIGIN``, ``UP``, ``DOWN``, ``LEFT``, ``RIGHT``, and others, defined in the :mod:`.constants` module." msgstr "" #: ../../source/tutorials/building_blocks.rst:108 msgid "There are many other possible ways to place mobjects on the screen, for example :meth:`.move_to`, :meth:`.next_to`, and :meth:`.align_to`. The next scene ``MobjectPlacement`` uses all three." msgstr "" #: ../../source/tutorials/building_blocks.rst:130 msgid "The :meth:`.move_to` method uses absolute units (measured relative to the ``ORIGIN``), while :meth:`.next_to` uses relative units (measured from the mobject passed as the first argument). :meth:`align_to` uses ``LEFT`` not as measuring units but as a way to determine the border to use for alignment. The coordinates of the borders of a mobject are determined using an imaginary bounding box around it." msgstr "" #: ../../source/tutorials/building_blocks.rst:137 msgid "Many methods in manim can be chained together. For example the two lines" msgstr "" #: ../../source/tutorials/building_blocks.rst:145 msgid "can be replaced by" msgstr "" #: ../../source/tutorials/building_blocks.rst:151 msgid "Technically, this is possible because most methods calls return the modified mobject." msgstr "" #: ../../source/tutorials/building_blocks.rst:155 msgid "Styling mobjects" msgstr "" #: ../../source/tutorials/building_blocks.rst:157 msgid "The following scene changes the default aesthetics of the mobjects." msgstr "" #: ../../source/tutorials/building_blocks.rst:174 msgid "This scene uses two of the main functions that change the visual style of a mobject: :meth:`.set_stroke` and :meth:`.set_fill`. The former changes the visual style of the mobject's border while the latter changes the style of the interior. By default, most mobjects have a fully transparent interior so you must specify the ``opacity`` parameter to display the color. An opacity of ``1.0`` means fully opaque, while ``0.0`` means fully transparent." msgstr "" #: ../../source/tutorials/building_blocks.rst:181 msgid "Only instances of :class:`.VMobject` implement :meth:`.set_stroke` and :meth:`.set_fill`. Instances of :class:`.Mobject` implement :meth:`.~Mobject.set_color` instead. The vast majority of pre-defined classes are derived from :class:`.VMobject` so it is usually safe to assume that you have access to :meth:`.set_stroke` and :meth:`.set_fill`." msgstr "" #: ../../source/tutorials/building_blocks.rst:189 msgid "Mobject on-screen order" msgstr "" #: ../../source/tutorials/building_blocks.rst:191 msgid "The next scene is exactly the same as the ``MobjectStyling`` scene from the previous section, except for exactly one line." msgstr "" #: ../../source/tutorials/building_blocks.rst:209 msgid "The only difference here (besides the scene name) is the order in which the mobjects are added to the scene. In ``MobjectStyling``, we added them as ``add(circle, square, triangle)``, whereas in ``MobjectZOrder`` we add them as ``add(triangle, square, circle)``." msgstr "" #: ../../source/tutorials/building_blocks.rst:214 msgid "As you can see, the order of the arguments of :meth:`~.Scene.add` determines the order that the mobjects are displayed on the screen, with the left-most arguments being put in the back." msgstr "" #: ../../source/tutorials/building_blocks.rst:221 msgid "Animations" msgstr "" #: ../../source/tutorials/building_blocks.rst:223 msgid "At the heart of manim is animation. Generally, you can add an animation to your scene by calling the :meth:`~.Scene.play` method." msgstr "" #: ../../source/tutorials/building_blocks.rst:243 msgid "Put simply, animations are procedures that interpolate between two mobjects. For example, :code:`FadeIn(square)` starts with a fully transparent version of :code:`square` and ends with a fully opaque version, interpolating between them by gradually increasing the opacity. :class:`.FadeOut` works in the opposite way: it interpolates from fully opaque to fully transparent. As another example, :class:`.Rotate` starts with the mobject passed to it as argument, and ends with the same object but rotated by a certain amount, this time interpolating the mobject's angle instead of its opacity." msgstr "" #: ../../source/tutorials/building_blocks.rst:254 msgid "Animating methods" msgstr "" #: ../../source/tutorials/building_blocks.rst:256 msgid "Any property of a mobject that can be changed can be animated. In fact, any method that changes a mobject's property can be used as an animation, through the use of :meth:`.animate`." msgstr "" #: ../../source/tutorials/building_blocks.rst:276 msgid ":meth:`.animate` is a property of all mobjects that animates the methods that come afterward. For example, :code:`square.set_fill(WHITE)` sets the fill color of the square, while :code:`square.animate.set_fill(WHITE)` animates this action." msgstr "" #: ../../source/tutorials/building_blocks.rst:281 msgid "Animation run time" msgstr "" #: ../../source/tutorials/building_blocks.rst:283 msgid "By default, any animation passed to :meth:`play` lasts for exactly one second. Use the :code:`run_time` argument to control the duration." msgstr "" #: ../../source/tutorials/building_blocks.rst:296 msgid "Creating a custom animation" msgstr "" #: ../../source/tutorials/building_blocks.rst:298 msgid "Even though Manim has many built-in animations, you will find times when you need to smoothly animate from one state of a :class:`~.Mobject` to another. If you find yourself in that situation, then you can define your own custom animation. You start by extending the :class:`~.Animation` class and overriding its :meth:`~.Animation.interpolate_mobject`. The :meth:`~.Animation.interpolate_mobject` method receives alpha as a parameter that starts at 0 and changes throughout the animation. So, you just have to manipulate self.mobject inside Animation according to the alpha value in its interpolate_mobject method. Then you get all the benefits of :class:`~.Animation` such as playing it for different run times or using different rate functions." msgstr "" #: ../../source/tutorials/building_blocks.rst:305 msgid "Let's say you start with a number and want to create a :class:`~.Transform` animation that transforms it to a target number. You can do it using :class:`~.FadeTransform`, which will fade out the starting number and fade in the target number. But when we think about transforming a number from one to another, an intuitive way of doing it is by incrementing or decrementing it smoothly. Manim has a feature that allows you to customize this behavior by defining your own custom animation." msgstr "" #: ../../source/tutorials/building_blocks.rst:310 msgid "You can start by creating your own ``Count`` class that extends :class:`~.Animation`. The class can have a constructor with three arguments, a :class:`~.DecimalNumber` Mobject, start, and end. The constructor will pass the :class:`~.DecimalNumber` Mobject to the super constructor (in this case, the :class:`~.Animation` constructor) and will set start and end." msgstr "" #: ../../source/tutorials/building_blocks.rst:314 msgid "The only thing that you need to do is to define how you want it to look at every step of the animation. Manim provides you with the alpha value in the :meth:`~.Animation.interpolate_mobject` method based on frame rate of video, rate function, and run time of animation played. The alpha parameter holds a value between 0 and 1 representing the step of the currently playing animation. For example, 0 means the beginning of the animation, 0.5 means halfway through the animation, and 1 means the end of the animation." msgstr "" #: ../../source/tutorials/building_blocks.rst:319 msgid "In the case of the ``Count`` animation, you just have to figure out a way to determine the number to display at the given alpha value and then set that value in the :meth:`~.Animation.interpolate_mobject` method of the ``Count`` animation. Suppose you are starting at 50 and incrementing until the :class:`~.DecimalNumber` reaches 100 at the end of the animation." msgstr "" #: ../../source/tutorials/building_blocks.rst:322 msgid "If alpha is 0, you want the value to be 50." msgstr "" #: ../../source/tutorials/building_blocks.rst:323 msgid "If alpha is 0.5, you want the value to be 75." msgstr "" #: ../../source/tutorials/building_blocks.rst:324 msgid "If alpha is 1, you want the value to be 100." msgstr "" #: ../../source/tutorials/building_blocks.rst:326 msgid "Generally, you start with the starting number and add only some part of the value to be increment according to the alpha value. So, the logic of calculating the number to display at each step will be ``50 + alpha * (100 - 50)``. Once you set the calculated value for the :class:`~.DecimalNumber`, you are done." msgstr "" #: ../../source/tutorials/building_blocks.rst:330 msgid "Once you have defined your ``Count`` animation, you can play it in your :class:`~.Scene` for any duration you want for any :class:`~.DecimalNumber` with any rate function." msgstr "" #: ../../source/tutorials/building_blocks.rst:367 msgid "Using coordinates of a mobject" msgstr "" #: ../../source/tutorials/building_blocks.rst:369 msgid "Mobjects contain points that define their boundaries. These points can be used to add other mobjects respectively to each other, e.g. by methods like :meth:`~.Mobject.get_center` , :meth:`~.Mobject.get_top` and :meth:`~.Mobject.get_start`. Here is an example of some important coordinates:" msgstr "" #: ../../source/tutorials/building_blocks.rst:401 msgid "Transforming mobjects into other mobjects" msgstr "" #: ../../source/tutorials/building_blocks.rst:402 msgid "It is also possible to transform a mobject into another mobject like this:" msgstr "" #: ../../source/tutorials/building_blocks.rst:413 msgid "The Transform function maps points of the previous mobject to the points of the next mobject. This might result in strange behaviour, e.g. when the dots of one mobject are arranged clockwise and the other points are arranged counterclockwise. Here it might help to use the `flip` function and reposition the points via the `roll `_ function of numpy:" msgstr "" #: ../../source/tutorials/building_blocks.rst:439 msgid "Scenes" msgstr "" ================================================ FILE: docs/i18n/gettext/tutorials/configuration.pot ================================================ ================================================ FILE: docs/i18n/gettext/tutorials/index.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/tutorials/index.rst:4 #: ../../source/tutorials/index.rst:4 msgid "Table of Contents" msgstr "" ================================================ FILE: docs/i18n/gettext/tutorials/output_and_config.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/tutorials/output_and_config.rst:2 msgid "Manim's Output Settings" msgstr "" #: ../../source/tutorials/output_and_config.rst:4 msgid "This document will focus on understanding manim's output files and some of the main command-line flags available." msgstr "" #: ../../source/tutorials/output_and_config.rst:7 msgid "This tutorial picks up where :doc:`quickstart` left off, so please read that document before starting this one." msgstr "" #: ../../source/tutorials/output_and_config.rst:11 msgid "Manim output folders" msgstr "" #: ../../source/tutorials/output_and_config.rst:13 msgid "At this point, you have just executed the following command." msgstr "" #: ../../source/tutorials/output_and_config.rst:19 msgid "Let's dissect what just happened step by step. First, this command executes manim on the file ``scene.py``, which contains our animation code. Further, 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 may contain more than one scene. Next, the flag `-p` tells manim to play the scene once it's rendered, and the `-ql` flag tells manim to render the scene in low quality." msgstr "" #: ../../source/tutorials/output_and_config.rst:27 msgid "After the video is rendered, you will see that manim has generated some new files and the project folder will look as follows." msgstr "" #: ../../source/tutorials/output_and_config.rst:44 msgid "There are quite a few new files. The main output is in ``media/videos/scene/480p15/SquareToCircle.mp4``. By default, the ``media`` folder will contain all of manim's output files. The ``media/videos`` subfolder contains the rendered videos. Inside of it, you will find one folder for each different video quality. In our case, since we used the ``-l`` flag, the video was generated at 480 resolution at 15 frames per second from the ``scene.py`` file. Therefore, the output can be found inside ``media/videos/scene/480p15``. The additional folders ``media/videos/scene/480p15/partial_movie_files`` as well as ``media/text`` and ``media/Tex`` contain files that are used by manim internally." msgstr "" #: ../../source/tutorials/output_and_config.rst:55 msgid "You can see how manim makes use of the generated folder structure by executing the following command," msgstr "" #: ../../source/tutorials/output_and_config.rst:62 msgid "The ``-ql`` flag (for low quality) has been replaced by the ``-qh`` flag, for high quality. Manim will take considerably longer to render this file, and it will play it once it's done since we are using the ``-p`` flag. The output should look like this:" msgstr "" #: ../../source/tutorials/output_and_config.rst:84 msgid "And the folder structure should look as follows." msgstr "" #: ../../source/tutorials/output_and_config.rst:102 msgid "Manim has created a new folder ``media/videos/1080p60``, which corresponds to the high resolution and the 60 frames per second. Inside of it, you can find the new ``SquareToCircle.mp4``, as well as the corresponding ``partial_movie_files``." msgstr "" #: ../../source/tutorials/output_and_config.rst:107 msgid "When working on a project with multiple scenes, and trying out multiple resolutions, the structure of the output directories will keep all your videos organized." msgstr "" #: ../../source/tutorials/output_and_config.rst:111 msgid "Further, manim has the option to output the last frame of a scene, when adding the flag ``-s``. This is the fastest option to quickly get a preview of a scene. The corresponding folder structure looks like this:" msgstr "" #: ../../source/tutorials/output_and_config.rst:134 msgid "Saving the last frame with ``-s`` can be combined with the flags for different resolutions, e.g. ``-s -ql``, ``-s -qh``" msgstr "" #: ../../source/tutorials/output_and_config.rst:141 msgid "Sections" msgstr "" #: ../../source/tutorials/output_and_config.rst:143 msgid "In addition to the movie output file one can use sections. Each section produces its own output video. The cuts between two sections can be set like this:" msgstr "" #: ../../source/tutorials/output_and_config.rst:157 msgid "All the animations between two of these cuts get concatenated into a single output video file. Be aware that you need at least one animation in each section. For example this wouldn't create an output video:" msgstr "" #: ../../source/tutorials/output_and_config.rst:171 msgid "One way of fixing this is to wait a little:" msgstr "" #: ../../source/tutorials/output_and_config.rst:182 msgid "For videos to be created for each section you have to add the ``--save_sections`` flag to the Manim call like this:" msgstr "" #: ../../source/tutorials/output_and_config.rst:188 msgid "If you do this, the ``media`` folder will look like this:" msgstr "" #: ../../source/tutorials/output_and_config.rst:214 msgid "As you can see each section receives their own output video in the ``sections`` directory. The JSON file in here contains some useful information for each section:" msgstr "" #: ../../source/tutorials/output_and_config.rst:255 msgid "This data can be used by third party applications, like a presentation system or automated video editing tool." msgstr "" #: ../../source/tutorials/output_and_config.rst:257 msgid "You can also skip rendering all animations belonging to a section like this:" msgstr "" #: ../../source/tutorials/output_and_config.rst:271 msgid "Some command line flags" msgstr "" #: ../../source/tutorials/output_and_config.rst:273 msgid "When executing the command" msgstr "" #: ../../source/tutorials/output_and_config.rst:279 msgid "it was necessary to specify which ``Scene`` class to render. This is because a single file can contain more than one ``Scene`` class. If your file contains multiple ``Scene`` classes, and you want to render them all, you can use the ``-a`` flag." msgstr "" #: ../../source/tutorials/output_and_config.rst:284 msgid "As discussed previously, the ``-ql`` specifies low render quality. This does not look very good, but is very useful for rapid prototyping and testing. The other options that specify render quality are ``-qm``, ``-qh``, and ``-qk`` for medium, high, and 4k quality, respectively." msgstr "" #: ../../source/tutorials/output_and_config.rst:289 msgid "The ``-p`` flag plays the animation once it is rendered. If you want to open the file browser at the location of the animation instead of playing it, you can use the ``-f`` flag. You can also omit these two flags." msgstr "" #: ../../source/tutorials/output_and_config.rst:293 msgid "Finally, by default manim will output .mp4 files. If you want your animations in .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 a different file extension." msgstr "" ================================================ FILE: docs/i18n/gettext/tutorials/quickstart.pot ================================================ msgid "" msgstr "" "Project-Id-Version: Manim \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../source/tutorials/quickstart.rst:3 msgid "Quickstart" msgstr "" #: ../../source/tutorials/quickstart.rst:6 msgid "Before proceeding, install Manim and make sure it's running properly by following the steps in :doc:`../installation`. For information on using Manim with Jupyterlab or Jupyter notebook, go to the documentation for the :meth:`IPython magic command `, ``%%manim``." msgstr "" #: ../../source/tutorials/quickstart.rst:14 msgid "Overview" msgstr "" #: ../../source/tutorials/quickstart.rst:16 msgid "This quickstart guide will lead you through creating a sample project using Manim: an animation engine for precise programmatic animations." msgstr "" #: ../../source/tutorials/quickstart.rst:19 msgid "First, you will use a command line interface to create a ``Scene``, the class through which Manim generates videos. In the ``Scene`` you will animate a circle. Then you will add another ``Scene`` showing a square transforming into a circle. This will be your introduction to Manim's animation ability. Afterwards, you will position multiple mathematical objects (``Mobject``\\s). Finally, you will learn the ``.animate`` syntax, a powerful feature that animates the methods you use to modify ``Mobject``\\s." msgstr "" #: ../../source/tutorials/quickstart.rst:29 msgid "Starting a new project" msgstr "" #: ../../source/tutorials/quickstart.rst:31 msgid "Start by creating a new folder. For the purposes of this guide, name the folder ``project``:" msgstr "" #: ../../source/tutorials/quickstart.rst:37 msgid "This folder is the root folder for your project. It contains all the files that Manim needs to function, as well as any output that your project produces." msgstr "" #: ../../source/tutorials/quickstart.rst:42 msgid "Animating a circle" msgstr "" #: ../../source/tutorials/quickstart.rst:44 msgid "Open a text editor, such as Notepad. Copy the following code snippet into the window:" msgstr "" #: ../../source/tutorials/quickstart.rst:57 msgid "Save the code snippet into your project folder with the name ``scene.py``." msgstr "" #: ../../source/tutorials/quickstart.rst:64 msgid "3. Open the command line, navigate to your project folder, and execute the following command:" msgstr "" #: ../../source/tutorials/quickstart.rst:71 msgid "Manim will output rendering information, then create an MP4 file. Your default movie player will play the MP4 file, displaying the following animation." msgstr "" #: ../../source/tutorials/quickstart.rst:83 msgid "If you see an animation of a pink circle being drawn, congratulations! You just wrote your first Manim scene from scratch." msgstr "" #: ../../source/tutorials/quickstart.rst:86 msgid "If you get an error message instead, you do not see a video, or if the video output does not look like the preceding animation, it is likely that Manim has not been installed correctly. Please refer to our :doc:`FAQ section ` for help with the most common issues." msgstr "" #: ../../source/tutorials/quickstart.rst:95 msgid "Explanation" msgstr "" #: ../../source/tutorials/quickstart.rst:97 msgid "Let's go over the script you just executed line by line to see how Manim was able to draw the circle." msgstr "" #: ../../source/tutorials/quickstart.rst:100 msgid "The first line imports all of the contents of the library:" msgstr "" #: ../../source/tutorials/quickstart.rst:106 msgid "This is the recommended way of using Manim, as a single script often uses multiple names from the Manim namespace. In your script, you imported and used ``Scene``, ``Circle``, ``PINK`` and ``Create``." msgstr "" #: ../../source/tutorials/quickstart.rst:110 msgid "Now let's look at the next two lines:" msgstr "" #: ../../source/tutorials/quickstart.rst:118 msgid "Most of the time, the code for scripting an animation is entirely contained within the :meth:`~.Scene.construct` method of a :class:`.Scene` class. Inside :meth:`~.Scene.construct`, you can create objects, display them on screen, and animate them." msgstr "" #: ../../source/tutorials/quickstart.rst:122 msgid "The next two lines create a circle and set its color and opacity:" msgstr "" #: ../../source/tutorials/quickstart.rst:129 msgid "Finally, the last line uses the animation :class:`.Create` to display the circle on your screen:" msgstr "" #: ../../source/tutorials/quickstart.rst:136 msgid "All animations must reside within the :meth:`~.Scene.construct` method of a class derived from :class:`.Scene`. Other code, such as auxiliary or mathematical functions, may reside outside the class." msgstr "" #: ../../source/tutorials/quickstart.rst:142 msgid "Transforming a square into a circle" msgstr "" #: ../../source/tutorials/quickstart.rst:144 msgid "With our circle animation complete, let's move on to something a little more complicated." msgstr "" #: ../../source/tutorials/quickstart.rst:146 msgid "Open ``scene.py``, and add the following code snippet below the ``CreateCircle`` class:" msgstr "" #: ../../source/tutorials/quickstart.rst:162 msgid "Render ``SquareToCircle`` by running the following command in the command line:" msgstr "" #: ../../source/tutorials/quickstart.rst:168 #: ../../source/tutorials/quickstart.rst:216 #: ../../source/tutorials/quickstart.rst:284 #: ../../source/tutorials/quickstart.rst:326 msgid "The following animation will render:" msgstr "" #: ../../source/tutorials/quickstart.rst:185 msgid "This example shows one of the primary features of Manim: the ability to implement complicated and mathematically intensive animations (such as cleanly interpolating between two geometric shapes) with just a few lines of code." msgstr "" #: ../../source/tutorials/quickstart.rst:191 msgid "Positioning ``Mobject``\\s" msgstr "" #: ../../source/tutorials/quickstart.rst:193 msgid "Next, let's go over some basic techniques for positioning ``Mobject``\\s." msgstr "" #: ../../source/tutorials/quickstart.rst:195 msgid "Open ``scene.py``, and add the following code snippet below the ``SquareToCircle`` method:" msgstr "" #: ../../source/tutorials/quickstart.rst:210 msgid "Render ``SquareAndCircle`` by running the following command in the command line:" msgstr "" #: ../../source/tutorials/quickstart.rst:232 msgid "``next_to`` is a ``Mobject`` method for positioning ``Mobject``\\s." msgstr "" #: ../../source/tutorials/quickstart.rst:234 msgid "We first specified the pink circle as the square's reference point by passing ``circle`` as the method's first argument. The second argument is used to specify the direction the ``Mobject`` is placed relative to the reference point. In this case, we set the direction to ``RIGHT``, telling Manim to position the square to the right of the circle. Finally, ``buff=0.5`` applied a small distance buffer between the two objects." msgstr "" #: ../../source/tutorials/quickstart.rst:240 msgid "Try changing ``RIGHT`` to ``LEFT``, ``UP``, or ``DOWN`` instead, and see how that changes the position of the square." msgstr "" #: ../../source/tutorials/quickstart.rst:242 msgid "Using positioning methods, you can render a scene with multiple ``Mobject``\\s, setting their locations in the scene using coordinates or positioning them relative to each other." msgstr "" #: ../../source/tutorials/quickstart.rst:246 msgid "For more information on ``next_to`` and other positioning methods, check out the list of :class:`.Mobject` methods in our reference manual." msgstr "" #: ../../source/tutorials/quickstart.rst:251 msgid "Using ``.animate`` syntax to animate methods" msgstr "" #: ../../source/tutorials/quickstart.rst:253 msgid "The final lesson in this tutorial is using ``.animate``, a ``Mobject`` method which animates changes you make to a ``Mobject``. When you prepend ``.animate`` to any method call that modifies a ``Mobject``, the method becomes an animation which can be played using ``self.play``. Let's return to ``SquareToCircle`` to see the differences between using methods when creating a ``Mobject``, and animating those method calls with ``.animate``." msgstr "" #: ../../source/tutorials/quickstart.rst:260 msgid "Open ``scene.py``, and add the following code snippet below the ``SquareAndCircle`` class:" msgstr "" #: ../../source/tutorials/quickstart.rst:278 msgid "Render ``AnimatedSquareToCircle`` by running the following command in the command line:" msgstr "" #: ../../source/tutorials/quickstart.rst:299 msgid "The first ``self.play`` creates the square. The second animates rotating it 45 degrees. The third transforms the square into a circle, and the last colors the circle pink. Although the end result is the same as that of ``SquareToCircle``, ``.animate`` shows ``rotate`` and ``set_fill`` being applied to the ``Mobject`` dynamically, instead of creating them with the changes already applied." msgstr "" #: ../../source/tutorials/quickstart.rst:305 msgid "Try other methods, like ``flip`` or ``shift``, and see what happens." msgstr "" #: ../../source/tutorials/quickstart.rst:307 msgid "Open ``scene.py``, and add the following code snippet below the ``AnimatedSquareToCircle`` class:" msgstr "" #: ../../source/tutorials/quickstart.rst:320 msgid "Render ``DifferentRotations`` by running the following command in the command line:" msgstr "" #: ../../source/tutorials/quickstart.rst:338 msgid "This ``Scene`` illustrates the quirks of ``.animate``. When using ``.animate``, Manim actually takes a ``Mobject``'s starting state and its ending state and interpolates the two. In the ``AnimatedSquareToCircle`` class, you can observe this when the square rotates: the corners of the square appear to contract slightly as they move into the positions required for the first square to transform into the second one." msgstr "" #: ../../source/tutorials/quickstart.rst:344 msgid "In ``DifferentRotations``, the difference between ``.animate``'s interpretation of rotation and the ``Rotate`` method is far more apparent. The starting and ending states of a ``Mobject`` rotated 180 degrees are the same, so ``.animate`` tries to interpolate two identical objects and the result is the left square. If you find that your own usage of ``.animate`` is causing similar unwanted behavior, consider using conventional animation methods like the right square, which uses ``Rotate``." msgstr "" #: ../../source/tutorials/quickstart.rst:353 msgid "You're done!" msgstr "" ================================================ FILE: docs/i18n/gettext/tutorials/using_text.pot ================================================ ================================================ FILE: docs/i18n/hi/LC_MESSAGES/index.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: hi\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/index.pot\n" "X-Crowdin-File-ID: 5163\n" "Language-Team: Hindi\n" "Language: hi_IN\n" "PO-Revision-Date: 2021-11-06 12:29\n" #: ../../source/index.rst:7 msgid "Manim Community Overview" msgstr "Manim Community की समीक्षा" #: ../../source/index.rst:9 msgid "Animating technical concepts is traditionally pretty tedious since it can be difficult to make the animations precise enough to convey them accurately. ``Manim`` uses Python to generate animations programmatically, making it possible to specify exactly how each one should run." msgstr "पारंपरिक तौर पर तकनीकी विषयों को अनुप्राणित करना अत्यंत जटिल होता है क्योंकि अनुप्राणनों को इतना सटीक बनाना कि उन्हें सही रूप में दर्शाया जाए, यह कठिन हो सकता है। ``Manim`` Python का उपयोग करके अनुप्राणन क्रमादेशित रूप में उत्पादित करता है, जिससे हर एक किस प्रकार चलना चाहिए, यह स्पष्ट करना संभव हो जाता है।" #: ../../source/index.rst:14 msgid "This project is still very much a work in progress, but we hope that the information here will make it easier for newcomers to get started using ``Manim``." msgstr "इस परियोजना पर कार्य अभी भी काफ़ी हद तक प्रगति पर है, पर हमें आशा है की यहाँ दी गई जानकारी नए उपयोगकर्ताओं के लिए ``Manim`` का प्रयोग आरंभ करना सरल बनाएगी।" #: ../../source/index.rst:20 msgid "All content of the docs is licensed under the MIT license. Especially for the examples you encounter: Feel free to use this code in your own projects!" msgstr "प्रलेखन का सभी विषय-वस्तु MIT अनुज्ञापत्र के तहत अनुज्ञापित किया गया है। विशेष रूप से वह सभी उदाहरण जिनका आप सामना करेंगे: अपने कार्यों एवं परियोजनाओं में इस कोड का उपयोग निसंकोच कीजिए!" #: ../../source/index.rst:23 msgid "We are curious to see the awesome projects you build using this library, feel free to share your projects with us `on Twitter `_, `Reddit `_, or via `Discord `_." msgstr "हम आपके द्वारा इस संग्रह का प्रयोग करके बनाए गए अद्भुत परियोजनाओं को देखने के लिए उत्सुक हैं, निसंकोच हमारे साथ `Twitter पर `_, `Reddit पर `_, अन्यथा `Discord `_ द्वारा अपनी परियोजनाएँ हमारे साथ साझा करें।" #: ../../source/index.rst:27 msgid "In case you publish your work made with Manim, we would appreciate if you add a link to `our homepage `_ or `our GitHub repository `_. If you use Manim in a scientific context, instructions on how to cite a particular release can be found `in our README `_." msgstr "यदि आप अपना Manim द्वारा बनाए गए कार्य को प्रकाशित करते हैं, हमें प्रसन्नता होगी यदि आप `हमारे मुखपृष्ट `_ या `हमारे GitHub कोष (रिपाॅज़िटोरी)`_ की कड़ी जोड़ें। अगर आप Manim का प्रयोग वैज्ञानिक संदर्भ में करते हैं, किसी विशेष अवतरण को उद्धृत करने के निर्देश `हमारे README `_ में पाए जा सकते हैं।" #: ../../source/index.rst:36 msgid "As a quick reference, here are some often used modules, classes and methods:" msgstr "तत्काल संगर्भ के रूप में, कुछ प्रायः उपयोग किए जाने वाले प्रतिरूपक (माॅड्यूल), वर्ग (क्लासेस) एवं प्रणालियाँ प्रस्तुत हैं:" #: ../../source/index.rst:38 msgid "Modules: :mod:`~.moving_camera_scene`, :mod:`~.tex_mobject`, :mod:`~.geometry`," msgstr "प्रतिरूपक: :mod:`~.moving_camera_scene`, :mod:`~.tex_mobject`, :mod:`~.geometry`," #: ../../source/index.rst:43 msgid "Classes: :class:`~.Mobject` , :class:`~.VMobject`, :class:`~.ValueTracker`, :class:`~.MathTex`, :class:`~.Angle`, :class:`~.Tex`, :class:`~.Text`," msgstr "वर्ग: :class:`~.Mobject` , :class:`~.VMobject`, :class:`~.ValueTracker`, :class:`~.MathTex`, :class:`~.Angle`, :class:`~.Tex`, :class:`~.Text`," ================================================ FILE: docs/i18n/pt/LC_MESSAGES/index.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: pt-BR\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/index.pot\n" "X-Crowdin-File-ID: 5163\n" "Language-Team: Portuguese, Brazilian\n" "Language: pt_BR\n" "PO-Revision-Date: 2021-11-06 12:29\n" #: ../../source/index.rst:7 msgid "Manim Community Overview" msgstr "Visão geral da comunidade" #: ../../source/index.rst:9 msgid "Animating technical concepts is traditionally pretty tedious since it can be difficult to make the animations precise enough to convey them accurately. ``Manim`` uses Python to generate animations programmatically, making it possible to specify exactly how each one should run." msgstr "Animar conceitos técnicos é tradicionalmente bastante tedioso, já que pode ser difícil tornar as animações suficientemente precisas para transmiti-las com precisão. ``Manim`` usa Python para gerar animações programáticas, tornando possível especificar exatamente como cada uma deve ser executada." #: ../../source/index.rst:14 msgid "This project is still very much a work in progress, but we hope that the information here will make it easier for newcomers to get started using ``Manim``." msgstr "Este projecto continua a ser, em grande medida, um trabalho em progresso. mas esperamos que a informação aqui torne mais fácil para iniciantes começarem a usar ``Manim``." #: ../../source/index.rst:20 msgid "All content of the docs is licensed under the MIT license. Especially for the examples you encounter: Feel free to use this code in your own projects!" msgstr "Todo o conteúdo da documentação está licenciado sob a licença MIT. Especialmente para os exemplos que você encontrou: Sinta-se à vontade para usar esse código em seus próprios projetos!" #: ../../source/index.rst:23 msgid "We are curious to see the awesome projects you build using this library, feel free to share your projects with us `on Twitter `_, `Reddit `_, or via `Discord `_." msgstr "Estamos curiosos para ver os projetos incríveis que você cria usando esta biblioteca, sinta-se livre para compartilhar seus projetos conosco `no Twitter `_, `Reddit `_, ou via `Discord `_." #: ../../source/index.rst:27 msgid "In case you publish your work made with Manim, we would appreciate if you add a link to `our homepage `_ or `our GitHub repository `_. If you use Manim in a scientific context, instructions on how to cite a particular release can be found `in our README `_." msgstr "No caso de publicar seu trabalho feito com Manim, Gostaríamos que você adicionasse um link `nossa página inicial `_ ou `nosso repositório no GitHub `_. Se você usar Manim em um contexto científico, instruções sobre como citar uma versão em particular podem ser encontradas `em nosso README `_." #: ../../source/index.rst:36 msgid "As a quick reference, here are some often used modules, classes and methods:" msgstr "Como referência rápida, aqui estão alguns módulos, classes e métodos frequentemente usados:" #: ../../source/index.rst:38 msgid "Modules: :mod:`~.moving_camera_scene`, :mod:`~.tex_mobject`, :mod:`~.geometry`," msgstr "Módulos: :mod:`~.moving_camera_scene`, :mod:`~.tex_mobject`, :mod:`~.geometry`," #: ../../source/index.rst:43 msgid "Classes: :class:`~.Mobject` , :class:`~.VMobject`, :class:`~.ValueTracker`, :class:`~.MathTex`, :class:`~.Angle`, :class:`~.Tex`, :class:`~.Text`," msgstr "Classe: :class:`~.Mobject` , :class:`~.VMobject`, :class:`~.ValueTracker`, :class:`~.MathTex`, :class:`~.Angle`, :class:`~.Tex`, :class:`~.Text`," ================================================ FILE: docs/i18n/sv/LC_MESSAGES/contributing.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: sv\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/contributing.pot\n" "X-Crowdin-File-ID: 5143\n" "Language-Team: Swedish\n" "Language: sv_SE\n" "PO-Revision-Date: 2021-11-06 12:29\n" #: ../../source/contributing.rst:3 msgid "Contributing" msgstr "Bidragande" #: ../../source/contributing.rst:5 msgid "Thank you for your interest in contributing to Manim! However you have decided to contribute or interact with the community, please always be civil and respect other members of the community. If you haven't read our :doc:`code of conduct`, do so here. Manim is Free and Open Source Software (FOSS) for mathematical animations. As such, **we welcome everyone** who is interested in mathematics, pedagogy, computer animations, open-source, software development, and beyond. Manim accepts many kinds of contributions, some are detailed below:" msgstr "Tack för ditt intresse för att bidra till Manim! Oavsett hur du bestämt dig för att bidra eller interagera med communityn, kom ihåg att alltid vara civiliserad och respektera andra medlemmar i communityn. Om du inte redan har gjort det, läs vår :doc:`uppförandekod`. Manim är en gratis programvara med öppen källkod (FOSS) för matematiska animationer. På grund av detta, **välkomnar vi alla** som är intresserade av matematik, pedagogik, datoranimationer, öppen källkod, mjukvaruutveckling och vidare. Manim tar emot många typer av bidrag, några exempel beskrivs nedan:" #: ../../source/contributing.rst:14 msgid "Code maintenance and development" msgstr "Underhåll och utveckling av kod" #: ../../source/contributing.rst:15 msgid "DevOps" msgstr "DevOps" #: ../../source/contributing.rst:16 msgid "Documentation" msgstr "Dokumentation" #: ../../source/contributing.rst:17 msgid "Developing educational content & narrative documentation" msgstr "Utveckla pedagogiskt innehåll & berättande dokumentation" #: ../../source/contributing.rst:18 msgid "Plugins to extend Manim functionality" msgstr "Plugins för att utöka Manims funktionalitet" #: ../../source/contributing.rst:19 msgid "Testing (graphical, unit & video)" msgstr "Testning (grafik, enhetstester & video)" #: ../../source/contributing.rst:20 msgid "Website design and development" msgstr "Webbplatsdesign och -utveckling" #: ../../source/contributing.rst:21 msgid "Translating documentation and docstrings" msgstr "Översätta dokumentation och docsträngar" #: ../../source/contributing.rst:24 msgid "Please ensure that you are reading the latest version of this guide by ensuring that \"latest\" is selected in the version switcher." msgstr "Se till att du läser den senaste versionen av denna guide genom att se till att \"senaste\" väljs i versionshanteraren." ================================================ FILE: docs/i18n/sv/LC_MESSAGES/examples.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: sv\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/examples.pot\n" "X-Crowdin-File-ID: 5161\n" "Language-Team: Swedish\n" "Language: sv_SE\n" "PO-Revision-Date: 2021-11-06 12:29\n" #: ../../source/examples.rst:3 msgid "Example Gallery" msgstr "Exempelgalleri" #: ../../source/examples.rst:5 msgid "This gallery contains a collection of best practice code snippets together with their corresponding video/image output, illustrating different functionalities all across the library. These are all under the MIT license, so feel free to copy & paste them to your projects. Enjoy this taste of Manim!" msgstr "Detta galleri innehåller en samling av kodstycken och de motsvarande videor/bilder som de producerar. Dessa kodstycken ses som exempel på bästa praxis och illustrerar flera olika funktioner som finns tillgängliga inom programbiblioteket. De är alla utgivna med MIT licens så varsågod att kopiera och klistra in dem i olika projekt. Vi hoppas ni njuter av denna försmak av Manims funktioner!" #: ../../source/examples.rst:13 msgid "This gallery is not the only place in our documentation where you can see explicit code and video examples: there are many more in our :doc:`reference manual ` -- see, for example, our documentation for the modules :mod:`~.tex_mobject`, :mod:`~.geometry`, :mod:`~.moving_camera_scene`, and many more." msgstr "Detta galleri är inte den enda platsen i vår dokumentation där du kan se explicit kod och videoexempel. Det finns många andra platser i vår :doc:`reference manual ` -- se till exempel vår dokumentation för modulerna :mod:`~.tex_mobject`, :mod:`~.geometry`, :mod:`~.moving_camera_scene` och många andra." #: ../../source/examples.rst:19 msgid "Check out our `interactive Jupyter environment `_ which allows running the examples online, without requiring a local installation." msgstr "Kolla in vår `interaktiva Jupyter-miljö `_ som gör det möjligt att köra exemplen online utan att det krävs en lokal installation." #: ../../source/examples.rst:23 msgid "Also, visit our `Twitter `_ for more *manimations*!" msgstr "Besök även vår `Twitter `_ för fler *manimationer*!" #: ../../source/examples.rst:29 msgid "Basic Concepts" msgstr "Grundläggande Begrepp" #: ../../source/examples.rst:98 msgid "Animations" msgstr "Animationer" #: ../../source/examples.rst:180 msgid "You can use multiple ValueTrackers simultaneously." msgstr "Du kan använda flera ValueTrackers samtidigt." #: ../../source/examples.rst:274 msgid "Plotting with Manim" msgstr "Plottar med Manim" #: ../../source/examples.rst:402 msgid "Special Camera Settings" msgstr "Speciella kamerainställningar" ================================================ FILE: docs/i18n/sv/LC_MESSAGES/index.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: sv\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/index.pot\n" "X-Crowdin-File-ID: 5163\n" "Language-Team: Swedish\n" "Language: sv_SE\n" "PO-Revision-Date: 2021-11-06 12:29\n" #: ../../source/index.rst:7 msgid "Manim Community Overview" msgstr "Manim Community Översikt" #: ../../source/index.rst:9 msgid "Animating technical concepts is traditionally pretty tedious since it can be difficult to make the animations precise enough to convey them accurately. ``Manim`` uses Python to generate animations programmatically, making it possible to specify exactly how each one should run." msgstr "Traditionellt så har det varit jobbigt att animera tekniska begrepp eftersom det är svårt att skapa animationer som är tillräckligt exakta för att förklara dem korrekt. ``Manim`` använder sig av Python för att generera animationer på ett programmatiskt sätt vilket gör det möjligt att ange exakt hur varje animation ska köras." #: ../../source/index.rst:14 msgid "This project is still very much a work in progress, but we hope that the information here will make it easier for newcomers to get started using ``Manim``." msgstr "Detta projekt är fortfarande i hög grad ett pågående arbete, men vi hoppas att informationen här kommer att göra det lättare för nykomlingar att komma igång med ``Manim``." #: ../../source/index.rst:20 msgid "All content of the docs is licensed under the MIT license. Especially for the examples you encounter: Feel free to use this code in your own projects!" msgstr "Allt innehåll i dokumentationen är licensierat under MIT-licensen. Detta gäller även för alla exempel som du möter på. Använd gärna koden i dina egna projekt!" #: ../../source/index.rst:23 msgid "We are curious to see the awesome projects you build using this library, feel free to share your projects with us `on Twitter `_, `Reddit `_, or via `Discord `_." msgstr "Vi är nyfikna på att se de fantastiska projekt du skapar med hjälp av detta bibliotek! Dela gärna dina projekt med oss på Twitter `_, `Reddit `_ eller via `Discord `_." #: ../../source/index.rst:27 msgid "In case you publish your work made with Manim, we would appreciate if you add a link to `our homepage `_ or `our GitHub repository `_. If you use Manim in a scientific context, instructions on how to cite a particular release can be found `in our README `_." msgstr "Om du publicerar ett projekt du skapad med Manim så skulle vi uppskatta om du lägger till en länk till `vår hemsida `_ eller `vårt GitHub-arkiv `_. Om du använder Manim i ett vetenskapligt sammanhang så finns instruktioner om hur man citerar en viss version av Manim `i vår README `_." #: ../../source/index.rst:36 msgid "As a quick reference, here are some often used modules, classes and methods:" msgstr "Som snabbreferens ges här några av de oftast använda modulerna, klasserna och metoderna:" #: ../../source/index.rst:38 msgid "Modules: :mod:`~.moving_camera_scene`, :mod:`~.tex_mobject`, :mod:`~.geometry`," msgstr "Moduler: :mod:`~.moving_camera_scene`, :mod:`~.tex_mobject`, :mod:`~.geometry`," #: ../../source/index.rst:43 msgid "Classes: :class:`~.Mobject` , :class:`~.VMobject`, :class:`~.ValueTracker`, :class:`~.MathTex`, :class:`~.Angle`, :class:`~.Tex`, :class:`~.Text`," msgstr "Klasser: :class:`~.Mobject` , :class:`~.VMobject`, :class:`~.ValueTracker`, :class:`~.MathTex`, :class:`~.Angle`, :class:`~.Tex`, :class:`~.Text`," ================================================ FILE: docs/i18n/sv/LC_MESSAGES/installation.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: sv\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/installation.pot\n" "X-Crowdin-File-ID: 5165\n" "Language-Team: Swedish\n" "Language: sv_SE\n" "PO-Revision-Date: 2021-11-06 12:29\n" #: ../../source/installation.rst:2 msgid "Installation" msgstr "Installering" #: ../../source/installation.rst:4 msgid "Depending on your use case, different installation options are recommended: if you just want to play around with Manim for a bit, interactive in-browser notebooks are a really simple way of exploring the library as they require no local installation. Head over to https://try.manim.community to give our interactive tutorial a try." msgstr "Beroende på ditt användningsfall rekommenderas olika installationsalternativ: om du bara vill testa Manim först så är interaktiva notebooks lätta att utforska biblioteket med. De kan dessutom öppnas i din webbläsare utan att installera Manim lokalt vilket gör dem enkla att använda. Ta gärna en titt https://try.manim.community för en interaktiv nybörjarkurs." #: ../../source/installation.rst:10 msgid "Otherwise, if you intend to use Manim to work on an animation project, we recommend installing the library locally (either to your system's Python, or via Docker)." msgstr "Annars, om du har för avsikt att använda Manim för att jobba på ett animationsprojekt, så rekommenderar vi att du installerar biblioteket lokalt (antingen till ditt systems Python, eller via Docker)." #: ../../source/installation.rst:16 msgid "Note that there are several different versions of Manim. The instructions on this website are **only** for the *community edition*. Find out more about the :doc:`differences between Manim versions ` if you are unsure which version you should install." msgstr "Observera att det finns flera olika versioner av Manim. Instruktionerna på denna webbsida är **endast** för *community-utgåvan*. Läs mer om :doc:`skillnader mellan Manim versioner ` om du är osäker på vilken version du bör installera." #: ../../source/installation.rst:22 msgid ":ref:`Installing Manim to your system's Python `" msgstr ":ref:`Installera Manim till ditt systems Python `" #: ../../source/installation.rst:23 msgid ":ref:`Using Manim via Docker `" msgstr ":ref:`Använda Manim via Docker `" #: ../../source/installation.rst:24 msgid ":ref:`Interactive Jupyter notebooks via Binder / Google Colab `" msgstr ":ref:`Interaktiva Jupyter notebooks via Binder / Google Colab `" #: ../../source/installation.rst:31 msgid "Installing Manim locally" msgstr "Installering av Manim lokalt" #: ../../source/installation.rst:33 msgid "Manim is a Python library, and it can be `installed via pip `__. However, in order for Manim to work properly, some additional system dependencies need to be installed first. The following pages have operating system specific instructions for you to follow." msgstr "Manim är ett Pythonbibliotek, och det kan `installeras via pip `__. För att Manim ska fungera ordentligt måste dock ytterligare systemberoenden installeras först. Följande sidor har operativsystemsspecifika instruktioner för dig att följa." #: ../../source/installation.rst:41 msgid "Depending on your particular setup, the installation process might be slightly different. Make sure that you have tried to follow the steps on the following pages carefully, but in case you hit a wall we are happy to help: either `join our Discord `__, or start a new Discussion `directly on GitHub `__." msgstr "Beroende på ditt specifika system så kan installationsprocessen vara något annorlunda. Se till att du har försökt att följa stegen på följande sidor noga, men om du träffar en vägg så hjälper vi gärna till: du kan antingen `gå med i vår Discord `__, eller starta en ny diskussion `direkt på GitHub `__." #: ../../source/installation.rst:57 msgid "Once Manim is installed locally, you can proceed to our :doc:`quickstart guide ` which walks you through rendering a first simple scene." msgstr "När Manim väl installerats lokalt så kan du fortsätta till vår :doc:`snabbstartsguide ` som visar dig hur du renderar din första enkla scen." #: ../../source/installation.rst:61 msgid "As mentioned above, do not worry if there are errors or other problems: consult our :doc:`troubleshooting guide ` for help, or get in touch with the community via `GitHub discussions `__ or `Discord `__." msgstr "Som nämnts ovan så behöver du inte oroa dig om det finns fel eller andra problem: läs vår :doc:`felsökningsguide ` för att få hjälp, eller ta kontakt med communityn via `GitHub-diskussioner `__ eller `Discord `__." #: ../../source/installation.rst:73 msgid "Using Manim via Docker" msgstr "Användning av Manim via Docker" #: ../../source/installation.rst:75 msgid "`Docker `__ is a virtualization tool that allows the distribution of encapsulated software environments (containers)." msgstr "`Docker `__ är ett virtualiseringsverktyg som gör det möjligt att distribuera inkapslade mjukvarumiljöer (containers)." #: ../../source/installation.rst:78 msgid "The following pages contain more information about the docker image maintained by the community, ``manimcommunity/manim``:" msgstr "Följande sidor innehåller mer information om den Docker Image som underhålls av communityn, ``manimcommunity/manim``:" #: ../../source/installation.rst:89 msgid "Interactive Jupyter notebooks for your browser" msgstr "Interaktiva Jupyter notebooks för din webbläsare" #: ../../source/installation.rst:91 msgid "Manim ships with a built-in ``%%manim`` IPython magic command designed for the use within `Jupyter notebooks `__. Our interactive tutorial over at https://try.manim.community illustrates how Manim can be used from within a Jupyter notebook." msgstr "Manim ges ut med ett inbyggt ``%%manim`` IPython magic command som är utformat för användning inuti `Jupyter notebooks `__. Vår interaktiva nybörjarkurs på https://try.manim.community illustrerar hur Manim kan användas inuti en Jupyter notebook." #: ../../source/installation.rst:96 msgid "The following pages explain how you can setup interactive environments like that yourself:" msgstr "Följande sidor förklarar hur du kan skapa sådana interaktiva miljöer själv:" #: ../../source/installation.rst:105 msgid "Installation for developers" msgstr "Installering för utvecklare" ================================================ FILE: docs/i18n/sv/LC_MESSAGES/plugins.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: sv\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/plugins.pot\n" "X-Crowdin-File-ID: 5181\n" "Language-Team: Swedish\n" "Language: sv_SE\n" "PO-Revision-Date: 2021-11-06 12:30\n" #: ../../source/plugins.rst:5 msgid "Plugins" msgstr "Plugins" #: ../../source/plugins.rst:7 msgid "Plugins are features that extend Manim's core functionality. Since Manim is extensible and not everything belongs in its core, we'll go over how to install, use, and create your own plugins." msgstr "Plugins är tillägg som utökar Manims kärnfunktionalitet. Eftersom Manim är utökningsbart, och inte allt hör hemma dess kärna, så kommer vi gå över hur man kan installera, använda och skapa egna plugins." #: ../../source/plugins.rst:13 msgid "The standard naming convention for plugins is to prefix the plugin with ``manim-``. This makes them easy for users to find on package repositories such as PyPI." msgstr "Den namnkonvention som används som standard för plugins är att sätta prefixet ``manim-`` i början pluginens namn. Detta gör det enkelt för andra användare att hitta plugins via paketarkiv (repositories) som exempel PyPI." #: ../../source/plugins.rst:19 msgid "The plugin feature is new and under active development. Expect updates for the best practices on installing, using, and creating plugins; as well as new subcommands/flags for ``manim plugins``" msgstr "Pluginfunktionen är ny och under aktiv utveckling. Räkna med att de bästa metoderna att installera, använda och skapa plugins, samt nya underkommandon/flaggor för ``manim-plugins``, kommer uppdateras" #: ../../source/plugins.rst:25 msgid "See https://plugins.manim.community/ for the list of plugins available." msgstr "Se https://plugins.manim.community/ för listan över tillgängliga plugins." #: ../../source/plugins.rst:28 msgid "Installing Plugins" msgstr "Installering av Plugins" #: ../../source/plugins.rst:29 msgid "Plugins can be easily installed via the ``pip`` command:" msgstr "Plugins kan enkelt installeras via ``pip`` kommandot:" #: ../../source/plugins.rst:36 msgid "After installing a plugin, you may use the ``manim plugins`` command to list your available plugins, see the following help output:" msgstr "Efter att du har installerat en plugin kan du använda kommandot ``manim plugins`` för att lista dina tillgängliga plugins, se följande hjälpmeddelande:" #: ../../source/plugins.rst:52 msgid "You can list plugins as such:" msgstr "Du kan få en lista av plugins på detta sätt:" #: ../../source/plugins.rst:61 msgid "Using Plugins in Projects" msgstr "Användning av Plugins i Projekt" #: ../../source/plugins.rst:62 msgid "For enabling a plugin ``manim.cfg`` or command line parameters should be used." msgstr "För att aktivera en plugin bör ``manim.cfg`` eller command line parametrar användas." #: ../../source/plugins.rst:66 msgid "The plugins should be module name of the plugin and not PyPi name." msgstr "Pluginerna bör vara namnet på modulen, inte dess PyPI namn." #: ../../source/plugins.rst:68 msgid "Enabling plugins through ``manim.cfg``" msgstr "Aktivering av plugins via ``manim.cfg``" #: ../../source/plugins.rst:75 msgid "For specifying multiple plugins, command separated values must be used." msgstr "För att ange flera plugins så måste kommandoseparerade värden användas." #: ../../source/plugins.rst:83 msgid "Creating Plugins" msgstr "Skapa Plugins" #: ../../source/plugins.rst:84 msgid "Plugins are intended to extend Manim's core functionality. If you aren't sure whether a feature should be included in Manim's core, feel free to ask over on the `Discord server `_. Visit `manim-plugintemplate `_ on PyPI.org which serves as an in-depth tutorial for creating plugins." msgstr "Plugins är avsedda att utöka Manims kärnfunktionalitet. Om du inte är säker på om en funktion ska inkluderas i Manims kärna, fråga gärna på `Discord-servern `_. Besök även `manim-plugintemplate `_ på PyPI.org eftersom det fungerar som en fördjupad handledning för att skapa plugins." #: ../../source/plugins.rst:94 msgid "The only requirement of manim plugins is that they specify an entry point with the group, ``\"manim.plugins\"``. This allows Manim to discover plugins available in the user's environment. Everything regarding the plugin's directory structure, build system, and naming are completely up to your discretion as an author. The aforementioned template plugin is only a model using Poetry since this is the build system Manim uses. The plugin's `entry point `_ can be specified in poetry as:" msgstr "Det enda kravet på manim plugins är att de anger en ingångspunkt genom gruppen, ``\"manim.plugins\"``. Detta gör det möjligt för Manim att upptäcka plugins som finns i användarens arbetsmiljö. Allt om pluginens katalogstruktur, byggsystem och namngivning är helt upp till din dina egna val som författare. Den ovannämnda mallpluginen är bara en modell med Poesi eftersom detta är byggsystemet som Manim använder. Pluginens `ingångspunkt `_ kan anges i poesi som:" #: ../../source/plugins.rst:108 msgid "Here ``name`` is the name of the module of the plugin." msgstr "Här är ``name`` namnet på pluginens modul." #: ../../source/plugins.rst:110 msgid "Here ``object_reference`` can point to either a function in a module or a module itself. For example," msgstr "Här kan ``object_reference`` peka mot antingen en funktion i en modul eller en modul själv. Till exempel," #: ../../source/plugins.rst:118 msgid "Here a module is used as ``object_reference``, and when this plugin is enabled, Manim will look for ``__all__`` keyword defined in ``manim_plugintemplate`` and everything as a global variable one by one." msgstr "Här används en modul som ``object_reference``. När denna modul aktiveras så kommer Manim att leta efter nyckelordet ``__all__`` som definierats i ``manim_plugintemplate`` och allt som en global variabel en efter en." #: ../../source/plugins.rst:122 msgid "If ``object_reference`` is a function, Manim calls the function and expects the function to return a list of modules or functions that need to be defined globally." msgstr "Om ``object_reference`` är en funktion så kommer Manim anropa funktionen och förväntar sig att funktionen returnerar en lista över moduler eller funktioner som behöver definieras globalt." #: ../../source/plugins.rst:125 msgid "For example," msgstr "Till exempel," ================================================ FILE: docs/i18n/sv/LC_MESSAGES/reference.po ================================================ [Binary file] ================================================ FILE: docs/i18n/sv/LC_MESSAGES/reporting_bugs.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: sv\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/reporting_bugs.pot\n" "X-Crowdin-File-ID: 5833\n" "Language-Team: Swedish\n" "Language: sv_SE\n" "PO-Revision-Date: 2021-11-06 12:30\n" #: ../../source/reporting_bugs.rst:2 msgid "Reporting bugs" msgstr "Rapportering av buggar" #: ../../source/reporting_bugs.rst:4 msgid "One of the best ways of contributing to Manim is by reporting bugs. If you have encountered something that you believe is a bug, please follow these steps:" msgstr "Ett av de bästa sätten att bidra till Manim är genom att rapportera buggar. Om du har stött på något som du tror är en bugg, följ dessa steg:" #: ../../source/reporting_bugs.rst:8 msgid "First of all, make sure you are running the latest version of manim. If not, update your version and try again." msgstr "Först och främst, se till att du kör den senaste versionen av manim. Om inte, uppdatera din version och försök igen." #: ../../source/reporting_bugs.rst:11 msgid "Search for other users who may have had similar issues in the past. Search the repository's `issues page `_ (don't forget to search closed issues), bring it up on our `Discord server `_, use sites like StackOverflow, and exercise your best Google practices. If you can't find anything helpful, then go to the next step." msgstr "Sök efter andra användare som kan ha haft liknande problem tidigare. Sök i arkivets (repository) `issues page `_ (glöm inte att söka även bland slutna ärenden), ta upp det i vår `Discord-server `_, använd webbplatser som StackOverflow och använd dig av dina bästa Google-metoder. Om du inte kan hitta något hjälpsamt, gå sedan till nästa steg." #: ../../source/reporting_bugs.rst:17 msgid "Can reproduce the issue, i.e. that you have some code that illustrates the bug **every time** (or at least most of the time) it is executed." msgstr "Kan reproducera problemet, dvs att du har en kod som illustrerar felet **varje gång** (eller åtminstone de flesta gångerna) det körs." #: ../../source/reporting_bugs.rst:21 msgid "Clarify what behavior you expected, and how the actual behavior differs from your expectation." msgstr "Klargör vilket beteende du förväntade dig och hur det faktiska beteendet skiljer sig från dina förväntningar." #: ../../source/reporting_bugs.rst:24 msgid "Gather information about your environment, such as your operating system, python version, and any stack traces that the code may have generated (if applicable)." msgstr "Samla information om din miljö, såsom ditt operativsystem, python-version, och eventuella stackspår som koden kan ha genererat (om möjligt)." #: ../../source/reporting_bugs.rst:28 msgid "Please open an issue only after you have gathered this information. When submitting an issue, make sure to follow the template (this is the default text you are shown when first opening the 'New Issue' page). A community member will (hopefully) respond and start a conversation to address the issue." msgstr "Vänligen öppna ett problem först efter att du har samlat in denna information. När du skickar in ett ärende, se till att följa mallen (detta är standardtexten du visas när du först öppnar sidan 'Nytt ärende'. En medlem i communityn kommer (förhoppningsvis) att svara och starta en konversation för att ta itu med problemet." ================================================ FILE: docs/i18n/sv/LC_MESSAGES/tutorials.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: sv\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/tutorials.pot\n" "X-Crowdin-File-ID: 5835\n" "Language-Team: Swedish\n" "Language: sv_SE\n" "PO-Revision-Date: 2021-11-06 12:30\n" #: ../../source/tutorials.rst:4 #: ../../source/tutorials.rst:4 msgid "Table of Contents" msgstr "Innehållsförteckning" ================================================ FILE: docs/i18n/sv/LC_MESSAGES/tutorials/building_blocks.po ================================================ msgid "" msgstr "" "Project-Id-Version: 031f65d9b7a2e83b265c23f1c4450271\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Crowdin-Project: 031f65d9b7a2e83b265c23f1c4450271\n" "X-Crowdin-Project-ID: 1\n" "X-Crowdin-Language: sv\n" "X-Crowdin-File: /[ManimCommunity.manim] main/docs/i18n/gettext/tutorials/building_blocks.pot\n" "X-Crowdin-File-ID: 5839\n" "Language-Team: Swedish\n" "Language: sv_SE\n" "PO-Revision-Date: 2021-11-06 12:29\n" #: ../../source/tutorials/building_blocks.rst:3 msgid "Manim's building blocks" msgstr "Manims byggstenar" #: ../../source/tutorials/building_blocks.rst:5 msgid "This document explains the building blocks of manim and will give you all the necessary tools to start producing your own videos." msgstr "Detta dokument går igenom Manims byggstenar och ger dig alla verktyg som behövs för att börja producera dina egna videor." #: ../../source/tutorials/building_blocks.rst:8 msgid "Essentially, manim puts at your disposal three different concepts that you can orchestrate together to produce mathematical animations: the **mathematical object** (or **mobject** for short) the **animation**, and the **scene**. As we will see in the following sections, each of these three concepts is implemented in manim as a separate class: the :class:`.Mobject`, :class:`.Animation`, and :class:`.Scene` classes." msgstr "I huvudsak ställer Manim tre olika begrepp till ditt förfogande som du kan använda tillsammans med varandra för att producera matematiska animationer: det **matematiska objektet** (eller kortfattat **mobject**), **animationen** och **scenen**. Som vi kommer att se i följande avsnitt så implementeras var och ett av dessa i Manim som enskilda klasser: :class:`.Mobject`, :class:`.Animation`, och :class:`.Scene` klasserna." #: ../../source/tutorials/building_blocks.rst:15 msgid "It is recommended that you read the tutorials :doc:`quickstart` and :doc:`a_deeper_look` before reading this page." msgstr "Det rekommenderas att du först läser följande tutorials, :doc:`quickstart` och :doc:`a_deeper_look`, före du läser vidare på denna sidan." #: ../../source/tutorials/building_blocks.rst:21 msgid "Mobjects" msgstr "Mobjekt" #: ../../source/tutorials/building_blocks.rst:23 msgid "Mobjects are the basic building block for all manim animations. Each class that derives from :class:`.Mobject` represents an object that can be displayed on the screen. For example, simple shapes such as :class:`.Circle`, :class:`.Arrow`, and :class:`.Rectangle` are all mobjects. More complicated constructs such as :class:`.Axes`, :class:`.FunctionGraph`, or :class:`.BarChart` are mobjects as well." msgstr "Mobject är den grundläggande byggstenen för alla animationer som görs i manim. Varje klass som ärver från :class:`.Mobject` representerar ett objekt som kan visas på skärmen. Som exempel är :class:`.Circle`, :class:`.Arrow`, och :class:`.Rectangle` allihopa Mobjekt. Andra mer komplicerade exempel är exempelvis :class:`.Axes`, :class:`.FunctionGraph`, och :class:`.BarChart`." #: ../../source/tutorials/building_blocks.rst:30 msgid "If you try to display an instance of :class:`.Mobject` on the screen, you will only see an empty frame. The reason is that the :class:`.Mobject` class is an abstract base class of all other mobjects, i.e. it does not have any pre-determined visual shape that can be displayed on the screen. It is only the skeleton of a thing that *could* be displayed. Therefore, you will rarely need to use plain instances of :class:`.Mobject`; instead, you will most likely create instances of its derived classes. One of these derived classes is :class:`.VMobject`. The ``V`` stands for Vectorized Mobject. In essence, a vmobject is a mobject that uses `vector graphics `_ to be displayed. Most of the time, you will be dealing with vmobjects, though we will continue to use the term \"mobject\" to refer to the class of shapes that can be displayed on the screen, as it is more general." msgstr "Om du försöker visa en instans av :class:`.Mobject` på skärmen kommer du bara att se en tom ram. Anledningen är att klassen :class:`.Mobject` är en abstrakt basklass för alla andra mobjects, dvs den har inte någon förutbestämd visuell form som kan visas på skärmen. Den är bara en skelettstruktur av en sak som *kunde* ha visats. Därför behöver du sällan använda vanliga instanser av :class:`.Mobject`; istället kommer du sannolikt att skapa instanser av dess härledda klasser. En av dessa härledda klasser är :class:`.VMobject`. ``V`` står för Vectorized Mobject. I grund och botten är ett vmobject ett mobject som använder `vektorgrafik `_ för att visas. För det mesta kommer du egentligen att hantera vmobjects men vi kommer att fortsätta att använda termen \"mobject\" för att hänvisa till klasser av former som kan visas på skärmen. Det gör vi eftersom \"mobject\" är mer allmänt." #: ../../source/tutorials/building_blocks.rst:44 msgid "Any object that can be displayed on the screen is a ``mobject``, even if it is not necessarily *mathematical* in nature." msgstr "Varje objekt som kan visas på skärmen är ett ``mobject`` även om det inte nödvändigtvis har en *matematisk* natur." #: ../../source/tutorials/building_blocks.rst:47 msgid "To see examples of classes derived from :class:`.Mobject`, see the :mod:`.geometry` module. Most of these are in fact derived from :class:`.VMobject` as well." msgstr "För att se exempel på klasser härledda från :class:`.Mobject`, se :mod:`.geometry`-modulen. De flesta av dessa härrör i själva verket från :class:`.VMobject` också." #: ../../source/tutorials/building_blocks.rst:53 msgid "Creating and displaying mobjects" msgstr "Skapa och visa mobjects" #: ../../source/tutorials/building_blocks.rst:55 msgid "As explained in :doc:`quickstart`, usually all of the code in a manim script is put inside the :meth:`.construct` method of a :class:`.Scene` class. To display a mobject on the screen, call the :meth:`~.Scene.add` method of the containing :class:`.Scene`. This is the principal way of displaying a mobject on the screen when it is not being animated. To remove a mobject from the screen, simply call the :meth:`~.Scene.remove` method from the containing :class:`.Scene`." msgstr "Som det förklaras i :doc:`quickstart` brukar all kod i ett manim-skript placeras i :meth:`.construct` metoden av en :class:`.Scene` klass. För att visa ett mobject på skärmen, anropa :meth:`~.Scene.add` metoden som finns i klassen :class:`.Scene`. Detta är det huvudsakliga sättet att visa ett mobject på skärmen när det inte animeras. För att ta bort ett mobject från skärmen anropa helt enkelt :meth:`~.Scene.remove`-metoden från klassen :class:`.Scene`." #: ../../source/tutorials/building_blocks.rst:75 msgid "Placing mobjects" msgstr "Placering av mobject" #: ../../source/tutorials/building_blocks.rst:77 msgid "Let's define a new :class:`.Scene` called ``Shapes`` and :meth:`~.Scene.add` some mobjects to it. This script generates a static picture that displays a circle, a square, and a triangle:" msgstr "Vi definierar nu en ny :class:`.Scene` som heter ``Shapes`` och lägger till några mobject till den med hjälp av metoden :meth:`~.Scene.add`. Detta skript genererar en orörlig bild som visar en cirkel, en kvadrat, och en triangel:" #: ../../source/tutorials/building_blocks.rst:96 msgid "By default, mobjects are placed at the center of coordinates, or *origin*, when they are first created. They are also given some default colors. Further, the ``Shapes`` scene places the mobjects by using the :meth:`.shift` method. The square is shifted one unit in the ``UP`` direction from the origin, while the circle and triangle are shifted one unit ``LEFT`` and ``RIGHT``, respectively." msgstr "Som standard placeras mobjects i mitten av koordinatsystemet, eller *origin* (sv. origo), när de först skapas. De får också några standardfärger. Vidare placerar scenen ``Shapes`` mobject genom att använda :meth:`.shift` metoden. Kvadraten flyttas en enhet i ``UP`` riktningen från origo, medan cirkeln och triangeln respektive skiftas en enhet ``LEFT`` och ``RIGHT``." #: ../../source/tutorials/building_blocks.rst:102 msgid "Unlike other graphics software, manim places the center of coordinates at the center of the screen. The positive vertical direction is up, and the positive horizontal direction is right. See also the constants ``ORIGIN``, ``UP``, ``DOWN``, ``LEFT``, ``RIGHT``, and others, defined in the :mod:`.constants` module." msgstr "Till skillnad från andra grafikprogram placerar manim centrum av koordinatsystemet i mitten av skärmen. Den positiva vertikala riktningen är uppåt, och den positiva horisontella riktningen är åt höger. Se även konstanterna ``ORIGIN``, ``UP``, ``DOWN``, ``LEFT``, ``RIGHT`` och andra konstanter som definieras i :mod:`.constants`-modulen." #: ../../source/tutorials/building_blocks.rst:108 msgid "There are many other possible ways to place mobjects on the screen, for example :meth:`.move_to`, :meth:`.next_to`, and :meth:`.align_to`. The next scene ``MobjectPlacement`` uses all three." msgstr "Det finns många andra sätt att placera mobjekt på skärmen, till exempel genom metoderna :meth:`. move_to`, :meth:`.next_to` och :meth:`.align_to`. Nästa scen ``MobjectPlacement`` använder sig av alla tre." #: ../../source/tutorials/building_blocks.rst:130 msgid "The :meth:`.move_to` method uses absolute units (measured relative to the ``ORIGIN``), while :meth:`.next_to` uses relative units (measured from the mobject passed as the first argument). :meth:`align_to` uses ``LEFT`` not as measuring units but as a way to determine the border to use for alignment. The coordinates of the borders of a mobject are determined using an imaginary bounding box around it." msgstr "Metoden :meth:`.move_to` använder sig av absoluta enheter (alltså, givet i förhållande till ``ORIGIN``), medan :meth:`.next_to` använder sig av relativa enheter (alltså, givet i förhållande till det mobject som ges i första argumentet). :meth:`align_to` använder ``LEFT`` inte som en mätenhet utan som ett sätt att bestämma vilket gränssnitt som mobjectet ska justeras till. Koordinaterna för ett mobjects gränser bestäms med hjälp av en icke-visuell begränsningsruta runt den." #: ../../source/tutorials/building_blocks.rst:137 msgid "Many methods in manim can be chained together. For example the two lines" msgstr "Många metoder i manim kan kedjas ihop. Till exempel de två raderna" #: ../../source/tutorials/building_blocks.rst:145 msgid "can be replaced by" msgstr "kan ersättas med" #: ../../source/tutorials/building_blocks.rst:151 msgid "Technically, this is possible because most methods calls return the modified mobject." msgstr "Tekniskt sett är detta möjligt eftersom de flesta metodanrop returnerar det modifierade mobjectet." #: ../../source/tutorials/building_blocks.rst:155 msgid "Styling mobjects" msgstr "Styla mobject" #: ../../source/tutorials/building_blocks.rst:157 msgid "The following scene changes the default aesthetics of the mobjects." msgstr "Följande scen ändrar mobjektens standardutseende." #: ../../source/tutorials/building_blocks.rst:174 msgid "This scene uses two of the main functions that change the visual style of a mobject: :meth:`.set_stroke` and :meth:`.set_fill`. The former changes the visual style of the mobject's border while the latter changes the style of the interior. By default, most mobjects have a fully transparent interior so you must specify the ``opacity`` parameter to display the color. An opacity of ``1.0`` means fully opaque, while ``0.0`` means fully transparent." msgstr "Denna scen använder två huvudfunktioner som ändrar den visuella stilen på ett mobject: :meth:`.set_stroke` och :meth:`.set_fill`. Den första ändrar den visuella stilen på mobjectets rand medan den andra ändrar stilen på interiören. Som standard har de flesta mobjects en helt genomskinlig interiör så du måste ange parametern ``opacity`` för att visa färgen. Ett opacitetsvärde på ``1.0`` betyder helt ogenomskinlig, medan ``0.0`` betyder helt genomskinlig." #: ../../source/tutorials/building_blocks.rst:181 msgid "Only instances of :class:`.VMobject` implement :meth:`.set_stroke` and :meth:`.set_fill`. Instances of :class:`.Mobject` implement :meth:`.~Mobject.set_color` instead. The vast majority of pre-defined classes are derived from :class:`.VMobject` so it is usually safe to assume that you have access to :meth:`.set_stroke` and :meth:`.set_fill`." msgstr "Endast instanser av :class:`.VMobject` implementerar :meth:`.set_stroke` och :meth:`.set_fill`. Instanser av :class:`.Mobject` implementerar :meth:`.~Mobject.set_color` istället. De allra flesta fördefinierade klasser härstammar från :class:`.VMobject` så det är vanligtvis säkert att anta att du har tillgång till :meth:`.set_stroke` och :meth:`.set_fill`." #: ../../source/tutorials/building_blocks.rst:189 msgid "Mobject on-screen order" msgstr "Ordningen av Mobject på skärmen" #: ../../source/tutorials/building_blocks.rst:191 msgid "The next scene is exactly the same as the ``MobjectStyling`` scene from the previous section, except for exactly one line." msgstr "Nästa scen är exakt samma som ``MobjectStyling`` scenen från föregående avsnitt, med undantag för exakt en rad." #: ../../source/tutorials/building_blocks.rst:209 msgid "The only difference here (besides the scene name) is the order in which the mobjects are added to the scene. In ``MobjectStyling``, we added them as ``add(circle, square, triangle)``, whereas in ``MobjectZOrder`` we add them as ``add(triangle, square, circle)``." msgstr "Den enda skillnaden här (förutom scennamnet) är den ordning i vilken mobjects läggs till i scenen. I ``MobjectStyling``, lade vi till dem som ``add(circle, square, triangle)``, medan vi i ``MobjectZOrder`` lägger till dem som ``add(triangle, square, circle)``." #: ../../source/tutorials/building_blocks.rst:214 msgid "As you can see, the order of the arguments of :meth:`~.Scene.add` determines the order that the mobjects are displayed on the screen, with the left-most arguments being put in the back." msgstr "Som du kan se så bestämmer ordningen på argumenten i :meth:`~.Scene.add` den ordning som mobjects visas på skärmen, så att argumentet längst till vänster hamnar längst bak." #: ../../source/tutorials/building_blocks.rst:221 msgid "Animations" msgstr "Animationer" #: ../../source/tutorials/building_blocks.rst:223 msgid "At the heart of manim is animation. Generally, you can add an animation to your scene by calling the :meth:`~.Scene.play` method." msgstr "Manims största syfte är att animera. Allmänt så kan du lägga till en animation till din scen genom att anropa :meth:`~.Scene.play`-metoden." #: ../../source/tutorials/building_blocks.rst:244 msgid "Put simply, animations are procedures that interpolate between two mobjects. For example, :code:`FadeIn(square)` starts with a fully transparent version of :code:`square` and ends with a fully opaque version, interpolating between them by gradually increasing the opacity. :class:`.FadeOut` works in the opposite way: it interpolates from fully opaque to fully transparent. As another example, :class:`.Rotate` starts with the mobject passed to it as argument, and ends with the same object but rotated by a certain amount, this time interpolating the mobject's angle instead of its opacity." msgstr "Enkelt uttryckt är animationer procedurer som interpolerar mellan två mobjects. Till exempel börjar :code:`FadeIn(square)` med en helt genomskinlig version av :code:`square` och avslutas med en helt ogenomskinlig version, och detta sker genom att interpolera mellan dem genom att gradvis öka opaciteten. :class:`.FadeOut` fungerar på motsatt sätt: den interpolerar från helt ogenomskinlig till helt genomskinlig. Som ett annat exempel :class:`.Rotate` börjar med mobjectet som skickats till det som argument, och slutar med samma objekt men roterat med ett visst belopp, genom att denna gångenn interpolera mobjektets vinkel istället för dess opacitet." #: ../../source/tutorials/building_blocks.rst:255 msgid "Animating methods" msgstr "Animeringsmetoder" #: ../../source/tutorials/building_blocks.rst:257 msgid "Any property of a mobject that can be changed can be animated. In fact, any method that changes a mobject's property can be used as an animation, through the use of :meth:`.animate`." msgstr "Varje egenskap hos ett mobject som kan ändras kan även animeras. Faktum är att alla metoder som ändrar ett mobjects egenskaper kan användas som en animation genom att använda :meth:`.animate`." #: ../../source/tutorials/building_blocks.rst:277 msgid ":meth:`.animate` is a property of all mobjects that animates the methods that come afterward. For example, :code:`square.set_fill(WHITE)` sets the fill color of the square, while :code:`sqaure.animate.set_fill(WHITE)` animates this action." msgstr ":meth:`.animate` är en egenskap hos alla mobjekt som animerar metoderna som kommer efteråt. Till exempel anger :code:`square.set_fill(WHITE)` fyllnadsfärgen på fyrkanten, medan :code:`square.animate.set_fill(WHITE)` animerar detta." #: ../../source/tutorials/building_blocks.rst:282 msgid "Animation run time" msgstr "Animationens körtid" #: ../../source/tutorials/building_blocks.rst:284 msgid "By default, any animation passed to :meth:`play` lasts for exactly one second. Use the :code:`run_time` argument to control the duration." msgstr "Som standard varar varje animation som skickats till :meth:`play` i exakt en sekund. Använd argumentet :code:`run_time` för att kontrollera varaktigheten." #: ../../source/tutorials/building_blocks.rst:297 msgid "Creating a custom animation" msgstr "Skapa en egen animation" #: ../../source/tutorials/building_blocks.rst:299 msgid "Even though Manim has many built-in animations, you will find times when you need to smoothly animate from one state of a :class:`~.Mobject` to another. If you find yourself in that situation, then you can define your own custom animation. You start by extending the :class:`~.Animation` class and overriding its :meth:`~.Animation.interpolate_mobject`. The :meth:`~.Animation.interpolate_mobject` method receives alpha as a parameter that starts at 0 and changes throughout the animation. So, you just have to manipulate self.mobject inside Animation according to the alpha value in its interpolate_mobject method. Then you get all the benefits of :class:`~.Animation` such as playing it for different run times or using different rate functions." msgstr "Även om Manim har många inbyggda animationer, kommer det vara stunder när du behöver animera smidigt från ett tillstånd av ett :class:`~.Mobject` till ett annat. Om du befinner dig i den situationen kan du definiera en egen animation. Du börjar med att utöka :class:`~.Animation`-klassen och åsidosätter dess :meth:`~.Animation.interpolate_mobject`. :meth:`~.Animation.interpolate_mobject` -metoden får alfa som en parameter som startar vid 0 och ändras under hela animationen. Så du behöver bara manipulera self.mobject inuti Animation enligt alfa värdet i dess interpolate_mobject-metod. Då får du alla fördelar med :class:`~.Animation` såsom att spela det under olika körtider eller använda olika hastighetsfunktioner." #: ../../source/tutorials/building_blocks.rst:306 msgid "Let's say you start with a number and want to create a :class:`~.Transform` animation that transforms it to a target number. You can do it using :class:`~.FadeTransform`, which will fade out the starting number and fade in the target number. But when we think about transforming a number from one to another, an intuitive way of doing it is by incrementing or decrementing it smoothly. Manim has a feature that allows you to customize this behavior by defining your own custom animation." msgstr "Låt oss säga att du börjar med ett tal och vill skapa en :class:`~.Transform`-animation som omvandlar talet till ett annat givet tal. Du kan göra det med :class:`~.FadeTransform`, vilket kommer att tona bort det första talet och tona in det andra talet. Men när vi tänker på att omvandla ett tal till ett annat, är ett intuitivt sätt att göra det genom att inkrementera eller dekrementera det på ett smidigt sätt. Manim har en funktion som gör att du kan anpassa detta beteende genom att definiera din egen animation." #: ../../source/tutorials/building_blocks.rst:311 msgid "You can start by creating your own ``Count`` class that extends :class:`~.Animation`. The class can have a constructor with three arguments, a :class:`~.DecimalNumber` Mobject, start, and end. The constructor will pass the :class:`~.DecimalNumber` Mobject to the super constructor (in this case, the :class:`~.Animation` constructor) and will set start and end." msgstr "Du kan börja med att skapa din egen ``Count`` klass som utökar klassen :class:`~.Animation`. Klassen kan ha en konstruktor med tre argument, ett :class:`~.DecimalNumber` Mobject, start and end. Konstruktorn kommer att skicka :class:`~.DecimalNumber` Mobject till superkonstruktorn (i detta fall konstruktorn i :class:`~.Animation`) och kommer att ställa in start och slut." #: ../../source/tutorials/building_blocks.rst:315 msgid "The only thing that you need to do is to define how you want it to look at every step of the animation. Manim provides you with the alpha value in the :meth:`~.Animation.interpolate_mobject` method based on frame rate of video, rate function, and run time of animation played. The alpha parameter holds a value between 0 and 1 representing the step of the currently playing animation. For example, 0 means the beginning of the animation, 0.5 means halfway through the animation, and 1 means the end of the animation." msgstr "Det enda du behöver göra är att definiera hur du vill att det ska se ut för varje steg i animationen. Manim ger dig alfavärdet i :meth:`~. nimation.interpolate_mobject' metoden baserat på bildhastigheten av videon, hastighetsfunktionen och körtiden för den animation som spelas. Alfaparametern har ett värde mellan 0 och 1 som representerar steget i den aktuella animationen. Till exempel betyder 0 början av animationen, 0,5 betyder halvvägs genom animationen och 1 betyder slutet av animationen." #: ../../source/tutorials/building_blocks.rst:320 msgid "In the case of the ``Count`` animation, you just have to figure out a way to determine the number to display at the given alpha value and then set that value in the :meth:`~.Animation.interpolate_mobject` method of the ``Count`` animation. Suppose you are starting at 50 and incrementing until the :class:`~.DecimalNumber` reaches 100 at the end of the animation." msgstr "I fallet med ``Count`` animationen, behöver du bara hitta ett sätt att bestämma talet som ska visas för det givna alfavärdet och sedan ange det värdet i :meth:`~.Animation.interpolate_mobject` -metoden för ``Count``-animationen. Antag att du börjar med 50 och inkrementerar värdet tills :class:`~.DecimalNumber` når 100 i slutet av animationen." #: ../../source/tutorials/building_blocks.rst:323 msgid "If alpha is 0, you want the value to be 50." msgstr "Om alfa är 0, vill du att värdet ska vara 50." #: ../../source/tutorials/building_blocks.rst:324 msgid "If alpha is 0.5, you want the value to be 75." msgstr "Om alfa är 0,5, vill du att värdet ska vara 75." #: ../../source/tutorials/building_blocks.rst:325 msgid "If alpha is 1, you want the value to be 100." msgstr "Om alfa är 1, vill du att värdet ska vara 100." #: ../../source/tutorials/building_blocks.rst:327 msgid "Generally, you start with the starting number and add only some part of the value to be increment according to the alpha value. So, the logic of calculating the number to display at each step will be - 50 + alpha * (100 - 50). Once you set the calculated value for the :class:`~.DecimalNumber`, you are done." msgstr "Allmänt så börjar du med startnumret och adderar bara en del av värdet som ska inkrementeras enligt vad alfavärdet är. Så den programlogik som behövs för att beräkna talet som ska visas vid varje steg kommer att vara - 50 + alfa * (100 - 50). När du satt det beräknade värdet för :class:`~.DecimalNumber`-klassen är du klar." #: ../../source/tutorials/building_blocks.rst:331 msgid "Once you have defined your ``Count`` animation, you can play it in your :class:`~.Scene` for any duration you want for any :class:`~.DecimalNumber` with any rate function." msgstr "När du väl har definierat din ``Count`` animation kan du spela upp den i din :class:`~.Scene` med given varaktighet för vilken klass :class:`~.DecimalNumber` som helst, med valfri hastighetsfunktion." #: ../../source/tutorials/building_blocks.rst:368 msgid "Using coordinates of a mobject" msgstr "Använda ett mobjects koordinater" #: ../../source/tutorials/building_blocks.rst:370 msgid "Mobjects contain points that define their boundaries. These points can be used to add other mobjects respectively to each other, e.g. by methods like :meth:`~.Mobject.get_center` , :meth:`~.Mobject.get_top` and :meth:`~.Mobject.get_start`. Here is an example of some important coordinates:" msgstr "Mobject innehåller punkter som definierar objektets rand. Dessa punkter kan användas för att lägga till andra mobjects gentemot varandra, t.ex. genom metoder som :meth:`~.Mobject.get_center` , :meth:`~.Mobject.get_top` och :meth:`~.Mobject.get_start`. Här är ett exempel på några viktiga koordinater:" #: ../../source/tutorials/building_blocks.rst:402 msgid "Transforming mobjects into other mobjects" msgstr "Omvandla mobjects till andra mobjects" #: ../../source/tutorials/building_blocks.rst:403 msgid "It is also possible to transform a mobject into another mobject like this:" msgstr "Det är också möjligt att förvandla ett mobject till ett annat mobject på detta vis:" #: ../../source/tutorials/building_blocks.rst:414 msgid "The Transform function maps points of the previous mobject to the points of the next mobject. This might result in strange behaviour, e.g. when the dots of one mobject are arranged clockwise and the other points are arranged counterclockwise. Here it might help to use the `flip` function and reposition the points via the `roll `_ function of numpy:" msgstr "Transform-funktionen avbildar punkter hos det tidigare mobjectet till punkterna i nästa mobject. Detta kan resultera i konstigt beteende, t.ex. när punkter av ett mobject arrangeras medsols och det andra mobjectets punkter arrangeras motsols. Här kan det hjälpa att använda `flip`-funktionen och flytta punkterna via `roll `_ funktionen i numpy:" #: ../../source/tutorials/building_blocks.rst:440 msgid "Scenes" msgstr "Scener" ================================================ FILE: docs/i18n/sv/LC_MESSAGES/tutorials/quickstart.po ================================================ [Binary file] ================================================ FILE: docs/source/changelog.rst ================================================ ######### Changelog ######### This page contains a list of changes made between releases. Changes from versions that are not listed below (in particular patch-level releases since v0.18.0) are documented on our `GitHub release page `__. .. toctree:: changelog/0.19.0-changelog changelog/0.18.0-changelog changelog/0.17.3-changelog changelog/0.17.2-changelog changelog/0.17.1-changelog changelog/0.17.0-changelog changelog/0.16.0-changelog changelog/0.15.2-changelog changelog/0.15.1-changelog changelog/0.15.0-changelog changelog/0.14.0-changelog changelog/0.13.1-changelog changelog/0.13.0-changelog changelog/0.12.0-changelog changelog/0.11.0-changelog changelog/0.10.0-changelog changelog/0.9.0-changelog changelog/0.8.0-changelog changelog/0.7.0-changelog changelog/0.6.0-changelog changelog/0.5.0-changelog changelog/0.4.0-changelog changelog/0.3.0-changelog changelog/0.2.0-changelog changelog/0.1.1-changelog changelog/0.1.0-changelog ================================================ FILE: docs/source/conf.py ================================================ # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html from __future__ import annotations import os import sys from datetime import datetime from pathlib import Path import manim from manim.utils.docbuild.module_parsing import parse_module_attributes # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath(".")) # -- Project information ----------------------------------------------------- project = "Manim" copyright = f"2020-{datetime.now().year}, The Manim Community Dev Team" # noqa: A001 author = "The Manim Community Dev Team" # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ "sphinx.ext.autodoc", "sphinx_copybutton", "sphinx.ext.napoleon", "sphinx.ext.autosummary", "sphinx.ext.doctest", "sphinx.ext.extlinks", "sphinx.ext.viewcode", "sphinxext.opengraph", "manim.utils.docbuild.manim_directive", "manim.utils.docbuild.autocolor_directive", "manim.utils.docbuild.autoaliasattr_directive", "sphinx.ext.graphviz", "sphinx.ext.inheritance_diagram", "sphinxcontrib.programoutput", "myst_parser", "sphinx_design", "sphinx_reredirects", ] # Automatically generate stub pages when using the .. autosummary directive autosummary_generate = True myst_enable_extensions = ["colon_fence", "amsmath"] # redirects (for moved / deleted pages) redirects = { "installation/linux": "uv.html", "installation/macos": "uv.html", "installation/windows": "uv.html", } # generate documentation from type hints ALIAS_DOCS_DICT = parse_module_attributes()[0] autodoc_typehints = "description" autodoc_type_aliases = { alias_name: f"~manim.{module}.{alias_name}" for module, module_dict in ALIAS_DOCS_DICT.items() for category_dict in module_dict.values() for alias_name in category_dict } autoclass_content = "both" # controls whether functions documented by the autofunction directive # appear with their full module names add_module_names = False # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # Custom section headings in our documentation napoleon_custom_sections = ["Tests", ("Test", "Tests")] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. html_extra_path = ["robots.txt"] exclude_patterns: list[str] = [] # -- Options for internationalization ---------------------------------------- # Set the destination directory of the localized po files locale_dirs = ["../i18n/"] # Splits the text in more pot files. gettext_compact = False # Remove useless metadata from po files. gettext_last_translator = "" gettext_language_team = "" # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = "furo" html_favicon = str(Path("_static/favicon.ico")) # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] html_theme_options = { "source_repository": "https://github.com/ManimCommunity/manim/", "source_branch": "main", "source_directory": "docs/source/", "light_logo": "manim-logo-sidebar.svg", "dark_logo": "manim-logo-sidebar-dark.svg", "light_css_variables": { "color-content-foreground": "#000000", "color-background-primary": "#ffffff", "color-background-border": "#ffffff", "color-sidebar-background": "#f8f9fb", "color-brand-content": "#1c00e3", "color-brand-primary": "#192bd0", "color-link": "#c93434", "color-link--hover": "#5b0000", "color-inline-code-background": "#f6f6f6;", "color-foreground-secondary": "#000", }, "dark_css_variables": { "color-content-foreground": "#ffffffd9", "color-background-primary": "#131416", "color-background-border": "#303335", "color-sidebar-background": "#1a1c1e", "color-brand-content": "#2196f3", "color-brand-primary": "#007fff", "color-link": "#51ba86", "color-link--hover": "#9cefc6", "color-inline-code-background": "#262626", "color-foreground-secondary": "#ffffffd9", }, } html_title = f"Manim Community v{manim.__version__}" # This specifies any additional css files that will override the theme's html_css_files = ["custom.css"] latex_engine = "lualatex" # external links extlinks = { "issue": ("https://github.com/ManimCommunity/manim/issues/%s", "#%s"), "pr": ("https://github.com/ManimCommunity/manim/pull/%s", "#%s"), } # opengraph settings ogp_site_name = "Manim Community | Documentation" ogp_site_url = "https://docs.manim.community/" ogp_social_cards = { "image": "_static/logo.png", } # inheritance_graph settings inheritance_graph_attrs = { "concentrate": True, "size": '""', "splines": "ortho", "nodesep": 0.1, "ranksep": 0.2, } inheritance_node_attrs = { "penwidth": 0, "shape": "box", "width": 0.05, "height": 0.05, "margin": 0.05, } inheritance_edge_attrs = { "penwidth": 1, } html_js_files = ["responsiveSvg.js"] graphviz_output_format = "svg" ================================================ FILE: docs/source/contributing.rst ================================================ ############ Contributing ############ .. important:: Manim is currently undergoing a major refactor. In general, contributions implementing new features will not be accepted in this period. Other contributions unrelated to cleaning up the codebase may also take a longer period of time to be reviewed. This guide may quickly become outdated quickly; we highly recommend joining our `Discord server `__ to discuss any potential contributions and keep up to date with the latest developments. Thank you for your interest in contributing to Manim! However you have decided to contribute or interact with the community, please always be civil and respect other members of the community. If you haven't read our :doc:`code of conduct`, do so here. Manim is Free and Open Source Software (FOSS) for mathematical animations. As such, **we welcome everyone** who is interested in mathematics, pedagogy, computer animations, open-source, software development, and beyond. Manim accepts many kinds of contributions, some are detailed below: * Code maintenance and development * DevOps * Documentation * Developing educational content & narrative documentation * Plugins to extend Manim functionality * Testing (graphical, unit & video) * Website design and development * Translating documentation and docstrings To get an overview of what our community is currently working on, check out `our development project board `__. .. note:: Please ensure that you are reading the latest version of this guide by ensuring that "latest" is selected in the version switcher. Contributing can be confusing, so here are a few guides: .. toctree:: :maxdepth: 3 contributing/development contributing/docs contributing/testing contributing/performance contributing/internationalization ================================================ FILE: docs/source/examples.rst ================================================ ############### Example Gallery ############### This gallery contains a collection of best practice code snippets together with their corresponding video/image output, illustrating different functionalities all across the library. These are all under the MIT license, so feel free to copy & paste them to your projects. Enjoy this taste of Manim! .. tip:: This gallery is not the only place in our documentation where you can see explicit code and video examples: there are many more in our :doc:`reference manual ` -- see, for example, our documentation for the modules :mod:`~.tex_mobject`, :mod:`~.geometry`, :mod:`~.moving_camera_scene`, and many more. Check out our `interactive Jupyter environment `_ which allows running the examples online, without requiring a local installation. Also, visit our `Twitter `_ for more *manimations*! Basic Concepts ============== .. manim:: ManimCELogo :save_last_frame: :ref_classes: MathTex Circle Square Triangle class ManimCELogo(Scene): def construct(self): self.camera.background_color = "#ece6e2" logo_green = "#87c2a5" logo_blue = "#525893" logo_red = "#e07a5f" logo_black = "#343434" ds_m = MathTex(r"\mathbb{M}", fill_color=logo_black).scale(7) ds_m.shift(2.25 * LEFT + 1.5 * UP) circle = Circle(color=logo_green, fill_opacity=1).shift(LEFT) square = Square(color=logo_blue, fill_opacity=1).shift(UP) triangle = Triangle(color=logo_red, fill_opacity=1).shift(RIGHT) logo = VGroup(triangle, square, circle, ds_m) # order matters logo.move_to(ORIGIN) self.add(logo) .. manim:: BraceAnnotation :save_last_frame: :ref_classes: Brace :ref_methods: Brace.get_text Brace.get_tex class BraceAnnotation(Scene): def construct(self): dot = Dot([-2, -1, 0]) dot2 = Dot([2, 1, 0]) line = Line(dot.get_center(), dot2.get_center()).set_color(ORANGE) b1 = Brace(line) b1text = b1.get_text("Horizontal distance") b2 = Brace(line, direction=line.copy().rotate(PI / 2).get_unit_vector()) b2text = b2.get_tex("x-x_1") self.add(line, dot, dot2, b1, b2, b1text, b2text) .. manim:: VectorArrow :save_last_frame: :ref_classes: Dot Arrow NumberPlane Text class VectorArrow(Scene): def construct(self): dot = Dot(ORIGIN) arrow = Arrow(ORIGIN, [2, 2, 0], buff=0) numberplane = NumberPlane() 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:: GradientImageFromArray :save_last_frame: :ref_classes: ImageMobject 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) image.background_rectangle = SurroundingRectangle(image, color=GREEN) self.add(image, image.background_rectangle) .. manim:: BooleanOperations :ref_classes: Union Intersection Exclusion Difference class BooleanOperations(Scene): def construct(self): ellipse1 = Ellipse( width=4.0, height=5.0, fill_opacity=0.5, color=BLUE, stroke_width=10 ).move_to(LEFT) ellipse2 = ellipse1.copy().set_color(color=RED).move_to(RIGHT) bool_ops_text = MarkupText("Boolean Operation").next_to(ellipse1, UP * 3) ellipse_group = Group(bool_ops_text, ellipse1, ellipse2).move_to(LEFT * 3) self.play(FadeIn(ellipse_group)) i = Intersection(ellipse1, ellipse2, color=GREEN, fill_opacity=0.5) self.play(i.animate.scale(0.25).move_to(RIGHT * 5 + UP * 2.5)) intersection_text = Text("Intersection", font_size=23).next_to(i, UP) self.play(FadeIn(intersection_text)) u = Union(ellipse1, ellipse2, color=ORANGE, fill_opacity=0.5) union_text = Text("Union", font_size=23) self.play(u.animate.scale(0.3).next_to(i, DOWN, buff=union_text.height * 3)) union_text.next_to(u, UP) self.play(FadeIn(union_text)) e = Exclusion(ellipse1, ellipse2, color=YELLOW, fill_opacity=0.5) exclusion_text = Text("Exclusion", font_size=23) self.play(e.animate.scale(0.3).next_to(u, DOWN, buff=exclusion_text.height * 3.5)) exclusion_text.next_to(e, UP) self.play(FadeIn(exclusion_text)) d = Difference(ellipse1, ellipse2, color=PINK, fill_opacity=0.5) difference_text = Text("Difference", font_size=23) self.play(d.animate.scale(0.3).next_to(u, LEFT, buff=difference_text.height * 3.5)) difference_text.next_to(d, UP) self.play(FadeIn(difference_text)) Animations ========== .. manim:: PointMovingOnShapes :ref_classes: Circle Dot Line GrowFromCenter Transform MoveAlongPath Rotating 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:: MovingAround :ref_methods: Mobject.shift VMobject.set_fill Mobject.scale Mobject.rotate class MovingAround(Scene): def construct(self): square = Square(color=BLUE, fill_opacity=1) self.play(square.animate.shift(LEFT)) self.play(square.animate.set_fill(ORANGE)) self.play(square.animate.scale(0.3)) self.play(square.animate.rotate(0.4)) .. manim:: MovingAngle :ref_classes: Angle :ref_methods: Mobject.rotate class MovingAngle(Scene): def construct(self): rotation_center = LEFT theta_tracker = ValueTracker(110) line1 = Line(LEFT, RIGHT) line_moving = Line(LEFT, RIGHT) line_ref = line_moving.copy() line_moving.rotate( theta_tracker.get_value() * DEGREES, about_point=rotation_center ) a = Angle(line1, line_moving, radius=0.5, other_angle=False) tex = MathTex(r"\theta").move_to( Angle( line1, line_moving, radius=0.5 + 3 * SMALL_BUFF, other_angle=False ).point_from_proportion(0.5) ) self.add(line1, line_moving, a, tex) self.wait() line_moving.add_updater( lambda x: x.become(line_ref.copy()).rotate( theta_tracker.get_value() * DEGREES, about_point=rotation_center ) ) a.add_updater( lambda x: x.become(Angle(line1, line_moving, radius=0.5, other_angle=False)) ) tex.add_updater( lambda x: x.move_to( Angle( line1, line_moving, radius=0.5 + 3 * SMALL_BUFF, other_angle=False ).point_from_proportion(0.5) ) ) self.play(theta_tracker.animate.set_value(40)) self.play(theta_tracker.animate.increment_value(140)) self.play(tex.animate.set_color(RED), run_time=0.5) self.play(theta_tracker.animate.set_value(350)) .. tip:: You can use multiple ValueTrackers simultaneously. .. manim:: MovingDots class MovingDots(Scene): def construct(self): d1,d2=Dot(color=BLUE),Dot(color=GREEN) dg=VGroup(d1,d2).arrange(RIGHT,buff=1) l1=Line(d1.get_center(),d2.get_center()).set_color(RED) x=ValueTracker(0) y=ValueTracker(0) d1.add_updater(lambda z: z.set_x(x.get_value())) d2.add_updater(lambda z: z.set_y(y.get_value())) l1.add_updater(lambda z: z.become(Line(d1.get_center(),d2.get_center()))) self.add(d1,d2,l1) self.play(x.animate.set_value(5)) self.play(y.animate.set_value(4)) self.wait() .. manim:: MovingGroupToDestination class MovingGroupToDestination(Scene): def construct(self): group = VGroup(Dot(LEFT), Dot(ORIGIN), Dot(RIGHT, color=RED), Dot(2 * RIGHT)).scale(1.4) dest = Dot([4, 3, 0], color=YELLOW) self.add(group, dest) self.play(group.animate.shift(dest.get_center() - group[2].get_center())) self.wait(0.5) .. manim:: MovingFrameBox :ref_modules: manim.mobject.svg.tex_mobject :ref_classes: MathTex SurroundingRectangle class MovingFrameBox(Scene): def construct(self): text=MathTex( "\\frac{d}{dx}f(x)g(x)=","f(x)\\frac{d}{dx}g(x)","+", "g(x)\\frac{d}{dx}f(x)" ) self.play(Write(text)) framebox1 = SurroundingRectangle(text[1], buff = .1) framebox2 = SurroundingRectangle(text[3], buff = .1) self.play( Create(framebox1), ) self.wait() self.play( ReplacementTransform(framebox1,framebox2), ) self.wait() .. manim:: RotationUpdater :ref_methods: Mobject.add_updater Mobject.remove_updater class RotationUpdater(Scene): def construct(self): def updater_forth(mobj, dt): mobj.rotate_about_origin(dt) def updater_back(mobj, dt): mobj.rotate_about_origin(-dt) line_reference = Line(ORIGIN, LEFT).set_color(WHITE) line_moving = Line(ORIGIN, LEFT).set_color(YELLOW) line_moving.add_updater(updater_forth) self.add(line_reference, line_moving) self.wait(2) line_moving.remove_updater(updater_forth) line_moving.add_updater(updater_back) self.wait(2) line_moving.remove_updater(updater_back) self.wait(0.5) .. manim:: PointWithTrace :ref_classes: Rotating :ref_methods: VMobject.set_points_as_corners Mobject.add_updater class PointWithTrace(Scene): def construct(self): path = VMobject() dot = Dot() path.set_points_as_corners([dot.get_center(), dot.get_center()]) def update_path(path): previous_path = path.copy() previous_path.add_points_as_corners([dot.get_center()]) path.become(previous_path) path.add_updater(update_path) self.add(path, dot) self.play(Rotating(dot, angle=PI, about_point=RIGHT, run_time=2)) self.wait() self.play(dot.animate.shift(UP)) self.play(dot.animate.shift(LEFT)) self.wait() Plotting with Manim =================== .. manim:: SinAndCosFunctionPlot :save_last_frame: :ref_modules: manim.mobject.coordinate_systems :ref_classes: MathTex :ref_methods: Axes.plot Axes.get_vertical_line_to_graph Axes.input_to_graph_point Axes.get_axis_labels class SinAndCosFunctionPlot(Scene): def construct(self): axes = Axes( x_range=[-10, 10.3, 1], y_range=[-1.5, 1.5, 1], x_length=10, axis_config={"color": GREEN}, x_axis_config={ "numbers_to_include": np.arange(-10, 10.01, 2), "numbers_with_elongated_ticks": np.arange(-10, 10.01, 2), }, tips=False, ) axes_labels = axes.get_axis_labels() sin_graph = axes.plot(lambda x: np.sin(x), color=BLUE) cos_graph = axes.plot(lambda x: np.cos(x), color=RED) sin_label = axes.get_graph_label( sin_graph, "\\sin(x)", x_val=-10, direction=UP / 2 ) cos_label = axes.get_graph_label(cos_graph, label="\\cos(x)") vert_line = axes.get_vertical_line( axes.i2gp(TAU, cos_graph), color=YELLOW, line_func=Line ) line_label = axes.get_graph_label( cos_graph, r"x=2\pi", x_val=TAU, direction=UR, color=WHITE ) plot = VGroup(axes, sin_graph, cos_graph, vert_line) labels = VGroup(axes_labels, sin_label, cos_label, line_label) self.add(plot, labels) .. manim:: ArgMinExample class ArgMinExample(Scene): def construct(self): ax = Axes( x_range=[0, 10], y_range=[0, 100, 10], axis_config={"include_tip": False} ) labels = ax.get_axis_labels(x_label="x", y_label="f(x)") t = ValueTracker(0) def func(x): return 2 * (x - 5) ** 2 graph = ax.plot(func, color=MAROON) initial_point = [ax.coords_to_point(t.get_value(), func(t.get_value()))] dot = Dot(point=initial_point) dot.add_updater(lambda x: x.move_to(ax.c2p(t.get_value(), func(t.get_value())))) x_space = np.linspace(*ax.x_range[:2],200) minimum_index = func(x_space).argmin() self.add(ax, labels, graph, dot) self.play(t.animate.set_value(x_space[minimum_index])) self.wait() .. manim:: GraphAreaPlot :save_last_frame: :ref_modules: manim.mobject.coordinate_systems :ref_methods: Axes.plot Axes.get_vertical_line_to_graph Axes.get_area Axes.get_axis_labels class GraphAreaPlot(Scene): def construct(self): ax = Axes( x_range=[0, 5], y_range=[0, 6], x_axis_config={"numbers_to_include": [2, 3]}, tips=False, ) labels = ax.get_axis_labels() curve_1 = ax.plot(lambda x: 4 * x - x ** 2, x_range=[0, 4], color=BLUE_C) curve_2 = ax.plot( lambda x: 0.8 * x ** 2 - 3 * x + 4, x_range=[0, 4], color=GREEN_B, ) line_1 = ax.get_vertical_line(ax.input_to_graph_point(2, curve_1), color=YELLOW) line_2 = ax.get_vertical_line(ax.i2gp(3, curve_1), color=YELLOW) riemann_area = ax.get_riemann_rectangles(curve_1, x_range=[0.3, 0.6], dx=0.03, color=BLUE, fill_opacity=0.5) area = ax.get_area(curve_2, [2, 3], bounded_graph=curve_1, color=GREY, opacity=0.5) self.add(ax, labels, curve_1, curve_2, line_1, line_2, riemann_area, area) .. manim:: PolygonOnAxes :ref_classes: Axes Polygon class PolygonOnAxes(Scene): def get_rectangle_corners(self, bottom_left, top_right): return [ (top_right[0], top_right[1]), (bottom_left[0], top_right[1]), (bottom_left[0], bottom_left[1]), (top_right[0], bottom_left[1]), ] def construct(self): ax = Axes( x_range=[0, 10], y_range=[0, 10], x_length=6, y_length=6, axis_config={"include_tip": False}, ) t = ValueTracker(5) k = 25 graph = ax.plot( lambda x: k / x, color=YELLOW_D, x_range=[k / 10, 10.0, 0.01], use_smoothing=False, ) def get_rectangle(): polygon = Polygon( *[ ax.c2p(*i) for i in self.get_rectangle_corners( (0, 0), (t.get_value(), k / t.get_value()) ) ] ) polygon.stroke_width = 1 polygon.set_fill(BLUE, opacity=0.5) polygon.set_stroke(YELLOW_B) return polygon polygon = always_redraw(get_rectangle) dot = Dot() dot.add_updater(lambda x: x.move_to(ax.c2p(t.get_value(), k / t.get_value()))) dot.set_z_index(10) self.add(ax, graph, dot) self.play(Create(polygon)) self.play(t.animate.set_value(10)) self.play(t.animate.set_value(k / 10)) self.play(t.animate.set_value(5)) .. manim:: HeatDiagramPlot :save_last_frame: :ref_modules: manim.mobject.coordinate_systems :ref_methods: Axes.plot_line_graph Axes.get_axis_labels class HeatDiagramPlot(Scene): def construct(self): ax = Axes( x_range=[0, 40, 5], y_range=[-8, 32, 5], x_length=9, y_length=6, x_axis_config={"numbers_to_include": np.arange(0, 40, 5)}, y_axis_config={"numbers_to_include": np.arange(-5, 34, 5)}, tips=False, ) labels = ax.get_axis_labels( x_label=Tex(r"$\Delta Q$"), y_label=Tex(r"T[$^\circ C$]") ) x_vals = [0, 8, 38, 39] y_vals = [20, 0, 0, -5] graph = ax.plot_line_graph(x_values=x_vals, y_values=y_vals) self.add(ax, labels, graph) Special Camera Settings ======================= .. manim:: FollowingGraphCamera :ref_modules: manim.scene.moving_camera_scene :ref_classes: MovingCameraScene MoveAlongPath Restore :ref_methods: Axes.plot Mobject.add_updater class FollowingGraphCamera(MovingCameraScene): def construct(self): self.camera.frame.save_state() # create the axes and the curve ax = Axes(x_range=[-1, 10], y_range=[-1, 10]) graph = ax.plot(lambda x: np.sin(x), color=BLUE, x_range=[0, 3 * PI]) # create dots based on the graph moving_dot = Dot(ax.i2gp(graph.t_min, graph), color=ORANGE) dot_1 = Dot(ax.i2gp(graph.t_min, graph)) dot_2 = Dot(ax.i2gp(graph.t_max, graph)) self.add(ax, graph, dot_1, dot_2, moving_dot) self.play(self.camera.frame.animate.scale(0.5).move_to(moving_dot)) def update_curve(mob): mob.move_to(moving_dot.get_center()) self.camera.frame.add_updater(update_curve) self.play(MoveAlongPath(moving_dot, graph, rate_func=linear)) self.camera.frame.remove_updater(update_curve) self.play(Restore(self.camera.frame)) .. manim:: MovingZoomedSceneAround :ref_modules: manim.scene.zoomed_scene :ref_classes: ZoomedScene BackgroundRectangle UpdateFromFunc :ref_methods: Mobject.add_updater ZoomedScene.get_zoomed_display_pop_out_animation class MovingZoomedSceneAround(ZoomedScene): # contributed by TheoremofBeethoven, www.youtube.com/c/TheoremofBeethoven def __init__(self, **kwargs): ZoomedScene.__init__( self, zoom_factor=0.3, zoomed_display_height=1, zoomed_display_width=6, image_frame_stroke_width=20, zoomed_camera_config={ "default_frame_stroke_width": 3, }, **kwargs ) def construct(self): dot = Dot().shift(UL * 2) image = ImageMobject(np.uint8([[0, 100, 30, 200], [255, 0, 5, 33]])) image.height = 7 frame_text = Text("Frame", color=PURPLE, font_size=67) zoomed_camera_text = Text("Zoomed camera", color=RED, font_size=67) self.add(image, dot) zoomed_camera = self.zoomed_camera zoomed_display = self.zoomed_display frame = zoomed_camera.frame zoomed_display_frame = zoomed_display.display_frame frame.move_to(dot) frame.set_color(PURPLE) zoomed_display_frame.set_color(RED) zoomed_display.shift(DOWN) zd_rect = BackgroundRectangle(zoomed_display, fill_opacity=0, buff=MED_SMALL_BUFF) self.add_foreground_mobject(zd_rect) unfold_camera = UpdateFromFunc(zd_rect, lambda rect: rect.replace(zoomed_display)) frame_text.next_to(frame, DOWN) self.play(Create(frame), FadeIn(frame_text, shift=UP)) 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(FadeIn(zoomed_camera_text, shift=UP)) # Scale in x y z scale_factor = [0.5, 1.5, 0] self.play( frame.animate.scale(scale_factor), zoomed_display.animate.scale(scale_factor), FadeOut(zoomed_camera_text), FadeOut(frame_text) ) self.wait() self.play(ScaleInPlace(zoomed_display, 2)) self.wait() self.play(frame.animate.shift(2.5 * DOWN)) self.wait() self.play(self.get_zoomed_display_pop_out_animation(), unfold_camera, rate_func=lambda t: smooth(1 - t)) self.play(Uncreate(zoomed_display_frame), FadeOut(frame)) self.wait() .. manim:: FixedInFrameMObjectTest :save_last_frame: :ref_classes: ThreeDScene :ref_methods: ThreeDScene.set_camera_orientation ThreeDScene.add_fixed_in_frame_mobjects class FixedInFrameMObjectTest(ThreeDScene): def construct(self): axes = ThreeDAxes() self.set_camera_orientation(phi=75 * DEGREES, theta=-45 * DEGREES) text3d = Text("This is a 3D text") self.add_fixed_in_frame_mobjects(text3d) text3d.to_corner(UL) self.add(axes) self.wait() .. manim:: ThreeDLightSourcePosition :save_last_frame: :ref_classes: ThreeDScene ThreeDAxes Surface :ref_methods: ThreeDScene.set_camera_orientation class ThreeDLightSourcePosition(ThreeDScene): def construct(self): axes = ThreeDAxes() sphere = Surface( lambda u, v: np.array([ 1.5 * np.cos(u) * np.cos(v), 1.5 * np.cos(u) * np.sin(v), 1.5 * np.sin(u) ]), v_range=[0, TAU], u_range=[-PI / 2, PI / 2], checkerboard_colors=[RED_D, RED_E], resolution=(15, 32) ) 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:: ThreeDCameraRotation :ref_classes: ThreeDScene ThreeDAxes :ref_methods: ThreeDScene.begin_ambient_camera_rotation ThreeDScene.stop_ambient_camera_rotation class ThreeDCameraRotation(ThreeDScene): def construct(self): axes = ThreeDAxes() circle=Circle() self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) self.add(circle,axes) self.begin_ambient_camera_rotation(rate=0.1) self.wait() self.stop_ambient_camera_rotation() self.move_camera(phi=75 * DEGREES, theta=30 * DEGREES) self.wait() .. manim:: ThreeDCameraIllusionRotation :ref_classes: ThreeDScene ThreeDAxes :ref_methods: ThreeDScene.begin_3dillusion_camera_rotation ThreeDScene.stop_3dillusion_camera_rotation class ThreeDCameraIllusionRotation(ThreeDScene): def construct(self): axes = ThreeDAxes() circle=Circle() self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) self.add(circle,axes) self.begin_3dillusion_camera_rotation(rate=2) self.wait(PI/2) self.stop_3dillusion_camera_rotation() .. manim:: ThreeDSurfacePlot :save_last_frame: :ref_classes: ThreeDScene Surface class ThreeDSurfacePlot(ThreeDScene): def construct(self): resolution_fa = 24 self.set_camera_orientation(phi=75 * DEGREES, theta=-30 * DEGREES) def param_gauss(u, v): x = u y = v sigma, mu = 0.4, [0.0, 0.0] d = np.linalg.norm(np.array([x - mu[0], y - mu[1]])) z = np.exp(-(d ** 2 / (2.0 * sigma ** 2))) return np.array([x, y, z]) gauss_plane = Surface( param_gauss, resolution=(resolution_fa, resolution_fa), v_range=[-2, +2], u_range=[-2, +2] ) gauss_plane.scale(2, about_point=ORIGIN) gauss_plane.set_style(fill_opacity=1,stroke_color=GREEN) gauss_plane.set_fill_by_checkerboard(ORANGE, BLUE, opacity=0.5) axes = ThreeDAxes() self.add(axes,gauss_plane) Advanced Projects ================= .. manim:: OpeningManim :ref_classes: Tex MathTex Write FadeIn LaggedStart NumberPlane Create :ref_methods: NumberPlane.prepare_for_nonlinear_transform class OpeningManim(Scene): def construct(self): title = Tex(r"This is some \LaTeX") basel = MathTex(r"\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}") VGroup(title, basel).arrange(DOWN) self.play( Write(title), FadeIn(basel, shift=DOWN), ) self.wait() transform_title = Tex("That was a transform") transform_title.to_corner(UP + LEFT) self.play( Transform(title, transform_title), LaggedStart(*[FadeOut(obj, shift=DOWN) for obj in basel]), ) self.wait() grid = NumberPlane() grid_title = Tex("This is a grid", font_size=72) grid_title.move_to(transform_title) self.add(grid, grid_title) # Make sure title is on top of grid self.play( FadeOut(title), FadeIn(grid_title, shift=UP), Create(grid, run_time=3, lag_ratio=0.1), ) self.wait() grid_transform_title = Tex( r"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.animate.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:: SineCurveUnitCircle :ref_classes: MathTex Circle Dot Line VGroup :ref_methods: Mobject.add_updater Mobject.remove_updater :ref_functions: always_redraw class SineCurveUnitCircle(Scene): # contributed by heejin_park, https://infograph.tistory.com/230 def construct(self): self.show_axis() self.show_circle() self.move_dot_and_draw_curve() self.wait() def show_axis(self): x_start = np.array([-6,0,0]) x_end = np.array([6,0,0]) y_start = np.array([-4,-2,0]) y_end = np.array([-4,2,0]) x_axis = Line(x_start, x_end) y_axis = Line(y_start, y_end) self.add(x_axis, y_axis) self.add_x_labels() self.origin_point = np.array([-4,0,0]) self.curve_start = np.array([-3,0,0]) def add_x_labels(self): x_labels = [ MathTex(r"\pi"), MathTex(r"2 \pi"), MathTex(r"3 \pi"), MathTex(r"4 \pi"), ] for i in range(len(x_labels)): x_labels[i].next_to(np.array([-1 + 2*i, 0, 0]), DOWN) self.add(x_labels[i]) def show_circle(self): circle = Circle(radius=1) circle.move_to(self.origin_point) self.add(circle) self.circle = circle def move_dot_and_draw_curve(self): orbit = self.circle origin_point = self.origin_point dot = Dot(radius=0.08, color=YELLOW) dot.move_to(orbit.point_from_proportion(0)) self.t_offset = 0 rate = 0.25 def go_around_circle(mob, dt): self.t_offset += (dt * rate) # print(self.t_offset) mob.move_to(orbit.point_from_proportion(self.t_offset % 1)) def get_line_to_circle(): return Line(origin_point, dot.get_center(), color=BLUE) def get_line_to_curve(): x = self.curve_start[0] + self.t_offset * 4 y = dot.get_center()[1] return Line(dot.get_center(), np.array([x,y,0]), color=YELLOW_A, stroke_width=2 ) self.curve = VGroup() self.curve.add(Line(self.curve_start,self.curve_start)) def get_curve(): last_line = self.curve[-1] x = self.curve_start[0] + self.t_offset * 4 y = dot.get_center()[1] new_line = Line(last_line.get_end(),np.array([x,y,0]), color=YELLOW_D) self.curve.add(new_line) return self.curve dot.add_updater(go_around_circle) origin_to_circle_line = always_redraw(get_line_to_circle) dot_to_curve_line = always_redraw(get_line_to_curve) sine_curve_line = always_redraw(get_curve) self.add(dot) self.add(orbit, origin_to_circle_line, dot_to_curve_line, sine_curve_line) self.wait(8.5) dot.remove_updater(go_around_circle) ================================================ FILE: docs/source/index.rst ================================================ .. manim documentation master file, created by sphinx-quickstart on Tue Aug 4 13:58:07 2020. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Manim Community Edition ======================= Animating technical concepts is traditionally pretty tedious since it can be difficult to make the animations precise enough to convey them accurately. Manim relies on Python's simplicity to generate animations programmatically, making it convenient to specify exactly how each one should run. Take a look at the :doc:`Example Gallery <../examples>` for some inspiration on how to create beautiful images and videos with Manim. First Steps ----------- Are you new to Manim and are looking for where to get started? Then you are in the right place! .. note:: Please be aware that there are different, incompatible versions of Manim available. This version, the Community Edition of Manim (`ManimCE `_), is a separate project maintained by the community, but it was forked from `3b1b/manim `_, the original Manim created and open-sourced by Grant Sanderson, creator of `3Blue1Brown `_ educational math videos. Check our :ref:`installation FAQ ` to learn more! - The :doc:`Installation ` section has the latest and up-to-date installation instructions for Windows, macOS, and Linux. You can also find information on Manim's docker images and (online) notebook environments there. - Want to try the library before installing it? Take a look at our interactive online playground at https://try.manim.community in the form of a Jupyter notebook. - In our :doc:`Tutorials ` section you will find a collection of resources that will teach you how to use Manim. In particular, the :doc:`tutorials/quickstart` tutorial teaches you Manim's basics, and in :doc:`tutorials/building_blocks` the classes used to compose your animations are described in more detail. Finding Help ------------ Are you struggling with installing or using Manim? Don't worry, we've all been there. Here are some good resources to help you out: - Perhaps your problem is one that occurs frequently, then chances are it is addressed in our :doc:`collection of FAQs `. - If you are looking for information on some specific class, look for it in the :doc:`reference manual ` and/or use the search feature of the documentation. - Still no luck? Then you are welcome to ask the community for help, together we usually manage to find a solution for your problem! Consult the :doc:`FAQ page on getting help ` for instructions. Navigating the Documentation ---------------------------- Here are some short summaries for all of the sections in this documentation: - The :doc:`Example Gallery ` is a collection of examples (rendered videos and images together with the code they were generated from) that show a few different, simple things that you can do with Manim. - The :doc:`Installation ` section has information on installing Manim. - In :doc:`Tutorials & Guides ` you can find learning resources: proper tutorials that guide you through the process of creating a video are in the :doc:`Tutorial ` section; guides on specific topics are in the :doc:`Guides ` section, and the answers to frequently asked questions can be found in the :doc:`FAQ ` section. - The :doc:`Reference Manual ` contains a comprehensive list of all of Manim's (documented) modules, classes, and functions. If you are somewhat familiar with Manim's module structure, feel free to browse the manual directly. If you are searching for something specific, feel free to use the documentation's search feature in the sidebar. Many classes and methods come with their own illustrated examples too! - The :doc:`Plugins ` page documents how to install, write, and distribute plugins (that is, separate Python packages that extend the feature set of the core library). - Changes between versions are documented in our :doc:`Changelog `. - If you are looking into contributing to the development of Manim, you can find information on how to get involved in our :doc:`Contributing ` section. - And finally, the :doc:`Code of Conduct ` page has a formal description of the rules you should abide by when interacting within our community. Sharing Your Work ----------------- We'd love to hear from you and see your manimations `on Twitter `_, `Reddit `_, or `Discord `_. If you're using Manim in a scientific context, instructions on how to cite a particular release can be found `in our README `_. License Information ------------------- Manim is an open-source library licensed under the **MIT License**, which applies to both the original and the community editions of the software. This means you are free to use, modify, and distribute the code in accordance with the MIT License terms. However, there are some additional points to be aware of: - **Copyrighted Assets:** Specific assets, such as the "Pi creatures" in Grant Sanderson's (3Blue1Brown) videos, are copyrighted and protected. Please avoid using these characters in any derivative works. - **Content Creation and Sharing:** Videos and animations created with Manim can be freely shared, and no attribution to Manim is required—although it is much appreciated! You are encouraged to showcase your work online and share it with the Manim community. Index ----- .. toctree:: :maxdepth: 2 examples installation tutorials_guides reference plugins changelog contributing conduct .. image:: _static/crowdin-badge.svg :align: center :alt: Localized with Crowdin :target: https://translate.manim.community ================================================ FILE: docs/source/installation.rst ================================================ Installation ============ Depending on your use case, different installation options are recommended: if you just want to play around with Manim for a bit, interactive in-browser notebooks are a really simple way of exploring the library as they require no local installation. Head over to https://try.manim.community to give our interactive tutorial a try. Otherwise, if you intend to use Manim to work on an animation project, we recommend installing the library locally (preferably to some isolated virtual Python environment, or a conda-like environment, or via Docker). .. warning:: Note that there are several different versions of Manim. The instructions on this website are **only** for the *community edition*. Find out more about the :ref:`differences between Manim versions ` if you are unsure which version you should install. #. :ref:`(Recommended) Installing Manim via Python's package manager pip ` #. :ref:`Installing Manim to a conda environment ` #. :ref:`Using Manim via Docker ` #. :ref:`Interactive Jupyter notebooks via Binder / Google Colab ` .. _local-installation: Installing Manim locally via pip ******************************** The recommended way of installing Manim is by using Python's package manager pip. If you already have a Python environment set up, you can simply run ``pip install manim`` to install the library. Our :doc:`local installation guide ` provides more detailed instructions, including best practices for setting up a suitable local environment. .. toctree:: :hidden: installation/uv .. _conda-installation: Installing Manim via Conda and related environment managers *********************************************************** Conda is a package manager for Python that allows creating environments where all your dependencies are stored. Like this, you don't clutter up your PC with unwanted libraries and you can just delete the environment when you don't need it anymore. It is a good way to install manim since all dependencies like ``pycairo``, etc. come with it. Also, the installation steps are the same, no matter if you are on Windows, Linux, Intel Macs or on Apple Silicon. .. NOTE:: There are various popular alternatives to Conda like `mamba `__ / `micromamba `__, or `pixi `__. They all can be used to setup a suitable, isolated environment for your Manim projects. The following pages show how to install Manim in a conda environment: .. toctree:: :maxdepth: 2 installation/conda .. _docker-installation: Using Manim via Docker ********************** `Docker `__ is a virtualization tool that allows the distribution of encapsulated software environments (containers). The following pages contain more information about the docker image maintained by the community, ``manimcommunity/manim``: .. toctree:: installation/docker .. _interactive-online: Interactive Jupyter notebooks for your browser ********************************************** Manim ships with a built-in ``%%manim`` IPython magic command designed for the use within `Jupyter notebooks `__. Our interactive tutorial over at https://try.manim.community illustrates how Manim can be used from within a Jupyter notebook. The following pages explain how you can setup interactive environments like that yourself: .. toctree:: installation/jupyter .. _editor-addons: Editors ******** If you're using Visual Studio Code you can install an extension called *Manim Sideview* which provides automated rendering and an integrated preview of the animation inside the editor. The extension can be installed through the `marketplace of VS Code `__. .. caution:: This extension is not officially maintained by the Manim Community. If you run into issues, please report them to the extension's author. Installation for developers *************************** In order to change code in the library, it is recommended to install Manim in a different way. Please follow the instructions in our :doc:`contribution guide ` if you are interested in that. ================================================ FILE: docs/source/plugins.rst ================================================ .. _plugins: ======= Plugins ======= Plugins are features that extend Manim's core functionality. Since Manim is extensible and not everything belongs in its core, we'll go over how to install, use, and create your own plugins. .. note:: The standard naming convention for plugins is to prefix the plugin with ``manim-``. This makes them easy for users to find on package repositories such as PyPI. .. WARNING:: The plugin feature is new and under active development. Expect updates for the best practices on installing, using, and creating plugins; as well as new subcommands/flags for ``manim plugins`` .. tip:: See https://plugins.manim.community/ for the list of plugins available. Installing Plugins ****************** Plugins can be easily installed via the ``pip`` command: .. code-block:: bash pip install manim-* After installing a plugin, you may use the ``manim plugins`` command to list your available plugins, see the following help output: .. code-block:: bash manim plugins -h Usage: manim plugins [OPTIONS] Manages Manim plugins. Options: -l, --list List available plugins -h, --help Show this message and exit. Made with <3 by Manim Community developers. You can list plugins as such: .. code-block:: bash manim plugins -l Plugins: • manim_plugintemplate Using Plugins in Projects ************************* For enabling a plugin ``manim.cfg`` or command line parameters should be used. .. important:: The plugins should be module name of the plugin and not PyPi name. Enabling plugins through ``manim.cfg`` .. code-block:: ini [CLI] plugins = manim_rubikscube For specifying multiple plugins, comma-separated values must be used. .. code-block:: ini [CLI] plugins = manim_rubikscube, manim_plugintemplate Creating Plugins **************** Plugins are intended to extend Manim's core functionality. If you aren't sure whether a feature should be included in Manim's core, feel free to ask over on the `Discord server `_. Visit `manim-plugintemplate `_ on PyPI.org which serves as an in-depth tutorial for creating plugins. .. code-block:: bash pip install manim-plugintemplate The only requirement of manim plugins is that they specify an entry point with the group, ``"manim.plugins"``. This allows Manim to discover plugins available in the user's environment. Everything regarding the plugin's directory structure, build system, and naming are completely up to your discretion as an author. The standard way to specify an entry point (see `the Python packaging guide `__ for details) is to include the following in your ``pyproject.toml``: .. code-block:: toml [project.entry-points."manim.plugins"] "name" = "object_reference" .. versionremoved:: 0.18.1 Plugins should be imported explicitly to be usable in user code. The plugin system will probably be refactored in the future to provide a more structured interface. A note on Renderer Compatibility ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Depending on which renderer is currently active, custom mobjects created in your plugin might want to behave differently as the corresponding mobject base classes are (unfortunately) not fully compatible. The currently active renderer can be queried by checking the value of ``manim.config.renderer``. All possible renderer types are given by :class:`.constants.RendererType`. The module :mod:`.manim.mobject.utils` contains utility functions that return the base class for the currently active renderer. A simple form of renderer compatibility (by hot-swapping the class inheritance chain) for Mobjects directly inheriting from :class:`.Mobject` or :class:`.VMobject` can be achieved by using the :class:`.mobject.opengl.opengl_compatibility.ConvertToOpenGL` metaclass. ================================================ FILE: docs/source/reference.rst ================================================ Reference Manual ================ This reference manual details modules, functions, and variables included in Manim, describing what they are and what they do. For learning how to use Manim, see :doc:`tutorials/index`. For a list of changes since the last release, see the :doc:`changelog`. .. warning:: The pages linked to here are currently a work in progress. Inheritance Graphs ------------------ Animations ********** .. inheritance-diagram:: manim.animation.animation manim.animation.changing manim.animation.composition manim.animation.creation manim.animation.fading manim.animation.growing manim.animation.indication manim.animation.movement manim.animation.numbers manim.animation.rotation manim.animation.specialized manim.animation.speedmodifier manim.animation.transform manim.animation.transform_matching_parts manim.animation.updaters.mobject_update_utils manim.animation.updaters.update :parts: 1 :top-classes: manim.animation.animation.Animation Cameras ******* .. inheritance-diagram:: manim.camera.camera manim.camera.mapping_camera manim.camera.moving_camera manim.camera.multi_camera manim.camera.three_d_camera :parts: 1 :top-classes: manim.camera.camera.Camera, manim.mobject.mobject.Mobject Mobjects ******** .. inheritance-diagram:: manim.mobject.frame manim.mobject.geometry.arc manim.mobject.geometry.boolean_ops manim.mobject.geometry.line manim.mobject.geometry.polygram manim.mobject.geometry.shape_matchers manim.mobject.geometry.tips manim.mobject.graph manim.mobject.graphing.coordinate_systems manim.mobject.graphing.functions manim.mobject.graphing.number_line manim.mobject.graphing.probability manim.mobject.graphing.scale manim.mobject.logo manim.mobject.matrix manim.mobject.mobject manim.mobject.table manim.mobject.three_d.polyhedra manim.mobject.three_d.three_d_utils manim.mobject.three_d.three_dimensions manim.mobject.svg.brace manim.mobject.svg.svg_mobject manim.mobject.text.code_mobject manim.mobject.text.numbers manim.mobject.text.tex_mobject manim.mobject.text.text_mobject manim.mobject.types.image_mobject manim.mobject.types.point_cloud_mobject manim.mobject.types.vectorized_mobject manim.mobject.value_tracker manim.mobject.vector_field :parts: 1 :top-classes: manim.mobject.mobject.Mobject Scenes ****** .. inheritance-diagram:: manim.scene.moving_camera_scene manim.scene.scene manim.scene.scene_file_writer manim.scene.three_d_scene manim.scene.vector_space_scene manim.scene.zoomed_scene :parts: 1 :top-classes: manim.scene.scene.Scene, manim.scene.scene.RerunSceneHandler Module Index ------------ .. toctree:: :maxdepth: 3 reference_index/animations reference_index/cameras reference_index/configuration reference_index/mobjects reference_index/scenes reference_index/utilities_misc ================================================ FILE: docs/source/robots.txt ================================================ User-agent: * Disallow: / Allow: /en/stable/ Sitemap: https://docs.manim.community/sitemap.xml ================================================ FILE: docs/source/tutorials_guides.rst ================================================ Tutorials & Guides ================== .. toctree:: :caption: Table of Contents :maxdepth: 2 tutorials/index guides/index faq/index ================================================ FILE: docs/source/_static/custom.css ================================================ @media (prefers-color-scheme: dark) { span.nc { text-decoration: none !important; } } .admonition-manim-example { padding: 0; display: flex; flex-direction: column; } .admonition-manim-example p.admonition-title { font-weight: 600; font-size: 0.925rem; margin: 0; } .admonition-manim-example .highlight-python { margin: 0; } .admonition-manim-example .highlight { border-radius: 0; } .admonition-manim-example .highlight pre { font-size: 15px; } .manim-video { width: 100%; padding: 8px 0; outline: 0; } .admonition-manim-example .manim-video { padding: 0; } .admonition-manim-example img { margin-bottom: 0; } .admonition-manim-example p:last-child { margin-top: 0; padding-left: 0.5rem; padding-bottom: 0.15rem; font-size: 15px; } .admonition-manim-example .copybtn { margin-right: 6px; font-size: 18px; } .admonition-manim-example .copybtn:hover { cursor: pointer; } p.rubric{ text-transform: capitalize; font-size: 1.25rem; font-weight: bold; } .sig-param{ color: var(--color-content-foreground); } dl.c .field-list dt, dl.cpp .field-list dt, dl.js .field-list dt, dl.py .field-list dt { text-transform: capitalize; font-weight: bold; font-size: var(--font-size--normal); } h4, h5, h6{ text-transform: none; } /* yikes-ish attempt at bugfix for navbar on some browsers */ .sidebar-tree a.internal.reference { display: table-cell; } .manim-binder-button { text-transform: capitalize; padding: 10px 20px; margin: 10px 0; } .manim-binder-wrapper { background-color: var(--color-code-background); color: var(--color-code-foreground); } .manim-binder-title { margin-top: 0; } .manim-binder-button-wrapper { margin: 0px 10px; } ================================================ FILE: docs/source/_static/manim-binder.min.js.LICENSE.txt ================================================ /*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ ================================================ FILE: docs/source/_static/responsiveSvg.js ================================================ window.addEventListener("load", function () { const styleElements = [] const colorSchemeQuery = window.matchMedia('(prefers-color-scheme: dark)'); const diagrams = document.querySelectorAll("object.inheritance.graphviz"); for (let diagram of diagrams) { style = document.createElement('style'); styleElements.push(style); console.log(diagram); diagram.contentDocument.firstElementChild.appendChild(style); } function setColorScheme(e) { let colors, additions = ""; if (e.matches) { // Dark colors = { text: "#e07a5f", box: "#383838", edge: "#d0d0d0", background: "#131416" }; } else { // Light colors = { text: "#e07a5f", box: "#fff", edge: "#413c3c", background: "#ffffff" }; additions = ` .node polygon { filter: drop-shadow(0 1px 3px #0002); } ` } for (let style of styleElements) { style.innerHTML = ` svg { background-color: ${colors.background}; } .node text { fill: ${colors.text}; } .node polygon { fill: ${colors.box}; } .edge polygon { fill: ${colors.edge}; stroke: ${colors.edge}; } .edge path { stroke: ${colors.edge}; } ${additions} `; } } setColorScheme(colorSchemeQuery); colorSchemeQuery.addEventListener("change", setColorScheme); }); ================================================ FILE: docs/source/_templates/logo-text.html ================================================ ManimCommunity logo ================================================ FILE: docs/source/_templates/autosummary/class.rst ================================================ {{ name | escape | underline}} Qualified name: ``{{ fullname | escape }}`` .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} :show-inheritance: :members: :private-members: {% block methods %} {%- if methods %} .. rubric:: {{ _('Methods') }} .. autosummary:: :nosignatures: {% for item in methods if item != '__init__' and item not in inherited_members %} ~{{ name }}.{{ item }} {%- endfor %} {%- endif %} {%- endblock %} {% block attributes %} {%- if attributes %} .. rubric:: {{ _('Attributes') }} .. autosummary:: {% for item in attributes %} ~{{ name }}.{{ item }} {%- endfor %} {%- endif %} {% endblock %} ================================================ FILE: docs/source/_templates/autosummary/module.rst ================================================ {{ name | escape | underline }} .. currentmodule:: {{ fullname }} .. automodule:: {{ fullname }} {# SEE manim.utils.docbuild.autoaliasattr_directive #} {# FOR INFORMATION ABOUT THE CUSTOM autoaliasattr DIRECTIVE! #} .. autoaliasattr:: {{ fullname }} {% block classes %} {% if classes %} .. rubric:: Classes .. autosummary:: :toctree: . :nosignatures: {% for class in classes %} {{ class }} {% endfor %} {% endif %} {% endblock %} {% block functions %} {% if functions %} .. rubric:: {{ _('Functions') }} {% for item in functions %} .. autofunction:: {{ item }} {%- endfor %} {% endif %} {% endblock %} {% block exceptions %} {% if exceptions %} .. rubric:: {{ _('Exceptions') }} .. autosummary:: {% for item in exceptions %} {{ item }} {%- endfor %} {% endif %} {% endblock %} {% block modules %} {% if modules %} .. rubric:: Modules .. autosummary:: :toctree: :recursive: {% for item in modules %} {{ item }} {%- endfor %} {% endif %} {% endblock %} ================================================ FILE: docs/source/changelog/0.1.0-changelog.rst ================================================ ****** 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. New Features ============ 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 #. 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`! #. Re-add :code:`--save_frames` flag, which will save each frame as a png #. Re-introduce manim feature that allows you to type manim code in :code:`stdin` if you pass a minus sign :code:`(-)` as filename #. Added the :code:`--custom_folders` flag which yields a simpler output folder structure #. Re-implement GIF export with the :code:`-i` flag (using this flag outputs ONLY a .gif file, and no .mp4 file) #. Added a :code:`--verbose` flag #. You can save the logs to a file by using :code:`--log_to_file` #. Read :code:`tex_template` from config file if not specified by :code:`--tex_template`. #. Add experimental javascript rendering with :code:`--use_js_renderer` #. Add :code:`-q/--quality [k|p|h|m|l]` flag and removed :code:`-m/-l` flags. #. Removed :code:`--sound` flag 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 -------------------------------- #. 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 #. highlight the area between two curves #. ThreeDScene now supports 3dillusion_camera_rotation #. Add :code:`z_index` for manipulating depth of Objects on scene. #. Add a :code:`VDict` class: a :code:`VDict` is to a :code:`VGroup` what a :code:`dict` is to a :code:`list` #. Added Scene-caching feature. Now, if a partial movie file is unchanged in your code, it isn’t rendered again! [HIGHLY UNSTABLE We're working on it ;)] #. Most :code:`get_` and :code:`set_` methods have been removed in favor of instance attributes and properties #. The :code:`Container` class has been made into an AbstractBaseClass, i.e. in cannot be instantiated. Instead, use one of its children classes #. The ``TextMobject`` and ``TexMobject`` objects have been deprecated, due to their confusing names, in favour of ``Tex`` and ``MathTex``. You can still, however, continue to use ``TextMobject`` and ``TexMobject``, albeit with Deprecation Warnings constantly reminding you to switch. #. 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. Documentation ============= #. Added clearer installation instructions, tutorials, examples, and API reference [WIP] Fixes ===== #. Initialization of directories has been moved to :code:`config.py`, and a bunch of bugs associated to file structure generation have been fixed #. Nonfunctional file :code:`media_dir.txt` has been removed #. Nonfunctional :code:`if` statements in :code:`scene_file_writer.py` have been removed #. Fix a bug where trying to render the example scenes without specifying the scene would show all scene objects in the library #. Many :code:`Exceptions` have been replaced for more specific exception subclasses #. Fixed a couple of subtle bugs in :code:`ArcBetweenPoints` Of interest to developers ========================= #. Python code formatting is now enforced by using the :code:`black` tool #. PRs now require two approving code reviews from community devs before they can be merged #. Added tests to ensure stuff doesn't break between commits (For developers) [Uses Github CI, and Pytest] #. Add contribution guidelines (for developers) #. Added autogenerated documentation with sphinx and autodoc/autosummary [WIP] #. Made manim internally use relative imports #. Since the introduction of the :code:`TexTemplate` class, the files :code:`tex_template.tex` and :code:`ctex_template.tex` have been removed #. Added logging tests tools. #. Added ability to save logs in json #. Move to Poetry. #. Colors have moved to an Enum Other Changes ============= #. Cleanup 3b1b Specific Files #. 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. ================================================ FILE: docs/source/changelog/0.1.1-changelog.rst ================================================ ****** v0.1.1 ****** :Date: December 1, 2020 Changes since Manim Community release v0.1.0 Plugins ======= #. Provided a standardized method for plugin discoverability, creation, installation, and usage. See the :ref:`documentation `. Fixes ===== #. JsRender is optional to install. (via :pr:`697`). #. Allow importing modules from the same directory as the input file when using ``manim`` from the command line (via :pr:`724`). #. Remove some unnecessary or unpythonic methods from :class:`~.Scene` (``get_mobjects``, ``add_mobjects_among``, ``get_mobject_copies``), via :pr:`758`. #. Fix formatting of :class:`~.Code` (via :pr:`798`). Configuration ============= #. Removed the ``skip_animations`` config option and added the ``Renderer.skip_animations`` attribute instead (via :pr:`696`). #. The global ``config`` dict has been replaced by a global ``config`` instance of the new class :class:`~.ManimConfig`. This class has a dict-like API, so this should not break user code, only make it more robust. See the Configuration tutorial for details. #. Added the option to configure a directory for external assets (via :pr:`649`). Documentation ============= #. Add ``:issue:`` and ``:pr:`` directives for simplifying linking to issues and pull requests on GitHub (via :pr:`685`). #. Add a ``skip-manim`` tag for skipping the ``.. manim::`` directive when building the documentation locally (via :pr:`796`). 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`. #. Variations of :class:`~.Dot` have been added as :class:`~.AnnotationDot` (a bigger dot with bolder stroke) and :class:`~.LabeledDot` (a dot containing a label). #. Scene.set_variables_as_attrs has been removed (via :pr:`692`). #. Ensure that the axes for graphs (:class:`GraphScene`) always intersect (:pr:`580`). #. Now Mobject.add_updater does not call the newly-added updater by default (use ``call_updater=True`` instead) (via :pr:`710`) #. VMobject now has methods to determine and change the direction of the points (via :pr:`647`). #. Added BraceBetweenPoints (via :pr:`693`). #. Added ArcPolygon and ArcPolygonFromArcs (via :pr:`707`). #. Added Cutout (via :pr:`760`). #. Added Mobject raise not implemented errors for dunder methods and implementations for VGroup dunder methods (via :pr:`790`). #. Added :class:`~.ManimBanner` for a animated version of our logo and banner (via :pr:`729`) #. The background color of a scene can now be changed reliably by setting, e.g., ``self.camera.background_color = RED`` (via :pr:`716`). ================================================ FILE: docs/source/changelog/0.10.0-changelog.rst ================================================ ******* v0.10.0 ******* :Date: September 01, 2021 Contributors ============ A total of 40 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Animfysyk + * Benjamin Hackl * Christian Clauss * Daniel Adelodun + * Darigov Research * Darylgolden * Eric Biedert + * Harivinay * Jan-Hendrik Müller * Jephian Lin + * Joy Bhalla + * Laith Bahodi * Lalourche + * Max Stoumen * Naveen M K * Oliver * Partha Das + * Raj Dandekar + * Rohan Sharma + * Ryan McCauley * Václav Hlaváč + * asjadaugust + * ccn * icedcoffeeee * sparshg * vinnniii15 + * vladislav doster + * xia0long + The patches included in this release have been reviewed by the following contributors. * Aathish Sivasubrahmanian * Benjamin Hackl * Darylgolden * Devin Neal * Eric Biedert * GameDungeon * Harivinay * Hugues Devimeux * Jan-Hendrik Müller * Jason Villanueva * Jephian Lin * Joy Bhalla * KingWampy * Laith Bahodi * Naveen M K * Oliver * Raghav Goel * Raj Dandekar * Ryan McCauley * ccn * icedcoffeeee * ralphieraccoon * sparshg Pull requests merged ==================== A total of 59 pull requests were merged for this release. Breaking changes ---------------- * :pr:`1843`: Dropped redundant OpenGL files and add metaclass support for :class:`~.Surface` - ``OpenGL`` classes from ``opengl_geometry.py``, ``opengl_text_mobject.py``, ``opengl_tex_mobject.py``, ``opengl_svg_path.py``, ``opengl_svg_mobject.py`` and most of ``opengl_three_dimensions.py`` have been removed. - ``ParametricSurface`` has been renamed to :class:`~.Surface` Deprecated classes and functions -------------------------------- * :pr:`1941`: Added examples, tests and improved documentation for :mod:`~.coordinate_systems` * :pr:`1694`: Added ``font_size`` parameter for :class:`~.Tex` and :class:`~.Text`, replaced ``scale`` parameters with ``font_size`` * :pr:`1860`: Removed :class:`~.GraphScene`, :class:`~.NumberLineOld` and parameters for :class:`~.ChangingDecimal` New features ------------ * :pr:`1929`: Implementing a ``zoom`` parameter for :meth:`.ThreeDScene.move_camera` Zooming into a :class:`~.ThreeDScene` can now be done by calling, for example, ``self.move_camera(zoom=2)`` in the ``construct`` method. * :pr:`1980`: Added a ``dissipating_time`` keyword argument to :class:`~.TracedPath` to allow animating a dissipating path * :pr:`1899`: Allow switching the renderer to OpenGL at runtime Previously, the metaclass approach only changed the inheritance chain to switch between OpenGL and cairo mobjects when the class objects are initialized, i.e., at import time. This PR also triggers the changes to the inheritance chain when the value of ``config.renderer`` is changed. * :pr:`1828`: Added configuration option ``zero_pad`` for zero padding PNG file names Enhancements ------------ * :pr:`1882`: Added OpenGL support for :class:`~.PMobject` and its subclasses * :pr:`1881`: Added methods :meth:`.Angle.get_lines` and :meth:`.Angle.get_value` to :class:`~.Angle` * :pr:`1952`: Added the option to save last frame for OpenGL * :pr:`1922`: Fixed IPython interface to exit cleanly when OpenGL renderer raises an error * :pr:`1923`: Fixed CLI help text for ``manim init`` subcommand so that it is not truncated * :pr:`1868`: Added OpenGL support to IPython magic The OpenGL renderer can now be used in jupyter notebooks when using the ``%%manim`` magic command. * :pr:`1841`: Reduced default resolution of :class:`~.Dot3D` * :pr:`1866`: Allow passing keyword argument ``corner_radius`` to :class:`~.SurroundingRectangle` * :pr:`1847`: Allow :class:`~.Cross` to be created without requiring a mobject Fixed bugs ---------- * :pr:`1985`: Use ``height`` to determine ``font_size`` instead of the ``_font_size`` attribute * :pr:`1758`: Fixed scene selection being ignored when using the OpenGL renderer * :pr:`1871`: Fixed broken :meth:`.VectorScene.vector_to_coords` * :pr:`1973`: Fixed indexing of :meth:`.Table.get_entries` to respect row length * :pr:`1950`: Fixed passing custom arrow shapes to :class:`~.CurvedArrow` * :pr:`1967`: Fixed :attr:`.Axes.coordinate_labels` referring to the entire axis, not just its labels * :pr:`1951`: Fixed :meth:`.Axes.get_line_graph` returning a graph rendered below the axes * :pr:`1943`: Added ``buff`` keyword argument to :class:`~.BraceLabel` * :pr:`1938`: Fixed :class:`~.Rotate` for angles that are multiples of :math:`2\pi` * :pr:`1924`: Made arrow tips rotate ``IN`` and ``OUT`` properly * :pr:`1931`: Fixed ``row_heights`` in :meth:`.Mobject.arrange_in_grid` * :pr:`1893`: Fixed CLI error when rendering a file containing a single scene without specifying the scene name * :pr:`1744`: Fixed bug in :class:`~.NumberPlane` with strictly positive or strictly negative values for ``x_range`` and ``y_range`` * :pr:`1887`: Fixed ``custom_config`` not working in ``frames_comparison`` * :pr:`1879`: Fixed how the installed version is determined by Poetry Documentation-related changes ----------------------------- * :pr:`1979`: Corrected Japanese phrases in documentation * :pr:`1976`: Fixed labelling of languages in documentation example * :pr:`1949`: Rewrite installation instructions from scratch * :pr:`1963`: Added sitemap to ``robots.txt`` * :pr:`1939`: Fixed formatting of parameter description of :class:`~.NumberPlane` * :pr:`1918`: Fixed a typo in the text tutorial * :pr:`1915`: Improved the wording of the installation instructions for Google Colab * :pr:`1906`: Improved language and overall consistency in ``README`` * :pr:`1880`: Updated tutorials to use ``.animate`` instead of :class:`~.ApplyMethod` * :pr:`1877`: Remove duplicated imports in some documentation examples * :pr:`1869`: Fixed duplicated Parameters section in :meth:`.Mobject.arrange_in_grid` Changes concerning the testing system ------------------------------------- * :pr:`1894`: Fixed an OpenGL test Changes to our development infrastructure ----------------------------------------- * :pr:`1987`: Added support for using OpenGL in subprocess in Windows pipeline * :pr:`1964`: Added ``CITATION.cff`` and a method to automatically update this citation with new releases * :pr:`1856`: Modified Dockerfile to support multi-platform builds via ``docker buildx`` * :pr:`1955`: Partially support OpenGL rendering with Docker * :pr:`1896`: Made RTD apt install FFMPEG instead of installing a Python binding * :pr:`1864`: Shortened and simplified PR template * :pr:`1853`: Updated Sphinx to 4.1.2 Code quality improvements and similar refactors ----------------------------------------------- * :pr:`1960`: Ignore fewer flake8 errors * :pr:`1947`: Set flake8 not to ignore undefined names in Python code * :pr:`1948`: flake8: Set max-line-length instead of ignoring long lines * :pr:`1956`: Upgrade to modern Python syntax - This pull request was created `with the command `__ ``pyupgrade --py36-plus **/*.py`` - Python f-strings simplify the code and `should speed up execution `__. * :pr:`1898`: Replaced ``self.data["attr"]`` and ``self.uniforms["attr"]`` with ``self.attr`` In particular, ``OpenGLVMobject.points`` can now be accessed directly. * :pr:`1934`: Improved code quality by implementing suggestions from LGTM * :pr:`1861`: Updated ``dearpygui`` version to 0.8.x New releases ------------ * :pr:`1989`: Prepare new release v0.10.0 ================================================ FILE: docs/source/changelog/0.11.0-changelog.rst ================================================ ******* v0.11.0 ******* :Date: October 02, 2021 Contributors ============ A total of 31 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Aathish Sivasubrahmanian * Benjamin Hackl * Charlie + * Christopher Besch + * Darylgolden * Evan Boehs + * GameDungeon * Hugues Devimeux * Jerónimo Squartini * Laith Bahodi * Meredith Espinosa + * Mysaa * Naveen M K * Nicolai Weitkemper + * Oliver * Ryan McCauley * Tim + * icedcoffeeee * imadjamil + * leleogere + * Максим Заякин + The patches included in this release have been reviewed by the following contributors. * Aathish Sivasubrahmanian * Benjamin Hackl * Charlie * Darylgolden * Evan Boehs * GameDungeon * Hugues Devimeux * Jan-Hendrik Müller * Jason Villanueva * Laith Bahodi * Mark Miller * Mysaa * Naveen M K * Nicolai Weitkemper * Oliver * Raghav Goel * Ryan McCauley * Skaft * friedkeenan * icedcoffeeee * leleogere Pull requests merged ==================== A total of 55 pull requests were merged for this release. Breaking changes ---------------- * :pr:`1990`: Changed and improved the implementation of :meth:`.CoordinateSystem.get_area` to work without Riemann rectangles This changes how :meth:`.CoordinateSystem.get_area` is implemented. To mimic the old behavior (tiny Riemann rectangles), use :meth:`.CoordinateSystem.get_riemann_rectangles` with a small value for ``dx``. * :pr:`2095`: Changed angles for polar coordinates to use math convention This PR switches the parameter names ``phi`` and ``theta`` in :func:`cartesian_to_spherical` and :func:`spherical_to_cartesian` to align with the `usual definition in mathematics `__. Highlights ---------- * :pr:`2094`: Implemented :class:`~.ImplicitFunction` and :meth:`.CoordinateSystem.get_implicit_curve` for plotting implicit curves An :class:`~.ImplicitFunction` that plots the points :math:`(x, y)` which satisfy some equation :math:`f(x,y) = 0`. * :pr:`2075`: Implemented :meth:`.Mobject.set_default`, a mechanism for changing default values of keyword arguments * :pr:`1998`: Added support for Boolean Operations on VMobjects This PR introduces boolean operations for :class:`~.VMobject`; see details and examples at :class:`~.Union`, :class:`~.Difference`, :class:`~.Intersection` and :class:`~.Exclusion`. Deprecated classes and functions -------------------------------- * :pr:`2123`: Renamed ``distance`` parameter of :class:`.ThreeDScene` and :class:`.ThreeDCamera` to ``focal_distance`` * :pr:`2102`: Deprecated :class:`~.SampleSpaceScene` and :class:`~.ReconfigurableScene` * :pr:`2061`: Removed deprecated ``u_min``, ``u_max``, ``v_min``, ``v_max`` in :class:`~.Surface` * :pr:`2024`: Deprecated redundant methods :meth:`.Mobject.rotate_in_place`, :meth:`.Mobject.scale_in_place`, :meth:`.Mobject.scale_about_point` * :pr:`1991`: Deprecated :meth:`.VMobject.get_points` New features ------------ * :pr:`2118`: Added 3D support for :class:`~.ArrowVectorField` and :class:`~.StreamLines` * :pr:`1469`: Added :meth:`.VMobject.proportion_from_point` to measure the proportion of points along a Bezier curve Enhancements ------------ * :pr:`2111`: Improved setting of OpenGL colors * :pr:`2113`: Added OpenGL compatibility to :meth:`.ThreeDScene.begin_ambient_camera_rotation` and :meth:`.ThreeDScene.move_camera` * :pr:`2016`: Added OpenGL support for :mod:`~.mobject.boolean_ops` * :pr:`2084`: Added :meth:`~Table.get_highlighted_cell` and fixed :meth:`~Table.add_highlighted_cell` * :pr:`2013`: Removed unnecessary check in :class:`~.TransformMatchingAbstractBase` * :pr:`1971`: Added OpenGL support for :class:`~.StreamLines` * :pr:`2041`: Added config option to enable OpenGL wireframe for debugging Fixed bugs ---------- * :pr:`2070`: Fixed :meth:`~OpenGLRenderer.get_frame` when window is created * :pr:`2071`: Fixed :class:`~AnimationGroup` OpenGL compatibility * :pr:`2108`: Fixed swapped axis step values in :class:`~.NumberPlane` * :pr:`2072`: Added OpenGL compatibility for :class:`~.Cube`. * :pr:`2060`: Fixed OpenGL compatibility issue for meth:`~Line.set_opacity` * :pr:`2037`: Fixed return value of :meth:`~.OpenGLMobject.apply_complex_function` * :pr:`2039`: Added OpenGL compatibility for :meth:`~Cylinder.add_bases`. * :pr:`2066`: Fixed error raised by logging when cache is full * :pr:`2026`: Fixed OpenGL shift animation for :class:`~.Text` * :pr:`2028`: Fixed OpenGL overriding SVG fill color * :pr:`2043`: Fixed bug where :meth:`.NumberLine.add_labels` cannot accept non-mobject labels * :pr:`2011`: Fixed ``-a`` flag for OpenGL rendering * :pr:`1994`: Fix :meth:`~.input_to_graph_point` when passing a line graph (from :meth:`.Axes.get_line_graph`) * :pr:`2017`: Avoided using deprecated ``get_points`` method and fixed :class:`~.OpenGLPMPoint` color Documentation-related changes ----------------------------- * :pr:`2131`: Copyedited the configuration tutorial in the documentation * :pr:`2120`: Changed ``manim_directive`` to use a clean configuration via ``tempconfig`` * :pr:`2122`: Fixed broken links in inheritance graphs by moving them to ``reference.rst`` * :pr:`2115`: Improved docstring of :meth:`.PMobject.add_points` * :pr:`2116`: Made type hint for ``line_spacing`` argument of :class:`~.Paragraph` more accurate * :pr:`2117`: Changed the way the background color was set in a documentation example to avoid leaking the setting to other examples * :pr:`2101`: Added note that translation process is not ready * :pr:`2055`: Fixed parameter types of :meth:`.Graph.add_edges` and :meth:`.Graph.add_vertices` * :pr:`862`: Prepared documentation for translation (still work in progress) * :pr:`2035`: Fixed broken link in README * :pr:`2020`: Corrected paths to user-wide configuration files for MacOS and Linux Changes concerning the testing system ------------------------------------- * :pr:`2008`: Reuse CLI flag tests for OpenGL * :pr:`2080`: Reused :class:`~.Mobject` tests for :class:`~.OpenGLMobject` Changes to our development infrastructure ----------------------------------------- * :pr:`2004`: Cancel previous workflows in the same branch in Github Actions Code quality improvements and similar refactors ----------------------------------------------- * :pr:`2050`: Make colour aliases IDE-friendly * :pr:`2126`: Fixed whitespace in info message issued by :meth:`.SceneFileWriter.clean_cache` * :pr:`2124`: Upgraded several dependencies (in particular: ``skia-pathops``) * :pr:`2001`: Fixed several warnings issued by LGTM * :pr:`2064`: Removed duplicate insert shader directory * :pr:`2027`: Improved wording in info message issued by :meth:`.SceneFileWriter.clean_cache` * :pr:`1968`: Sharpened Flake8 configuration and fixed resulting warnings New releases ------------ * :pr:`2114`: Prepared new release, ``v0.11.0`` ================================================ FILE: docs/source/changelog/0.12.0-changelog.rst ================================================ ******* v0.12.0 ******* :Date: November 02, 2021 Contributors ============ A total of 40 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Anima. + * Arcstur + * Benjamin Hackl * Christopher Besch * Darylgolden * David Yang + * Dhananjay Goratela + * Ethan Rooke + * Eugene Chung + * GameDungeon * Gustav-Rixon + * Jan-Hendrik Müller * Josiah Winslow + * Laith Bahodi * Martmists + * Michael Hill + * Naveen M K * Nick + * NotWearingPants + * Peeter Joot + * Ryan McCauley * Viicos + * heitor + * icedcoffeeee * kieran-pringle + * Виктор Виктор + The patches included in this release have been reviewed by the following contributors. * Alex Lembcke * Anima. * Benjamin Hackl * Christopher Besch * Darylgolden * David Yang * Dhananjay Goratela * Ethan Rooke * Eugene Chung * Gustav-Rixon * Hugues Devimeux * Jan-Hendrik Müller * Jason Villanueva * Laith Bahodi * Mysaa * Naveen M K * Nick * Oliver * Ryan McCauley * Viicos * icedcoffeeee * kieran-pringle Pull requests merged ==================== A total of 52 pull requests were merged for this release. Highlights ---------- * :pr:`1812`: Implemented logarithmic scaling for :class:`~.NumberLine` / :class:`~.Axes` This implements scaling bases that can be passed to the ``scaling`` keyword argument of :class:`.NumberLine`. See :class:`.LogBase` (for a logarithmic scale) and :class:`.LinearBase` (for the default scale) for more details and examples. * :pr:`2152`: Introduced API for scene sections via :meth:`.Scene.next_section` Sections divide a scene into multiple parts, resulting in multiple output videos (when using the ``--save_sections`` flag). The cuts between two sections are defined by the user in the :meth:`~.Scene.construct` method. Each section has an optional name and type, which can be used by a plugin (`see an example `__). You can skip rendering specific sections with the ``skip_animations`` keyword argument. Deprecated classes and functions -------------------------------- * :pr:`1926`: OpenGL: changed ``submobjects`` to be a property * :pr:`2245`: Removed deprecated method ``get_center_point`` and parameters ``azimuth_label_scale``, ``number_scale_value``, ``label_scale``, ``scale_factor``, ``size``, ``x_min``, ``x_max``, ``delta_x``, ``y_min``, ``y_max``, ``delta_y`` * :pr:`2187`: Renamed ``get_graph`` and its variants to :meth:`~.CoordinateSystem.plot` * :pr:`2065`: Deprecated :class:`~.FullScreenFadeRectangle` and :class:`~.PictureInPictureFrame` New features ------------ * :pr:`2025`: Implemented :meth:`.CoordinateSystem.input_to_graph_coords` and fixed :meth:`.CoordinateSystem.angle_of_tangent` * :pr:`2151`: Added option to set the input file from a config file * :pr:`2128`: Added keyword arguments ``match_center``, ``match_width`` etc. to :meth:`.Mobject.become` * :pr:`2162`: Implemented :meth:`.MovingCamera.auto_zoom` for automatically zooming onto specified mobjects * :pr:`2236`: Added ``skip_animations`` argument to :meth:`.Scene.next_section` * :pr:`2196`: Implemented :meth:`.Line3D.parallel_to` and :meth:`.Line3D.perpendicular_to` Enhancements ------------ * :pr:`2138`: Fixed example for :meth:`~.Vector.coordinate_label` and added more customization for :class:`~.Matrix` - Additional keyword arguments for :meth:`~.Vector.coordinate_label` are passed to the constructed matrix. - :class:`~.Matrix` now accepts a ``bracket_config`` keyword argument. * :pr:`2139`: Changed the color of :class:`~.NumberLine` from ``LIGHT_GREY`` to ``WHITE`` * :pr:`2157`: Added :meth:`.CoordinateSystem.plot_polar_graph` * :pr:`2243`: Fixed wasteful recursion in :meth:`.Mobject.get_merged_array` * :pr:`2205`: Improved last frame output handling for the OpenGL renderer * :pr:`2172`: Added ``should_render`` attribute to disable rendering mobjects * :pr:`2182`: Changed the default width of videos in Jupyter notebooks to 60% Fixed bugs ---------- * :pr:`2244`: Fixed :meth:`.CoordinateSystem.get_area` when using few plot points and a boundary graph * :pr:`2232`: Fixed :class:`.Graph` stopping to update after animating additions/deletions of vertices or edges * :pr:`2142`: Fixed issue with duplicates in OpenGL family and added tests * :pr:`2168`: Fixed order of return values of :func:`.space_ops.cartesian_to_spherical` * :pr:`2160`: Made projection shaders compatible with :class:`.StreamLines` * :pr:`2140`: Fixed passing color lists to :meth:`.Mobject.set_color` for the OpenGL renderer * :pr:`2211`: Fixed animations not respecting the specified rate function * :pr:`2161`: Fixed ``IndexOutOfBoundsError`` in TeX logging * :pr:`2148`: Fixed :class:`~.Arrow` tip disorientation with :meth:`.Line.put_start_and_end_on` * :pr:`2192`: Fixed :func:`.svg_path.string_to_numbers` sometimes returning strings * :pr:`2185`: Fixed type mismatch for height and width parameters of :class:`~.Text` Documentation-related changes ----------------------------- * :pr:`2228`: Added a new boolean operation example to the gallery * :pr:`2239`: Removed erroneous raw string from text tutorial * :pr:`2184`: Moved comments in :class:`~.VMobject` to documentation * :pr:`2217`: Removed superfluous dots in documentation of :class:`.Section` * :pr:`2215`: Fixed typo in docstring of :meth:`.ThreeDAxes.get_z_axis_label` * :pr:`2212`: Fixed Documentation for Sections * :pr:`2201`: Fixed a typo in the documentation * :pr:`2165`: Added Crowdin configuration and changed source files to ``.pot`` format * :pr:`2130`: Transferred troubleshooting installation related snippets from Discord to the documentation * :pr:`2176`: Modified :meth:`.Mobject.set_default` example to prevent leaking across the docs Changes concerning the testing system ------------------------------------- * :pr:`2197`: Added tests for resolution flag * :pr:`2146`: Increased test coverage for OpenGL renderer Changes to our development infrastructure ----------------------------------------- * :pr:`2191`: Removed ``add-trailing-comma`` pre-commit hook Code quality improvements and similar refactors ----------------------------------------------- * :pr:`2136`: Added type hints to all colors * :pr:`2220`: Cleanup: let ``Scene.renderer.time`` return something that makes sense * :pr:`2222`: Updated Classifiers in ``pyproject.toml``: removed Python 3.6, added Python 3.9 * :pr:`2213`: Removed redundant ``partial_movie_files`` parameter in :meth:`.SceneFileWriter.combine_to_movie` * :pr:`2200`: Addressed some maintenance TODOs - Changed an `Exception` to `ValueError` - Fixed :meth:`.MappingCamera.points_to_pixel_coords` by adding the ``mobject`` argument of the parent - Rounded up width in :class:`.SplitScreenCamera` - Added docstring to :meth:`.Camera.capture_mobject` * :pr:`2194`: Added type hints to :mod:`.utils.images` * :pr:`2171`: Added type hints to :mod:`.utils.ipython_magic` * :pr:`2164`: Improved readability of regular expression New releases ------------ * :pr:`2247`: Prepared new release ``v0.12.0`` ================================================ FILE: docs/source/changelog/0.13.0-changelog.rst ================================================ ******* v0.13.0 ******* :Date: December 04, 2021 Contributors ============ A total of 27 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Alex Lembcke * Benjamin Hackl * Christopher Besch * Darylgolden * Filip + * John Ingles + * Laith Bahodi * Lucas Ricci + * Marcin Serwin + * Mysaa * Naveen M K * Ricky + * Viicos * ask09ok + * citrusmunch + * icedcoffeeee * mostlyaman + * vmiezys + * zhujisheng + The patches included in this release have been reviewed by the following contributors. * Alex Lembcke * Benjamin Hackl * Christopher Besch * Darylgolden * Filip * Hugues Devimeux * Jan-Hendrik Müller * Laith Bahodi * Lucas Ricci * Naveen M K * Oliver * Ryan McCauley * Viicos * ask09ok * icedcoffeeee * mostlyaman Pull requests merged ==================== A total of 39 pull requests were merged for this release. Highlights ---------- * :pr:`2313`: Finalized translation process and documentation Deprecated classes and functions -------------------------------- * :pr:`2331`: Removed deprecations up to ``v0.12.0`` - Removed ``distance`` parameters from :class:`~.ThreeDCamera` (replacement: ``focal_distance``) - Removed ``min_distance_to_new_point`` parameter from :class:`~.TracedPath` - Removed ``positive_space_ratio`` and ``dash_spacing`` parameters from :class:`~.DashedVMobject` - Removed ``_in_place`` methods from :mod:`.mobject` - Removed ``ReconfigurableScene`` - Removed ``SampleSpaceScene`` * :pr:`2312`: Replaced all occurrences of ``set_submobjects`` New features ------------ * :pr:`2314`: Added basic support for adding subcaptions via :meth:`.Scene.add_subcaption` - New method :meth:`.Scene.add_subcaption` - New keyword arguments ``subcaption``, ``subcaption_duration``, ``subcaption_offset`` for :meth:`.Scene.play` * :pr:`2267`: Implemented :meth:`.CoordinateSystem.plot_antiderivative_graph` Enhancements ------------ * :pr:`2347`: Moved ``manim_directive.py`` to ``manim.utils.docbuild`` * :pr:`2340`: Added documentation for :mod:`.animation.growing` and improved :class:`.SpinInFromNothing` * :pr:`2343`: Replaced current tree layout algorithm with SageMath's for improved layout of large trees * :pr:`2351`: Added missing ``**kwargs`` parameter to :meth:`.Table.add_highlighted_cell` * :pr:`2344`: Resized SVG logos, fit content to canvas Fixed bugs ---------- * :pr:`2359`: Resolved ``ValueError`` when calling ``manim cfg write`` * :pr:`2276`: Fixed bug with alignment of z-axis in :class:`~.ThreeDAxes` * :pr:`2325`: Several improvements to handling of ``quality`` argument * :pr:`2335`: Fixed bug with zooming camera and :class:`~.PointCloud` * :pr:`2328`: Fixed bug causing incorrect RGBA values to be passed to cairo * :pr:`2292`: Fixed positioning of :class:`~.Flash` * :pr:`2262`: Fixed wrong cell coordinates with :meth:`.Table.get_cell` after scaling * :pr:`2280`: Fixed :class:`~.DecimalNumber` color when number of displayed digits changes Documentation-related changes ----------------------------- * :pr:`2354`: Port over docs and typings from ``mobject.py`` and ``vectorized_mobject.py`` to their OpenGL counterparts * :pr:`2350`: Added mention of Manim sideview extension for VS Code * :pr:`2342`: Removed :meth:`~.CoordinateSystem.get_graph` usage from :class:`~.Axes` example * :pr:`2216`: Edited and added new sections to the quickstart tutorial * :pr:`2279`: Added documentation for discontinuous functions * :pr:`2319`: Swapped ``dotL`` and ``dotR`` in :meth:`.Mobject.interpolate` example * :pr:`2230`: Copyedited building blocks tutorial * :pr:`2310`: Clarified that Manim does not support Python 3.10 yet in the documentation * :pr:`2294`: Made documentation front page more concise and rearranged order of tutorials * :pr:`2287`: Replace link to old interactive notebook Changes concerning the testing system ------------------------------------- * :pr:`2346`: Made ``frames_comparsion`` decorator for frame testing a proper module of the library * :pr:`2318`: Added tests for ``remover`` keyword argument of :class:`~.AnimationGroup` * :pr:`2301`: Added a test for :meth:`.ThreeDScene.add_fixed_in_frame_mobjects` * :pr:`2274`: Optimized some tests to reduce duration * :pr:`2272`: Added test for :class:`~.Broadcast` Code quality improvements and similar refactors ----------------------------------------------- * :pr:`2327`: Corrected type hint for ``labels`` keyword argument of :class:`~.Graph` * :pr:`2329`: Remove unintended line break in README * :pr:`2305`: Corrected type hint ``discontinuities`` argument for :class:`~.ParametricFunction` * :pr:`2300`: Add contact email for PyPi New releases ------------ * :pr:`2353`: Prepare new release: ``v0.13.0`` Unclassified changes -------------------- * :pr:`2348`: Updated translation source files ================================================ FILE: docs/source/changelog/0.13.1-changelog.rst ================================================ ******* v0.13.1 ******* :Date: December 05, 2021 Contributors ============ A total of 2 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Benjamin Hackl The patches included in this release have been reviewed by the following contributors. * Laith Bahodi Pull requests merged ==================== A total of 2 pull requests were merged for this release. Fixed bugs ---------- * :pr:`2363`: Fixed broken IPython magic command New releases ------------ * :pr:`2364`: Prepared bugfix release ``v0.13.1`` ================================================ FILE: docs/source/changelog/0.14.0-changelog.rst ================================================ ******* v0.14.0 ******* :Date: January 07, 2022 Contributors ============ A total of 29 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Benjamin Hackl * BorisTheBrave + * Darylgolden * GameDungeon * Gergely Bencsik + * Jan-Hendrik Müller * Jihoon + * Kian Kasad + * Kiran-Raj-Dev + * Laith Bahodi * Leo Xu + * Marcin Serwin * Matt Gleich + * Naveen M K * Steven nguyen + * Vectozavr + * Viicos * citrusmunch * netwizard22 + The patches included in this release have been reviewed by the following contributors. * Benjamin Hackl * BorisTheBrave * Christopher Besch * Darylgolden * GameDungeon * Gergely Bencsik * Hugues Devimeux * Jan-Hendrik Müller * Kiran-Raj-Dev * Laith Bahodi * Leo Xu * Lucas Ricci * Marcin Serwin * Naveen M K * Raghav Goel * Ryan McCauley * Viicos * icedcoffeeee Pull requests merged ==================== A total of 29 pull requests were merged for this release. Deprecated classes and functions -------------------------------- * :pr:`2390`: Removed deprecations up to `v0.13.0` - Removed ``get_graph``, ``get_implicit_curve``, ``get_derivative_graph``, ``get_line_graph`` and ``get_parametric_curve`` in favour of their ``plot`` variants - Removed ``FullScreenFadeRectangle`` and ``PictureInPictureFrame`` - Removed ``path_arc`` parameter from :class:`~.SpinInFromNothing` - Removed ``set_submobjects`` method from ``opengl_mobject.py`` New features ------------ * :pr:`2341`: Update :class:`~.Text` to use new ``ManimPango`` color setting * :class:`~.Text` class now uses color setting introduced in ``ManimPango 0.4.0`` for color and gradient. * :pr:`2397`: Added ``label_constructor`` parameter for :class:`~.NumberLine` Allows changing the class that will be used to construct :class:`~.Axes` and :class:`~.NumberLine` labels by default. Makes it possible to easily use :class:`~.Text` for labels if needed. Enhancements ------------ * :pr:`2383`: Made :meth:`.Surface.set_fill_by_value` support gradients along different axes * :pr:`2388`: Added ``about_point`` keyword argument to :class:`~.ApplyMatrix` * :pr:`2395`: Add documentation for paths functions * :pr:`2372`: Improved :class:`~.DashedVMobject` :class:`~.DashedVMobject` used to create stretched and uneven dashes on most plotted curves. Now the dash lengths are equalized. An option is reserved to use the old method. New keyword argument: ``dash_offset``. This parameter shifts the starting point. Fixed bugs ---------- * :pr:`2409`: Fixed performance degradation by trimming empty curves from paths when calling :meth:`.VMobject.align_points` * :pr:`2392`: Fixed ``ZeroDivisionError`` in :mod:`~.mobject.three_dimensions` * :pr:`2362`: Fixed phi updater in :meth:`.ThreeDScene.begin_3dillusion_camera_rotation` Documentation-related changes ----------------------------- * :pr:`2415`: Removed instructions on using and installing Docker in README * :pr:`2414`: Made improvements to the :doc:`/guides/configuration` tutorial * :pr:`2423`: Changed recommendation to ``mactex-no-gui`` from ``mactex`` for macOS install * :pr:`2407`: Clarified docstrings of :meth:`.Mobject.animate`, :meth:`.Mobject.set` and :class:`~.Variable` * :pr:`2352`: Added Crowdin badge * :pr:`2371`: Added ``dvips`` to list of required LaTeX packages on Linux * :pr:`2403`: Improved docstring of :class:`~.ApplyMethod` and removed propagated ``__init__`` docstring * :pr:`2391`: Fixed typo in parameter name in documentation of :class:`~.NumberLine` * :pr:`2368`: Added note in Internationalization Code quality improvements and similar refactors ----------------------------------------------- * :pr:`2408`: Removed various return annotations that were stifling type inference * :pr:`2424`: Removed ``strings.py`` * :pr:`1972`: Added support for MyPy * :pr:`2410`: Fixed Flake8 * :pr:`2401`: Fixed type annotations in :mod:`.mobject.three_dimensions` * :pr:`2405`: Removed some unused OpenGL files * :pr:`2399`: Fixed type annotations in :mod:`~.mobject.table` * :pr:`2385`: Made comments in quickstart tutorial more precise * :pr:`2377`: Fixed type hint for an argument of :class:`~.MoveAlongPath` New releases ------------ * :pr:`2411`: Prepare new release, ``v0.14.0`` ================================================ FILE: docs/source/changelog/0.15.0-changelog.rst ================================================ ******* v0.15.0 ******* :Date: February 26, 2022 Contributors ============ A total of 34 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Alex Lembcke * AnonymoZ + * Benjamin Hackl * Darylgolden * Eshaan Naga Venkata + * Faruk D. + * GameDungeon * Kevin Cen + * Laith Bahodi * Leo Xu * Lucas Ricci * Marcin Serwin * Michael McNeil Forbes + * Mysaa * Naveen M K * Pierre Couy + * Simon Ellmann + * Tommy Chu + * Viicos * ad_chaos * betafcc + * friedkeenan * icedcoffeeee * vmoros + * 鹤翔万里 The patches included in this release have been reviewed by the following contributors. * Benjamin Hackl * Christopher Besch * Darylgolden * Eshaan Naga Venkata * GameDungeon * Jan-Hendrik Müller * Laith Bahodi * Marcin Kurczewski * Marcin Serwin * Naveen M K * Raghav Goel * RomainJMend * Ryan McCauley * Tommy Chu * ad_chaos * betafcc * icedcoffeeee Pull requests merged ==================== A total of 71 pull requests were merged for this release. Breaking changes ---------------- * :pr:`2476`: Improved structure of the :mod:`.mobject` module Arrow tips now have to be imported from ``manim.mobject.geometry.tips`` instead of ``manim.mobject.geometry``. * :pr:`2387`: Refactored :class:`~.BarChart` and made it inherit from :class:`~.Axes` - :class:`~.BarChart` now inherits from :class:`~.Axes`, allowing it to use :class:`~.Axes`' methods. Also improves :class:`~.BarChart`'s configuration and ease of use. - Added :meth:`~.BarChart.get_bar_labels` to annotate the value of each bar of a :class:`~.BarChart`. Deprecated classes and functions -------------------------------- * :pr:`2568`: Removed Deprecated Methods Removed methods and classes that were deprecated since v0.10.0 and v0.11.0 * :pr:`2457`: Deprecated :class:`.ShowCreationThenFadeOut` New features ------------ * :pr:`2442`: Added ``media_embed`` config option to control whether media in Jupyter notebooks is embedded * :pr:`2504`: Added finer control over :meth:`.Scene.wait` being static (i.e., no updaters) or not - Added keyword argument ``frozen_frame`` to :class:`.Wait` and :meth:`.Scene.wait` - New convenience method: :meth:`.Scene.pause` (alias for ``Scene.wait(frozen_frame=True)``) - Changed default behavior for OpenGL updaters: updater functions are now not called by default when they are added - Changed default behavior of :meth:`.Scene.should_mobjects_update`: made it respect the set value of ``Wait.frozen_frame``, changed automatic determination of frozen frame state to also consider Scene updaters Enhancements ------------ * :pr:`2478`: Alternative scaling for tree graph layout * :pr:`2565`: Allowed passing vertex configuration keyword arguments to :meth:`.Graph.add_edges` * :pr:`2467`: :class:`~.MathTex`, :class:`~.Tex`, :class:`~.Text` and :class:`~.MarkupText` inherit color from their parent mobjects * :pr:`2537`: Added support for PySide coordinate system * :pr:`2158`: Added OpenGL compatibility to :meth:`.ThreeDScene.add_fixed_orientation_mobjects` and :meth:`.ThreeDScene.add_fixed_in_frame_mobjects` * :pr:`2535`: Implemented performance enhancement for :meth:`.VMobject.insert_n_curves_to_point_list` * :pr:`2516`: Cached view matrix for :class:`~.OpenGLCamera` * :pr:`2508`: Improve performance for :meth:`.Mobject.become` * :pr:`2332`: Changed ``color``, ``stroke_color`` and ``fill_color`` attributes to properties * :pr:`2396`: Fixed animations introducing or removing objects * :class:`.ShowPassingFlash` now removes objects when the animation is finished * Added ``introducer`` keyword argument to :class:`.Animation` analogous to ``remover`` * Updated :class:`.Graph` vertex addition handling Fixed bugs ---------- * :pr:`2574`: Improved Error in :mod:`.utils.tex_file_writing` * :pr:`2580`: Fixed :func:`.find_intersection` in :mod:`.space_ops` * :pr:`2576`: Fixed a bug with animation of removal of edges from a :class:`.Graph` * :pr:`2556`: Fixed showing highlighted cells when creating :class:`.Table` * :pr:`2559`: Fix setting line numbers in :class:`.Text` when using ManimPango settings * :pr:`2557`: Fixed logger bug in :meth:`.Camera.make_background_from_func` * :pr:`2548`: Fixed :class:`.Axes` plotting bug with logarithmic x-axis * :pr:`1547`: Fixed certain unicode characters in users' paths causing issues on Windows * :pr:`2526`: Fixed segfault when using ``--enable_gui`` * :pr:`2538`: Fixed flickering OpenGL preview when using ``frozen_frame`` * :pr:`2528`: Fixed custom naming of gifs and added some tests * :pr:`2487`: Fixed :meth:`.ThreeDCamera.remove_fixed_orientation_mobjects` * :pr:`2530`: Use single source of truth for default text values * :pr:`2494`: Fixed an issue related to previewing gifs * :pr:`2490`: Fixed order of transformation application in :class:`~.SVGMobject` * :pr:`2357`: Fixed ``screeninfo.get_monitors`` for MacOS * :pr:`2444`: Fixed :meth:`.VectorScene.add_axes` Documentation-related changes ----------------------------- * :pr:`2560`: Refactored more docstrings in :mod:`.geometry` * :pr:`2571`: Refactored docstrings in :mod:`.graphing` * :pr:`2569`: Refactored docstrings in :mod:`.geometry` * :pr:`2549`: Added a page for internals which links to our GitHub wiki * :pr:`2458`: Improved documentation for :class:`.Rotate` * :pr:`2459`: Added examples to some transform animations * :pr:`2517`: Added guide on profiling and improving performance * :pr:`2518`: Added imports to examples for ``deprecation`` decorator * :pr:`2499`: Improved help text for ``--write_to_movie`` * :pr:`2465`: Added documentation for :func:`.index_labels` * :pr:`2495`: Updated minimal LaTeX installation instructions * :pr:`2500`: Added note about contributions during refactor period * :pr:`2431`: Changed example in :meth:`.Surface.set_fill_by_value` * :pr:`2485`: Fixed some typos in documentation * :pr:`2493`: Fixed typo in documentation for parameters of :class:`.Square` * :pr:`2482`: Updated Python version requirement in installation guide * :pr:`2438`: Removed unnecessary rotation from example * :pr:`2468`: Hid more private methods from the docs * :pr:`2466`: Fixed a typo in the documentation for plugins * :pr:`2448`: Improvements to the ``.pot`` files cleaning system * :pr:`2436`: Fixed typo and improved example in building blocks tutorial Changes to our development infrastructure ----------------------------------------- * :pr:`2554`: Removed ``Remove-Item`` calls for MSYS2 Python * :pr:`2531`: Added a GitHub Action for automatic validation of citation metadata * :pr:`2536`: Upgraded version of setup-ffmpeg CI action * :pr:`2484`: Updated tinytex download URL Code quality improvements and similar refactors ----------------------------------------------- * :pr:`2573`: Moved :mod:`.value_tracker` back inside :mod:`.mobject` * :pr:`2566`: Removed unused livestream-related imports and functions from :mod:`.scene_file_writer` * :pr:`2524`: Reworked :mod:`.space_ops` * :pr:`2519`: Removed outdated comment * :pr:`2503`: Removed unused imports * :pr:`2475`: Removed setuptools dependency * :pr:`2472`: Removed unnecessary comment in :mod:`.simple_functions` * :pr:`2429`: Upgraded to future-style type annotations * :pr:`2464`: Bump pillow from 8.4.0 to 9.0.0 * :pr:`2376`: Updated dependencies for Python 3.10 * :pr:`2437`: Cleaned up :mod:`.simple_functions` - Removed ``fdiv`` as in all cases where it was used, it was just doing the same thing as numpy array division. - Replaced old implementation of the choose function with scipy's implementation - Use ``lru_cache`` (least recently used cache) for caching the choose function. Since it's only used for beziers, only 2 choose k and 3 choose k will be used, hence a size of 10 should be enough. - Removed ``clip_in_place`` in favor of ``np.clip`` - Removed one use of ``clip_in_place`` that wasn't actually doing anything * :pr:`2439`: Removed twitter template from scripts New releases ------------ * :pr:`2547`: Prepared new release, ``v0.15.0`` ================================================ FILE: docs/source/changelog/0.15.1-changelog.rst ================================================ ******* v0.15.1 ******* :Date: March 08, 2022 Contributors ============ A total of 9 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Benjamin Hackl * Nicolai Weitkemper * Yuchen + * ad_chaos The patches included in this release have been reviewed by the following contributors. * Alex Lembcke * Benjamin Hackl * Darylgolden * Naveen M K * Raghav Goel * ad_chaos * icedcoffeeee Pull requests merged ==================== A total of 9 pull requests were merged for this release. Enhancements ------------ * :pr:`2602`: Support groups in :class:`.TransformMatchingTex` Fixed bugs ---------- * :pr:`2594`: Fixed render flow issues with introducer animations * :pr:`2584`: Fixed bug with invalid color type ``None`` * :pr:`2587`: Fixed bug with rendering Tex string that contain ``%`` * :pr:`2593`: Fixed bug with displaying images in Jupyter Notebooks when ``config.media_embed`` is set to ``False`` Documentation-related changes ----------------------------- * :pr:`2570`: Refactored docstrings in :mod:`.coordinate_systems` * :pr:`2603`: Reduced the number of warnings during documentation build Code quality improvements and similar refactors ----------------------------------------------- * :pr:`2578`: Fixed incorrect type hint for color property of :class:`.Text` New releases ------------ * :pr:`2596`: Prepared bugfix release v0.15.1 ================================================ FILE: docs/source/changelog/0.15.2-changelog.rst ================================================ ******* v0.15.2 ******* :Date: April 25, 2022 Contributors ============ A total of 33 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Bailey Powers + * Benjamin Hackl * Dan Walsh + * Darigov Research * Darylgolden * David Millard + * Hamidreza Hashemi + * Jan-Hendrik Müller * Jason Villanueva * Jonathan Alpert + * Joy Bhalla * Kian Cross + * Luca + * Mohsin Shaikh + * Naveen M K * Prismo + * Ryan McCauley * WillSoltas + * ad_chaos * darkways + * dawn*squirryl + * icedcoffeeee * peaceheis * sparshg * trickypr + The patches included in this release have been reviewed by the following contributors. * Benjamin Hackl * Dan Walsh * Darylgolden * GameDungeon * Hugues Devimeux * Jan-Hendrik Müller * Jason Villanueva * Jonathan Alpert * Luca * Naveen M K * Prismo * Ryan McCauley * ad_chaos * darkways * hickmott99 * icedcoffeeee * peaceheis Pull requests merged ==================== A total of 39 pull requests were merged for this release. New features ------------ * :pr:`1975`: Improved CLI help page styling - Updates dependencies on Click and Cloup libraries for CLI help page styling. - Removed the dependency on click-default-group. - Added ``no_args_is_help`` parameter for ``manim render`` to allow easy access to help page. - Added note to ``manim`` help page epilog on how to access other command help pages. * :pr:`2404`: Add :class:`.SpiralIn` Animation - Make :class:`.ManimBanner` to use :class:`.SpiralIn`. * :pr:`2534`: Implement :class:`~.OpenGLImageMobject` * :pr:`2684`: Created a more accessible way to create Angles with line.py angle function - :meth:`.Angle.from_three_points` Enhancements ------------ * :pr:`2062`: Reuse shader wrappers and shader data * :pr:`2642`: Migrated ``file_ops.py`` and ``scene_file_writer.py`` from os.path to Pathlib In ``file_ops.py`` and ``scene_file_writer.py``: Uses of str type file names have been mostly (see further information) converted to pathlib's Path objects. Uses of ``os.path`` methods have been converted to equivalent pathlib methods. * :pr:`2655`: Fix :func:`.assert_is_mobject_method` when using OpenGL * :pr:`2665`: Improved handling of attributes when using the ``.animate`` syntax * :pr:`2674`: Document and type ``simple_functions.py`` - Add documentation for ``simple_functions.py``. - Small additions with some extra clarity for these functions. * :pr:`2693`: Allow using :meth:`.MovingCamera.auto_zoom` without animation Allows auto zooming camera without having to play an animation by passing an ``animation=False`` argument Fixed bugs ---------- * :pr:`2546`: Fixed a file logging bug and some maintenance * :pr:`2597`: Fix Bug in :class:`.Uncreate` with ``rate_func`` via introducing new parameter ``reversed`` to :class:`.Animation` - Refractor the :class:`.Uncreate`. The new implementation uses a flag member ``reversed``. Set it to ``True`` and its superclass handles the reverse. - Introduce a bool parameter ``reversed`` to :class:`.Animation`. It decides whether the animation needs to be played backwards. Default to be False. - Add conditional branches in :meth:`.Animation.get_sub_alpha`. If the parameter ``reversed`` is True, it would set ``rate_func(t)`` to ``rate_func(1 - t)``. * :pr:`2613`: Fixed bug in :meth:`.Circle.point_at_angle` when the angle is not in the interval :math:`[0, 2\pi]` * :pr:`2634`: Fix background lines drawn twice in :class:`.NumberPlane` * :pr:`2648`: Handle user-defined centers for Wiggle animation * :pr:`2658`: Fix arguments of overridden ``set_style`` for :class:`.BackgroundRectangle` Using :class:`.Write` animation on a :class:`.Text` object with ``.add_background_rectangle()`` applied no longer generates a ``TypeError``. * :pr:`2668`: (Re)set background color of :class:`.OpenGLRenderer` when initializing scene * :pr:`2676`: Fixed propagation of custom attributes in animations for the OpenGL renderer * :pr:`2688`: Fixed two minor issues of :class:`.SpiralIn` and :class:`.ManimBanner` Documentation-related changes ----------------------------- * :pr:`2609`: Copyedit troubleshooting.rst * :pr:`2610`: Add example PolygonOnAxes * :pr:`2617`: Re-added :mod:`.value_tracker` documentation * :pr:`2619`: Improve Example for arrange_in_grid * :pr:`2620`: Fixed typo in :meth:`.Animation.is_introducer` * :pr:`2640`: Copyedited Documentation Reviewed ``tutorials/configurations.rst``. Edited simple mistakes such as Manim not being capitalized and commas. * :pr:`2649`: Document and type utils/iterables.py * :pr:`2651`: Update copyright year in documentation to 2020-2022 * :pr:`2663`: Added documentation for scene updater functions * :pr:`2686`: Add instructions to install extra dependencies with poetry Changes to our development infrastructure ----------------------------------------- * :pr:`2561`: Run tests on Linux-aarch64 * :pr:`2656`: Fixed incompatibility with black version Code quality improvements and similar refactors ----------------------------------------------- * :pr:`2630`: Remove WebGL renderer The WebGL renderer is broken and unmaintained. The support for it in Manim is removed. * :pr:`2652`: Update ``cloup`` version to 0.13.0 from 0.7.0 * :pr:`2678`: Require ``backports-cached-property`` only for Python < 3.8 * :pr:`2685`: Migrate from ``os.path`` to ``pathlib`` in testing scripts This pull request changes a number of instances of ``os.path`` to Pathlib objects and functions. In addition, this PR modifies the SVGMobject constructor to accept both a Pathlib object or a string variable pathname its constructor. * :pr:`2691`: Removed :class:`CameraFrame` * :pr:`2696`: Made changelog generation run in parallel plus further improvements to ``scripts/dev_changelog.py`` * :pr:`2697`: Sort PRs by number in changelog sections before writing New releases ------------ * :pr:`2694`: Prepared bugfix release v0.15.2 ================================================ FILE: docs/source/changelog/0.16.0-changelog.rst ================================================ ******* v0.16.0 ******* :Date: July 13, 2022 Contributors ============ A total of 44 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Alex Lembcke * Baroudi Aymen + * Benjamin Hackl * Charalampos Georgiou + * Cindy Park + * Ejar + * Francesco Frassinelli + * Francisco Manríquez Novoa + * Jacob Evan Shreve + * Jaime Santos + * Jonathan Alpert * Joshua Mankelow + * Kevin Lubick + * Laith Bahodi * Lingren Kong + * Logen + * Naveen M K * Noam Zaks * Pedro Lamkowski + * Raghav Goel * Simeon Widdis * Sparsh Goenka * TornaxO7 + * Tristan Schulz + * WillSoltas * ad_chaos * conor-oneill-2 + * fcrozatier + * mooncaker816 + * niklebedenko + * nyabkun + * quark67 The patches included in this release have been reviewed by the following contributors. * Alex Lembcke * Benjamin Hackl * Darylgolden * Francesco Frassinelli * Francisco Manríquez Novoa * Gianluca Gippetto * Jan-Hendrik Müller * Jonathan Alpert * Kevin Lubick * Laith Bahodi * Naveen M K * Pedro Lamkowski * Philipp Imhof * Raghav Goel * Ryan McCauley * Sparsh Goenka * TornaxO7 * Tristan Schulz * ad_chaos * hickmott99 Pull requests merged ==================== A total of 56 pull requests were merged for this release. Highlights ---------- * :pr:`2550`: New thematic guide: a deep dive into the internals of the library This new :doc:`thematic guide ` aims to be a comprehensive walkthrough describing all the things that Manim does when you run it to produce a video. * :pr:`2732`: Improved overall structure of deployed documentation; added a dedicated :doc:`FAQ section ` * :pr:`2749`: Added :class:`.ChangeSpeed`, an animation wrapper that allows to smoothly change the speed at which an animation is played The speed of any animation can be changed by wrapping the animation with :class:`.ChangeSpeed` and passing a dictionary as ``speedinfo`` whose keys are the relative animation run time stamps and whose values are the absolute speed factors; e.g., ``{0.5: 2, 0.75: 0.25}`` smoothly speeds up the animation by a factor of 2 once it has been completed to 50%, and then it is smoothly slowed down to 1/4 of the default run speed after 75% of the animation are completed. The ``run_time`` of the animation will be adjusted to match the changed play speed. It is also possible to add time-based updaters that respect the change in speed, use the auxiliary :meth:`.ChangeSpeed.add_updater` method to do so. New features ------------ * :pr:`2667`: Made FFmpeg executable path configurable * :pr:`2739`: Added vectorized plotting functionality via keyword argument ``use_vectorized`` to improve performance Enhancements ------------ * :pr:`2186`: Enabled filling color by value for :class:`.OpenGLSurface`, replaced ``colors`` keyword argument of :meth:`.Surface.set_fill_by_value` with ``colorscale`` * :pr:`2288`: Added warning when attempting to add same mobject as child twice * :pr:`2707`: Fixed missing ``get_nth_curve_length_pieces`` method of :class:`.OpenGLVMobject` - Removed duplicate definition of ``get_curve_functions_with_lengths`` in ``OpenGLVMobject`` - Added definition of ``get_nth_curve_length_pieces`` to ``OpenGLVMobject`` * :pr:`2709`: Improved the look of the brackets of :class:`.Matrix` * :pr:`2714`: Fixed :meth:`.OpenGLVMobject.pointwise_become_partial` to improve stroke rendering * :pr:`2727`: Slight performance improvement for :class:`.ArrowVectorField` and Bézier curve computation * :pr:`2728`: Added :meth:`.VectorField.fit_to_coordinate_system` to fit a vector field to a given coordinate system * :pr:`2730`: Added note to let users find documentation of default CLI subcommand easier * :pr:`2746`: Installed ghostscript in the docker image * :pr:`2841`: Added :func:`.split_quadratic_bezier` and :func:`.subdivide_quadratic_bezier` * :pr:`2842`: CLI: Moved functionality from ``manim new`` to ``manim init`` and added deprecation warning for ``manim new`` * :pr:`2866`: Reorganize test files to match library module structure Fixed bugs ---------- * :pr:`2567`: Use tempconfig for every scene render * :pr:`2638`: Fixed :meth:`BarChart.change_bar_values` not updating when height is 0 * :pr:`2661`: Fixed tip resize functionality for :class:`.Axes` to match documentation * :pr:`2703`: Default to utf-8 when reading files in :class:`.Code` * :pr:`2721`: Fixed bad text slicing for lines in :class:`.Paragraph` * :pr:`2725`: Fixed wrong indentation in :class:`.Code` * :pr:`2734`: Fixed OpenGL segfaults when running :meth:`.Scene.play` or :meth:`.Scene.wait` in interactive mode * :pr:`2753`: Fixed multiplatform builds for docker images in pipeline * :pr:`2757`: Added missing ``__init__.py`` file in :mod:`.docbuild` module * :pr:`2770`: Fixed bug in :meth:`.VMobject.proportion_from_point` that caused proportions greater than 1 to be returned * :pr:`2826`: Fixed leaked mobjects coming from :class:`.TransformMatchingAbstractBase` * :pr:`2870`: Fixed issue with ``manim init scene SCENE_NAME filename.py`` and removed necessity of ``main.py`` to be present in working directory Documentation-related changes ----------------------------- * :pr:`2704`: Updated URL to Pango Markup formatting page * :pr:`2716`: Improved the order of the reference manuals * :pr:`2720`: Fixed typo in docstring of :class:`.Angle` * :pr:`2722`: Fixed typos in docstrings of classes in :mod:`.mobject.table` * :pr:`2726`: Edited note on :class:`.NumberPlane` length and added another example * :pr:`2740`: Fixed documentation of :meth:`.Cylinder.get_direction` * :pr:`2755`: Fixed docstring of :meth:`.VMobject.get_end_anchors` * :pr:`2760`: Removed ``cmake`` from the MacOS installation section * :pr:`2767`: Added more questions and answers to FAQ section, new :doc:`OpenGL FAQ ` * :pr:`2771`: Added documentation and testing for ``path_func`` keyword argument of :class:`.Transform` * :pr:`2828`: Removed suggestion issue template, added FAQ answer regarding proposing new features * :pr:`2849`: Added example for ``path_arc`` keyword argument of :class:`.Transform` * :pr:`2851`: Added an example on constructing a (neural) network using a partite :class:`.Graph` * :pr:`2855`: Added implicit ``docker.io/`` URL base in reference to docker images * :pr:`2861`: Added docstring for :meth:`.CoordinateSystem.plot_parametric_curve` Changes concerning the testing system ------------------------------------- * :pr:`2743`: Replaced ``assert`` statements with with assertion functions from ``np.testing`` Changes to our development infrastructure ----------------------------------------- * :pr:`2700`: CI: updated Python versions * :pr:`2701`: CI: added a workflow to publish docker image after releases and commits to main branch Code quality improvements and similar refactors ----------------------------------------------- * :pr:`2680`: Increased minimum required version of ``numpy`` to 1.19 * :pr:`2687`: Migrated from ``os.path`` to ``pathlib`` in :class:`.SVGMobject` and other locations * :pr:`2715`: Updated deprecated ``pillow`` constants * :pr:`2735`: Bump pyjwt from 2.3.0 to 2.4.0 * :pr:`2748`: Bump pillow from 9.1.0 to 9.1.1 * :pr:`2751`: Fixed flake C417 and improved a comment * :pr:`2825`: Bump notebook from 6.4.11 to 6.4.12 * :pr:`2864`: Updated lockfile New releases ------------ * :pr:`2863`: Prepared new release, ``v0.16.0`` ================================================ FILE: docs/source/changelog/0.17.0-changelog.rst ================================================ ******* v0.17.0 ******* :Date: December 02, 2022 Contributors ============ A total of 32 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Alex Lembcke * Alexander Vázquez * Benjamin Hackl * Duc Phat + * Hugues Devimeux * Ievgen Pyrogov + * Isaac Beh + * Jeff Hanke + * John Hammond + * Jérome Eertmans + * Kevin Lubick * Kian-Meng Ang + * Naveen M K * Nick Skriloff + * NotWearingPants * Onur Solmaz + * OpenRefactory, Inc + * Owen Samuel + * Pavel Zwerschke + * Sparsh Goenka * Taxo Rubio * ad-chaos + * fcrozatier * mostly documentation + * vahndi + The patches included in this release have been reviewed by the following contributors. * Benjamin Hackl * Darylgolden * Hugues Devimeux * Jan-Hendrik Müller * Kevin Lubick * Mohammed Belgoumri * Naveen M K * NotWearingPants * Raghav Goel * Sparsh Goenka * Tristan Schulz * ad-chaos * friedkeenan Pull requests merged ==================== A total of 63 pull requests were merged for this release. Breaking changes ---------------- * :pr:`2898`: Ported improved implementation of :class:`.SVGMobject` from 3b1b/manim The implementation of :class:`.SVGMobject` is completely changed in this release. Manim now uses the Python library ``svgelements`` to parse SVGs, instead of trying to do it itself. The former class for SVG path objects, ``SVGPathMobject`` has been replaced (without deprecation) with :class:`.VMobjectFromSVGPath`. If you need to create a mobject from an SVG path string, you can do so via:: import svgelements as se my_path_mobject = VMobjectFromSVGPath(se.Path(my_path_string)) The unused class ``TexSymbol`` has been removed. The modules ``manim.mobject.svg.svg_path`` and ``manim.mobject.svg.style_utils`` became superfluous due to the rework and have been removed. * :pr:`3030`: Added support for Python 3.11, dropped support for Python 3.7 Highlights ---------- * :pr:`3049`: Added thematic guide for the ``manim-voiceover`` plugin This new :doc:`thematic guide ` provides a brief introduction to ``manim-voiceover``, a plugin that helps to add voiceovers to your manimations. Supports both working with your own voice as well as synthetically generated voices. New features ------------ * :pr:`2883`: Added animation :class:`.RemoveTextLetterByLetter` * :pr:`3016`: Implemented :class:`.LineJointTypes` for both Cairo and OpenGL renderer * :pr:`3017`: Replaced renderer strings with :class:`.RendererType` enum entries Enhancements ------------ * :pr:`2927`: Allowed ``networkx`` to return 3D layouts when passing ``dim=3`` in the ``layout_config`` of a :class:`.Graph` * :pr:`3014`: Enabled code completion for :meth:`.Mobject.animate` for some IDEs Uses a Union of the existing Generic `Mobject` Type `T` and `_Animation Builder` as the declared return type from `Mobject.animate` to improve code completion. Fixed bugs ---------- * :pr:`2846`: Prevent :class:`.TransformMatchingTex` from crashing when there is nothing to fade * :pr:`2885`: Always expand user when validating file-paths * :pr:`2888`: Fixed bug with propagation of ``tex_template`` value when using ``tempconfig`` * :pr:`2895`: Fixed broken :class:`.ShowPassingFlashWithThinningStrokeWidth` * :pr:`2920`: Fixed alignment of faded lines when passing ``faded_line_ratio`` to :class:`.NumberPlane` * :pr:`2977`: Allow rendering of empty text strings * :pr:`2992`: Fixed ``CLI.tex_template_file`` config file setting * :pr:`3003`: Fixed setting ``run_time`` of :class:`.Succession` after creating the animation object * :pr:`3019`: Fixed rendering SVG paths with multiple move commands Documentation-related changes ----------------------------- * :pr:`2881`: Fixed small typo in deep dive guide * :pr:`2886`: Added docstring to and fixed type hint of :func:`.get_winding_number` * :pr:`2892`: Corrected error in the ``PolygonOnAxes`` example * :pr:`2903`: Fixed minor grammar issues in :doc:`/faq/general` * :pr:`2904`: Fixed formatting and grammar issues in :doc:`/contributing/development` * :pr:`2911`: Disabled autoplay for ``SoundExample`` in documentation * :pr:`2914`: Added conda installation instructions * :pr:`2915`: Added documentation to :mod:`.three_dimensions` * :pr:`2919`: Corrected parameters and enhanced the description of :meth:`.ImageMobject.interpolate_color` * :pr:`2932`: Fixed whitespace formatting issue * :pr:`2933`: Improved answer to the "no scenes in this module" error * :pr:`2936`: Added installation instructions for Windows via ``winget`` * :pr:`2962`: Disabled "Edit on GitHub" button in documentation * :pr:`2978`: Added documentation and example for :class:`.CyclicReplace` * :pr:`3001`: Added FAQ entry regarding failed ``manimpango`` build * :pr:`3004`: Fixed docbuild warnings * :pr:`3018`: Follow-up to :pr:`2988` -- fixes and improvements to some docstrings * :pr:`3022`: Corrected type hint in :meth:`Axes.coords_to_point` * :pr:`3035`: Include latex install instructions on ubuntu * :pr:`3044`: Added Debian dependencies required for pycairo and manimpango Changes concerning the testing system ------------------------------------- * :pr:`2893`: Improved performance of ``test_threed.py`` * :pr:`2981`: Implemented fallback save behavior for ``pytest --show_diff`` * :pr:`2982`: Rewrote unstable tests for :mod:`.text_mobject` to be non-graphical * :pr:`2991`: Migrated ``os.path`` to ``pathlib.Path`` in tests * :pr:`3053`: Added threshold for pixel value errors in frame comparison tests Changes to our development infrastructure ----------------------------------------- * :pr:`2925`: CI (test-arm): Updated python version to ``3.10.6`` * :pr:`2963`: CI (test-arm): Always select the correct python version * :pr:`3029`: CI: Updated actions version and added dependabot config * :pr:`3045`: Updated python-opengl -> python3-opengl for Ubuntu CI task Code quality improvements and similar refactors ----------------------------------------------- * :pr:`2872`: Add ``extract_frames.py`` utility script to help visualize test control data * :pr:`2877`: Fixed binder launch problem by adding missing optional ``notebook`` dependency * :pr:`2887`: Removed empty i18n files that caused filename clashes * :pr:`2931`: Updated ``mapbox-earcut`` * :pr:`2938`: Suggested fixes by iCR, OpenRefactory, Inc. * :pr:`2954`: Fixed click version string in ``pyproject.toml`` * :pr:`2958`: Fix missing stub packages for mypy * :pr:`2975`: Fixed broken links in README * :pr:`2980`: Migrate more ``os.path`` to ``pathlib.Path`` * :pr:`2983`: Fixed Windows CI Pipeline * :pr:`2988`: Converted all types of parameters in docstrings to proper type annotations * :pr:`2994`: Fixed segmentation faults from doctests under Python 3.10 * :pr:`2995`: Added encoding to ``open`` in :mod:`.utils.text_file_writing` * :pr:`3032`: Bump jupyter-core from 4.11.1 to 4.11.2 * :pr:`3033`: Bump pillow from 9.2.0 to 9.3.0 * :pr:`3054`: Removed unused ``GraphicalUnitTester`` New releases ------------ * :pr:`3023`: Prepared new release: v0.17.0 ================================================ FILE: docs/source/changelog/0.17.1-changelog.rst ================================================ ******* v0.17.1 ******* :Date: December 08, 2022 Contributors ============ A total of 5 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Alex Lembcke * Benjamin Hackl * Naveen M K * Onur Solmaz The patches included in this release have been reviewed by the following contributors. * Benjamin Hackl * Naveen M K * Sparsh Goenka Pull requests merged ==================== A total of 6 pull requests were merged for this release. Fixed bugs ---------- * :pr:`3061`: Always expand file paths using ``/`` when calling LaTeX * :pr:`3062`: Added Unicode encoding in :meth:`.Scene.add_subcaption` Documentation-related changes ----------------------------- * :pr:`2953`: Added documentation for lagged animations in :mod:`.animation.composition` Code quality improvements and similar refactors ----------------------------------------------- * :pr:`3064`: Increased minimal required version of ``svgelements`` * :pr:`3066`: Increased minimal version of ``pytest`` New releases ------------ * :pr:`3065`: Prepared new release: ``v0.17.1`` ================================================ FILE: docs/source/changelog/0.17.2-changelog.rst ================================================ ******* v0.17.2 ******* :Date: December 26, 2022 Contributors ============ A total of 5 people contributed to this release. People with a '+' by their names authored a patch for the first time. * CaftBotti + * Tristan Schulz * lgtm-com[bot] + The patches included in this release have been reviewed by the following contributors. * Benjamin Hackl * Naveen M K * Tristan Schulz Pull requests merged ==================== A total of 7 pull requests were merged for this release. Fixed bugs ---------- * :pr:`3089`: Fixed OpenGL mobjects like :class:`.Surface` by reordering init calls Documentation-related changes ----------------------------- * :pr:`3073`: Fixed typo: "Whetherer" to "Whether" * :pr:`3074`: Fixed typo in a comment Code quality improvements and similar refactors ----------------------------------------------- * :pr:`3024`: Add CodeQL workflow for GitHub code scanning * :pr:`3079`: Updated CI syntax for runner version >= 2.298.2 * :pr:`3084`: Properly setup CodeQL New releases ------------ * :pr:`3090`: Prepared new Hotfix Release: ``v0.17.2`` ================================================ FILE: docs/source/changelog/0.17.3-changelog.rst ================================================ ******* v0.17.3 ******* :Date: April 06, 2023 Contributors ============ A total of 35 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Alex Lembcke * Benjamin Hackl * DegrangeM + * Elyanah Aco + * Francisco Manríquez Novoa * Fredrik Lundström + * Frédéric Crozatier * Ikko Eltociear Ashimine + * ItIsJoeyG + * JinchuLi2002 + * Kevin Lubick * KingAndCross + * M. A. Ali + * Matthew Lee + * Max Coplan + * Naveen M K * NotWearingPants * Oscar Rangel + * Papierkorb2292 + * Phoenix2157 + * Tristan Schulz * ciobaca + * coreyp1 + * davidot + * icedcoffeeee * karpfediem + * vahndi The patches included in this release have been reviewed by the following contributors. * Benjamin Hackl * Fredrik Lundström * Frédéric Crozatier * Hugues Devimeux * Kevin Lubick * KingAndCross * Matthew Lee * Naveen M K * Tristan Schulz * coreyp1 * davidot * strager Pull requests merged ==================== A total of 42 pull requests were merged for this release. Deprecated classes and functions -------------------------------- * :pr:`3103`: Removed deprecated function ``OpenGLSurface.set_fill_by_value`` New features ------------ * :pr:`2974`: Added :class:`.DiGraph`, a mobject representing directed graphs * :pr:`3042`: Added :meth:`.Scene.replace` and use in :class:`.ReplacementTransform` * :pr:`3155`: Added support for individualized radius values in :meth:`.Polygram.round_corners` * :pr:`3159`: Added :meth:`.set_opacity_by_tex` method for setting the opacity of parts of Tex mobjects * :pr:`3201`: New tip shape :class:`.StealthTip`, allow specifying tip shape of :class:`.NumberLine` Enhancements ------------ * :pr:`3046`: Add warning if font is not found for Text, Code, and MarkupText * :pr:`3083`: Minor performance improvement in :mod:`.bezier` with preallocating array * :pr:`3092`: Improved :meth:`.Mobject.add` performance by checking for redundancy only once * :pr:`3134`: Performance: Store color data of ``OpenGLSurface`` to prevent OpenGL embed lag * :pr:`3180`: Performance: Speed up width/height/depth calculations by reducing copying * :pr:`3181`: Improved creation time for large :class:`.Text` mobjects * :pr:`3182`: Reduce memory allocations when building :class:`.SVGMobject` * :pr:`3191`: Fixed OpenGL rendering in named threads Fixed bugs ---------- * :pr:`3015`: Fixed bug with ``label_constructor`` in :meth:`.NumberLine.add_labels` * :pr:`3095`: Fixed ``get_axis_labels`` for :class:`.Axes` and :class:`.ThreeDAxes` * :pr:`3106`: Fixed ignored ``depth_test`` argument for ``OpenGLVMobjects`` * :pr:`3149`: Allow to use ``call_updater=True`` in :meth:`.Mobject.add_updater` with non-timebased updaters too * :pr:`3152`: Fixed behavior of :class:`.Wait` and :meth:`.Scene.wait` with specified ``stop_condition`` * :pr:`3163`: Fixed :class:`.BraceLabel` not passing additional keyword arguments to :class:`.Brace` * :pr:`3195`: Fixed :class:`.Axes` scaling for :meth:`.plot_implicit_curve` Documentation-related changes ----------------------------- * :pr:`3105`: Converted types specified in docstrings to proper type hints in :mod:`.three_dimensions` * :pr:`3108`: Clarified documentation for ``--resolution`` command line flag * :pr:`3109`: Clean-up, type-hints and documentation for :mod:`.three_dimensions` * :pr:`3124`: Fixed docstring of :meth:`.ThreeDCamera.get_value_trackers` * :pr:`3126`: Fixed dead links to troubleshooting page * :pr:`3137`: Fixed example using ``reverse=True`` with :class:`.Write` * :pr:`3160`: Fixed a typo * :pr:`3189`: Corrected the hinted return type for :func:`angle_between_vectors` * :pr:`3199`: Updated ``winget`` command for installing MiKTeX in documentation * :pr:`3204`: Fixed docstring formatting of :meth:`.Scene.replace` and improved its error handling Code quality improvements and similar refactors ----------------------------------------------- * :pr:`3144`: Fixed typo in ``stripUntranslatable.awk`` * :pr:`3154`: Bump ipython from 8.7.0 to 8.10.0 * :pr:`3156`: CI: Remove actions using self-hosted runners * :pr:`3164`: Bump markdown-it-py from 2.1.0 to 2.2.0 * :pr:`3165`: Removed deprecated keyword argument in :meth:`.Mobject.align_to` * :pr:`3166`: Made :class:`.ArrowTriangleTip`, :class:`.ArrowTriangleFilledTip` available to module namespace * :pr:`3179`: Fixed deprecation warning in :class:`.ParametricFunction` with ``use_vectorized=True`` * :pr:`3186`: Updated extlinks to work with latest version of Sphinx * :pr:`3196`: CI: updated PATH for recent changed in TinyTex * :pr:`3200`: Made import from ``moderngl`` compatible with more recent versions New releases ------------ * :pr:`3198`: Prepare new release: v0.17.3 ================================================ FILE: docs/source/changelog/0.18.0-changelog.rst ================================================ ******* v0.18.0 ******* :Date: November 11, 2023 Contributors ============ A total of 41 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Abulafia + * Adhyyan Sekhsaria + * Adrien Ludwig + * Alex Kempen + * Andres Berejnoi + * Anousheh Moonen + * Benjamin Hackl * Francisco Manríquez Novoa * Harald Schilly + * Immanuel-Alvaro-Bhirawa + * Jason Grace + * Jason Villanueva * Jinchu Li * John Lynch + * Jérome Eertmans * Matt Turner + * Narahari Rao + * Naveen M K * Nikhil Iyer + * Ron Li + * Sujal Singh + * Tristan Schulz * Uwe Zimmermann + * Václav Blažej + * Zachary Winkeler + The patches included in this release have been reviewed by the following contributors. * Alex Lembcke * Andres Berejnoi * Axel * Benjamin Hackl * Francisco Manríquez Novoa * Immanuel-Alvaro-Bhirawa * Jan-Hendrik Müller * Jason Grace * Jason Villanueva * Jinchu Li * John Lynch * Jérome Eertmans * Kevin Lubick * Narahari Rao * Naveen M K * NotWearingPants * SsNiPeR1 * TheMathematicFanatic * Tristan Schulz * Uwe Zimmermann * Viicos * icedcoffeeee Pull requests merged ==================== A total of 59 pull requests were merged for this release. Breaking changes ---------------- * :pr:`3020`: Rewrote Manim's color system This change removed the ``colour`` library as a dependency of Manim and replaced the internal handling of colors with the newly added :class:`.ManimColor`. This also adds hundreds of new predefined colors, see :mod:`.utils.color` for more details. This should only be a breaking change if you have interacted directly with the ``colour`` module before. The general interface has been kept stable. Highlights ---------- * :pr:`3299`: Added new ``manim checkhealth`` CLI subcommand This adds a new command line interface subcommand which can be used to check whether a local installation of Manim has been configured correctly, and all required (and optional) dependencies are available. To try it, run it via ``manim checkhealth`` or ``python -m manim checkhealth``. * :pr:`3427`: New feature: rendered examples in documentation can now be run directly via binder This adds a "Make interactive" button below the examples in our documentation that establishes a connection to binder such that examples can be modified and rerendered directly from your browser. * :pr:`3086`: Introduced a new module :mod:`.typing` for type hints This also adds various type hints to integral parts of the code base. * :pr:`3322`: Implemented auto-removal of auxiliary LaTeX files, enabled by default This automatically removes auxiliary files creating during the compilation of LaTeX documents like ``.aux`` or ``.dvi`` files. This behavior can be controlled via the newly introduced ``no_latex_cleanup`` config key (``False`` by default). On the command line, the autoremoval can be disabled via the ``--no_latex_cleanup`` CLI flag. * :pr:`3395`: Added support for Python 3.12 New features ------------ * :pr:`3361`: Added three new rate functions This adds the rate functions :func:`.smoothstep`, :func:`.smootherstep`, :func:`.smoothererstep` based on the SmoothStep sigmoid functions. * :pr:`3264`: Added new mobjects :class:`.LabeledLine` and :class:`.LabeledArrow` Enhancements ------------ * :pr:`3190`: Made :class:`.CurvesAsSubmobjects` mobjects compatible with :meth:`.input_to_graph_point` * :pr:`3226`: Avoid using a mobject as a default argument of :class:`.ArcBrace` * :pr:`3366`: Added spacing between values and unit in :class:`.DecimalNumber` This adds the new keyword argument ``unit_buff_per_font_unit`` (default: 0, for backwards compatibility). Setting it to some positive number creates additional space between the numeric value and the displayed unit. Fixed bugs ---------- * :pr:`3205`: Fixed type hint of ``angle`` in :class:`.Arc` * :pr:`3210`: Fixed :class:`.DecimalNumber` with ``show_ellipsis=True`` with the OpenGL renderer * :pr:`3211`: Fixed display issues with custom labels for :class:`.Axes` with the OpenGL renderer * :pr:`3298`: Fixed expand animation for :class:`.ManimBanner` * :pr:`3306`: Fixed IPython terminal history and embedded shell instantiation for scenes using :meth:`.Scene.interactive_embed` * :pr:`3315`: Fixed issue with parameter types in :meth:`.Scene.add_subcaption` * :pr:`3423`: Fixed incorrect submobject count of multi-part :class:`.Tex` mobjects This resolves various issues where formulas were not displayed completely, like it was the case with ``MathTex("1", "^{", "0")``. * :pr:`3284`: Fixed ``LinearTransformationSceneExample`` in Jupyter notebooks * :pr:`3302`: Fixed typo in comparison in :meth:`.OpenGLVMobject.interpolate` * :pr:`3340`: Fixed incorrect computation of bounding box for rotated :class:`.ImageMobject` * :pr:`3343`: Fixed return value of :meth:`.TexTemplate.add_to_preamble` and :meth:`.TexTemplate.add_to_document` * :pr:`3282`: Ensure that :meth:`.ArrowVectorField.get_vector` does not modify the passed inputs * :pr:`3392`: Fixed behavior of elongated tick lines for :class:`.NumberLine` * :pr:`3430`: Fixed CSV reader adding empty lists in rendering summary during documentation build * :pr:`3404`: Properly raise an exception on empty inputs to :class:`.AddTextLetterByLetter` Documentation-related changes ----------------------------- * :pr:`3219`: Enabled social cards for links to documentation * :pr:`3274`: Replaced incorrect mentions of Python 3.7 as the minimally required version * :pr:`3297`: Improved arrow tip sowcase example for :class:`.ArrowTip` * :pr:`3312`: Added documentation for :func:`.always_redraw` * :pr:`3218`: Improved grammar in the :doc:`deep dive guide ` * :pr:`3251`: Add LaTeX installation instructions for Fedora * :pr:`3290`: Updated required dependencies for MacOS installations * :pr:`3325`: Added documentation for functions in :mod:`.mobject_update_utils` This adds docstrings and typehints to :func:`.always_rotate`, :func:`.always_shift`, :func:`.turn_animation_into_updater` * :pr:`3353`: Added documentation for :meth:`.Mobject.center` * :pr:`3355`: Temporarily enabled ``htmlzip`` build on ReadTheDocs * :pr:`3377`: Fixed a typo in the :doc:`deep dive guide ` * :pr:`3389`: Removed superfluous curly braces in a LaTeX expression * :pr:`3417`: Replaced ``htmlzip`` ReadTheDocs build with workflow attaching downloadable documentation to GitHub releases Changes concerning the testing system ------------------------------------- * :pr:`3416`: Fixed tests to run on Cairo 1.18.0 * :pr:`3257`: Fix a configuration error concerning poetry * :pr:`3419`: Fixed caching of Cairo builds on CI runners Code quality improvements and similar refactors ----------------------------------------------- * :pr:`3229`: Made docbuild errors easier to debug and fixed error from changed exception class * :pr:`3231`: Fixed errors reported by ``flake8`` * :pr:`3232`: Upgrade ReadTheDocs build environment to use newer image * :pr:`3286`: Optimized :meth:`.Axes.coords_to_point` * :pr:`3224`: Replace final few occurrences of ``os.path`` by ``pathlib.Path`` * :pr:`3236`: Return self in :meth:`.AbstractImageMobject.set_resampling_algorithm` * :pr:`3253`: Bump tornado from 6.3.1 to 6.3.2 * :pr:`3272`: Bump docker/build-push-action from 3 to 4 * :pr:`3287`: Bump cryptography from 41.0.1 to 41.0.2 * :pr:`3350`: Added missing dependency ``typing-extensions`` * :pr:`3431`: Bump teatimeguest/setup-texlive-action from 2 to 3 * :pr:`3433`: Bump dependencies * :pr:`3399`: Updated several dependencies * :pr:`3397`: Several GitHub actions updates * :pr:`3405`: Updated manimpango version to fix error regarding type strictness * :pr:`3421`: Improved order of input checks when creating a tree graph New releases ------------ * :pr:`3439`: Prepared new release: v0.18.0 ================================================ FILE: docs/source/changelog/0.19.0-changelog.rst ================================================ ******* v0.19.0 ******* :Date: January 20, 2025 Major Changes ============= With the release of Manim v0.19.0, we've made lots of progress with making Manim easier to install! One of the biggest changes in this release is the replacement of the external ``ffmpeg`` dependency with the ``pyav`` library. This means that users no longer have to install ``ffmpeg`` in order to use Manim - they can just ``pip install manim`` and it will work! In light of this change, we also rewrote our :ref:`installation docs ` to recommend using a new tool called `uv `_ to install Manim. .. note:: Do not worry if you installed Manim with any previous methods, like homebrew, pip, choco, or scoop. Those methods will still work, and are not deprecated. However, the recommended way to install Manim is now with `uv `_. Contributors ============ A total of 54 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Aarush Deshpande * Abulafia * Achille Fouilleul + * Benjamin Hackl * CJ Lee + * Cameron Burdgick + * Chin Zhe Ning * Christopher Hampson + * ChungLeeCN + * Eddie Ruiz + * F. Muenkel + * Francisco Manríquez Novoa * Geoo Chi + * Henrik Skov Midtiby + * Hugo Chargois + * Irvanal Haq + * Jay Gupta + * Laifsyn + * Larry Skuse + * Nemo2510 + * Nikhil Iyer * Nikhila Gurusinghe + * Rehmatpal Singh + * Romit Mohane + * Saveliy Yusufov + * Sir James Clark Maxwell * Sophia Wisdom + * Tristan Schulz * VPC + * Victorien * Xiuyuan (Jack) Yuan + * alembcke * anagorko + * czuzu + * fogsong233 + * jkjkil4 + * modjfy + * nitzanbueno + * yang-tsao + The patches included in this release have been reviewed by the following contributors. * Aarush Deshpande * Achille Fouilleul * Benjamin Hackl * Christopher Hampson * Eddie Ruiz * Francisco Manríquez Novoa * Henrik Skov Midtiby * Hugo Chargois * Irvanal Haq * Jay Gupta * Jérome Eertmans * Nemo2510 * Nikhila Gurusinghe * OliverStrait * Saveliy Yusufov * Sir James Clark Maxwell * Tristan Schulz * VPC * Victorien * Xiuyuan (Jack) Yuan * alembcke * github-advanced-security[bot] Pull requests merged ==================== A total of 138 pull requests were merged for this release. Highlights ---------- * :pr:`3501`: Replaced external ``ffmpeg`` dependency with ``pyav`` This change removes the need to have ``ffmpeg`` available as a command line tool when using Manim. While ``pyav`` technically also uses ``ffmpeg`` internally, the maintainers of ``pyav`` distribute it in their binary wheels. * :pr:`3518`: Created a :class:`.HSV` color class, and added support for custom color spaces This extends the color system of Manim and adds support to implement custom color spaces. See the implementation of :class:`.HSV` for a practical example. * :pr:`3930`: Completely reworked the installation instructions As a consequence of removing the need for the external ``ffmpeg`` dependency, we have reworked and massively simplified the installation instructions. Given that practically, user-written scenes are effectively small self-contained Python projects, the new instructions strongly recommend using the `project and dependency management tool uv `__ to ensure a consistent and reproducible environment. * :pr:`3967`: Added support for Python 3.13 This adds support for Python 3.13, which brings the range of currently supported Python versions to 3.9 -- 3.13. * :pr:`3966`: :class:`.VGroup` can now be initialized with :class:`.VMobject` iterables Groups of Mobjects can now be created by passing an iterable to the :class:`.VGroup` constructors:: my_group = VGroup(Dot() for _ in range(10)) Breaking changes ---------------- * :pr:`3797`: Replaced ``Code.styles_list`` with :meth:`.Code.get_styles_list` The ``styles_list`` attribute of the :class:`.Code` class has been replaced with a class method :meth:`.Code.get_styles_list`. This method returns a list of all available values for the ``formatter_style`` argument of :class:`.Code`. * :pr:`3884`: Renamed parameters and variables conflicting with builtin functions To avoid having keyword arguments named after builtin functions, the following two changes were made to user-facing functions: - ``ManimColor.from_hex(hex=...)`` is now ``ManimColor.from_hex(hex_str=...)`` - ``Scene.next_section(type=...)`` is now ``Scene.next_section(section_type=...)`` * :pr:`3922`: Removed ``inner_radius`` and ``outer_radius`` from :class:`.Sector` constructor To construct a :class:`.Sector`, you now need to specify a ``radius`` (and an ``angle``). In particular, :class:`.AnnularSector` still accepts both ``inner_radius`` and ``outer_radius`` arguments. * :pr:`3964`: Allow :class:`.SurroundingRectangle` to accept multiple Mobjects This changes the signature of :class:`.SurroundingRectangle` to accept a sequence of Mobjects instead of a single Mobject. As a consequence, other arguments that could be specified as positional ones before now need to be specified as keyword arguments:: SurroundingRectangle(some_mobject, RED, 0.3) # raises error now SurroundingRectangle(some_mobject, color=RED, buff=0.3) # correct usage * :pr:`4115`: Completely rewrite the implementation of the :class:`.Code` mobject This includes several breaking changes to the interface of the class to make it more consistent. See the documentation of :class:`.Code` for a detailed description of the new interface, and the description of the pull request :pr:`4115` for an overview of changes to the old keyword arguments. New features ------------ * :pr:`3148`: Added a ``colorscale`` argument to :meth:`.CoordinateSystem.plot` * :pr:`3612`: Add three animations that together simulate a typing animation * :pr:`3754`: Add ``@`` shorthand for :meth:`.Axes.coords_to_point` and :meth:`.Axes.point_to_coords` * :pr:`3876`: Add :meth:`.Animation.set_default` class method * :pr:`3903`: Preserve colors of LaTeX coloring commands * :pr:`3913`: Added :mod:`.DVIPSNAMES` and :mod:`.SVGNAMES` color palettes * :pr:`3933`: Added :class:`.ConvexHull`, :class:`.ConvexHull3D`, :class:`.Label` and :class:`.LabeledPolygram` * :pr:`3992`: Add darker, lighter and contrasting methods to :class:`.ManimColor` * :pr:`3997`: Add a time property to scene (:attr:`.Scene.time`) * :pr:`4039`: Added the ``delay`` parameter to :func:`.turn_animation_into_updater` Enhancements ------------ * :pr:`3829`: Rewrite :func:`~.bezier.get_quadratic_approximation_of_cubic` to produce smoother animated curves * :pr:`3855`: Log execution time of sample scene in the ``manim checkhealth`` command * :pr:`3888`: Significantly reduce rendering time with a separate thread for writing frames to stream * :pr:`3890`: Better error messages for :class:`.DrawBorderThenFill` * :pr:`3893`: Improve line rendering performance of :class:`.Cylinder` * :pr:`3901`: Changed :attr:`.Square.side_length` attribute to a property * :pr:`3965`: Added the ``scale_stroke`` boolean parameter to :meth:`.VMobject.scale` * :pr:`3974`: Made videos embedded in Google Colab by default * :pr:`3982`: Refactored ``run_time`` validation for :class:`.Animation` and :meth:`.Scene.wait` * :pr:`4017`: Allow animations with ``run_time=0`` and implement convenience :class:`.Add` animation * :pr:`4034`: Draw more accurate circular :class:`.Arc` mobjects for large angles * :pr:`4051`: Add ``__hash__`` method to :class:`.ManimColor` * :pr:`4108`: Remove duplicate declaration of ``__all__`` in :mod:`.vectorized_mobject` Optimizations ------------- * :pr:`3760`: Optimize :meth:`.VMobject.pointwise_become_partial` * :pr:`3765`: Optimize :class:`.VMobject` methods which append to ``points`` * :pr:`3766`: Created and optimized Bézier splitting functions such as :func:`~.utils.bezier.partial_bezier_points()` in :mod:`manim.utils.bezier` * :pr:`3767`: Optimized :func:`manim.utils.bezier.get_smooth_cubic_bezier_handle_points()` * :pr:`3768`: Optimized :func:`manim.utils.bezier.is_closed` * :pr:`3960`: Optimized :func:`~.bezier.interpolate` and :func:`~.bezier.bezier` in :mod:`manim.utils.bezier` Fixed bugs ---------- * :pr:`3706`: Fixed :meth:`.Line.put_start_and_end_on` to use the actual end of an :class:`.Arrow3D` * :pr:`3732`: Fixed infinite loop in OpenGL :meth:`.BackgroundRectangle.get_color` * :pr:`3756`: Fix assertions and improve error messages when adding submobjects * :pr:`3778`: Fixed :func:`.there_and_back_with_pause` rate function behaviour with different ``pause_ratio`` values * :pr:`3786`: Fix :class:`.DiGraph` edges not fading correctly on :class:`.FadeIn` and :class:`.FadeOut` * :pr:`3790`: Fixed the :func:`.get_nth_subpath` function expecting a numpy array * :pr:`3832`: Convert audio files to ``.wav`` before passing to pydub * :pr:`3680`: Fixed behavior of ``config.background_opacity < 1`` * :pr:`3839`: Fixed :attr:`.ManimConfig.format` not updating movie file extension * :pr:`3885`: Fixed :meth:`.OpenGLMobject.invert` not reassembling family * :pr:`3951`: Call :meth:`.Animation.finish` for animations in an :class:`.AnimationGroup` * :pr:`4013`: Fixed scene skipping for :attr:`ManimConfig.upto_animation_number` set to 0 * :pr:`4089`: Fixed bug with opacity of :class:`.ImageMobject` * :pr:`4091`: Fixed :meth:`.VMobject.add_points_as_corners` to safely handle empty ``points`` parameter Documentation-related changes ----------------------------- * :pr:`3669`: Added a :mod:`manim.typing` guide * :pr:`3715`: Added docstrings to Brace * :pr:`3745`: Underline tag should be ```` in the documentation * :pr:`3818`: Automatically document usages of :class:`typing.TypeVar` * :pr:`3849`: Fix incorrect ``versionadded`` version number in plugin section in docs * :pr:`3851`: Rename ``manim.typing.Image`` type aliases to :class:`.PixelArray` to avoid conflict with ``PIL.Image`` * :pr:`3857`: Update installation instructions for MacOS (via dedicated brew formula) * :pr:`3878`: Fixed typehint in ``types.rst`` and replaced outdated reference to ``manim.typing.Image`` with :class:`manim.typing.PixelArray` * :pr:`3924`: Fix ``SyntaxWarning`` when building docs + use Python 3.13 for readthedocs build * :pr:`3958`: Fix: ``.to_edge``'s example demonstration in docs * :pr:`3972`: Refining documentations for :mod:`.moving_camera_scene` module * :pr:`4032`: Bump version and create changelog for ``v0.19.0`` * :pr:`4044`: Added support for autodocumenting type aliases that use the ``type`` syntax * :pr:`4065`: Polish documentation of :mod:`.utils.color.core` and remove ``interpolate_array`` function * :pr:`4077`: Update README and documentation landing page, improve way how 3b1b is credited * :pr:`4100`: Add wavy square example to :class:`.Homotopy` * :pr:`4107`: Corrected a typo in the deep dive guide * :pr:`4116`: Fix broken link to Poetry installation in contribution docs Type Hints ---------- * :pr:`3751`: Added typehints to :mod:`manim.utils.iterables` * :pr:`3803`: Added typings to :class:`.OpenGLMobject` * :pr:`3902`: fixed a wrong type hint in :meth:`.Scene.restructure_mobjects` * :pr:`3916`: fixed type hint in :meth:`.DrawBorderThenFill.interpolate_submobject` * :pr:`3926`: Fixed some typehints of :class:`.ParametricFunction` * :pr:`3940`: Fixed ``np.float_`` to ``np.float64`` while using numpy versions above 2.0 * :pr:`3961`: Added typehints to :mod:`manim.mobject.geometry` * :pr:`3980`: Added new :class:`.PointND` and :class:`.PointND_Array` type aliases * :pr:`3988`: Added type hints to :mod:`manim.cli` module * :pr:`3999`: Add type annotations to :mod:`manim.utils` * :pr:`4006`: Stopped ignoring :mod:`manim.plugins` errors in ``mypy.ini`` * :pr:`4007`: Added typings to :mod:`manim.__main__` * :pr:`4027`: Rename ``InternalPoint3D`` to :class:`~.typing.Point3D`, ``Point3D`` to :class:`~.Point3DLike` and other point-related type aliases * :pr:`4038`: Fixed type hint of :meth:`.Scene.play` to allow :attr:`.Mobject.animate` Internal Improvements and Automation ------------------------------------ * :pr:`3737`: Fixed action for building downloadable documentation * :pr:`3761`: Use ``--py39-plus`` in pre-commit * :pr:`3777`: Add pyproject for ruff formatting * :pr:`3779`: Switch pre-commit to use ``ruff`` for linting * :pr:`3795`: Replace Pyupgrade with Ruff rule * :pr:`3812`: Fix MacOS LaTeX CI * :pr:`3853`: Change from tempconfig to a config fixture in tests * :pr:`3858`: Update docker to use ENV x=y instead of ENV x y * :pr:`3872`: Use ruff for pytest style * :pr:`3873`: Use ruff instead of flake8-simplify * :pr:`3877`: Fix pre-commit linting * :pr:`3780`: Add Ruff Lint * :pr:`3781`: Ignore Ruff format in git blame * :pr:`3881`: Standardize docstrings with ruff pydocstyle rules * :pr:`3882`: Change flake8-comprehensions and flake8-bugbear to ruff * :pr:`3887`: Fix typo from HSV PR * :pr:`3923`: Use Ruff pygrep rules * :pr:`3925`: Use Github Markdown on README * :pr:`3955`: Use ``subprocess`` instead of ``os.system``. * :pr:`3956`: Set AAC codec for audio in mp4 files, add transcoding utility * :pr:`4069`: Include Noto fonts in Docker image * :pr:`4102`: Remove PT004 from Ruff ignore rules Dependencies ------------ * :pr:`3739`: [pre-commit.ci] pre-commit autoupdate * :pr:`3746`: Bump tqdm from 4.66.1 to 4.66.3 * :pr:`3750`: Bump jinja2 from 3.1.3 to 3.1.4 * :pr:`3776`: Bump requests from 2.31.0 to 2.32.0 * :pr:`3784`: [pre-commit.ci] pre-commit autoupdate * :pr:`3794`: [pre-commit.ci] pre-commit autoupdate * :pr:`3796`: Bump tornado from 6.4 to 6.4.1 * :pr:`3801`: [pre-commit.ci] pre-commit autoupdate * :pr:`3809`: [pre-commit.ci] pre-commit autoupdate * :pr:`3810`: Bump urllib3 from 2.2.1 to 2.2.2 * :pr:`3823`: [pre-commit.ci] pre-commit autoupdate * :pr:`3827`: Fix docker build * :pr:`3834`: [pre-commit.ci] pre-commit autoupdate * :pr:`3835`: Bump docker/build-push-action from 5 to 6 * :pr:`3841`: Bump certifi from 2024.2.2 to 2024.7.4 * :pr:`3844`: [pre-commit.ci] pre-commit autoupdate * :pr:`3847`: Bump zipp from 3.18.2 to 3.19.1 * :pr:`3865`: [pre-commit.ci] pre-commit autoupdate * :pr:`3880`: [pre-commit.ci] pre-commit autoupdate * :pr:`3889`: [pre-commit.ci] pre-commit autoupdate * :pr:`3895`: Lock `poetry.lock` * :pr:`3896`: [pre-commit.ci] pre-commit autoupdate * :pr:`3904`: [pre-commit.ci] pre-commit autoupdate * :pr:`3911`: [pre-commit.ci] pre-commit autoupdate * :pr:`3918`: [pre-commit.ci] pre-commit autoupdate * :pr:`3929`: [pre-commit.ci] pre-commit autoupdate * :pr:`3931`: Bump cryptography from 43.0.0 to 43.0.1 * :pr:`3987`: [pre-commit.ci] pre-commit autoupdate * :pr:`4023`: Bump tornado from 6.4.1 to 6.4.2 * :pr:`4035`: [pre-commit.ci] pre-commit autoupdate * :pr:`4037`: Cap ``pyav`` version ================================================ FILE: docs/source/changelog/0.2.0-changelog.rst ================================================ ****** v0.2.0 ****** :Date: January 1, 2021 The changes since Manim Community release v0.1.1 are listed below. Breaking Changes ================ - Remove all CONFIG dictionaries and all calls to ``digest_config`` and allow passing options directly to the constructor of the corresponding classes (:pr:`783`). Practically, this means that old constructions using ``CONFIG`` like:: class SomeMobject(Thing): CONFIG = { "my_awesome_property": 42 } where corresponding objects were then instantiated as ``my_mobject = SomeMobject()`` should now be created simply using ``my_mobject = SomeMobject(my_awesome_property=42)``. - Remove old syntax for animating mobject methods by passing the methods and arguments to ``self.play``, and use a new syntax featuring the ``animate`` property (:pr:`881`). For example: the old-style ``play`` call :: self.play(my_square.shift, LEFT) should be replaced with the new following call using the ``animate`` property:: self.play(my_square.animate.shift(LEFT)) New Features ============ - Added creation animation for :class:`~.ManimBanner` (:pr:`814`) - Added some documentation to :meth:`~.Scene.construct` (:pr:`753`) - Added a black and white monochromatic version of Manim's logo (:pr:`826`) - Added support for a plugin system (``manim plugin`` subcommand + documentation) (:pr:`784`) - Implemented ``__add__``, ``__iadd__``, ``__sub__``, and ``__isub__`` for :class:`~.Mobject` (allowing for notation like ``some_vgroup + some_mobject``) (:pr:`790`) - Added type hints to several files in the library (:pr:`835`) - Added some examples to :mod:`~.animation.creation` (:pr:`820`) - Added some examples to :class:`~.DashedLine` and :class:`~.CurvesAsSubmobjects` (:pr:`833`) - Added new implementation for text rendered with Pango, :class:`~.MarkupText`, which can be formatted with an HTML-like syntax (:pr:`855`) - Added Fading in and out examples and deprecation of ``FadeInFromDown`` and ``FadeOutAndShiftDown`` (:pr:`827`) - Added example for :class:`~.MoveAlongPath` to the docs (:pr:`873`) - Added ambient rotate for other angles - theta, phi, gamma (:pr:`660`) - Use custom bindings for Pango (:pr:`878`) - Added :class:`~.Graph`, a basic implementation for (graph theory) graphs (:pr:`861`) - Allow for chaining methods when using the new ``.animate`` syntax in :meth:`~.Scene.play` (:pr:`889`) Bugfixes ======== - Fix doctests in .rst files (:pr:`797`) - Fix failing doctest after adding ``manim plugin`` subcommand (:pr:`831`) - Normalize the direction vector in :meth:`~.mobject_update_utils.always_shift` (:pr:`839`) - Add ``disable_ligatures`` to :class:`~.Text` (via :pr:`804`) - Make scene caching aware of order of Mobjects (:pr:`845`) - Fix :class:`~.CairoText` to work with new config structure (:pr:`858`) - Added missing argument to classes inheriting from :class:`~.Matrix` (:pr:`859`) - Fixed: ``z_index`` of mobjects contained in others as submobjects is now properly respected (:pr:`872`) - Let :meth:`~.ParametricSurface.set_fill_by_checkboard` return the modified surface to allow method chaining (:pr:`883`) - Mobjects added during an updater are added to ``Scene.moving_mobjects`` (:pr:`838`) - Pass background color to JS renderer (:pr:`876`) - Small fixes to docstrings. Tiny cleanups. Remove ``digest_mobject_attrs``. (:pr:`834`) - Added closed shape detection in :class:`~.DashedVMobject` in order to achieve an even dash pattern (:pr:`884`) - Fix Spelling in docstrings and variables across the library (:pr:`890`) Other changes ============= - Change library name to manim (:pr:`811`) - Docker: use local files when building an image (:pr:`803`) - Let ffmpeg render partial movie files directly instead of temp files (:pr:`817`) - ``manimce`` to ``manim`` & capitalizing Manim in readme (:pr:`794`) - Added flowchart for different docstring categories (:pr:`828`) - Improve example in module docstring of :mod:`~.animation.creation` + explicitly document buff parameter in :meth:`~.Mobject.arrange` (:pr:`825`) - Disable CI pipeline for Python 3.6 (:pr:`823`) - Update URLs in docs (:pr:`832`) - Move upcoming changelog to GitHub-wiki (:pr:`822`) - Change badges in readme (:pr:`854`) - Exclude generated gRPC files from source control (:pr:`868`) - Added linguist-generated attribute to ``.gitattributes`` (:pr:`877`) - Cleanup: removed inheritance from ``object`` for some classes, refactor some imports (:pr:`795`) - Change several ``str.format()`` to ``f``-strings (:pr:`867`) - Update javascript renderer (:pr:`830`) - Bump version number to 0.2.0, update changelog (:pr:`894`) ================================================ FILE: docs/source/changelog/0.3.0-changelog.rst ================================================ ****** v0.3.0 ****** :Date: February 1, 2021 The changes since Manim Community release v0.2.0 are listed below. New Features ============ - :pr:`945`: :meth:`~.Graph.change_layout` method for :class:`~.Graph` mobject - :pr:`943`: IPython %%manim magic - :pr:`970`: Added ``--version`` command line flag - :pr:`948`: Allow passing a code string to :class:`~.Code` - :pr:`917`: Allow overriding new-style method animations - :pr:`756`: Allow setting frame_height and frame_width via config file - :pr:`939`: Added custom font files support - :pr:`892`: Added ManimCommunity colors - :pr:`922`: Tree layout for Graph mobject - :pr:`935`: Added code of conduct - :pr:`916`: Multi-column layout for partite graphs - :pr:`742`: Units: Pixels, Munits, Percent in :mod:`~.utils.unit` - :pr:`893`: Convenience method :meth:`~.Graph.from_networkx` for creating a graph from a networkx graph Bugfixes and Enhancements ========================= - :pr:`988`: Fix Windows CI pipeline by adding missing LaTeX package - :pr:`961`: Added typings and docs for vectorized mobjects and bezier related functions - :pr:`977`: JupyterLab docker image and documentation for manim and IPython - :pr:`985`: Fix variable name for webgl renderer - :pr:`954`: Fix edges lagging behind vertices in animations of graphs - :pr:`980`: Allow usage of custom Pygments styles in Code - :pr:`952`: Allow passing tween information to the WebGL frontend - :pr:`978`: Fix ``possible_paths`` not printing in ``code_mobject`` - :pr:`976`: Update ``ManimPango`` - :pr:`967`: Automatically import plugins - :pr:`971`: Make ManimCommunity look consistent - :pr:`957`: Raise ``NotImplementedError`` when trying to chain overridden method animations - :pr:`947`: Several fixes and improvements for :class:`~.PointCloundDot` - :pr:`923`: Documentation: move installation instructions for developers to page for developers - :pr:`964`: Added unit test for :class:`~.NumberLine`'s unit vector - :pr:`960`: Magnitude of :class:`~.NumberLine`'s unit vector should be ``unit_size``, not 1 - :pr:`958`: Fix code formatting in ``utils/debug.py`` - :pr:`953`: Update license year - :pr:`944`: Interpolate stroke opacity in :class:`~.FadeIn` and update ``stroke_opacity`` and ``fill_opacity`` in :meth:`~.VMobject.set_stroke` and :meth:`~.VMobject.set_fill` - :pr:`865`: Rename ``get_submobject_index_labels`` to ``index_labels`` - :pr:`941`: Added keyword arguments ``x_min``, ``x_max``, ``y_min``, ``y_max`` to :class:`~.ThreeDAxes` - :pr:`886`: Let the render progress bar show details about the rendered animation again - :pr:`936`: Fix :class:`~.BulletedList` TeX environment problem and add a typing to ``get_module`` - :pr:`938`: Remove dependency on progressbar - :pr:`937`: Change 'brew cask install' to 'brew install --cask' for CI pipeline - :pr:`933`: Make matrix work with lists again - :pr:`932`: Correctly parse ``log_dir`` option - :pr:`920`: Raise error if markup in :class:`~.MarkupText` is invalid - :pr:`929`: Raise an error if a :class:`~.Matrix` object is created with < 2-dimensional input - :pr:`907`: Make Scene.add_sound work again (when running with ``--disable_caching``) - :pr:`906`: Allow new-style method animation to be used in animation groups - :pr:`908`: Removed deprecated command line arguments from documentation - :pr:`903`: Tiny grammar improvements - :pr:`904`: Added blank line between imports and class example - :pr:`898`: CI: fix publish workflow ================================================ FILE: docs/source/changelog/0.4.0-changelog.rst ================================================ ****** v0.4.0 ****** :Date: March 3, 2021 The changes since Manim Community release v0.3.0 are listed below. Breaking Changes ================ - :pr:`915`: Manim's SVG engine has been reworked and is able to handle a wider variations of SVG files. In particular: fill and stroke properties are now retained from the original files. Breaking change: ``VMobjectFromSVGPathstring`` is deprecated and has been renamed to ``SVGPathMobject``. New Features ============ - :pr:`1026`: Add 3D Mobjects: :class:`~.Cone`, :class:`~.Cylinder`, :class:`~.Line3D`, :class:`~.Arrow3D` and :class:`~.Torus` - :pr:`1047`: Add documentation and examples for :class:`~.Matrix` - :pr:`1044`: ``register_font`` is available for macOS - :pr:`995`: Add generic :func:`~.Mobject.set` method and compatibility layer between properties and ``get_*``/``set_*`` methods Bugfixes and Enhancements ========================= - :pr:`981`: Fixed hot reload functionality for the WebGL renderer on Windows - :pr:`1053`: Repair links to source code in stable version of documentation - :pr:`1067`: Add ManimPango to ReadTheDocs requirements - :pr:`1058`: Replace ```` syntax by Pango's ```` for coloring parts of :class:`~.MarkupText` and allow using colors for underline, overline and strikethrough in MarkupText - :pr:`1063`: Fix documentation related to ``.animate`` - :pr:`1065`: Remove duplicate word 'vector' - :pr:`1060`: Update Linux installation instructions to mention the installation of Pango - :pr:`1050`: Ensure that the user-supplied stroke color and width gets applied to :class:`~.Cross` - :pr:`1059`: More descriptive error when accessing an unhandled mobject attribute - :pr:`1048`: Use absolute path in ``make_and_open_docs.py`` - :pr:`1000`: Remove ``MovingCameraScene.setup`` and ``MovingCameraScene.camera_frame`` - :pr:`1051`: Corrections for setting stroke related attributes on :class:`~.VMobject` - :pr:`1043`: Make :class:`~.CubicBezier` explicitly accept four points - :pr:`1046`: Use any version of ``importlib-metadata`` - :pr:`1030`: Parse ``.log`` file and try to print LaTeX errors if compilation fails - :pr:`1015`: Documentation: Add more explicit instructions related to ``tlmgr`` - :pr:`1028`: Documentation: Update installation guide on mac with Apple Silicon - :pr:`1032`: Remove ``Square.side_length`` property - :pr:`1031`: Fix link to wikipedia vector graphics page - :pr:`1021`: Documentation: Added example to :class:`~.CubicBezier` - :pr:`1017`: Added ``progress_bar`` to ``digest_args`` to fix the ``--progress_bar`` CLI flag - :pr:`1018`: Remove redundancy in :class:`~.FunctionGraph` arguments - :pr:`1024`: Migrate ``width`` / ``height`` / ``depth`` to properties - :pr:`1022`: Fix ``-p`` flag when passing ``-s`` - :pr:`1008`: CI pipeline: fix release asset upload - :pr:`983`: Make sure last frame for animations with updaters is correct - :pr:`984`: Add manim version to CLI output, append version name for generated ``.gif`` and ``.png`` files, add version to metadata of rendered videos, change dark blue terminal text to default green - :pr:`993`: Fix setting Mobject color to a gradient by passing a list of colors in :meth:`~.VMobject.set_color` - :pr:`1003`: Fix animation :class:`~.GrowArrow` - :pr:`1010`: Disable STDIN interaction for ffmpeg concat. - :pr:`969`: Fix the ``--tex_template`` CLI flag - :pr:`989`: Fix the ``manim cfg export`` subcommand - :pr:`1005`: Fix the feature where ``-`` is used as the filename - :pr:`998`: Allow using hexadecimal color codes with 3 characters - :pr:`996`: Changed the message of ``manim --version`` to not include "Edition" ================================================ FILE: docs/source/changelog/0.5.0-changelog.rst ================================================ ****** v0.5.0 ****** :Date: April 02, 2021 Contributors ============ A total of 35 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Abel Aebker + * Abhijith Muthyala * AntonBallmaier + * Aron * Benjamin Hackl * Bogdan Stăncescu + * Darylgolden * Devin Neal * GameDungeon + * Hugues Devimeux * Jason Villanueva * Kapil Sachdeva * KingWampy * Lionel Ray + * Mark Miller * Mohammad Al-Fetyani + * Naveen M K * Niklas Dewally + * Oliver + * Roopesh + * Seb Pearce + * aebkea + * friedkeenan * hydrobeam + * kolibril13 * sparshg * tfglynn + The patches included in this release have been reviewed by the following contributors. * Abel Aebker * Abhijith Muthyala * Benjamin Hackl * Bogdan Stăncescu * Devin Neal * Hugues Devimeux * Jason Villanueva * Kapil Sachdeva * KingWampy * Leo Torres * Lionel Ray * Mark Miller * Mohammad Al-Fetyani * Naveen M K * Oliver * Ricky Chon * vector67 Pull requests merged ==================== A total of 64 pull requests were merged for this release. Highlights ---------- * :pr:`1075`: Add OpenGL Renderer Adds an OpenGLRenderer, OpenGLCamera, OpenGL-enabled Mobjects, and a ``--use_opengl_renderer`` flag. When this flag is passed, you can pass the ``-p`` flag to preview animations, the ``-w`` flag to generate video, and the ``-q`` flag to specify render quality. If you don't pass either the ``-p`` or the ``-w`` flag, nothing will happen. Scenes rendered with the OpenGL renderer must *only* use OpenGL-enabled Mobjects. Deprecated classes and functions -------------------------------- * :pr:`1124`: Deprecated :class:`ShowCreation` in favor of :class:`Create` 1. Deprecated :class:`ShowCreation` in favor of :class:`Create` across the library with the exception of the `show_creation` boolean variable `vector_space_scene.py` 2. Added a deprecation warning in the original :class:`ShowCreation` class. * :pr:`1110`: Deprecated SmallDot + OpenGLSmallDot `SmallDot` isn't necessary and a deprecation warning will be raised. This will be removed in a future release. New features ------------ * :pr:`1037`: Added new fade and transform animations (:class:`~.TransformMatchingShapes`, :class:`~.TransformMatchingTex`, :class:`~.FadeTransform`) from 3b1b/manim Added new Fade animation: :class:`~FadeOutToPoint` Added :class:`~FadeTransform` and :class:`~FadeTransformPieces` for transforming mobjects and submobjects with a fade Added :class:`~TransformMatchingShapes` and :class:`~TransformMatchingTex` for transforming mobjects and tex that have matching parts * :pr:`1097`: Added 3D Mobject :class:`~.Dot3D` * :pr:`1074`: Added jupyter media_width option to the config * :pr:`1107`: Added :class:`~.Unwrite` animation class to complement :class:`~.Write` Added :class:`Unwrite` which inherits from :class:`~.Write`. It automatically reverses the animation of :class:`~.Write` by passing the reversed rate function, but it also takes an additional boolean parameter `reverse` which, if `False`, renders the animation from left to right (assuming text oriented in the usual way), but if `True`, it renders right to left. * :pr:`1085`: Added :class:`~.Angle` and :class:`~.RightAngle` for intersecting lines :class:`~.Angle` and :class:`~.RightAngle` both take two lines as input. If they intersect, or share a common vertex, an angle is drawn between them. Users can customize the look of the angle and also use a dotted right angle. Enhancements ------------ * :pr:`1144`: Improved quality of GIFs * :pr:`1157`: Refresh triangulation on call to :meth:`~.OpenGLVMobject.apply_points_function` Rotate called apply_points_function, which was previous not subclassed by OpenGLMobject - now it is. Then, the vertex normals can be updated too. Additionally, the old_points matrix would change after rotating, making the old points / new points test irrelevant. This is addressed with a .copy call. * :pr:`1151`: Added parametric function support to :class:`OpenGLSurface` * :pr:`1139`: In-Code `config["preview"]` Support * :pr:`1123`: Added caching, skipping, and user-specified background colors to the OpenGL renderer OpenGL play logic has been improved to support caching and skipping with `-n` argument ( it is now similar to Cairo play logic). A random bug was fixed in OpenGLSurface and OpenGL background color can now be changed via `background_color` argument. * :pr:`1118`: Allow passing animation arguments with .animate syntax Users will now be able to do things like `obj.animate(run_time=2).method(arg)` if they want to specify animation arguments for an individual `.animate` call, and can still not specify any arguments like `obj.animate.method(arg)`. Passing animation arguments is only allowed directly after `.animate` is accessed, if passed elsewhere then a `ValueError` is raised. * :pr:`718`: Rotating the numbers in y axis In Axes, the y axis will be rotated 90deg but the numbers are also rotated and shouldn't be. Fixes this issue. * :pr:`1070`: Raise FileNotFoundError when unable to locate the .cfg file specified via ``--config_file`` Raising the error will stop script execution and let the user know that there are problems with the `--config_file` location instead of reverting back to the default configuration. Fixed bugs ---------- * :pr:`1224`: Fixed :class:`~.ShowIncreasingSubsets`, :class:`~.ShowSubmobjectsOneByOne`, and :class:`~.AddTextLetterByLetter` * :pr:`1201`: Prevent crash on :meth:`~.Scene.embed` for empty scenes * :pr:`1192`: Fixed issue when an animation is cached, manim can't merge the partial movie files. * :pr:`1193`: Fixed using :class:`~.Animation` without a child :class:`~.Mobject` in :class:`~.AnimationGroup` `AnimationGroup` may now take `Animation` objects which do not have a child `Mobject`, such as `Wait`. * :pr:`1170`: Fixed minor SVG parsing bugs * :pr:`1159`: Added support for multiple transforms in the same SVG element * :pr:`1156`: Fixed :class:`~.DrawBorderThenFill` to support OpenGL and improved type hints for some functions Fixed a bug in :class:`~.DrawBorderThenFill` that prevented :class:`~.Write` animations from working with :class:`~.OpenGLVMobjects` and slightly improved type hints for some animation functions to include :class:`~.OpenGLVMobject`. * :pr:`1134`: Fixed the `-a` flag. The ``-a`` / ``--write-all`` flag was broken. When used, it would cause Manim to crash just after beginning to render the second scene. * :pr:`1115`: Fixed bugs in :class:`~.OpenGLMobject` and added :class:`ApplyMethod` support Fixed undefined variables and converted :class:`Mobject` to :class:`OpenGLMobject`. Also, fixed assert statement in :class:`ApplyMethod`. * :pr:`1092`: Refactored coordinate_systems.py, fixed bugs, added :class:`~.NumberPlane` test The default behavior of :meth:`~.Mobject.rotate` is to rotate about the center of :class:`~.Mobject`. :class:`~.NumberLine` is symmetric about the point at the number 0 only when ``|x_min|`` == ``|x_max|``. Ideally, the rotation should coincide with the point at number 0 on the line. Added a regression test and additionally fixed some bugs introduced in :pr:`718`. * :pr:`1078`: Removed stray print statements from `__main__.py` Uses rich's print traceback instead and fixes an issue in printing the version twice when `manim --version` is called. * :pr:`1086`: Fixed broken line spacing in :class:`~.Text` The `line_spacing` kwarg was missing when creating :class:`Text` Mobjects; this adds it. * :pr:`1083`: Corrected the shape of :class:`~.Torus` :class:`Torus` draws a surface with an elliptical cross-section when `minor_radius` is different from 1. This PR ensures the cross-section is always a circle. Documentation-related changes ----------------------------- * :pr:`1217`: Copyedited the document on testing in our documentation * :pr:`1206`: Added Docstrings to :class:`~.Mobject` * :pr:`1218`: Removed BezierSpline from the example gallery * :pr:`1219`: Updated Dockerfile (include dependencies for building documentation), moved documentation to main README * :pr:`1209`: Added :ref_methods: to the manim directive This allows class methods to be linked in the documentation. Checkout the `example references `_ below the code to see how this is used! * :pr:`1204`: Added rotation example to example gallery * :pr:`1137`: Added GitHub Wiki pages on adding testing/documentation to Sphinx Docs * :pr:`1114`: Added examples for :class:`~.Ellipse`, :class:`~.Polygon`, :class:`~.RegularPolygon`, :class:`~.Triangle` and :class:`~.RoundedRectangle` * :pr:`1195`: Removed SmallDot from example * :pr:`1130`: Added pre-commit to run black and flake8, updated contributing documentation accordingly * :pr:`1138`: Moved previous version changelogs to separate files; Added a Script to generate future changelogs This script quickly generates a changelog for whoever is making the release. * :pr:`1190`: Added note in contributing guide to read the latest version of the documentation * :pr:`1188`: Added sounds example to docs * :pr:`1165`: Added documentation for installing Manim on Colab * :pr:`1128`: Added examples for :class:`~.DashedLine`, :class:`~.TangentLine`, :class:`~.Elbow`, :class:`~.Arrow`, :class:`~.Vector`, :class:`~.DoubleArrow` * :pr:`1177`: Replace links to the latest version of the documentation to the stable version * :pr:`1077`: Added details to :func:`~.Mobject.get_critical_point` * :pr:`1154`: Fixed some typing hints. (ints to floats) * :pr:`1036`: Added :class:`~.SurroundingRectangle` to the example gallery * :pr:`1103`: Added documentation and examples for Square, Dot, Circle and Rectangle * :pr:`1101`: Added documentation to :class:`~.Mobject` * :pr:`1088`: Added new svg files to documentation and imports In particular, SVGPathMobject, VMobjectFromPathstring, and the style_utils functions to manim's namespace. * :pr:`1076`: Improve documentation for GraphScene Updated `coords_to_point` and `point_to_coords` under `manim/scene/graph_scene.py` as the dosctring of each function confusingly described the opposite of what it is supposed to do. Changes concerning the testing system ------------------------------------- * :pr:`1160`: Enable CI testing for OpenGL * :pr:`1100`: Rewrote test cases to use sys.executable in the command instead of "python" Tests would fail due to `capture()` not spawning a subshell in the correct environment, so when python was called, the test would be unable to find necessary packages. * :pr:`1079`: Removed the hardcoded value, `manim`, in `test_version.py` Changes to our development infrastructure ----------------------------------------- * :pr:`1213`: Updated TinyTex dependencies * :pr:`1187`: Add CodeCov to Github Workflow * :pr:`1166`: CI: Use poetry's cache dir rather than pip * :pr:`1071`: Enable pytest-cov based code coverage - Include pytest-cov as a python module as part of developer dependencies - In updating poetry to include pytest-cov, manimpango moved from version 0.2.3 to 0.2.4, and libpango1.0-dev needed to be installed in Ubuntu. - Add to the CI workflow (`ci.yml`) to create and upload test coverage. * :pr:`1073`: Removed "one line summary" from PULL_REQUEST_TEMPLATE.md Code quality improvements and similar refactors ----------------------------------------------- * :pr:`1167`: Merge :class:`~.OpenGLMobject` and :class:`~.Mobject` * :pr:`1164`: Fixed single PEP8 style in `cairo_renderer.py` * :pr:`1140`: Flake8 Compat & Code Cleanup * :pr:`1019`: Refactored :meth:`~.Scene.play` - Removed the _**three**_ decorators of :meth:`~.Scene.play`, in particular: caching logic and file writer logic are now included within :meth:`~.Scene.play` (it wasn't possible before, because `scene.wait` and `scene.play` were two different things). - Added `is_static_wait` attributes to Wait. (<=> if wait is a frozen frame). - Renamed and moved `scene.add_static_frame` to `renderer.freeze_current_frame`. - Now when calling play without animation, it raises `ValueError` instead of just a warning. - Fixed :pr:`874` by modifying `renderer.update_skipping_status` - `renderer` starts the animation with `scene.begin_animations` (`scene.compile_animation_data` used to do this) - The run time and the time progression generation is now done in `scene.play_internal` although it'd make more sense that renderer processes it later. - Added a bunch of cool tests thanks to mocks, and thanks to the new syntax `scene.render` ================================================ FILE: docs/source/changelog/0.6.0-changelog.rst ================================================ ****** v0.6.0 ****** :Date: May 02, 2021 Contributors ============ A total of 40 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Abel Aebker * Abhijith Muthyala * Adam Ryczkowski + * Alex Lembcke + * Anton Ballmaier * Aron * Benjamin Hackl * Darylgolden * Deniz Hasler + * Devin Neal * Elisha Hollander + * Erik Tastepe + * Jan-Hendrik Müller * Jason Villanueva * Laith Bahodi * Mark Miller * Mohammad Al-Fetyani * Naveen M K * Newell Jensen + * Nidhal Baccouri + * Nikhil Garuda + * Peilonrayz + * Raghav Goel * Ricky Chon + * friedkeenan * kamilczerwinski22 + * sparshg The patches included in this release have been reviewed by the following contributors. * Aathish Sivasubrahmanian * Abel Aebker * Abhijith Muthyala * Adam Ryczkowski * Alex Lembcke * Anton Ballmaier * Aron * Benjamin Hackl * Darylgolden * Deniz Hasler * Devin Neal * Elisha Hollander * GameDungeon * Hugues Devimeux * Jan-Hendrik Müller * Jason Villanueva * KingWampy * Laith Bahodi * Mark Miller * Mohammad Al-Fetyani * Naveen M K * Nidhal Baccouri * Nikhil Garuda * Oliver * Philipp Imhof * Raghav Goel * Ricky Chon * friedkeenan * sparshg Pull requests merged ==================== A total of 112 pull requests were merged for this release. Breaking changes ---------------- * :pr:`1347`: Restructure vector_field module and add documentation :class`~.VectorField` is renamed to :class:`~.ArrowVectorField` and a new class :class:`~.VectorField` is added as a superclass for :class:`~.ArrowVectorField` and :class:`~.StreamLines`. :class:`~.AnimatedStreamLines` is removed. It's functionality is moved to :class:`~.StreamLines`. Added a lot of new options when working with vector fields. :class:`~.ShowPassingFlashWithThinningStrokeWidth` was moved to the indication module. * :pr:`1161`: Upgrades to CoordinateSystem and graphing. Breaking changes were introduced to :class:`~.Axes`, :class:`~.ThreeDAxes`, :class:`~.NumberPlane` and :class:`~.NumberLine` All the above now use lists to construct their ranges as opposed to explicitly defining these values. `x_range` has replaced `x_min`, `x_max` and defining the step is much easier with `x_step` --> ``x_range`` : ``[x_min, x_max, x_step]``. There were also many upgrades to these classes which improve their functionality and appearance. ``NumberLineOld`` was introduced to continue support for :class:`~.GraphScene`, although we are moving away from GraphScene and intend to deprecate it in a future release. * :pr:`1013`: Refactored the Command Line Interface to use Click instead of Argparse This change breaks the CLI API to organize the structure of Manim Community's commands, options, and arguments. To be more in line with POSIX compliant CLI conventions, options for commands are given *BEFORE* their arguments. In Argparse: ``manim basic.py -p -ql`` With Click: ``manim -p -ql basic.py`` Although this is primarily a refactor and most of the common options are still there, some options have been added/removed. Use the ``manim`` command's ``--help`` option, or simply run the command without providing options/arguments to view the help page with the full list of subcommands/options/arguments. - Added a ``--fps``/``--frame_rate`` option which allows for custom fps that don't have to be integer (i.e. 29.97, 23.98, etc.). Users no longer have to specify the FPS from within a config file. Additionally, the ``--webgl_renderer_fps`` option has been removed. Use ``--fps`` or ``--frame_rate`` instead. - Added a ``--renderer`` option which you can use to select your choice of renderer (e.g. ``--renderer=opengl``). There are currently *THREE* renderers to choose from! - Removed the ``--background_color`` option. Reassigned the ``--background_color`` option's shorthand ``-c`` to ``--config_file``. - Removed the ``--leave_progress_bars`` option. Use ``--progress_bars=leave`` instead. - Removed the deprecated render quality flags, in particular: ``-l``, ``-m``, ``-h``, ``-k``. - Removed the ``--sound`` option. It lost support long ago with the removal of SoX. Deprecated classes and functions -------------------------------- * :pr:`1431`: Fix CLI bugs - Fixed conflict with ``-f`` which was previously assigned to both ``--show_in_file_browser`` and ``--format`` by removing ``-f`` from ``--format``. A warning is issued that ``-f`` will soon move to ``--format``. - Added back in flags to render the files as gif/last frame. Deprecated them in favor of ``--format``. - Fixed the broken ``--output_file``/``-o`` option. - Fixed an issue where the ``-qh`` quality option was interpreted as ``-q`` ``-h``, prompting the help page. * :pr:`1354`: Refactored a few functions in space_ops.py, deprecated :func:`~.angle_between` * :pr:`1370`: Remove TexMobject and TextMobject TexMobject and TextMobject have been deprecated for a while, they are now fully removed. Use Tex or MathTex instead. * :pr:`1349`: Removed the deprecated ``SmallDot`` mobject * :pr:`1259`: Removed deprecated CairoText class New features ------------ * :pr:`1386`: Implement utility methods for adding/removing vertices and edges of graphs; allow custom mobjects as vertices * :pr:`1385`: Added :meth:`~.Axes.get_line_graph` for plotting a line graph Added :meth:`~.Axes.get_line_graph` that returns a line graph from lists of points along x, y and z (optional) axes. * :pr:`1381`: Hot reloading for the OpenGL renderer Rerun scene when the input file is modified * :pr:`1383`: Overhaul of the :mod:`~.animation.indication` module interfaces - Added class `Circumscribe` combining functionality of `CircleIndicate`, `AnimationOnSurroundingRectangle`, `ShowPassingFlashAround`, `ShowCreationThenDestructionAround`, `ShowCreationThenFadeAround`, which have all been deprecated. - Changes to `Flash`: `flash_radius` parameter now defines inner radius of the animation. Added new parameter `time_width`. - `ShowCreationThenDestruction` has been deprecated in favor of `ShowPassingFlash` - Changes to `ApplyWave`: New implementation giving more flexibility with new parameters `wave_func`, `time_width` and`ripples` - Renamed `WiggleOutThenIn` to `Wiggle` (`WiggleOutThenIn` has been deprecated) - Added documentation and examples to all the above - Other minor enhancements and bug-fixes * :pr:`1348`: Added :class:`~.Polyhedron`, and platonic solids :class:`~.Tetrahedron`, :class:`~.Octahedron`, :class:`~.Icosahedron` and :class:`~.Dodecahedron` * :pr:`1285`: Add :meth:`~.Scene.interactive_embed` for OpenGL rendering :meth:`~.Scene.interactive_embed` allows interaction with Scene via mouse and keyboard as well as dynamic commands via an iPython terminal. * :pr:`1261`: Render image automatically if no animation is played in a scene - If no animations in scene and asked to preview/render a video, preview/render an image instead of raising a confusing error. * :pr:`1200`: Add text and SVG mobjects to OpenGL Added OpenGL-compatible text and SVG mobjects Enhancements ------------ * :pr:`1398`: Fix and enhance `Mobject.arrange_in_grid` `arrange_in_grid` now actually arranges submobjects in a grid. Added new parameters `buff`, `cell_alignment`, `row_alignments`, `col_alignments`, `row_heights`, `col_widths`, `flow_order`. * :pr:`1407`: Fix bug and rename :meth:`vector_coordinate_label` to :meth:`~.Vector.coordinate_label` and move it to :class:`geometry.py` * :pr:`1380`: Allow image objects as background images * :pr:`1391`: Add `path_arc` support to `.animate` syntax The parameter `path_arc` of :class:`~.Transform` now works with the `.animate` syntax * :pr:`1364`: Added :meth:`~.Mobject.match_points` - Added :func:`~.Mobject.match_points`, which transforms the points, positions and submobjects of a Mobject to match that of the other while keeping style unchanged. * :pr:`1363`: Change of TeX compiler and output file format * :pr:`1359`: Make FILE a required argument * Make `FILE` a required argument, `manim/cli/render/commands.py`:L30 * :pr:`1304`: Improve Tex string splitting at double braces: only split for double brace groups * :pr:`1340`: Add OpenGL support to the new transform animations Made `FadeTransform`, `FadeTransformPieces`, `TransformMatchingShapes` and `TransformMatchingTex` compatible with OpenGL rendering. * :pr:`1343`: Make TexTemplate() simple, but keep Tex()'s default template TexTemplate() now returns a simple tex template. * :pr:`1321`: Add OpenGL support to :class:`~.AnimationGroup` * :pr:`1302`: Raise appropriate errors in :meth:`~.VMobject.point_from_proportion` - Raise an error if the ``alpha`` argument is not between 0 and 1. - Raise an error if the :class:`~.VMobject` has no points. * :pr:`1315`: Fix performance issues with :meth:`~.VMobject.get_arc_length`, stemming from :pr:`1274` * :pr:`1320`: Add `jpeg` extension to the default image extensions * :pr:`1234`: Added new method :meth:`~.Mobject.get_midpoint` Implemented :meth:`~.Mobject.get_midpoint` to return the point that is the middle of the stroke line of an mobject. * :pr:`1237`: Notify user if they are using an outdated version of Manim * :pr:`1308`: Improved :class:`~.ManimBanner` animations * :pr:`1275`: Add SVG element support to :class:`~.SVGMobject` * :pr:`1238`: Add parameter ``about_point`` for :meth:`~.Mobject.rotate` * :pr:`1260`: Change Brace from Tex to SVG (#1258) * :pr:`1122`: Support for specifying the interpolation algorithms for individual ImageMobjects * :pr:`1283`: Set default value of keyword ``random_seed`` in :class:`~.Scene` to ``None`` (was 0 and fixed before) * :pr:`1220`: Added sanity checks to :meth:`~.Mobject.add_to_back` for Mobjects Add Mobject `add_to_back` sanity checks: - Raises ValueError when Mobject tries to add itself - Raises TypeError when a non-Mobject is added - Filters out incoming duplicate submobjects if at least one instance of that submobject exists in the list * :pr:`1249`: Set corners of :class:`~.Rectangle` in counterclockwise direction This improves the look of transformations between rectangles and other simple mobjects. * :pr:`1248`: Add Copy function to TexTemplate Fixed bugs ---------- * :pr:`1368`: Added a check to ensure checking for the latest version was successful * :pr:`1413`: Prevent duplication of the same mobject when adding to submobjects via :meth:`~.Mobject.add_to_back` Fixes #1412 * :pr:`1395`: SVG transforms now handle exponent notation (6.02e23) * :pr:`1355`: Rewrite `put_start_and_end_on` to work in 3D * :pr:`1346`: Fixed errors introduced by stray print in :class:`~.MathTex` * :pr:`1305`: Automatically remove long tick marks not within the range of the :class:`~NumberLine` * :pr:`1296`: Fix random pipeline TeX failures * :pr:`1274`: Fix :meth:`~.VMobject.point_from_proportion` to account for the length of curves. - Add :meth:`~.VMobject.get_nth_curve_function_with_length` and associated functions. - Change :meth:`~.VMobject.point_from_proportion` to use these functions to account for curve length. Documentation-related changes ----------------------------- * :pr:`1430`: Un-deprecated GraphScene (will be deprecated later), fixed an old-style call to NumberPlane - More work is required in order to fully replace `GraphScene` via `Axes`, thus `GraphScene` is not deprecated yet. - Fixed one example in which the old `NumberPlane` syntax was used. * :pr:`1425`: Added a "How to Cite Manim" section to the Readme * :pr:`1387`: Added Guide to Contribute Examples from GitHub Wiki to Documentation Added a Guide * :pr:`1424`: Fixed all current docbuild warnings * :pr:`1389`: Adding Admonitions Tutorial to docs * :pr:`1341`: Reduce complexity of ThreeDSurfacePlot example * :pr:`1362`: Quick reference to modules * :pr:`1376`: Add flake8 and isort in docs added 'flake8' and 'isort' usages to docs * :pr:`1360`: Grammatical error corrections in documentation changed a few sentences in docs/source * :pr:`1351`: Some more typehints * :pr:`1358`: Fixed link to installation instructions for developers * :pr:`1338`: Added documentation guidelines for type hints * :pr:`1342`: Multiple ValueTracker example for docs * :pr:`1210`: Added tutorial chapter on coordinates of an mobject * :pr:`1335`: Added import statements to examples in documentation * :pr:`1245`: Added filled angle Example * :pr:`1328`: Docs: Update Brace example * :pr:`1326`: Improve documentation of :class:`~.ManimMagic` (in particular: fix documented order of CLI flags) * :pr:`1323`: Blacken Docs Strings * :pr:`1300`: Added typehints for :class:`~.ValueTracker` * :pr:`1301`: Added further docstrings and typehints to :class:`~.Mobject` * :pr:`1298`: Add double backquotes for rst code samples (value_tracker.py) * :pr:`1297`: Change docs to use viewcode extension instead of linkcode Switched ``sphinx.ext.linkcode`` to ``sphinx.ext.viewcode`` and removed ``linkcode_resolve`` in ``conf.py``. * :pr:`1246`: Added docstrings for :class:`~.ValueTracker` * :pr:`1251`: Switch documentation from guzzle-sphinx-theme to furo * :pr:`1232`: Further docstrings and examples for :class:`~.Mobject` * :pr:`1291`: Grammar improvements in README.md * :pr:`1269`: Add documentation about :meth:`~.set_color_by_tex` * :pr:`1284`: Updated readme by providing the correct link to the example_scenes * :pr:`1029`: Added example jupyter notebook into the examples folders * :pr:`1279`: Added sphinx requirements to pyproject.toml New contributors who wanted to build the sphinx documentation had an extra step that could be removed by making use of ``poetry install``. This removes the developer's need for ``pip install -r requirements.txt``. * :pr:`1268`: Added documentation explaining the differences between manim versions * :pr:`1247`: Added warning for the usage of `animate` * :pr:`1242`: Added an example for the manim colormap * :pr:`1239`: Add TinyTex installation instructions * :pr:`1231`: Improve changelog generation script Changes concerning the testing system ------------------------------------- * :pr:`1299`: Red pixels (different value) now appear over green pixels (same value) in GraphicalUnitTest Changes to our development infrastructure ----------------------------------------- * :pr:`1436`: Cache poetry venv with `pyproject.toml` hash in key Cache poetry venv with `pyproject.toml` hash in key * :pr:`1435`: CI: Update poetry cache when new version is released Fix `test_version` failure in CI when using cached poetry venv * :pr:`1427`: Add URL's to pyproject.toml * :pr:`1421`: Updated changelog generator's labels and removed pre-commit bot from changelog * :pr:`1339`: CI: Fix macOS installation error from creating file in read-only file system * :pr:`1257`: CI: Caching ffmpeg, tinytex dependencies and poetry venv CI: Caching ffmpeg, tinytex dependencies and poetry venv * :pr:`1294`: Added mixed-line-ending to .pre-commit-config.yaml * :pr:`1278`: Fixed flake8 errors and removed linter/formatter workflows * :pr:`1270`: Added isort to pre_commit file * :pr:`1263`: CI: Turn off experimental installer for poetry to fix installation errors - Turn off experimental installer for poetry to prevent manim installation errors for packages. - Downgrade py39 to py38 for flake checks as `pip` does not enjoy py39, along with `poetry`. * :pr:`1255`: CI: Fix macOS pipeline failure Update `ci.yml` to update and upgrade brew if necessary before installing dependencies, and remove the unsupported `dvisvgm.86_64-darwin` package. * :pr:`1254`: Removed the comment warning that GitHub doesn't allow uploading video in the issue templates. * :pr:`1216`: Use actions/checkout for cloning repository; black-checks * :pr:`1235`: Fixed version of decorator at <5.0.0 Code quality improvements and similar refactors ----------------------------------------------- * :pr:`1411`: Change `Union[float, int]` to just `float` according to PEP 484 * :pr:`1241`: Type Annotations: Fixing errors showing up in static type checking tool mypy * :pr:`1319`: Fix mean/meant typo Fix typo in docs * :pr:`1313`: Singular typo fix on the Quickstart page in documentation * :pr:`1292`: Remove unnecessary imports from files Imports reduced in a bunch of files * :pr:`1295`: Fix grammar and typos in the CODE OF CONDUCT * :pr:`1293`: Minor fixes - reduce lines Remove unnecessary lines * :pr:`1281`: Remove all Carriage Return characters in our files * :pr:`1178`: Format Imports using Isort * :pr:`1233`: Fix deprecation warning for ``--use_opengl_renderer`` and ``--use_webgl_renderer`` * :pr:`1282`: Fix typing hints in vectorized_mobject.py based on mypy New releases ------------ * :pr:`1434`: Prepare v0.6.0 ================================================ FILE: docs/source/changelog/0.7.0-changelog.rst ================================================ ****** v0.7.0 ****** :Date: June 01, 2021 Contributors ============ A total of 45 people contributed to this release. People with a '+' by their names authored a patch for the first time. * André + * Anton Ballmaier * Benjamin Hackl * Clar Fon * Darylgolden * Devin Neal * Hugues Devimeux * Iced-Tea3 + * Jan-Hendrik Müller * Jason Villanueva * Jerónimo Squartini + * KingWampy * Laith Bahodi * Max Stoumen + * Mohammad Al-Fetyani * Naveen M K * NeoPlato * Newell Jensen * Nikhil Garuda * Nikhil Sharma + * PaulCMurdoch + * Philipp Imhof * Raghav Goel * Robert West + * Ryan McCauley + * Skaft + * SwiddisZwei + * e4coder + * friedkeenan * malte-v + * ralphieraccoon * sparshg The patches included in this release have been reviewed by the following contributors. * Aathish Sivasubrahmanian * Abhijith Muthyala * Anton Ballmaier * Aron * Benjamin Hackl * Darylgolden * Devin Neal * GameDungeon * Hugues Devimeux * Iced-Tea3 * Jan-Hendrik Müller * Jason Villanueva * Jerónimo Squartini * KingWampy * Laith Bahodi * Mark Miller * Mohammad Al-Fetyani * Naveen M K * Nikhil Garuda * Oliver * Philipp Imhof * Raghav Goel * Ricky Chon * Ryan McCauley * Skaft * SwiddisZwei * e4coder * friedkeenan * ralphieraccoon * sparshg Pull requests merged ==================== A total of 87 pull requests were merged for this release. Breaking changes ---------------- * :pr:`1521`: Improve :class:`~.Animation` docs - Improve documentation of the :class:`~.Animation` class. - Unify the signature of ``get_all_mobjects``. Now it always returns a sequence of :class:`Mobjects <.Mobject>`. This breaks using ``FadeTransform.get_all_mobjects`` as ``Group``. * :pr:`1470`: Drop support for Python 3.6 Manim won't work on Python 3.6 anymore. Highlights ---------- * :pr:`1447`: Added :class:`~.PolarPlane` for polar coordinates. * :pr:`1490`: Added :class:`~.Polygram`, rework the polygon inheritance tree, and add :class:`~.Star` - Add :class:`~.Polygram`, a generalized :class:`~.Polygon` that allows for disconnected sets of edges. - Make :class:`~.Polygon` inherit from :class:`~.Polygram`. - Add :func:`~.regular_vertices` - Add :class:`~.RegularPolygram`. - Make :class:`~.RegularPolygon` inherit from :class:`~.RegularPolygram`. - Add :class:`~.Star`. * :pr:`1462`: OpenGL: Added :class:`~.Shader`, :class:`~.Mesh`, and :class:`~.FullScreenQuad` Add Shader and Mesh objects * :pr:`1418`: Added project management commands - ``manim init`` - quickly sets up default files for a manim project. - ``manim new project`` - lets the user set project settings. It also creates the project inside a new folder of name - ``manim new scene`` - used to quickly insert new scenes into files. If ``file name`` is not provided ``main.py`` is used as default. Deprecated classes and functions -------------------------------- * :pr:`1598`: Update examples to use :class:`~.Axes` and deprecate :class:`~.GraphScene` :class:`~.GraphScene` has been deprecated and its functionality has been shifted to :class:`~.Axes`. See the updated example gallery for sample usage. * :pr:`1454`: Fading module enhancements Moved functionality of all Fading classes to :class:`~.FadeIn` and :class:`~.FadeOut`. All other fading classes have been deprecated. * :pr:`1375`: Deleted the deprecated ``ShowCreation`` in favor of :class:`~.Create` New features ------------ * :pr:`1566`: Added the ability to add gridlines to a :class:`~.Rectangle` * :pr:`1548`: Added :class:`~.ArcBrace`, a subclass of :class:`~.Brace`. * :pr:`1559`: Update VGroup to support item assignment (#1530) Support indexed item-assignment for VGroup * :pr:`1518`: Allow fading multiple Mobjects in one Animation * :pr:`1422`: Added :func:`~.override_animation` decorator * :pr:`1504`: Color module enhancements - Replaced ``BLUE_E`` with what was previously ``DARK_BLUE`` and removed ``DARK_BLUE`` - Added alias ``LIGHTER_GRAY`` for ``GRAY_A`` - Added ``PURE_RED``, ``PURE_BLUE`` and renamed ``GREEN_SCREEN`` to ``PURE_GREEN`` - All gray colors are now also available using British spelling (including ``GREY_BROWN``) - Replaced color example in the docs. It can now be used as a quick reference for all color names. * :pr:`1272`: Implement metaclass approach in geometry module to make mobjects compatible with cairo and opengl rendering * :pr:`1404`: Added two deprecation decorators Added two function decorators ``deprecated`` and ``deprecated_params`` as a consistent way of deprecating code. Enhancements ------------ * :pr:`1572`: OpenGL compatibility via metaclass: :class:`~.TracedPath`, :class:`~.ParametricFunction`, :class:`~.Brace`, :class:`~.VGroup` * :pr:`1472`: Porting methods from :class:`~.GraphScene` to :class:`~.CoordinateSystem` * :pr:`1589`: OpenGL compatibility via metaclass: :class:`~.ValueTracker` * :pr:`1564`: Add extra notes for TeX compilation errors Add hint to use custom ``TexTemplate`` on TeX compilation errors * :pr:`1584`: Added a check for ``0`` in :meth:`~.round_corners` * :pr:`1586`: Add OpenGLMobject support to all ``isinstance`` occurrences This PR increases the support for OpenGL in the remaining animation classes and in other places where appropriate. * :pr:`1577`: Added new metaclass ConvertToOpenGL (replacing MetaVMobject), restore IntelliSense * :pr:`1562`: Improved VectorField's Nudge Accuracy Per Step Implemented the Runge-Kutta algorithm in VectorField's nudge function. This increases the accuracy as an object moves along a vector field. This also increases efficiency as the nudge function requires less loops to achieve accuracy than the previous implementation. * :pr:`1480`: Add logging info to tex errors * :pr:`1567`: Compatibility Fixes with ManimPango v0.3.0 - ManimPango v0.3.0+ is required for Manim now. - Show errors from Pango when Markup isn't correct * :pr:`1512`: OpenGL compatibility via metaclass: graph * :pr:`1511`: OpenGL compatibility via metaclass: svg_mobject, text_mobject, tex_mobject * :pr:`1502`: Added ``center`` parameter to :class:`~.Sphere` and ``point`` parameter to :class:`~.Dot3D` * :pr:`1486`: Update of ``rate_functions`` Changed the picture for the non standard rate functions. * :pr:`1495`: Ported value_tracker to OpenGL * :pr:`1382`: Expand documentation, testing, and functionality of ValueTrackers; remove ExponentialValueTracker Added more documentation and inline operators to ValueTracker and ComplexValueTracker. Brought coverage for value_tracker.py to 100%. Removed ExponentialValueTracker. * :pr:`1475`: Add SVG elliptical arc support Fixed bugs ---------- * :pr:`1574`: Fixed error when processing SVG with omitted elliptical arc command * :pr:`1596`: Fix indexing for non-whitespace tex arg separator Fixes #1568 Fix issue when setting the arg_separator of a Tex object as a non-whitespace character(s). The method `break_up_by_substrings(self)` was not accounting for the separator when setting the index. * :pr:`1588`: Fixed multiple animations being saved in the same file * :pr:`1571`: Fix tests after introducing parallelization * :pr:`1545`: Fix outdated parameters for :class:`LinearTransformationScene` and add an example + typing. * :pr:`1513`: Fixed rotation of gradients while rotating a VMobject - Fixed the direction of gradient which remained the same while rotating VMobjects - Added ``rotate_sheen_direction()`` method in VMobject * :pr:`1570`: Output errors to stderr * :pr:`1560`: Declare ``*.npz`` ``*.wav`` ``*.png`` as binary in ``.gitattributes`` * :pr:`1211`: Refactored scene caching and fixed issue when a different hash was produced when copying a mobject in the scene Refactored internal scene-caching mechanism and fixed bug when an inconsistent hash was produced when copying a mobject. * :pr:`1527`: Improved handling of substring isolation within sqrt, and fixed a bug with transform_mismatch for the matching shape transforms * :pr:`1526`: Fix fading * :pr:`1523`: Fix multiple FadeIn / Out only working on VMobjects Documentation-related changes ----------------------------- * :pr:`1599`: Added example for :class:`~.Annulus` * :pr:`1415`: New example for gallery and some docs refinements * :pr:`1509`: Copyedited Documentation Added a link to Manim Community GitHub page in ``for_dev.rst``. Fixed :meth:`~.Mobject.get_start` and added ``roll`` link in ``building_blocks-rst`` Added language to code blocks in ``configuration.rst`` * :pr:`1384`: Added typings to space_ops.py Added Typehints to most of the functions * :pr:`1500`: Example for :meth:`~.apply_complex_function` * :pr:`1551`: Fixed the typo for Admonitions * :pr:`1550`: Restructuring of Contribution Section * :pr:`1541`: Fixing broken links and other minor doc things * :pr:`1516`: Update docs to use ``t_range`` instead of ``t_min`` and ``t_max`` in :class:`~.ParametricFunction` * :pr:`1508`: Update troubleshooting docs * :pr:`1485`: Added :class:`~.Title` example for the docs * :pr:`1439`: Cleaning ``Sequence`` typehints * :pr:`1440`: Added Scoop installation docs (Windows) * :pr:`1452`: Refine typehints at :class:`~.Angle` * :pr:`1458`: Refine docs of :class:`~.Text` ( add ``disable_ligatures=True`` for t2c) * :pr:`1449`: Added :class:`~.PointCloudDot` example * :pr:`1473`: Added easy example for :meth:`~.arrange_in_grid` * :pr:`1402`: Added typestring parser checker * :pr:`1451`: Reduce complexity of AngleExample * :pr:`1441`: Add inheritance diagrams to reference page Added inheritance diagrams to the reference page as a quick navigation method. * :pr:`1457`: Fixing broken doc links * :pr:`1445`: Remove $ from tutorial commands Changes concerning the testing system ------------------------------------- * :pr:`1556`: Try pytest-xdist for parallelization in tests Changes to our development infrastructure ----------------------------------------- * :pr:`1505`: Add docs reference to PR template Added documentation link to the Pull Request Template. * :pr:`1499`: Updated Discord links in the docs to point towards a standardized redirect * :pr:`1461`: Build the docs - Logging * :pr:`1481`: pyproject.toml: poetry_core -> poetry-core * :pr:`1477`: Update RDT sphinx package to version 3.5.3 * :pr:`1460`: Create CONTRIBUTING.md * :pr:`1453`: manim_directive: fix image links in docs - Windows Use POSIX path on Windows to link images so documentation can build locally. Code quality improvements and similar refactors ----------------------------------------------- * :pr:`1465`: Added typings and description to some functions in :mod:`~.coordinate_systems`. * :pr:`1552`: Removed unwanted parameters in geometry Removed ``anchors_span_full_range``, ``close_new_points``, ``anchors_span_full_range``, ``preserve_tip_size_when_scaling``, ``mark_paths_closed`` and ``close_new_points`` * :pr:`1597`: Removed hilite_me and insert_line_numbers_in_html from global name space * :pr:`1535`: Update dependencies and fix tests * :pr:`1544`: Adding spell checker as a pre-commit hook * :pr:`1542`: Swapping a pango markup link in docs * :pr:`1531`: Don't use deprecated methods in deprecation.py * :pr:`1492`: Remove stray print statements introduced in #1404 * :pr:`1471`: Fix Some Warnings from lgtm Changes that needed to be reverted again ---------------------------------------- * :pr:`1606`: Bring back ``DARK_BLUE`` New releases ------------ * :pr:`1601`: Preparation for v0.7.0: added changelog and bumped version number ================================================ FILE: docs/source/changelog/0.8.0-changelog.rst ================================================ ****** v0.8.0 ****** :Date: July 02, 2021 Contributors ============ A total of 37 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Benjamin Hackl * Bill Shillito + * Darigov Research + * Darylgolden * Devin Neal * Iced-Tea3 * Jan-Hendrik Müller * Jason Villanueva * KingWampy * Laith Bahodi * MathInvariance + * Max Stoumen * Mehmet Ali Özer + * Michael Pilosov + * Mohammad Al-Fetyani * Naveen M K * Nikhil Garuda * Oliver * PaulCMurdoch * Philipp Imhof * PipedQuintes + * Raghav Goel * Ryan McCauley * Ujjayanta + * Vagrid + * andrehisatsuga + * friedkeenan * peaceheis + * yit6 + The patches included in this release have been reviewed by the following contributors. * Abhijith Muthyala * Anton Ballmaier * Aron * Benjamin Hackl * Clar Fon * Darylgolden * Devin Neal * Jan-Hendrik Müller * Jason Villanueva * KingWampy * Laith Bahodi * Mark Miller * MathInvariance * Mohammad Al-Fetyani * Naveen M K * Nikhil Garuda * Oliver * Philipp Imhof * Raghav Goel * Ryan McCauley * Ujjayanta * Vagrid * friedkeenan Pull requests merged ==================== A total of 76 pull requests were merged for this release. Deprecated classes and functions -------------------------------- * :pr:`1616`: Remove all functions and classes that were deprecated until ``v0.6.0`` New features ------------ * :pr:`1716`: Rewrite stroke and fill shaders Rewrite vectorized mobject shaders to be compatible with transformation matrices. * :pr:`1695`: Add option to justify text with :class:`~.MarkupText` A new parameter ``justify`` is added to :class:`~.MarkupText`. It can be used to justify a paragraph of text. * :pr:`1660`: Added support for ``.webm`` and transparency of videos in Jupyter notebooks - Added support for generating ``webm`` videos via the command line flag ``--format=webm`` - Added transparency support for Jupyter notebooks * :pr:`1553`: Add dearpygui integration Enhancements ------------ * :pr:`1728`: Improved positioning and size of the OpenGL window; added some configuration options * :pr:`1733`: Let OpenGLMobject.copy return a deep copy by default * :pr:`1735`: Metaclass compatibility for `coordinate_system.py`, `Code` and `ParametricSurface` * :pr:`1585`: OpenGL compatibility via metaclass for :class:`~.Matrix`, :class:`~.DecimalNumber`, :class:`~.Variable` * :pr:`1713`: Exit the command line interface gracefully if no scene was chosen * :pr:`1652`: Refactored :class:`~.Mobject` and :class:`~.Scene` to no longer inherit from the abstract base class ``Container`` - Moved tests in ``test_container.py`` for :class:`Container` that test :class:`~.Scene` and :class:`~.Mobject` to their own files. - Corrected various instances of incorrectly passed keyword arguments, or unused keyword arguments. * :pr:`1693`: Made the default arrowhead size for :class:`~.Arrow3D` smaller * :pr:`1678`: Allow some rate functions to assume values outside of [0, 1]; introduce clamping decorators - Fixed animations so that certain rate functions (``running_start``, ``wiggle``, ``ease_in_back``, ``ease_out_back``, ``ease_in_out_back``, ``ease_in_elastic``, ``ease_out_elastic``, and ``ease_out_elastic``) can go outside the range from 0 to 1. - Fixed lag ratios so that they're spaced out evenly within the time interval and the rate functions are applied to each animation individually, rather than having the rate function determine when the animation starts. - Fixed faulty code for ``ease_in_out_expo``, ``ease_in_bounce``, ``ease_out_bounce``, and ``ease_in_out_bounce``. * :pr:`1649`: Made video file names in Jupyter notebook more readable * :pr:`1667`: Determine the default number of decimal places for :class:`~.NumberLine` labels automatically from the step size As an example: If the step size is set to 0.5, labels will now show at least one decimal place. * :pr:`1608`: Color file paths in terminal; remove curly braces surrounding the file path in "Partial movie file written in..." messages * :pr:`1632`: OpenGL compatibility via metaclass: :class:`~.Group` Fixed bugs ---------- * :pr:`1740`: Fix pillow to <8.3.0 * :pr:`1729`: Fix bug when using :class:`~.Text` with the OpenGL renderer * :pr:`1675`: Fixed ignored fill and stroke colors for :class:`~.SVGMobject` * :pr:`1664`: Fixed accidental displacement in :class:`~.Axes` caused by ``include_numbers`` / ``numbers_to_include`` * :pr:`1670`: Fixed missing ``numpy`` import in OpenGL shader example * :pr:`1636`: Fixed bugs and added examples to methods and classes in :mod:`manim.mobject.matrix` * :pr:`1614`: Fix tick issues and improve tick placement for :class:`~.NumberLine` * :pr:`1593`: Un-flip output of ``get_frame()`` when using the OpenGL renderer * :pr:`1619`: Fix output of automatically detected LaTeX errors * :pr:`1595`: Fixed a few CLI and rendering bugs - Corrected issue where gifs were being logged with an incorrect extension - Fixed issue where videos were output when format was set to png - Added logging for png output - Added precedence handling when the ``write_to_movie`` flag would conflict with ``--format`` - Fixed issue that caused png image output to be ignored when caching was enabled * :pr:`1635`: Added missing numpy import for :mod:`manim.mobject.probability` * :pr:`1634`: Fixed OpenGL examples for MacOS Renamed deprecated ``gl_FragColor`` to ``fragColor``. Documentation-related changes ----------------------------- * :pr:`1732`: Remove reference to ``--plugins`` flag * :pr:`1734`: Fix inheritance graph background color * :pr:`1698`: Added an example for :class:`~.PMobject` * :pr:`1690`: Added an example for :class:`~.CoordinateSystem` * :pr:`1510`: Add a tutorial for using :class:`~.Text` and :class:`~.Tex` * :pr:`1685`: Added an example and parameter description for :class:`~.AnnularSector` * :pr:`1687`: Updated imports in ``geometry.py`` and added example to :class:`~.Arrow` * :pr:`1681`: Added an example for :class:`~.NumberLine` * :pr:`1697`: Added an example for :class:`~.PGroup` * :pr:`1594`: Several improvements to the documentation design and layout * :pr:`1696`: Added an example for :class:`~.DashedVMobject` * :pr:`1637`: Added an example for :class:`~.FunctionGraph` * :pr:`1626`: Added an example for :class:`~.Prism` * :pr:`1712`: Added a second example for :class:`~.DoubleArrow` * :pr:`1710`: Update copyright year in documentation to 2020-2021 * :pr:`1708`: Fixed link to interactive example notebook * :pr:`1657`: Added an example for :class:`~.ParametricSurface` * :pr:`1642`: Added examples and docstrings for :class:`~.BarChart` * :pr:`1700`: Added an example for :meth:`~.Mobject.scale` * :pr:`1689`: Added an example for :class:`~.SurroundingRectangle` * :pr:`1627`: Added an example for :class:`~.Sphere` * :pr:`1569`: Added example to demonstrate differences between :class:`~.Transform` and :class:`~.ReplacementTransform` * :pr:`1647`: Added an example for :class:`~.Sector` * :pr:`1673`: Updated documentation examples for :class:`~.Text` and :class:`~.MarkupText`: set ``weight=BOLD`` instead of ``style`` * :pr:`1650`: Added an example for :class:`~.ArcBetweenPoints` * :pr:`1628`: Added an example for :class:`~.NumberPlane` * :pr:`1646`: Added an example for :class:`~.Underline` * :pr:`1659`: Added more details to the Google Colab installation instructions * :pr:`1658`: Updated python requirement in the documentation * :pr:`1639`: Added an example for :class:`~.SampleSpace` * :pr:`1640`: Added an example for :class:`~.Point` * :pr:`1643`: Fixed ``RightArcAngleExample`` for :class:`~.Angle` in documentation * :pr:`1617`: Visually improved an example in our tutorial * :pr:`1641`: Added an example for :class:`~.ComplexPlane` * :pr:`1644`: Added an example for :class:`~.BackgroundRectangle` * :pr:`1633`: Added an example for :class:`~.Integer` * :pr:`1630`: Added an example for :class:`~.Arc` * :pr:`1631`: Added an example for :class:`~.BulletedList` * :pr:`1620`: Fixed reference to command line interface help command Changes to our development infrastructure ----------------------------------------- * :pr:`1623`: CI: branch rename: master -> main * :pr:`1621`: Revert default template and add new templates * :pr:`1573`: PR template for the manim hackathon Code quality improvements and similar refactors ----------------------------------------------- * :pr:`1720`: Renamed incorrect references of ``master`` to ``main`` * :pr:`1692`: Removed redundant warning in CLI parsing * :pr:`1651`: Small code cleanup for :class:`~.Polygram` * :pr:`1610`: Changed one image extension to lowercase letters New releases ------------ * :pr:`1738`: Preparation for v0.8.0: added changelog and bumped version number ================================================ FILE: docs/source/changelog/0.9.0-changelog.rst ================================================ ****** v0.9.0 ****** :Date: August 02, 2021 Contributors ============ A total of 35 people contributed to this release. People with a '+' by their names authored a patch for the first time. * Alex Lembcke * Benjamin Hackl * Darylgolden * Devin Neal * Harivinay + * Hugues Devimeux * Jared Hughes + * Jason Villanueva * Kadatatlu Kishore + * KingWampy * LED Me Explain + * Laith Bahodi * Mohammad Al-Fetyani * Noam Zaks * Oliver * PaulCMurdoch * Raghav Prabhakar + * Ryan McCauley * Suhail Sherif + * Taektiek + * Udeshya Dhungana + * UraniumCronorum + * Vinh H. Pham (Vincent) + * ccn + * icedcoffeeee + * sahilmakhijani + * sparshg The patches included in this release have been reviewed by the following contributors. * Abhijith Muthyala * Alex Lembcke * Benjamin Hackl * Darylgolden * Devin Neal * Harivinay * Hugues Devimeux * Jan-Hendrik Müller * Jason Villanueva * KingWampy * Laith Bahodi * Lino * Mohammad Al-Fetyani * Oliver * Raghav Goel * Suhail Sherif * icedcoffeeee * sahilmakhijani * sparshg Pull requests merged ==================== A total of 55 pull requests were merged for this release. Highlights ---------- * :pr:`1677`: Added a new :class:`~.Table` mobject This brings easy-to-use and customizable tables to Manim. Several examples for this new mobject can be found at :mod:`the module documentation page <.mobject.table>` and its subpages. Deprecated classes and functions -------------------------------- * :pr:`1848`: Deprecated parameters for :class:`~.DashedLine` and :class:`~.DashedVMobject` - ``dash_spacing`` is an unused parameter - ``positive_space_ratio`` has been replaced with the shorter name ``dashed_ratio`` * :pr:`1773`: Remove all classes and functions that were deprecated until ``v0.7.0`` and ``v0.8.0`` The classes ``FadeInFrom``, ``FadeOutAndShift``, ``FadeOutToPoint``, ``FadeInFromPoint``, ``FadeInFromLarge``, ``VFadeIn``, ``VFadeOut``, ``VFadeInThenOut`` have been removed, use :class:`~.FadeIn` or :class:`~.FadeOut` with appropriate keyword arguments instead. The classes ``CircleIndicate``, ``ShowCreationThenDestruction``, ``AnimationOnSurroundingRectangle``, ``ShowPassingFlashAround``, ``ShowCreationThenDestructionAround``, ``ShowCreationThenFadeAround``, ``WiggleOutThenIn``, ``TurnInsideOut`` have been removed. Use :class:`~.Circumscribe`, :class:`~.ShowPassingFlash`, or :class:`~.Wiggle` instead. The classes ``OpenGLTexMobject`` and ``OpenGLTextMobject`` have been removed, use :class:`~.MathTex` and :class:`~.Tex` instead. Also, ``VMobjectFromSVGPathstring`` has been removed, use :class:`~.SVGPathMobject` instead. Finally, the utility functions ``get_norm`` and ``cross`` have been removed (use the corresponding Numpy methods instead), and the function ``angle_between`` has been replaced with ``angle_between_vectors``. * :pr:`1731`: Deprecated :class:`~.ParametricSurface` parameters - ``u_min`` and ``u_max`` have been replaced by ``u_range``. - ``v_min`` and ``v_max`` have been replaced by ``v_range``. New features ------------ * :pr:`1780`: Allow non-numerical values to be added to :class:`~.NumberLine` and :class:`~.Axes` - Added :meth:`.NumberLine.add_labels` method to :class:`~.NumberLine` which accepts a dictionary of positions/values. - :meth:`.CoordinateSystem.add_coordinates` now accepts a dictionary too. * :pr:`1719`: Added a :class:`~.Broadcast` animation * :pr:`1765`: Added a static method :meth:`.Circle.from_three_points` for defining a circle from three points - Added a new :func:`~.perpendicular_bisector` function in ``space_ops.py`` * :pr:`1686`: Added :meth:`.ParametricSurface.set_fill_by_value` This method enables a color gradient to be applied to a :class:`~.ParametricSurface`, including the ability to define at which points the colors should be centered. Enhancements ------------ * :pr:`1833`: Added OpenGL compatibility for :class:`~.VDict`, :meth:`~.Axes.get_line_graph` and :class:`~.FocusOn` * :pr:`1760`: Added ``window_size`` flag to manually adjust the size of the OpenGL window Accepts a tuple in the form: ``x,y``. * :pr:`1823`: Reworked :class:`~.DashedVMobject` Rewritten the logic to generate dashes * :pr:`1808`: OpenGL renderer updates - Adds model matrices to all OpenGLVMobjects - Improved performance on vectorized mobject shaders - Added updaters that are part of the scene rather than a mobject * :pr:`1787`: Made :class:`~.DecimalNumber` apply color to the ellipsis Made color apply to the dots when `show_ellipsis` is set to true in `DecimalNumber` * :pr:`1775`: Let :class:`~.Create` work on :class:`~.OpenGLSurface` * :pr:`1757`: Added warning when there is a large number of items to hash. * :pr:`1774`: Add the ``reverse`` parameter to :class:`~.Write` Fixed bugs ---------- * :pr:`1722`: Fixed ``remover=True`` for :class:`~.AnimationGroup` * :pr:`1727`: Fixed some hot reload issues and compatibility with IDEs - Fixed interactive embed issue where it would fail when running on non-tty terminals - Fixed issue where file observer would error after the second run as the first observer was not closed * :pr:`1844`: Fixed the oversized :class:`~.Code` window with the OpenGL renderer * :pr:`1821`: Fixed issues concerning ``frame_center`` in :class:`~.ThreeDScene` - Changing ``frame_center`` in a :class:`~.ThreeDScene` now actually changes the camera position. - An animation with only ``frame_center`` animated will now be rendered properly. - A black dot is not created at the origin once ``frame_center`` is animated. * :pr:`1826`: Fixed scaling issue with :meth:`.BarChart.change_bar_values` * :pr:`1839`: Allow passing arguments to ``.animate`` with the OpenGL renderer * :pr:`1791`: :meth:`~.Mobject.set_z_index` now sets all submobjects' ``z_index`` value * :pr:`1792`: Fixed bug that caused dry runs to fail when using the PNG format * :pr:`1790`: Fixed an import from ``manimlib`` * :pr:`1782`: Fixed :class:`~.Tex` not working properly with the OpenGL renderer * :pr:`1783`: Fixed :meth:`~.OpenGLMobject.shuffle` function and added :meth:`~.Mobject.invert` to OpenGL * :pr:`1786`: Fixed :class:`~.DecimalNumber` not working properly when the number of digits changes * :pr:`1763`: Fixed not being able to set some CLI flags in the configuration file * :pr:`1776`: :meth:`.CoordinateSystem.get_riemann_rectangles` now uses the graph's range instead of the axes range If no range specified, `get_riemann_rectangles` generates the rectangles only where the area is correctly bounded * :pr:`1770`: Rewrote :meth:`.OpenGLMobject.put_start_and_end_on` to work correctly in 3D * :pr:`1736`: Fixed :class:`~.LinearTransformationScene` crashing on multiple animations Documentation-related changes ----------------------------- * :pr:`1852`: Fixed docs for :meth:`.Coordinate_system.add_coordinates` and moved :class: `~.Code` example * :pr:`1807`: Updated installation instructions - Added a warning about the incompatibility of different versions of Manim in the README - Modified the admonition warning in the documentation - Removed duplicated information from the README (``pip install manim`` is already covered in the docs) * :pr:`1739`: Added a section on creating a custom animation to the "Manim's building blocks" tutorial * :pr:`1835`: Updated documentation with information about reworked graphical unit test system * :pr:`1845`: Improve ``ThreeDSurfacePlot`` example in example gallery * :pr:`1842`: Removed instructions on installing Poetry from Developer Installation documentation, reference Poetry's documentation instead * :pr:`1829`: Switch the order of Scoop and Chocolatey in the docs for the Windows Installation * :pr:`1827`: Added ``robots.txt`` to prevent old versions of documentation from showing in search results * :pr:`1819`: Removed mention of ``-h`` CLI flag from documentation * :pr:`1813`: Removed unused variables from tutorial * :pr:`1815`: Added codespell to the list of used linters in the contribution guidelines * :pr:`1778`: Improve sidebar structure of the documentation's reference manual * :pr:`1749`: Added documentation and example for :meth:`.VMobject.set_fill` * :pr:`1743`: Edited the developer installation instructions to include information on cloning the repository * :pr:`1706`: Rework example for :class:`~.Variable` Changes concerning the testing system ------------------------------------- * :pr:`1836`: Converted all the graphical tests to the new syntax * :pr:`1802`: Refactored graphical unit testing system, and implemented multi frames tests This PR introduces a new ``@frames_comparison`` decorator which allows writing simple ``construct``-like functions as tests. Control data for new tests can be easily generated by calling ``pytest --set_test``. Changes to our development infrastructure ----------------------------------------- * :pr:`1830`: Be more concise about the documentation URL in the PR template Code quality improvements and similar refactors ----------------------------------------------- * :pr:`1851`: Renamed ``Tabular`` to :class:`~.Table` * :pr:`1817`: Remove pillow version requirement * :pr:`1806`: Fixed spelling mistake * :pr:`1745`: Updated the BibTeX template in the README to Manim v0.9.0 New releases ------------ * :pr:`1850`: Bump version number to ``v0.9.0`` and generate changelog ================================================ SYMLINK: docs/source/conduct.md -> CODE_OF_CONDUCT.md ================================================ ================================================ FILE: docs/source/contributing/development.md ================================================ # Manim Development Process ## For first-time contributors 1. Install git: For instructions see . 2. Fork the project: Go to and 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. 3. Clone your fork to your local computer: ```shell git clone https://github.com//manim.git ``` GitHub will provide both a SSH (`git@github.com:/manim.git`) and HTTPS (`https://github.com//manim.git`) URL for cloning. You can use SSH if you have SSH keys setup. :::{WARNING} Do not clone the ManimCommunity repository. You must clone your own fork. ::: 4. Change the directory to enter the project folder: ```shell cd manim ``` 5. Add the upstream repository, ManimCommunity: ```shell git remote add upstream https://github.com/ManimCommunity/manim.git ``` 6. Now, `git remote -v` should show two remote repositories named: - `origin`, your forked repository - `upstream` the ManimCommunity repository 7. Install the Python project management tool `uv`, as recommended in our {doc}`installation guide for users `. 8. Let `uv` create a virtual environment for your development installation by running ```shell uv sync ``` In case you need (or want) to install some of the optional dependency groups defined in our [`pyproject.toml`](https://github.com/ManimCommunity/manim/blob/main/pyproject.toml), run `uv sync --all-extras`, or pass the `--extra` flag with the name of a group, for example `uv sync --extra jupyterhub`. 9. Install Pre-Commit: ```shell uv run pre-commit install ``` This will ensure during development that each of your commits is properly formatted against our linter and formatters. You are now ready to work on Manim! ## Develop your contribution 1. Checkout your local repository's main branch and pull the latest changes from ManimCommunity, `upstream`, into your local repository: ```shell git switch main git pull --rebase upstream main ``` 2. Create a branch for the changes you want to work on rather than working off of your local main branch: ```shell git switch -c upstream/main ``` This ensures you can easily update your local repository's main with the first step and switch branches to work on multiple features. 3. Write some awesome code! You're ready to make changes in your local repository's branch. You can add local files you've changed within the current directory with `git add .`, or add specific files with ```shell git add ``` and commit these changes to your local history with `git commit`. If you have installed pre-commit, your commit will succeed only if none of the hooks fail. :::{tip} When crafting commit messages, it is highly recommended that you adhere to [these guidelines](https://www.conventionalcommits.org/en/v1.0.0/). ::: 4. Add new or update existing tests. Depending on your changes, you may need to update or add new tests. For new features, it is required that you include tests with your PR. Details of our testing system are explained in the {doc}`testing guide `. 5. Update docstrings and documentation: Update the docstrings (the text in triple quotation marks) of any functions or classes you change and include them with any new functions you add. See the {doc}`documentation guide ` for more information about how we prefer our code to be documented. The content of the docstrings will be rendered in the {doc}`reference manual <../reference>`. :::{tip} Use the {mod}`manim directive for Sphinx ` to add examples to the documentation! ::: As far as development on your local machine goes, these are the main steps you should follow. (polishing-changes-and-submitting-a-pull-request)= ## Polishing Changes and Submitting a Pull Request As soon as you are ready to share your local changes with the community so that they can be discussed, go through the following steps to open a pull request. A pull request signifies to the ManimCommunity organization, "Here are some changes I wrote; I think it's worthwhile for you to maintain them." :::{note} You do not need to have everything (code/documentation/tests) complete to open a pull request (PR). If the PR is still under development, please mark it as a draft. Community developers will still be able to review the changes, discuss yet-to-be-implemented changes, and offer advice; however, the more complete your PR, the quicker it will be merged. ::: 1. Update your fork on GitHub to reflect your local changes: ```shell git push -u origin ``` Doing so creates a new branch on your remote fork, `origin`, with the contents of your local repository on GitHub. In subsequent pushes, this local branch will track the branch `origin` and `git push` is enough. 2. Make a pull request (PR) on GitHub. In order to make the ManimCommunity development team aware of your changes, you can make a PR to the ManimCommunity repository from your fork. :::{WARNING} Make sure to select `ManimCommunity/manim` instead of `3b1b/manim` as the base repository! ::: Choose the branch from your fork as the head repository - see the screenshot below. ```{image} /_static/pull-requests.png :align: center ``` Please make sure you follow the template (this is the default text you are shown when first opening the 'New Pull Request' page). Your changes are eligible to be merged if: 1. there are no merge conflicts 2. the tests in our pipeline pass 3. at least one (two for more complex changes) Community Developer approves the changes You can check for merge conflicts between the current upstream/main and your branch by executing `git pull upstream main` locally. If this generates any merge conflicts, you need to resolve them and push an updated version of the branch to your fork of the repository. Our pipeline consists of a series of different tests that ensure that Manim still works as intended and that the code you added sticks to our coding conventions. - **Code style**: We use the code style imposed by [Black](https://black.readthedocs.io/en/stable/), [isort](https://pycqa.github.io/isort/) and [flake8](https://flake8.pycqa.org/en/latest/). The GitHub pipeline makes sure that the (Python) files changed in your pull request also adhere to this code style. If this step of the pipeline fails, fix your code formatting automatically by running `black ` and `isort `. To fix code style problems, run `flake8 ` for a style report, and then fix the problems manually that were detected by `flake8`. - **Tests**: The pipeline runs Manim's test suite on different operating systems (the latest versions of Ubuntu, macOS, and Windows) for different versions of Python. The test suite consists of two different kinds of tests: integration tests and doctests. You can run them locally by executing `uv run pytest` and `uv run pytest --doctest-modules manim`, respectively, from the root directory of your cloned fork. - **Documentation**: We also build a version of the documentation corresponding to your pull request. Make sure not to introduce any Sphinx errors, and have a look at the built HTML files to see whether the formatting of the documentation you added looks as you intended. You can build the documentation locally by running `make html` from the `docs` directory. Make sure you have [Graphviz](https://graphviz.org/) installed locally in order to build the inheritance diagrams. See {doc}`docs` for more information. Finally, if the pipeline passes and you are satisfied with your changes: wait for feedback and iterate over any requested changes. You will likely be asked to edit or modify your PR in one way or another during this process. This is not an indictment of your work, but rather a strong signal that the community wants to merge your changes! Once approved, your changes may be merged! ### Further useful guidelines 1. When submitting a PR, please mention explicitly if it includes breaking changes. 2. When submitting a PR, make sure that your proposed changes are as general as possible, and ready to be taken advantage of by all of Manim's users. In particular, leave out any machine-specific configurations, or any personal information it may contain. 3. If you are a maintainer, please label issues and PRs appropriately and frequently. 4. 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). 5. When submitting a code review, it is highly recommended that you adhere to [these general guidelines](https://conventionalcomments.org/). 6. If you find stale or inactive issues that seem to be irrelevant, please post a comment saying 'This issue should be closed', and a community developer will take a look. 7. Please do as much as possible to keep issues, PRs, and development in general as tidy as possible. You can find examples for the `docs` in several places: the {doc}`Example Gallery <../examples>`, {doc}`Tutorials <../tutorials/index>`, and {doc}`Reference Classes <../reference>`. **Thank you for contributing!** ================================================ FILE: docs/source/contributing/docs.rst ================================================ ==================== Adding Documentation ==================== Building the documentation -------------------------- When you clone the Manim repository from GitHub, you can access the ``docs/`` folder which contains the necessary files to build the documentation. To build the docs locally, open a CLI, enter the ``docs/`` folder with the ``cd`` command and execute the following depending on your OS: - Windows: ``./make.bat html`` - macOS and Linux: ``make html`` The first time you build the docs, the process will take several minutes because it needs to generate all the ``.rst`` (reST: reStructured Text) files from scratch by reading and parsing all the Manim content. The process becomes much shorter the next time, as it rebuilds only the parts which have changed. Sphinx library and extensions ----------------------------- Manim uses `Sphinx `_ for building the docs. It also makes use of Sphinx extensions such as: - `Autodoc: `_ imports Manim's Python source code, extracts its docstrings and generates documentation from them. - `Autosummary: `_ a complement to Autodoc which adds a special directive ``autosummary``, used in Manim to automatically document classes, methods, attributes, functions, module-level variables and exceptions. Autosummary makes use of `Jinja templates `_, which Manim defines for autosummarizing classes and modules inside ``docs/source/_templates/``. - `Graphviz extension for Sphinx: `_ embeds graphs generated by the `Graphviz `_ module, which must be installed in order to render the inheritance diagrams in the :doc:`/reference`. - `Napoleon: `_ enables Sphinx to read Google style docstrings and, in particular for Manim, `NumPy style docstrings `_ - see :doc:`docs/docstrings` for more information. Sphinx theme ------------ The theme used for this website is `Furo `_. Custom Sphinx directives ------------------------ Manim implements **custom directives** for use with Autodoc and Autosummary, which are defined in :mod:`~.docbuild`: .. currentmodule:: manim.utils.docbuild .. autosummary:: :toctree: ../reference autoaliasattr_directive autocolor_directive manim_directive Index ----- .. toctree:: :maxdepth: 2 docs/admonitions docs/docstrings docs/examples docs/references docs/typings docs/types ================================================ FILE: docs/source/contributing/internationalization.rst ================================================ ==================== Internationalization ==================== Thank you for your interest in localizing Manim! Please read the instructions below to get started. You are also encouraged, though not required, to join our `Discord server `__. Signing up ========== You will first need to create an account for our project. Go to our `project homepage `__ and click the sign up button at the top right hand corner. Follow the instructions to create an account. After creating an account, you should return back to our homepage. Click the Manim project to contribute translations for the main library. Contributing ============ .. important:: Keep in mind that Manim is still a work in progress. Tutorials and documentation are always subject to change. When a developer implements a new feature, they are not forced to respect any translations. This means that parts of the translation might become outdated over time. That being said, improving the documentation and making it more accessible is still highly encouraged. And even if your work gets outdated and requires change, you or someone else can simply adjust the translation. Your efforts are not in vain! Voting ------ To ensure that our translations are of good quality, we use crowdsourcing and voting to approve good translations and reject bad ones. The current threshold for a translation being accepted is 3 votes; this may change as we gauge the level of activity in the community and the quality of translations. To vote on translations, first click on a language you would like to help with, then click the "translate all" button. You should then enter the translation editor. Next to the search bar, you will see a funnel-like icon - click it and select the "Need to Be Voted" option to see translations that need to be voted on. You can then select a string on the left sidebar, view the translations at the bottom and vote with the + and - icons for good and poor translations respectively. Translations ------------ You can also help with contributing translations directly. Follow the steps above to enter the translation editor (instead of clicking "Translate all", you may also choose to translate strings from a specific file by clicking them). Crowdin's on-screen tutorial should guide you through the process. Translation guidelines ====================== In general, follow the conventions for technical writing in your target language. You may want to refer to similar, high quality sources (eg. Python's documentation in your language) for guidance. Note that code blocks, code literals, names and pseudonyms should be left unchanged. Proofreading ============ For certain languages with a significant number of speakers within the Manim Community, an additional step of proofreading is used after crowdsourcing to further ensure the quality of our translations. Proofreaders are trusted community members who will look over and give the final approval on translations. If you would like to be a proofreader, please email translations@manim.community with the answers to the following questions: 1. What is your Crowdin username? 2. What is your Discord username (optional)? 3. What is your GitHub username (optional)? 4. List the languages you speak, and your level of fluency with them. 5. What language(s) are you applying to be a proofreader for? 6. Do you have any previous experience with translations? 7. If yes, give us more details. 8. How will you ensure the quality of translations, should you become a proofreader? Please note that you don't need to have prior translation experience to be a proofreader, just a commitment to maintaining a good quality of translations. Errors ====== Source errors ------------- If you spot an error with a source string, report it to us by opening an :issue:`issue ` on GitHub. Refrain from translating the string until the issue is resolved. ================================================ FILE: docs/source/contributing/performance.rst ================================================ ===================== Improving performance ===================== One of Manim's main flaws as an animation library is its slow performance. As of time of writing (January 2022), the library is still very unoptimized. As such, we highly encourage contributors to help out in optimizing the code. Profiling ========= Before the library can be optimized, we first need to identify the bottlenecks in performance via profiling. There are numerous Python profilers available for this purpose; some examples include cProfile and Scalene. Running an animation as a script -------------------------------- Most instructions for profilers assume you can run the python file directly as a script from the command line. While Manim animations are usually run from the command-line, we can run them as scripts by adding something like the following to the bottom of the file: .. code-block:: python with tempconfig({"quality": "medium_quality", "disable_caching": True}): scene = SceneName() scene.render() Where ``SceneName`` is the name of the scene you want to run. You can then run the file directly, and can thus follow the instructions for most profilers. An example: profiling with cProfile and SnakeViz ------------------------------------------------- Install SnakeViz: .. code-block:: bash pip install snakeviz cProfile is included with in Python's standard library and does not need to be installed. Suppose we want to profile ``SquareToCircle``. Then we add and save the following code to ``square_to_circle.py``: .. code-block:: python from manim import * class SquareToCircle(Scene): def construct(self): s = Square() c = Circle() self.add(s) self.play(Transform(s, c)) with tempconfig({"quality": "medium_quality", "disable_caching": True}): scene = SquareToCircle() scene.render() Now run the following in the terminal: .. code-block:: bash python -m cProfile -o square_to_circle.txt square_to_circle.py This will create a file called ``square_to_circle.txt``. Now, we can run SnakeViz on the profile file: .. code-block:: bash snakeviz square_to_circle.txt A browser window or tab will open with a visualization of the profile, which should look something like this: .. image:: /_static/snakeviz.png ================================================ FILE: docs/source/contributing/testing.rst ================================================ ============ Adding Tests ============ If you are adding new features to manim, you should add appropriate tests for them. Tests prevent manim from breaking at each change by checking that no other feature has been broken and/or been unintentionally modified. .. warning:: The full tests suite requires Cairo 1.18 in order to run all tests. However, Cairo 1.18 may not be available from your package manager, like ``apt``, and it is very likely that you have an older version installed, e.g., 1.16. If you run tests with a version prior to 1.18, many tests will be skipped. Those tests are not skipped in the online CI. If you want to run all tests locally, you need to install Cairo 1.18 or above. You can do so by compiling Cairo from source: 1. download ``cairo-1.18.0.tar.xz`` from `here `_. and uncompress it; 2. open the INSTALL file and follow the instructions (you might need to install ``meson`` and ``ninja``); 3. run the tests suite and verify that the Cairo version is correct. How Manim tests --------------- Manim uses pytest as its testing framework. To start the testing process, go to the root directory of the project and run pytest in your terminal. Any errors that occur during testing will be displayed in the terminal. Some useful pytest flags: - ``-x`` will make pytest stop at the first failure it encounters - ``-s`` will make pytest display all the print messages (including those during scene generation, like DEBUG messages) - ``--skip_slow`` will skip the (arbitrarily) slow tests - ``--show_diff`` will show a visual comparison in case a unit test is failing. How it Works ~~~~~~~~~~~~ At the moment there are three types of tests: #. Unit Tests: Tests for most of the basic functionalities of manim. For example, there a test for ``Mobject``, that checks if it can be added to a Scene, etc. #. Graphical unit tests: Because ``manim`` is a graphics library, we test frames. To do so, we create test scenes that render a specific feature. When pytest runs, it compares the result of the test to the control data, either at 6 fps or just the last frame. If it matches, the tests pass. If the test and control data differ, the tests fail. You can use ``--show_diff`` flag with ``pytest`` to visually see the differences. The ``extract_frames.py`` script lets you see all the frames of a test. #. Videos format 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 the system (for reasons related to ffmpeg). Therefore, we only compare video configuration values, exported in .json. Architecture ------------ The ``manim/tests`` directory looks like this: :: . ├── conftest.py ├── control_data │ ├── graphical_units_data │ │ ├── creation │ │ │ ├── DrawBorderThenFillTest.npy │ │ │ ├── FadeInFromDownTest.npy │ │ │ ├── FadeInFromLargeTest.npy │ │ │ ├── FadeInFromTest.npy │ │ │ ├── FadeInTest.npy │ │ │ ├── ... │ │ ├── geometry │ │ │ ├── AnnularSectorTest.npy │ │ │ ├── AnnulusTest.npy │ │ │ ├── ArcBetweenPointsTest.npy │ │ │ ├── ArcTest.npy │ │ │ ├── CircleTest.npy │ │ │ ├── CoordinatesTest.npy │ │ │ ├── ... │ │ ├── graph │ │ │ ├── ... | | | | ... │ └── videos_data │ ├── SquareToCircleWithDefaultValues.json │ └── SquareToCircleWithlFlag.json ├── helpers │ ├── graphical_units.py │ ├── __init__.py │ └── video_utils.py ├── __init__.py ├── test_camera.py ├── test_config.py ├── test_copy.py ├── test_vectorized_mobject.py ├── test_graphical_units │ ├── conftest.py │ ├── __init__.py │ ├── test_creation.py │ ├── test_geometry.py │ ├── test_graph.py │ ├── test_indication.py │ ├── test_movements.py │ ├── test_threed.py │ ├── test_transform.py │ └── test_updaters.py ├── test_logging │ ├── basic_scenes.py │ ├── expected.txt │ ├── testloggingconfig.cfg │ └── test_logging.py ├── test_scene_rendering │ ├── conftest.py │ ├── __init__.py │ ├── simple_scenes.py │ ├── standard_config.cfg │ └── test_cli_flags.py └── utils ├── commands.py ├── __init__.py ├── testing_utils.py └── video_tester.py ... The Main Directories -------------------- - ``control_data/``: The directory containing control data. ``control_data/graphical_units_data/`` contains the expected and correct frame data for graphical tests, and ``control_data/videos_data/`` contains the .json files used to check videos. - ``test_graphical_units/``: Contains graphical tests. - ``test_scene_rendering/``: For tests that need to render a scene in some way, such as tests for CLI flags (end-to-end tests). - ``utils/``: Useful internal functions used by pytest. .. note:: fixtures are not contained here, they are in ``conftest.py``. - ``helpers/``: Helper functions for developers to setup graphical/video tests. Adding a New Test ----------------- Unit Tests ~~~~~~~~~~ Pytest determines which functions are tests by searching for files whose names begin with "test\_", and then within those files for functions beginning with "test" and classes beginning with "Test". These kinds of tests must be in ``tests/`` (e.g. ``tests/test_container.py``). Graphical Unit Test ~~~~~~~~~~~~~~~~~~~ The test must be written in the correct file (i.e. the file that corresponds to the appropriate category the feature belongs to) and follow the structure of unit tests. For example, to test the ``Circle`` VMobject which resides in ``manim/mobject/geometry.py``, add the CircleTest to ``test/test_geometry.py``. The name of the module is indicated by the variable __module_test__, that **must** be declared in any graphical test file. The module name is used to store the graphical control data. .. important:: You will need to use the ``frames_comparison`` decorator to create a test. The test function **must** accept a parameter named ``scene`` that will be used like ``self`` in a standard ``construct`` method. Here's an example in ``test_geometry.py``: .. code:: python from manim import * from manim.utils.testing.frames_comparison import frames_comparison __module_test__ = "geometry" @frames_comparison def test_circle(scene): circle = Circle() scene.play(Animation(circle)) The decorator can be used with or without parentheses. **By default, the test only tests the last frame. To enable multi-frame testing, you have to set ``last_frame=False`` in the parameters.** .. code:: python @frames_comparison(last_frame=False) def test_circle(scene): circle = Circle() scene.play(Animation(circle)) You can also specify, when needed, which base scene you need (ThreeDScene, for example) : .. code:: python @frames_comparison(last_frame=False, base_scene=ThreeDScene) def test_circle(scene): circle = Circle() scene.play(Animation(circle)) Feel free to check the documentation of ``@frames_comparison`` for more. Note that tests name must follow the syntax ``test_``, otherwise pytest will not recognize it as a test. .. warning:: If you run pytest now, you will get a ``FileNotFound`` error. This is because you have not created control data for your test. To create the control data for your test, you have to use the flag ``--set_test`` along with pytest. For the example above, it would be .. code-block:: bash pytest test_geometry.py::test_circle --set_test -s (``-s`` is here to see manim logs, so you can see what's going on). If you want to see all the control data frames (e.g. to make sure your test is doing what you want), use the ``extract_frames.py`` script. The first parameter is the path to a ``.npz`` file and the second parameter is the directory you want the frames created. The frames will be named ``frame0.png``, ``frame1.png``, etc. .. code-block:: bash python scripts/extract_frames.py tests/test_graphical_units/control_data/plot/axes.npz output Please make sure to add the control data to git as soon as it is produced with ``git add ``. Videos tests ~~~~~~~~~~~~ To test videos generated, we use the decorator ``tests.utils.videos_tester.video_comparison``: .. code:: python @video_comparison( "SquareToCircleWithlFlag.json", "videos/simple_scenes/480p15/SquareToCircle.mp4" ) def test_basic_scene_l_flag(tmp_path, manim_cfg_file, simple_scenes_path): scene_name = "SquareToCircle" command = [ "python", "-m", "manim", simple_scenes_path, scene_name, "-l", "--media_dir", str(tmp_path), ] out, err, exit_code = capture(command) assert exit_code == 0, err .. note:: ``assert exit*\ code == 0, err`` is used in case of the command fails to run. The decorator takes two arguments: json name and the path to where the video should be generated, starting from the ``media/`` dir. Note the fixtures here: - tmp_path is a pytest fixture to get a tmp_path. Manim will output here, according to the flag ``--media_dir``. - ``manim_cfg_file`` fixture that return a path pointing to ``test_scene_rendering/standard_config.cfg``. It's just to shorten the code, in the case multiple tests need to use this cfg file. - ``simple_scenes_path`` same as above, except for ``test_scene_rendering/simple_scene.py`` You have to generate a ``.json`` file first to be able to test your video. To do that, use ``helpers.save_control_data_from_video``. For instance, a test that will check if the l flag works properly will first require rendering a video using the -l flag from a scene. Then we will test (in this case, SquareToCircle), that lives in ``test_scene_rendering/simple_scene.py``. Change directories to ``tests/``, create a file (e.g. ``create\_data.py``) that you will remove as soon as you're done. Then run: .. code:: python save_control_data_from_video("", "SquareToCircleWithlFlag.json") Running this will save ``control_data/videos_data/SquareToCircleWithlFlag.json``, which will look like this: .. code:: json { "name": "SquareToCircleWithlFlag", "config": { "codec_name": "h264", "width": 854, "height": 480, "avg_frame_rate": "15/1", "duration": "1.000000", "nb_frames": "15" } } If you have any questions, please don't hesitate to ask on `Discord `_, in your pull request, or in an issue. ================================================ FILE: docs/source/contributing/docs/admonitions.rst ================================================ ================== Adding Admonitions ================== Adding Blocks for Tip, Note, Important etc. (Admonitions) --------------------------------------------------------- The following directives are called Admonitions. You can use them to point out additional or important information. Here are some examples: See also ~~~~~~~~ .. code-block:: rest .. seealso:: Some ideas at :mod:`~.tex_mobject`, :class:`~.Mobject`, :meth:`~.Mobject.add_updater`, :attr:`~.Mobject.depth`, :func:`~.make_config_parser` .. seealso:: Some ideas at :mod:`~.tex_mobject`, :class:`~.Mobject`, :meth:`~.Mobject.add_updater`, :attr:`~.Mobject.depth`, :func:`~.make_config_parser` .. index:: reST directives; note Note ~~~~ .. code-block:: rest .. note:: A note .. note:: A note Tip ~~~ .. code-block:: rest .. tip:: A tip .. tip:: A tip You may also use the admonition **hint**, but this is very similar and **tip** is more commonly used in the documentation. Important ~~~~~~~~~ .. code-block:: rest .. important:: Some important information which should be considered. .. important:: Some important information which should be considered. Warning ~~~~~~~ .. code-block:: rest .. warning:: Some text pointing out something that people should be warned about. .. warning:: Some text pointing out something that people should be warned about. You may also use the admonitions **caution** or even **danger** if the severity of the warning must be stressed. Attention ~~~~~~~~~ .. code-block:: rest .. attention:: A attention .. attention:: A attention You can find further information about Admonitions here: https://pradyunsg.me/furo/reference/admonitions/ ================================================ FILE: docs/source/contributing/docs/docstrings.rst ================================================ ================= Adding Docstrings ================= A docstring is a string literal that is used right after the definition of a module, function, class, or method. They are used to document our code. This page will give you a set of guidelines to write efficient and correct docstrings. Formatting the Docstrings ------------------------- Please begin the description of the class/function in the same line as the 3 quotes: .. code:: py def do_this(): """This is correct. (...) """ def dont_do_this(): """ This is incorrect. (...) """ NumPy Format ------------ The Manim Community uses numpy format for the documentation. Use the numpy format for sections and formatting - see https://numpydoc.readthedocs.io/en/latest/format.html. This includes: 1. The usage of ``Attributes`` to specify ALL ATTRIBUTES that a class can have and a brief (or long, if needed) description. Also, ``__init__`` parameters should be specified as ``Parameters`` **on the class docstring**, *rather than under* ``__init__``. Note that this 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 the class specifies no attributes at all. (See more on Parameters in number 2 of this list.) Example: .. code:: py class MyClass: """My cool class. Long or short (whatever is more appropriate) description here. Parameters ---------- name The class's name. id The class's id. mobj The mobject linked to this instance. Defaults to `Mobject()` \ (is set to that if `None` is specified). Attributes ---------- name The user's name. id The user's id. singleton Something. mobj The mobject linked to this instance. """ def __init__(name: str, id: int, singleton: MyClass, mobj: Mobject = None): ... 2. The usage of ``Parameters`` on functions to specify how every parameter works and what it does. This should be excluded if the function has no parameters. Note that you **should not** specify the default value of the parameter on the type. On the documentation render, this is already specified on the function's signature. If you need to indicate a further consequence of value omission or simply want to specify it on the docs, make sure to **specify it in the parameter's DESCRIPTION**. See an example on list item 4. .. note:: When documenting varargs (args and kwargs), make sure to document them by listing the possible types of each value specified, like this: :: Parameters ---------- args The args specified can be either an int or a float. kwargs The kwargs specified can only be a float. Note that, if the kwargs expect specific values, those can be specified in a section such as ``Other Parameters``: :: Other Parameters ---------------- kwarg_param_1 Parameter documentation here (etc) 3. The usage of ``Returns`` to indicate what is the type of this function's return value and what exactly it returns (i.e., a brief - or long, if needed - description of what this function returns). Can be omitted if the function does not explicitly return (i.e., always returns ``None`` because ``return`` is never specified, and it is very clear why this function does not return at all). In all other cases, it should be specified. See an example on list item 4. 4. The usage of ``Examples`` in order to specify an example of usage of a function **is highly encouraged** and, in general, should be specified for *every function* unless its usage is **extremely obvious**, which can be debatable. Even if it is, it's always a good idea to add an example in order to give a better orientation to the documentation user. Use the following format for Python code: .. code:: rst :: # python code here .. note:: Also, if this is a video- or animation-related change, please try to add an example GIF or video if possible for demonstration purposes. Make sure to be as explicit as possible in your documentation. We all want the users to have an easier time using this library. Example: .. code:: py def my_function( thing: int, other: np.ndarray, name: str, *, d: "SomeClassFromFarAway", test: Optional[int] = 45 ) -> "EpicClassInThisFile": # typings are optional for now """My cool function. Builds and modifies an :class:`EpicClassInThisFile` instance with the given parameters. Parameters ---------- thing Specifies the index of life. other Specifies something cool. name Specifies my name. d Sets thing D to this value. test Defines the number of times things should be tested. \ Defaults to 45, because that is almost the meaning of life. Returns ------- :class:`EpicClassInThisFile` The generated EpicClass with the specified attributes and modifications. Examples -------- Normal usage:: my_function(5, np.array([1, 2, 3]), "Chelovek", d=SomeClassFromFarAway(cool=True), test=5) """ # code... pass ================================================ FILE: docs/source/contributing/docs/examples.rst ================================================ =============== Adding Examples =============== This is a page for adding examples to the documentation. Here are some guidelines you should follow before you publish your examples. Guidelines for examples ----------------------- Everybody is welcome to contribute examples to the documentation. Since straightforward examples are a great resource for quickly learning manim, here are some guidelines. What makes a great example -------------------------- .. note:: As soon as a new version of manim is released, the documentation will be a snapshot of that version. Examples contributed after the release will only be shown in the latest documentation. * Examples should be ready to copy and paste for use. * Examples should be brief yet still easy to understand. * Examples don't require the ``from manim import *`` statement, this will be added automatically when the docs are built. * There should be a balance of animated and non-animated examples. - As manim makes animations, we can include lots of animated examples; however, our RTD has a maximum 20 minutes to build. Animated examples should only be used when necessary, as last frame examples render faster. - Lots of examples (e.g. size of a plot-axis, setting opacities, making texts, etc.) will also work as images. It is a lot more convenient to see the end product immediately instead of waiting for an animation to reveal it. * Please ensure the examples run on the current main branch when you contribute an example. * If the functions used are confusing for people, make sure to add comments in the example to explain what they do. How examples are structured --------------------------- * Examples can be organized into chapters and subchapters. - When you create examples, the beginning example chapter should focus on only one functionality. When the functionality is simple, multiple ideas can be illustrated under a single example. - As soon as simple functionalities are explained, the chapter may include more complex examples which build on the simpler ideas. Writing examples ~~~~~~~~~~~~~~~~ When you want to add/edit examples, they can be found in the ``docs/source/`` directory, or directly in the manim source code (e.g. ``manim/mobject/mobject.py``). The examples are written in ``rst`` format and use the manim directive (see :mod:`manim.utils.docbuild.manim_directive` ), ``.. manim::``. Every example is in its own block, and looks like this: .. code:: rst Formulas ======== .. manim:: Formula1 :save_last_frame: class Formula1(Scene): def construct(self): t = MathTex(r"\int_a^b f'(x) dx = f(b) - f(a)") self.add(t) self.wait(1) In the building process of the docs, all ``rst`` files are scanned, and the manim directive (``.. manim::``) blocks are identified as scenes that will be run by the current version of manim. Here is the syntax: * ``.. manim:: [SCENE_NAME]`` has no indentation and ``SCENE_NAME`` refers to the name of the class below. * The flags are followed in the next line (no blank line here!), with the indentation level of one tab. All possible flags can be found at :mod:`manim.utils.docbuild.manim_directive`. In the example above, the ``Formula1`` following ``.. manim::`` is the scene that the directive expects to render; thus, in the python code, the class has the same name: ``class Formula1(Scene)``. .. note:: Sometimes, when you reload an example in your browser, it has still the old website somewhere in its cache. If this is the case, delete the website cache, or open a new incognito tab in your browser, then the latest docs should be shown. **Only for locally built documentation:** If this still doesn't work, you may need to delete the contents of ``docs/source/references`` before rebuilding the documentation. ================================================ FILE: docs/source/contributing/docs/references.rst ================================================ ================= Adding References ================= Reference to types in documentation ----------------------------------- Always specify types with the correct **role** (see https://www.sphinx-doc.org/en/1.7/domains.html#python-roles) for the sake of proper rendering. E.g.: Use ``:class:`int``` to refer to an int type, and in general ``:class:``​`` to refer to a certain class (see ``Path specification`` below). See after for more specific instructions. Path specifications ~~~~~~~~~~~~~~~~~~~ 1. If it's on stdlib: Use ```` directly. If it's a class, just the name is enough. If it's a method (``:meth:``) or attribute (``:attr:``), dotted names may be used (e.g. ``:meth:`str.to_lower`​``). Example: ``:class:`int`​``, ``:class:`str`​``, ``:class:`float`​``, ``:class:`bool`​`` 2. If it's on the same file as the docstring or, for methods and attributes, under the same class, then the name may also be specified directly. Example: ``:class:`MyClass`​`` referring to a class in the same file; ``:meth:`push`​`` referring to a method in the same class; ``:meth:`MyClass.push`​`` referring to a method in a different class in the same file; ``:attr:`color`​`` referring to an attribute in the same class; ``:attr:`MyClass.color`​`` referring to an attribute in a different class in the same file. 3. If it's on a different file, then you may either use the full dotted name (e.g. ``~manim.animations.Animation``) or simply use the shortened 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 displays just ``Animation`` instead of the full location in the rendering. It can be removed for disambiguation purposes only. Example: ``:class:`~.Animation`​``, ``:meth:`~.VMobject.set_color`​``, ``:attr:`~.VMobject.color`​`` 4. If it's a class from a different module, specify the full dotted syntax. Example: ``:class:`numpy.ndarray`​`` for a numpy ndarray. Reference type specifications ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **The following instructions refer to types of attributes, parameters, and return values.** When specifying a type mid-text, it does not necessarily 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 jump to the related documentation. 1. Class names should be wrapped in ``:class:`path_goes_here`​``. See examples in the subsection above. 2. Method names should be wrapped in ``:meth:`path_goes_here`​``. See examples in the subsection above. 3. Attribute names should be wrapped in ``:attr:`path_goes_here`​``. See examples in the subsection above. 4. If ``None`` can also be specified, use ``Optional[type]``, where ``type`` must follow the guidelines in the current section. Example: ``Optional[:class:`str`]`` means you can either specify a ``str`` or ``None``. 5. If more than one type is possible, use ``Union[type_1, type_2, (...), type_n]``, where all the ``type_n`` must follow the guidelines in the current section. Note that, if one of these types is ``None``, then the Union should be wrapped with ``Optional`` instead. Example: ``Union[:class:`str`, :class:`int`]`` for either ``str`` or ``int``. ``Optional[Union[:class:`int`, :class:`bool`]]`` for either ``int``, ``bool`` or ``None``. 6. **Dictionaries:** Use ``Dict[key_type, value_type]``, where ``key_type`` and ``value_type`` must follow the guidelines in the current section. Example: ``Dict[:class:`str`, :class:`~.Mobject`]`` is a dictionary that maps strings to Mobjects. ``Dict[:class:`str`, Union[:class:`int`, :class:`MyClass`]]`` is a dictionary that maps a string to either an int or an instance of ``MyClass``. 7. **If the parameter is a list:** Note that it is very rare to require the parameter to be exactly a ``list`` type. One could usually specify a ``tuple`` instead, for example. So, in order to cover all cases, consider: 1. If the parameter only needs to be an ``Iterable``, i.e., if the function only requires being able to iterate over this parameter's value (e.g. can be a ``list``, ``tuple``, ``str``, but also ``zip()``, ``iter()`` and so on), then specify ``Iterable[type_here]``, where ``type_here`` is the type of the iterable's yielded elements and should follow the format in the present section (``Type specifications``). Example: ``Iterable[:class:`str`]`` for any iterable of strings; ``Iterable[:class:`~.Mobject`]`` for an iterable of Mobjects; etc. 2. If you require being able to index the parameter (i.e. ``x[n]``) or retrieve its length (i.e. ``len(x)``), or even just pass it to a function that requires any of those, then specify ``Sequence``, which allows any list-like object to be specified (e.g. ``list``, ``tuple``...) Example: ``Sequence[:class:`str`]`` for a sequence of strings; ``Sequence[Union[:class:`str`, :class:`int`]]`` for a sequence of integers or strings. 3. If you EXPLICITLY REQUIRE it to be a ``list`` for some reason, then use ``List[type]``, where ``type`` is the type that any element in the list will have. It must follow the guidelines in the current section. 8. **If the return type is a list or tuple:** Specify ``List[type]`` for a list, ``Tuple[type_a, type_b, (...), type_n]`` for a tuple (if the elements are all different) or ``Tuple[type, ...]`` (if all elements have the same type). Each ``type_n`` on those representations corresponds to elements in the returned list/tuple and must follow the guidelines in the current section. Example: ``List[Optional[:class:`str`]]`` for a list that returns elements that are either a ``str`` or ``None``; ``Tuple[:class:`str`, :class:`int`]`` for a tuple of type ``(str, int)``; ``Tuple[:class:`int`, ...]`` for a tuple of variable length with only integers. ================================================ FILE: docs/source/contributing/docs/types.rst ================================================ =================== Choosing Type Hints =================== In order to provide the best user experience, it's important that type hints are chosen correctly. With the large variety of types provided by Manim, choosing which one to use can be difficult. This guide aims to aid you in the process of choosing the right type for the scenario. The first step is figuring out which category your type hint fits into. Coordinates ----------- Coordinates encompass two main categories: points, and vectors. Points ~~~~~~ The purpose of points is pretty straightforward: they represent a point in space. For example: .. code-block:: python def print_point2D(coord: Point2DLike) -> None: x, y = coord print(f"Point at {x=},{y=}") def print_point3D(coord: Point3DLike) -> None: x, y, z = coord print(f"Point at {x=},{y=},{z=}") def print_point_array(coords: Point2DLike_Array | Point3DLike_Array) -> None: for coord in coords: if len(coord) == 2: # it's a Point2DLike print_point2D(coord) else: # it's a Point3DLike print_point3D(coord) def shift_point_up(coord: Point3DLike) -> Point3D: result = np.asarray(coord) result += UP print(f"New point: {result}") return result Notice that the last function, ``shift_point_up()``, accepts a :class:`~.Point3DLike` as a parameter and returns a :class:`~.Point3D`. A :class:`~.Point3D` always represents a NumPy array consisting of 3 floats, whereas a :class:`~.Point3DLike` can represent anything resembling a 3D point: either a NumPy array or a tuple/list of 3 floats, hence the ``Like`` word. The same happens with :class:`~.Point2D`, :class:`~.Point2D_Array` and :class:`~.Point3D_Array`, and their ``Like`` counterparts :class:`~.Point2DLike`, :class:`~.Point2DLike_Array` and :class:`~.Point3DLike_Array`. The rule for typing functions is: **make parameter types as broad as possible, and return types as specific as possible.** Therefore, for functions which are intended to be called by users, **we should always, if possible, accept** ``Like`` **types as parameters and return NumPy, non-** ``Like`` **types.** The main reason is to be more flexible with users who might want to pass tuples or lists as arguments rather than NumPy arrays, because it's more convenient. The last function, ``shift_point_up()``, is an example of it. Internal functions which are *not* meant to be called by users may accept non-``Like`` parameters if necessary. Vectors ~~~~~~~ Vectors share many similarities to points. However, they have a different connotation. Vectors should be used to represent direction. For example, consider this slightly contrived function: .. code-block:: python M = TypeVar("M", bound=Mobject) # allow any mobject def shift_mobject(mob: M, direction: Vector3D, scale_factor: float = 1) -> M: return mob.shift(direction * scale_factor) Here we see an important example of the difference. ``direction`` should not be typed as a :class:`~.Point3D`, because it represents a direction along which to shift a :class:`~.Mobject`, not a position in space. As a general rule, if a parameter is called ``direction`` or ``axis``, it should be type hinted as some form of :class:`~.VectorND` or :class:`~.VectorNDLike`. Colors ------ The interface Manim provides for working with colors is :class:`.ManimColor`. The main color types Manim supports are RGB, RGBA, and HSV. You will want to add type hints to a function depending on which type it uses. If any color will work, you will need something like: .. code-block:: python if TYPE_CHECKING: from manim.utils.color import ParsableManimColor # type hint stuff with ParsableManimColor Béziers ------- Manim internally represents a :class:`.Mobject` by a collection of points. In the case of :class:`.VMobject`, the most commonly used subclass of :class:`.Mobject`, these points represent Bézier curves, which are a way of representing a curve using a sequence of points. .. note:: To learn more about Béziers, take a look at https://pomax.github.io/bezierinfo/ Manim supports two different renderers, which each have different representations of Béziers: Cairo uses cubic Bézier curves, while OpenGL uses quadratic Bézier curves. Type hints like :class:`~.typing.BezierPoints` represent a single bezier curve, and :class:`~.typing.BezierPath` represents multiple Bézier curves. A :class:`~.typing.Spline` is when the Bézier curves in a :class:`~.typing.BezierPath` forms a single connected curve. Manim also provides more specific type aliases when working with quadratic or cubic curves, and they are prefixed with their respective type (e.g. :class:`~.typing.CubicBezierPoints`, is a :class:`~.typing.BezierPoints` consisting of exactly 4 points representing a cubic Bézier curve). Functions --------- Throughout the codebase, many different types of functions are used. The most obvious example is a rate function, which takes in a float and outputs a float (``Callable[[float], float]``). Another example is for overriding animations. One will often need to map a :class:`.Mobject` to an overridden :class:`.Animation`, and for that we have the :class:`~.typing.FunctionOverride` type hint. :class:`~.typing.PathFuncType` and :class:`~.typing.MappingFunction` are more niche, but are related to moving objects along a path, or applying functions. If you need to use it, you'll know. Images ------ There are several representations of images in Manim. The most common is the representation as a NumPy array of floats representing the pixels of an image. This is especially common when it comes to the OpenGL renderer. This is the use case of the :class:`~.typing.PixelArray` type hint. Sometimes, Manim may use ``PIL.Image.Image``, which is not the same as :class:`~.typing.PixelArray`. In this case, use the ``PIL.Image.Image`` typehint. Of course, if a more specific type of image is needed, it can be annotated as such. ================================================ FILE: docs/source/contributing/docs/typings.rst ================================================ ================== Typing Conventions ================== .. warning:: This section is still a work in progress. Adding type hints to functions and parameters --------------------------------------------- Manim is currently in the process of adding type hints into the library. In this section, you will find information about the standards used and some general guidelines. If you've never used type hints before, this is a good place to get started: https://realpython.com/python-type-checking/#hello-types. Typing standards ~~~~~~~~~~~~~~~~ Manim uses `mypy`_ to type check its codebase. You will find a list of configuration values in the ``mypy.ini`` configuration file. To be able to use the newest typing features not available in the lowest supported Python version, make use of `typing_extensions`_. To be able to use the new Union syntax (``|``) and builtins subscripting, use the ``from __future__ import annotations`` import. .. _mypy: https://mypy-lang.org/ .. _typing_extensions: https://pypi.org/project/typing-extensions/ Typing guidelines ~~~~~~~~~~~~~~~~~ * Manim has a dedicated :mod:`~.typing` module where type aliases are provided. Most of them may seem redundant, in particular the ones related to ``numpy``. This is in anticipation of the support for shape type hinting (`related issue `_). Besides the pending shape support, using the correct type aliases will help users understand which shape should be used. * For typings of generic collections, check out `this `_ link. * Always use a type hint of ``None`` for functions that does not return a value (this also applies to ``__init__``), e.g.: .. code:: py def height(self, value) -> None: self.scale_to_fit_height(value) * For variables representing paths, use the ``StrPath`` or ``StrOrBytesPath`` type alias defined in the :mod:`~.typing` module. * ``*args`` and ``**kwargs`` shouldn't be left untyped (in most cases you can use ``Any``). * Following `PEP 484 `_, use ``float`` instead of ``int | float``. * Use ``x | y`` instead of ``Union[x, y]`` * Mobjects have the typehint ``Mobject``, e.g.: .. code:: py def match_color(self, mobject: "Mobject"): """Match the color with the color of another :class:`~.Mobject`.""" return self.set_color(mobject.get_color()) * Always parametrize generics (``list[int]`` instead of ``list``, ``type[Any]`` instead of ``type``, etc.). This also applies to callables. .. code:: py rate_func: Callable[[float], float] = lambda t: smooth(1 - t) * Use ``TypeVar`` when you want to "link" type hints as being the same type. Consider ``Mobject.copy``, which returns a new instance of the same class. It would be type-hinted as: .. code:: py T = TypeVar("T") def copy(self: T) -> T: ... * Use ``typing.Iterable`` whenever the function works with *any* iterable, not a specific type. * Prefer ``numpy.typing.NDArray`` over ``numpy.ndarray`` .. code:: py import numpy as np if TYPE_CHECKING: import numpy.typing as npt def foo() -> npt.NDArray[float]: return np.array([1, 0, 1]) * If a method returns ``self``, use ``typing_extensions.Self``. .. code:: py if TYPE_CHECKING: from typing_extensions import Self class CustomMobject: def set_color(self, color: ManimColor) -> Self: ... return self * If the function returns a container of a specific length each time, consider using ``tuple`` instead of ``list``. .. code:: py def foo() -> tuple[float, float, float]: return (0, 0, 0) * If a function works with a parameter as long as said parameter has a ``__getitem__``, ``__iter___`` and ``__len__`` method, the typehint of the parameter should be ``collections.abc.Mapping``. If it also supports ``__setitem__`` and/or ``__delitem__``, it should be marked as ``collections.abc.MutableMapping``. * Typehinting something as ``object`` means that only attributes available on every Python object should be accessed, like ``__str__`` and so on. On the other hand, literally any attribute can be accessed on a variable with the ``Any`` typehint - it's more freeing than the ``object`` typehint, and makes mypy stop typechecking the variable. Note that whenever possible, try to keep typehints as specific as possible. * If objects are imported purely for type hint purposes, keep it under an ``if typing.TYPE_CHECKING`` guard, to prevent them from being imported at runtime (helps library performance). Do not forget to use the ``from __future__ import annotations`` import to avoid having runtime ``NameError`` exceptions. .. code:: py from typing import TYPE_CHECKING if TYPE_CHECKING: from manim.typing import Vector3D # type stuff with Vector3D Missing Sections for typehints are: ----------------------------------- * Mypy and numpy import errors: https://realpython.com/python-type-checking/#running-mypy * Explain ``mypy.ini`` (see above link) ================================================ FILE: docs/source/faq/general.md ================================================ # FAQ: General Usage ## Why does Manim say that "there are no scenes inside that module"? There are two main reasons why this error appears: if you have edited the file containing your `Scene` class and forgot to save it, or if you have accidentally passed the name of a wrong file to `manim`, this is a likely outcome. Check that you have spelled everything correctly. Otherwise, you are likely mixing up Manim versions. See {ref}`this FAQ answer ` for an explanation regarding why there are different versions. Under the assumption that you are trying to use the `manim` executable from the terminal to run a scene that has been written for the community version (i.e., there is `from manim import *`, or more specifically `from manim import Scene`), then this error indicates that the `manim` executable has been overwritten by the one provided by `manimgl` (unfortunately, both `manim` and `manimgl` provide a `manim` executable). You can check whether this is the case by running `manim --version`, the output of the community maintained version starts with `Manim Community v...`. If this is not the case, you are running `manimgl`. You can resolve this by either of the following steps: - Un- and reinstalling `manim`, - using the `manimce` executable in place of the `manim` one, - or replacing the call to the executable with a direct call to the Python module via `python -m manim`. --- ## No matter what code I put in my file, Manim only renders a black frame! Why? If you are using the usual pattern to write a `Scene`, i.e., ```python class MyAwesomeScene(Scene): def construct(self): ... # your animation code ``` then double check whether you have spelled `construct` correctly. If the method containing your code is not called `construct` (or if you are not calling a different, custom method from `construct`), Manim will not call your method and simply output a black frame. --- ## What are the default measurements for Manim's scene? The scene measures 8 units in height and has a default ratio of 16:9, which means that it measures {math}`8 \cdot 16 / 9 = 14 + 2/9` units in width. The origin is in the center of the scene, which means that, for example, the upper left corner of the scene has coordinates `[-7-1/9, 4, 0]`. --- ## How do I find out which keyword arguments I can pass when creating a `Mobject`? Let us consider a specific example, like the {class}`.Circle` class. When looking at its documentation page, only two specific keyword arguments are listed (`radius`, and `color`). Besides these concrete arguments, there is also a catchall `**kwargs` argument which captures all other arguments that are passed to `Circle`, and passes them on to the base class of {class}`.Circle`, {class}`.Arc`. The same holds for {class}`.Arc`: some arguments are explicitly documented, and there is again a catchall `**kwargs` argument that passes unprocessed arguments to the next base class -- and so on. The most important keyword arguments relevant to styling your mobjects are the ones that are documented for the base classes {class}`.VMobject` and {class}`.Mobject`. --- ## Can Manim render a video with transparent background? Yes: simply pass the CLI flag `-t` (or its long form `--transparent`). Note that the default video file format does not support transparency, which is why Manim will output a `.mov` instead of a `.mp4` when rendering with a transparent background. Other movie file formats that support transparency can be obtained by passing `--format=webm` or `--format=gif`. --- ## I have watched a video where a creator ran command X, but it does not work for me. Why? The video you have been watching is likely outdated. If you want to follow along, you either need to use the same version used in the video, or modify the code (in many cases it is just a method having been renamed etc.) accordingly. Check the video description, in some cases creators point out whether changes need to be applied to the code shown in the video. --- ## When using `Tex` or `MathTex`, some letters are missing. How can I fix this? It is possible that you have to (re)build some fonts used by LaTeX. For some distributions, you can do this manually by running ```bash fmtutil -sys --all ``` We recommend consulting the documentation of your LaTeX distribution for more information. --- ## I want to translate some code from `manimgl` to `manim`, what do I do with `CONFIG` dictionaries? The community-maintained version has dropped the use of `CONFIG` dictionaries very early, with {doc}`version v0.2.0 ` released in January 2021. Before that, Manim's classes basically processed `CONFIG` dictionaries by mimicking inheritance (to properly process `CONFIG` dictionaries set by parent classes) and then assigning all of the key-value-pairs in the dictionary as attributes of the corresponding object. In situations where there is not much inheritance going on, or for any custom setting, you should set these attributes yourself. For example, for an old-style `Scene` with custom attributes like ```python class OldStyle(Scene): CONFIG = {"a": 1, "b": 2} ``` should be written as ```python class NewStyle(Scene): a = 1 b = 2 ``` In situations where values should be properly inherited, the arguments should be added to the initialization function of the class. An old-style mobject `Thing` could look like ```python class Thing(VMobject): CONFIG = { "stroke_color": RED, "fill_opacity": 0.7, "my_awesome_argument": 42, } ``` where `stroke_color` and `fill_opacity` are arguments that concern the parent class of `Thing`, and `my_awesome_argument` is a custom argument that only concerns `Thing`. A version without `CONFIG` could look like this: ```python class Thing(VMobject): def __init__( self, stroke_color=RED, fill_opacity=0.7, my_awesome_argument=42, **kwargs ): self.my_awesome_argument = my_awesome_argument super().__init__(stroke_color=stroke_color, fill_opacity=fill_opacity, **kwargs) ``` --- ## My installation does not support converting PDF to SVG, help? This is an issue with `dvisvgm`, the tool shipped with LaTeX that transforms LaTeX output to a `.svg` file that Manim can parse. First, make sure your ``dvisvgm`` version is at least 2.4 by checking the output of ```bash dvisvgm --version ``` If you do not know how to update `dvisvgm`, please refer to your LaTeX distributions documentation (or the documentation of your operating system, if `dvisvgm` was installed as a system package). Second, check whether your ``dvisvgm`` supports PostScript specials. This is needed to convert from PDF to SVG. Run: ```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 ```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 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, also probably in `C:\windows\system32`) or `libgsl.dylib` (on MacOS, 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. When you have found the library, try (on MacOS or Linux) ```bash export LIBGS= dvisvgm -l ``` or (on Windows) ```bat set LIBGS= dvisvgm -l ``` 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 ```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 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/). --- ## Where can I find more resources for learning Manim? In our [Discord server](https://manim.community/discord), we have the community-maintained `#beginner-resources` channel in which links to helpful learning resources are collected. You are welcome to join our Discord and take a look yourself! If you have found some guides or tutorials yourself that are not on our list yet, feel free to add them! ================================================ FILE: docs/source/faq/help.md ================================================ # FAQ: Getting Help ## How do I animate X? Why do I get error Y? Can someone help me? Before asking the community, please make sure that the issue you are having is not already discussed in our {doc}`FAQ section ` sufficiently well so that you can resolve the problem yourself. You can also try to use your favorite search engine, if you are lucky you might find a blog post, a question on [StackOverflow](https://stackoverflow.com/questions/tagged/manim), or a post in the [r/manim subreddit](https://reddit.com/r/manim). If this is not the case, please take a moment to properly prepare your question: the better you manage to explain what exactly it is you are struggling with, the more efficient people will be able to help you. Regardless of the platform you choose in the next step, StackOverflow has a good guide on [asking good questions](https://stackoverflow.com/help/how-to-ask). As soon as you have a good idea of what exactly you want to ask, pick one of the following communication channels: - The community is most active [in our Discord server](https://manim.community/discord/). Click the link to join, then pick one of the `#manim-help` channels in the sidebar, and post your question there. If you are comfortable with using Discord, try to search for your problem using the search function of our server; perhaps people have been talking about it before! - We are also monitoring questions on [StackOverflow](https://stackoverflow.com/questions/tagged/manim) that are tagged with `manim`. - Many people are also active in our [r/manim subreddit](https://reddit.com/r/manim), feel free to post there if you are an avid Redditor -- but be aware that Discord or StackOverflow might be better choices. - And finally, you can also start a new [discussion on GitHub](https://github.com/ManimCommunity/manim/discussions) if you dislike all other options. In all of these channels, please make sure to abide by Manim's {doc}`Code of Conduct ` -- in short, be *excellent* to one another: be friendly and patient, considerate, and respectful. --- ## What should I do if nobody answers my question? Try and see whether your question can be improved: did you include all relevant information (in case of errors: the full stack trace, the code that you were rendering, and the command you used to run Manim?). In case you used a very long example, is it possible to construct a more minimal version that has the same (faulty) behavior? If you posted in one of our help channels on Discord and your question got buried, you are allowed to ping the `@Manim Helper` role to bring it to the attention of the volunteers who are willing to take a look. Please refrain from pinging the role immediately when asking your question for the first time, this is considered impolite. You can also try to post your question to a different channel if you feel that you are not having any success with your initial choice -- but please do not spam your question in all of our communication channels (and in particular for Discord: please don't use multiple help channels at once). In the end, it is as for most open-source projects: our community members are volunteers. If you do not receive a quick answer to your question, it may be because nobody knows the answer, or because your question is not clear enough, or it could be that everyone who can help you with your problem is busy doing other things. --- ## The library does not behave as documented, or something broke in a new release. What should I do? Sounds like you have found a bug. One of the best ways of contributing to the development of Manim is by reporting it! Check our list of known issues and feature requests [in our GitHub repository](https://github.com/ManimCommunity/manim/issues). If the problem you have found is not listed there yet (use the search function; also check whether there is a corresponding closed issue, it is possible that your problem has already been resolved and will be fixed with the next release), please consider the following steps to submit a new issue. ```{note} If you are unsure whether or not you should file a new issue for some odd behavior that you found, feel free to ask the community developers, preferably in one of our `#manim-dev` channels in [our Discord](https://manim.community/discord/). ``` 1. Make sure you are running the latest released version of Manim, your problem might otherwise already be fixed in a more recent version. Check the {doc}`/changelog` for a full list of changes between Manim releases. 2. Choose the correct category for your report when [creating a new issue](https://github.com/ManimCommunity/manim/issues/new/choose). We have dedicated issue templates for *bug reports*, *feature requests*, and *installation issues*. If your report falls into one of these categories, read the issue template carefully! Instructions are given in the `` sections of the text field. If you want to suggest a new feature without concrete implementation details, see {ref}`the instructions given in this answer `. 3. For bug reports: prepare a minimal example that can be used to illustrate the issue. Examples with hundreds of lines are very inefficient and tedious to debug. Your problem needs to be reproducible for others, so please make sure to prepare a suitable example. 4. This is mentioned in the bug report template as well, but it is very important: if you report that some code raises an error, make sure to include the full terminal output, from the command you used to run the library up to and including the last line with the error message. Read carefully: if the message mentions that there is another relevant log file, include this other file as well! --- (creating-suggestions)= ## I have an idea for a really cool feature that should be implemented, where should I share my idea? New suggestions and proposals should be made by [creating a new discussion](https://github.com/ManimCommunity/manim/discussions/new?category=suggestions-and-proposals) in the [*Suggestions and Proposals* category](https://github.com/ManimCommunity/manim/discussions/categories/suggestions-and-proposals) in our GitHub repository. Once the raw idea has been formed into a more concrete, implementable proposal that is supported by the community, and someone has expressed interest in working on the new feature, a corresponding [issue](https://github.com/ManimCommunity/manim/issues) will be created. Do **not** create issues for suggesting new features directly, they will be closed down. ================================================ FILE: docs/source/faq/index.rst ================================================ Frequently Asked Questions ========================== .. toctree:: :caption: Table of Contents :maxdepth: 2 :glob: * ================================================ FILE: docs/source/faq/installation.md ================================================ # FAQ: Installation (different-versions)= ## Why are there different versions 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, 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 documented on this website. In early 2021, Grant merged the shaders branch back into master, making it the default branch in his repository -- and this is what `manimgl` is. The old version, before merging the `shaders` branch is sometimes referred to as `ManimCairo` and is, at this point, only useful for one singular purpose: rendering Grant's old videos locally on your machine. It is still available in his GitHub repository in form of the `cairo-backend` branch. To summarize: - [**Manim**, or **ManimCE**](https://manim.community) refers to the community maintained version of the library. This is the version documented on this website; the package name on PyPI is [`manim`](https://pypi.org/project/manim/). - [ManimGL](https://github.com/3b1b/manim) is the latest released version of the version of the library developed by Grant "3b1b" Sanderson. It has more experimental features and breaking changes between versions are not documented. Check out its documentation [here](https://3b1b.github.io/manim/index.html); on PyPI the package name is [`manimgl`](https://pypi.org/project/manimgl/). - [ManimCairo](https://github.com/3b1b/manim/tree/cairo-backend) is the name that is sometimes used for the old, pre-OpenGL version of `manimgl`. The latest version of it is available [on PyPI as `manimlib`](https://pypi.org/project/manimgl/), but note that if you intend to use it to compile some old project of Grant, you will likely have to install the exact version from the time the project was created from source. --- ## Which version should I use? We recommend the community maintained version especially for beginners. It has been developed to be more stable, better tested and documented (!), and quicker to respond to community contributions. It is also perfectly reasonable to start learning with the community maintained version and then switch to a different version later on. If you do not care so much about documentation or stability, and would like to use the exact same version that Grant is using, then use ManimGL. And as mentioned above, ManimCairo should only be used for (re)rendering old 3Blue1Brown projects (basically 2019 and before). --- ## What are the differences between Manim, ManimGL, ManimCairo? Can I tell for which version a scene was written for? You can! The thing that usually gives it away is the `import` statement at the top of the file; depending on how the code imports Manim you can tell for which version of the code it was written for: - If the code imports from `manim` (i.e., `from manim import *`, `import manim as mn`, etc.), then the code you are reading is supposed to be run with the community maintained version. - If the import reads `import manimlib` (or `from manimlib import *`), you are likely reading a file to be rendered with ManimGL. - And if the import reads `from manimlib.imports import *`, or perhaps even `from big_ol_pile_of_manim_imports import *` you are reading a snippet that is supposed to be rendered with an early, or very early version of ManimCairo, respectively. --- ## How do I know which version of Manim I have installed? Assuming you can run `manim` in your terminal and there is some output, check the first line of the text being produced. If you are using the community maintained version, the first line of any output will be `Manim Community `. If it does not say that, you are likely using ManimGL. You can also check the list of packages you have installed: if typing `python` in your terminal spawns the interpreter that corresponds to the Python installation you use (might also be `py`, or `python3`, depending on your operating system), running `python -m pip list` will print a list of all installed packages. Check whether `manim` or `manimgl` appear in that list. Similarly, you can use `python -m pip install ` and `python -m pip uninstall ` to install and uninstall packages from that list, respectively. --- ## I am following the video guide X to install Manim, but some step fails. What do I do? It is only natural that there are many video guides on installing Manim out there, given that Manim is a library used for creating videos. Unfortunately however, (YouTube) videos can't be updated easily (without uploading a new one, that is) when some step in the installation process changes, and so there are many **severely outdated** resources out there. This is why we strongly recommend following our {doc}`written installation guide ` to guide you through the process. In case you prefer using a video guide regardless, please check whether the creator whose guide you have been watching has made a more recent version available, and otherwise please contact them directly. Asking for help in the community will likely lead to being suggested to follow our written guide. --- ## Why does ManimPango fail to install when running `pip install manim`? This most likely means that pip was not able to use our pre-built wheels of the `manimpango` dependency. Let us know (via [Discord](https://www.manim.community/discord/) or by opening a [new issue on GitHub](https://github.com/ManimCommunity/ManimPango/issues/new)) which architecture you would like to see supported, and we'll see what we can do about it. To fix errors when installing `manimpango`, you need to make sure you have all the necessary build requirements. Check out the detailed instructions given in [the BUILDING section](https://github.com/ManimCommunity/ManimPango#BUILDING) of [ManimPango's README](https://github.com/ManimCommunity/ManimPango). --- (not-on-path)= ## I am using Windows and get the error `X is not recognized as an internal or external command, operable program or batch file` If you have followed {doc}`our local installation instructions ` and have not activated the corresponding virtual environment, make sure to use `uv run manim ...` instead of just `manim` (or activate the virtual environment by following the instructions printed when running `uv venv`). Otherwise there is a problem with the directories where your system is looking for executables (the `PATH` variable). If `python` is recognized, you can try running commands by prepending `python -m`. That is, `manim` becomes `python -m manim`, and `pip` becomes `python -m pip`. Otherwise see [this StackExchange answer](https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path/143121#143121) to get help with editing the `PATH` variable manually. --- ## I have tried using Chocolatey (`choco install manimce`) to install Manim, but it failed! Make sure that you were running the command with administrator permissions, otherwise there can be problems. If this is not the issue, read Chocolatey's output carefully, it should mention a `.log` file containing information why the process failed. You are welcome to take this file (and any other input you feel might be relevant) and submit it to Manim's community to ask for help with your problem. See the {doc}`FAQ on getting help ` for instructions. --- ## On Windows, when typing `python` or `python3` the Windows store is opened, can I fix this? Yes: you can remove these aliases with these steps: 1. Go to the Windows Setting. 2. Under *Apps and Features* you will find application execution aliases. 3. Within this menu, disable the alias(es) that are causing the issue (`python` and/or `python3`). --- ## I am using Anaconda and get an `ImportError` mentioning that some Symbol is not found. This is because Anaconda environments come with their own preinstalled version of `cairo` which is not compatible with the version of `pycairo` required by Manim. Usually it can be fixed by running ```bash conda install -c conda-forge pycairo ``` --- ## How can I fix the error that `manimpango/cmanimpango.c` could not be found when trying to install Manim? This occasionally happens when your system has to build a wheel for [ManimPango](https://github.com/ManimCommunity/ManimPango) locally because there is no compatible version for your architecture available on PyPI. Very often, the problem is resolved by installing Cython (e.g., via `pip3 install Cython`) and then trying to reinstall Manim. If this does not fix it: - Make sure that you have installed all build dependencies mentioned in [ManimPango's README](https://github.com/ManimCommunity/ManimPango), - and if you still run into troubles after that, please reach out to us as described in the {doc}`Getting Help FAQs `. ================================================ FILE: docs/source/faq/internals.md ================================================ # Where can I learn more about Manim's internal structure? Efforts to document the internal structure of Manim is ongoing on our [wiki](https://github.com/ManimCommunity/manim/wiki/Developer-documentation-(WIP)). Keep in mind that since this is a work in progress, the information you find may be incomplete, outdated or even wrong. Still, it should serve as a good starting point. The wiki is open for anyone to edit, feel free to add information or even questions directly on the wiki pages. ================================================ FILE: docs/source/faq/opengl.md ================================================ # FAQ: OpenGL rendering ## Are there any resources on how the OpenGL renderer in the community maintained version can be used? Yes. Unfortunately, at this point, the official online documentation does not contain the relevant base classes like `OpenGLMobject` and `OpenGLVMobject` or specific OpenGL classes like `OpenGLSurface`, but documentation for some of them is available in form of docstrings [in the source code](https://github.com/ManimCommunity/manim/tree/main/manim/mobject/opengl). Furthermore, [this user guide by *aquabeam*](https://www.aquabeam.me/manim/opengl_guide/) can be helpful to get started using the OpenGL renderer. --- ## I am trying to run an interactive scene with `--renderer=opengl` and `Scene.interactive_embed`, but an error (`sqlite3.ProgrammingError`) is raised. How can I fix this? This seems to be an issue with a recent IPython release, in our experience it helps to downgrade the installed `IPython` package to `8.0.1`: `pip install IPython==8.0.1`. ================================================ FILE: docs/source/guides/add_voiceovers.rst ================================================ ########################### Adding Voiceovers to Videos ########################### Creating a full-fledged video with voiceovers is a bit more involved than creating purely visual Manim scenes. One has to use `a video editing program `__ to add the voiceovers after the video has been rendered. This process can be difficult and time-consuming, since it requires a lot of planning and preparation. To ease the process of adding voiceovers to videos, we have created `Manim Voiceover `__, a plugin that lets you add voiceovers to scenes directly in Python. To install it, run .. code-block:: bash pip install "manim-voiceover[azure,gtts]" Visit `the installation page `__ for more details on how to install Manim Voiceover. Basic Usage ########### Manim Voiceover lets you ... - Add voiceovers to Manim videos directly in Python, without having to use a video editor. - Record voiceovers with your microphone during rendering through a simple command line interface. - Develop animations with auto-generated AI voices from various free and proprietary services. It provides a very simple API that lets you specify your voiceover script and then record it during rendering: .. code-block:: python from manim import * from manim_voiceover import VoiceoverScene from manim_voiceover.services.recorder import RecorderService # Simply inherit from VoiceoverScene instead of Scene to get all the # voiceover functionality. class RecorderExample(VoiceoverScene): def construct(self): # You can choose from a multitude of TTS services, # or in this example, record your own voice: self.set_speech_service(RecorderService()) circle = Circle() # Surround animation sections with with-statements: with self.voiceover(text="This circle is drawn as I speak.") as tracker: self.play(Create(circle), run_time=tracker.duration) # The duration of the animation is received from the audio file # and passed to the tracker automatically. # This part will not start playing until the previous voiceover is finished. with self.voiceover(text="Let's shift it to the left 2 units.") as tracker: self.play(circle.animate.shift(2 * LEFT), run_time=tracker.duration) To get started with Manim Voiceover, visit the `Quick Start Guide `__. Visit the `Example Gallery `__ to see some examples of Manim Voiceover in action. ================================================ FILE: docs/source/guides/configuration.rst ================================================ Configuration ############# Manim provides an extensive configuration system that allows it to adapt to many different use cases. There are many configuration options that can be configured at different times during the scene rendering process. Each option can be configured programmatically via `the ManimConfig class`_, at the time of command invocation via `command-line arguments`_, or at the time the library is first imported via `the config files`_. The most common, simplest, and recommended way to configure Manim is via the command-line interface (CLI), which is described directly below. Command-line arguments ********************** By far the most commonly used command in the CLI is the ``render`` command, which is used to render scene(s) to an output file. It is used with the following arguments: .. program-output:: manim render --help :ellipsis: 9 However, since Manim defaults to the :code:`render` command whenever no command is specified, the following form is far more common and can be used instead: .. code-block:: bash manim [OPTIONS] FILE [SCENES] An example of using the above form is: .. code-block:: bash manim -qm file.py SceneOne This asks Manim to search for a Scene class called :code:`SceneOne` inside the file ``file.py`` and render it with medium quality (specified by the ``-qm`` flag). Another frequently used flag is ``-p`` ("preview"), which makes manim open the rendered video 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. Advanced examples ================= To render a scene in high quality, but only output the last frame of the scene instead of the whole video, you can execute .. code-block:: bash manim -sqh SceneName The following example specifies the output file name (with the :code:`-o` flag), renders only the first ten animations (:code:`-n` flag) with a white background (:code:`-c` flag), and saves the animation as a ``.gif`` instead of as a ``.mp4`` file (``--format=gif`` flag). It uses the default quality and does not try to open the file after it is rendered. .. code-block:: bash manim -o myscene --format=gif -n 0,10 -c WHITE SceneName A list of all CLI flags ======================== .. command-output:: manim --help .. command-output:: manim render --help .. command-output:: manim cfg --help .. command-output:: manim plugins --help The ManimConfig class ********************* The most direct way of configuring Manim is through the global ``config`` object, which is an instance of :class:`.ManimConfig`. Each property of this class is a config option that can be accessed either with standard attribute syntax or with dict-like syntax: .. code-block:: pycon >>> from manim import * >>> config.background_color = WHITE >>> config["background_color"] = WHITE .. note:: The former is preferred; the latter is provided for backwards compatibility. Most classes, including :class:`.Camera`, :class:`.Mobject`, and :class:`.Animation`, read some of their default configuration from the global ``config``. .. code-block:: pycon >>> Camera({}).background_color >>> config.background_color = RED # 0xfc6255 >>> Camera({}).background_color :class:`.ManimConfig` is designed to keep internal consistency. For example, setting ``frame_y_radius`` will affect ``frame_height``: .. code-block:: pycon >>> config.frame_height 8.0 >>> config.frame_y_radius = 5.0 >>> config.frame_height 10.0 The global ``config`` object is meant to be the single source of truth for all config options. All of the other ways of setting config options ultimately change the values of the global ``config`` object. The following example illustrates the video resolution chosen for examples rendered in our documentation with a reference frame. .. manim:: ShowScreenResolution :save_last_frame: class ShowScreenResolution(Scene): def construct(self): pixel_height = config["pixel_height"] # 1080 is default pixel_width = config["pixel_width"] # 1920 is default frame_width = config["frame_width"] frame_height = config["frame_height"] self.add(Dot()) d1 = Line(frame_width * LEFT / 2, frame_width * RIGHT / 2).to_edge(DOWN) self.add(d1) self.add(Text(str(pixel_width)).next_to(d1, UP)) d2 = Line(frame_height * UP / 2, frame_height * DOWN / 2).to_edge(LEFT) self.add(d2) self.add(Text(str(pixel_height)).next_to(d2, RIGHT)) The config files **************** As the last example shows, executing Manim from the command line may involve using many flags simultaneously. This may become a nuisance if you must execute the same script many times in a short time period, for example, when making small incremental tweaks to your scene script. For this reason, Manim can also be configured using a configuration file. A configuration file is a file ending with the suffix ``.cfg``. To use a local configuration file when rendering your scene, you must create a file with the name ``manim.cfg`` in the same directory as your scene code. .. warning:: The config file **must** be named ``manim.cfg``. Currently, Manim does not support config files with any other name. The config file must start with the section header ``[CLI]``. The configuration options under this header have the same name as the CLI flags and serve the same purpose. Take, for example, the following config file. .. code-block:: ini [CLI] # my config file output_file = myscene save_as_gif = True background_color = WHITE Config files are parsed with the standard python library ``configparser``. In particular, they will ignore any line that starts with a pound symbol ``#``. Now, executing the following command .. code-block:: bash manim -o myscene -i -c WHITE SceneName is equivalent to executing the following command, provided that ``manim.cfg`` is in the same directory as , .. code-block:: bash manim SceneName .. tip:: The names of the configuration options admissible in config files are exactly the same as the **long names** of the corresponding command- line flags. For example, the ``-c`` and ``--background_color`` flags are interchangeable, but the config file only accepts :code:`background_color` as an admissible option. Since config files are meant to replace CLI flags, all CLI flags can be set via a config file. Moreover, any config option can be set via a config file, whether or not it has an associated CLI flag. See the bottom of this document for a list of all CLI flags and config options. Manim will look for a ``manim.cfg`` config file in the same directory as the file being rendered, and **not** in the directory of execution. For example, .. code-block:: bash manim -o myscene -i -c WHITE SceneName will use the config file found in ``path/to/file.py``, if any. It will **not** use the config file found in the current working directory, even if it exists. In this way, the user may keep different config files for different scenes or projects, and execute them with the right configuration from anywhere in the system. The file described here is called the **folder-wide** config file because it affects all scene scripts found in the same folder. The user config file ==================== As explained in the previous section, a :code:`manim.cfg` config file only affects the scene scripts in its same folder. However, the user may also create a special config file that will apply to all scenes rendered by that user. This is referred to as the **user-wide** config file, and it will apply regardless of where Manim is executed from, and regardless of where the scene script is stored. The user-wide config file lives in a special folder, depending on the operating system. * Windows: :code:`UserDirectory`/AppData/Roaming/Manim/manim.cfg * MacOS: :code:`UserDirectory`/.config/manim/manim.cfg * Linux: :code:`UserDirectory`/.config/manim/manim.cfg Here, :code:`UserDirectory` is the user's home folder. .. note:: A user may have many **folder-wide** config files, one per folder, but only one **user-wide** config file. Different users in the same computer may each have their own user-wide config file. .. warning:: Do not store scene scripts in the same folder as the user-wide config file. In this case, the behavior is undefined. Whenever you use Manim from anywhere in the system, Manim will look for a user-wide config file and read its configuration. Cascading config files ====================== What happens if you execute Manim and it finds both a folder-wide config file and a user-wide config file? Manim will read both files, but if they are incompatible, **the folder-wide file takes precedence**. For example, take the following user-wide config file .. code-block:: ini # user-wide [CLI] output_file = myscene save_as_gif = True background_color = WHITE and the following folder-wide file .. code-block:: ini # folder-wide [CLI] save_as_gif = False Then, executing :code:`manim SceneName` will be equivalent to not using any config files and executing .. code-block:: bash manim -o myscene -c WHITE SceneName Any command-line flags have precedence over any config file. For example, using the previous two config files and executing :code:`manim -c RED SceneName` is equivalent to not using any config files and executing .. code-block:: bash manim -o myscene -c RED SceneName There 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 precedence, so any config options in the user-wide and any folder-wide files will override the library-wide file. This is referred to as the *cascading* config file system. .. warning:: **The user should not try to modify the library-wide file**. Contributors should receive explicit confirmation from the core developer team before modifying it. Order of operations ******************* .. raw:: html
With so many different ways of configuring Manim, it can be difficult to know when each config option is being set. In fact, this will depend on how Manim is being used. If Manim is imported from a module, then the configuration system will follow these steps: 1. The library-wide config file is loaded. 2. The user-wide and folder-wide files are loaded if they exist. 3. All files found in the previous two steps are parsed in a single :class:`ConfigParser` object, called ``parser``. This is where *cascading* happens. 4. :class:`logging.Logger` is instantiated to create Manim's global ``logger`` object. It is configured using the "logger" section of the parser, i.e. ``parser['logger']``. 5. :class:`ManimConfig` is instantiated to create the global ``config`` object. 6. The ``parser`` from step 3 is fed into the ``config`` from step 5 via :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 happen, and are complemented by: 8. The CLI flags are parsed and fed into ``config`` via :meth:`~ManimConfig.digest_args`. 9. If the ``--config_file`` flag was used, a new :class:`ConfigParser` object is created with the contents of the library-wide file, the user-wide file if it exists, and the file passed via ``--config_file``. In this case, the folder-wide file, if it exists, is ignored. 10. The new parser is fed into ``config``. 11. The rest of the CLI flags are processed. To summarize, the order of precedence for configuration options, from lowest to highest precedence is: 1. Library-wide config file, 2. user-wide config file, if it exists, 3. folder-wide config file, if it exists OR custom config file, if passed via ``--config_file``, 4. other CLI flags, and 5. any programmatic changes made after the config system is set. A list of all config options **************************** .. code:: ['aspect_ratio', 'assets_dir', 'background_color', 'background_opacity', 'bottom', 'custom_folders', 'disable_caching', 'dry_run', 'ffmpeg_loglevel', 'flush_cache', 'frame_height', 'frame_rate', 'frame_size', 'frame_width', 'frame_x_radius', 'frame_y_radius', 'from_animation_number', `fullscreen`, 'images_dir', 'input_file', 'left_side', 'log_dir', 'log_to_file', 'max_files_cached', 'media_dir', 'media_width', 'movie_file_extension', 'notify_outdated_version', 'output_file', 'partial_movie_dir', 'pixel_height', 'pixel_width', 'plugins', 'preview', 'progress_bar', 'quality', 'right_side', 'save_as_gif', 'save_last_frame', 'save_pngs', 'scene_names', 'show_in_file_browser', 'sound', 'tex_dir', 'tex_template', 'tex_template_file', 'text_dir', 'top', 'transparent', 'upto_animation_number', 'use_opengl_renderer', 'verbosity', 'video_dir', 'window_position', 'window_monitor', 'window_size', 'write_all', 'write_to_movie', 'enable_wireframe', 'force_window'] Accessing CLI command options ***************************** Entering ``manim``, or ``manim --help``, will open the main help page. .. code:: Usage: manim [OPTIONS] COMMAND [ARGS]... Animation engine for explanatory math videos. Options: --version Show version and exit. --help Show this message and exit. Commands: cfg Manages Manim configuration files. init Sets up a new project in current working directory with default settings. It copies files from templates directory and pastes them in the current working dir. new Create a new project or insert a new scene. plugins Manages Manim plugins. render Render SCENE(S) from the input FILE. See 'manim ' to read about a specific subcommand. Made with <3 by Manim Community developers. Each of the subcommands has its own help page which can be accessed similarly: .. code:: manim render manim render --help ================================================ FILE: docs/source/guides/index.rst ================================================ Thematic Guides =============== .. toctree:: :caption: Table of Contents :maxdepth: 2 :glob: configuration deep_dive using_text add_voiceovers ================================================ FILE: docs/source/guides/using_text.rst ================================================ ########################### Rendering Text and Formulas ########################### There are two different ways by which you can render **Text** in videos: 1. Using Pango (:mod:`~.text_mobject`) 2. Using LaTeX (:mod:`~.tex_mobject`) If you want to render simple text, you should use either :class:`~.Text` or :class:`~.MarkupText`, or one of its derivatives like :class:`~.Paragraph`. See :ref:`using-text-objects` for more information. LaTeX should be used when you need mathematical typesetting. See :ref:`rendering-with-latex` for more information. .. _using-text-objects: Text Without LaTeX ****************** The simplest way to add text to your animations is to use the :class:`~.Text` class. It uses the `Pango library`_ to render text. With Pango, you can also render non-English alphabets like 你好 or こんにちは or 안녕하세요 or مرحبا بالعالم. Here is a simple *Hello World* animation. .. manim:: HelloWorld :save_last_frame: :ref_classes: Text class HelloWorld(Scene): def construct(self): text = Text("Hello world", font_size=144) self.add(text) You can also use :class:`~.MarkupText` which allows the use of PangoMarkup (see the documentation of :class:`~.MarkupText` for details) to render text. For example: .. manim:: SingleLineColor :save_last_frame: :ref_classes: MarkupText class SingleLineColor(Scene): def construct(self): text = MarkupText( f'all in red except this', color=RED ) self.add(text) .. _Pango library: https://pango.org Working with :class:`~.Text` ============================ This section explains the properties of :class:`~.Text` and how can it be used in your animations. Using Fonts ----------- You can set a different font using :attr:`~.Text.font`. .. note:: The font used must be installed in your system, and Pango should know about it. You can get a list of fonts using :func:`manimpango.list_fonts`. >>> import manimpango >>> manimpango.list_fonts() [...] .. manim:: FontsExample :save_last_frame: class FontsExample(Scene): def construct(self): ft = Text("Noto Sans", font="Noto Sans") self.add(ft) Setting Slant and Weight ------------------------ Slant is the style of the Text, and it can be ``NORMAL`` (the default), ``ITALIC`` or ``OBLIQUE``. Usually, for many fonts both ``ITALIC`` and ``OBLIQUE`` look similar, but ``ITALIC`` uses **Roman Style**, whereas ``OBLIQUE`` uses **Italic Style**. Weight specifies the boldness of a font. You can see a list of weights in :class:`manimpango.Weight`. .. manim:: SlantsExample :save_last_frame: class SlantsExample(Scene): def construct(self): a = Text("Italic", slant=ITALIC) self.add(a) .. manim:: DifferentWeight :save_last_frame: class DifferentWeight(Scene): def construct(self): import manimpango g = VGroup() weight_list = dict( sorted( { weight: manimpango.Weight(weight).value for weight in manimpango.Weight }.items(), key=lambda x: x[1], ) ) for weight in weight_list: g += Text(weight.name, weight=weight.name, font="Open Sans") self.add(g.arrange(DOWN).scale(0.5)) .. _using-colors: Using Colors ------------ You can set the color of the text using :attr:`~.Text.color`: .. manim:: SimpleColor :save_last_frame: class SimpleColor(Scene): def construct(self): col = Text("RED COLOR", color=RED) self.add(col) You can use utilities like :attr:`~.Text.t2c` for coloring specific characters. This may be problematic if your text contains ligatures as explained in :ref:`iterating-text`. :attr:`~Text.t2c` accepts two types of dictionaries, * The keys can contain indices like ``[2:-1]`` or ``[4:8]``, this works similar to how `slicing `_ works in Python. The values should be the color of the Text from :class:`~.Color`. * The keys contain words or characters which should be colored separately and the values should be the color from :class:`~.Color`: .. manim:: Textt2cExample :save_last_frame: class Textt2cExample(Scene): def construct(self): t2cindices = Text('Hello', t2c={'[1:-1]': BLUE}).move_to(LEFT) t2cwords = Text('World',t2c={'rl':RED}).next_to(t2cindices, RIGHT) self.add(t2cindices, t2cwords) If you want to avoid problems when using colors (due to ligatures), consider using :class:`MarkupText`. Using Gradients --------------- You can add a gradient using :attr:`~.Text.gradient`. The value must be an iterable of any length: .. manim:: GradientExample :save_last_frame: class GradientExample(Scene): def construct(self): t = Text("Hello", gradient=(RED, BLUE, GREEN), font_size=96) self.add(t) You can also use :attr:`~.Text.t2g` for gradients with specific characters of the text. It shares a similar syntax to :ref:`the interface for colors `: .. manim:: t2gExample :save_last_frame: class t2gExample(Scene): def construct(self): t2gindices = Text( 'Hello', t2g={ '[1:-1]': (RED,GREEN), }, ).move_to(LEFT) t2gwords = Text( 'World', t2g={ 'World':(RED,BLUE), }, ).next_to(t2gindices, RIGHT) self.add(t2gindices, t2gwords) Setting Line Spacing -------------------- You can set the line spacing using :attr:`~.Text.line_spacing`: .. manim:: LineSpacing :save_last_frame: class LineSpacing(Scene): def construct(self): a = Text("Hello\nWorld", line_spacing=1) b = Text("Hello\nWorld", line_spacing=4) self.add(Group(a,b).arrange(LEFT, buff=5)) .. _disable-ligatures: Disabling Ligatures ------------------- By disabling ligatures you would get a one-to-one mapping between characters and submobjects. This fixes the issues with coloring text. .. warning:: Be aware that using this method with text that heavily depends on ligatures (Arabic text) may yield unexpected results. You can disable ligatures by passing ``disable_ligatures`` to :class:`Text`. For example: .. manim:: DisableLigature :save_last_frame: class DisableLigature(Scene): def construct(self): li = Text("fl ligature",font_size=96) nli = Text("fl ligature", disable_ligatures=True, font_size=96) self.add(Group(li, nli).arrange(DOWN, buff=.8)) .. _iterating-text: Iterating :class:`~.Text` ------------------------- Text objects behave like :class:`VGroups <.VGroup>`. Therefore, you can slice and index the text. For example, you can set each letter to different color by iterating it. .. manim:: IterateColor :save_last_frame: class IterateColor(Scene): def construct(self): text = Text("Colors", font_size=96) for letter in text: letter.set_color(random_bright_color()) self.add(text) .. warning:: Please note that `Ligature`_ can cause problems here. If you need a one-to-one mapping of characters to submobjects you should pass the ``disable_ligatures`` parameter to :class:`~.Text`. See :ref:`disable-ligatures`. .. _Ligature: https://en.wikipedia.org/wiki/Ligature_(writing) Working with :class:`~.MarkupText` ================================== MarkupText is similar to :class:`~.Text`, the only difference between them is that this accepts and processes PangoMarkup (which is similar to html), instead of just rendering plain text. Consult the documentation of :class:`~.MarkupText` for more details and further references about PangoMarkup. .. manim:: MarkupTest :save_last_frame: class MarkupTest(Scene): def construct(self): text = MarkupText( f'double green underline in red text except this', color=RED, font_size=34 ) self.add(text) .. _rendering-with-latex: Text With LaTeX *************** Just as you can use :class:`~.Text` to add text to your videos, you can use :class:`~.Tex` to insert LaTeX. For example, .. manim:: HelloLaTeX :save_last_frame: class HelloLaTeX(Scene): def construct(self): tex = Tex(r"\LaTeX", font_size=144) self.add(tex) .. note:: 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 ``\\`` to escape the backslash: ``Tex('\\LaTeX')``. Working with :class:`~.MathTex` =============================== Everything passed to :class:`~.MathTex` is in math mode by default. To be more precise, :class:`~.MathTex` is processed within an ``align*`` environment. You can achieve a similar effect with :class:`~.Tex` by enclosing your formula with ``$`` symbols: ``$\xrightarrow{x^6y^8}$``: .. manim:: MathTeXDemo :save_last_frame: class MathTeXDemo(Scene): def construct(self): rtarrow0 = MathTex(r"\xrightarrow{x^6y^8}", font_size=96) rtarrow1 = Tex(r"$\xrightarrow{x^6y^8}$", font_size=96) self.add(VGroup(rtarrow0, rtarrow1).arrange(DOWN)) LaTeX commands and keyword arguments ==================================== We can use any standard LaTeX commands in the AMS maths packages. Such as the ``mathtt`` math-text type or the ``looparrowright`` arrow. .. manim:: AMSLaTeX :save_last_frame: class AMSLaTeX(Scene): def construct(self): tex = Tex(r'$\mathtt{H} \looparrowright$ \LaTeX', font_size=144) 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, font_size=144) 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 have to 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, font_size=144, ) 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 by selecting parts of the tex code. In this example, 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', font_size=144) tex.set_color_by_tex('igsta', RED) self.add(tex) Note that :func:`~.set_color_by_tex` colors the entire substring containing the Tex, not just the specific symbol or Tex expression. Consider the following example: .. manim:: IncorrectLaTeXSubstringColoring :save_last_frame: class IncorrectLaTeXSubstringColoring(Scene): def construct(self): equation = MathTex( r"e^x = x^0 + x^1 + \frac{1}{2} x^2 + \frac{1}{6} x^3 + \cdots + \frac{1}{n!} x^n + \cdots" ) equation.set_color_by_tex("x", YELLOW) self.add(equation) As you can see, this colors the entire equation yellow, contrary to what may be expected. To color only ``x`` yellow, we have to do the following: .. manim:: CorrectLaTeXSubstringColoring :save_last_frame: class CorrectLaTeXSubstringColoring(Scene): def construct(self): equation = MathTex( r"e^x = x^0 + x^1 + \frac{1}{2} x^2 + \frac{1}{6} x^3 + \cdots + \frac{1}{n!} x^n + \cdots", substrings_to_isolate="x" ) equation.set_color_by_tex("x", YELLOW) self.add(equation) By setting ``substrings_to_isolate`` to ``x``, we split up the :class:`~.MathTex` into substrings automatically and isolate the ``x`` components into individual substrings. Only then can :meth:`~.set_color_by_tex` be used to achieve the desired result. Note that Manim also supports a custom syntax that allows splitting a TeX string into substrings easily: simply enclose parts of your formula that you want to isolate with double braces. In the string ``MathTex(r"{{ a^2 }} + {{ b^2 }} = {{ c^2 }}")``, the rendered mobject will consist of the substrings ``a^2``, ``+``, ``b^2``, ``=``, and ``c^2``. This makes transformations between similar text fragments easy to write using :class:`~.TransformMatchingTex`. Using ``index_labels`` to work with complicated strings ======================================================= You might sometimes be working with a very complicated :class:`~.MathTex` mobject that makes it difficult to work with its individual components. This is where the debugging function :func:`.index_labels` is very useful. The method shows the index of a mobject's submobjects, allowing you to easily find the components of the mobject you would like to change. .. manim:: IndexLabelsMathTex :save_last_frame: class IndexLabelsMathTex(Scene): def construct(self): text = MathTex(r"\binom{2n}{n+2}", font_size=96) # index the first (and only) term of the MathTex mob self.add(index_labels(text[0])) text[0][1:3].set_color(YELLOW) text[0][3:6].set_color(RED) self.add(text) LaTeX Maths Fonts - The Template Library ======================================== Changing fonts in LaTeX when typesetting mathematical formulae is trickier than regular text. It requires changing the template that is used to compile the TeX. Manim comes with a collection of :class:`~.TexFontTemplates` ready for you to use. These templates will all work in math mode: .. manim:: LaTeXMathFonts :save_last_frame: class LaTeXMathFonts(Scene): def construct(self): tex = Tex( r"$x^2 + y^2 = z^2$", tex_template=TexFontTemplates.french_cursive, font_size=144, ) 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 script. 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` instead. .. manim:: LaTeXTemplateLibrary :save_last_frame: class LaTeXTemplateLibrary(Scene): def construct(self): tex = Tex('Hello 你好 \\LaTeX', tex_template=TexTemplateLibrary.ctex, font_size=144) self.add(tex) Aligning formulae ================= :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', font_size=96) self.add(tex) ================================================ FILE: docs/source/installation/conda.rst ================================================ Conda ===== Required Dependencies --------------------- There are several package managers that work with conda packages, namely `conda `__, `mamba `__ and `pixi `__. After installing your package manager, you can create a new environment and install ``manim`` inside by running .. tab-set:: .. tab-item:: conda / mamba .. code-block:: bash # if you want to use mamba, just replace conda below with mamba conda create -n my-manim-environment conda activate my-manim-environment conda install -c conda-forge manim .. tab-item:: pixi .. code-block:: bash pixi init pixi add manim Since all dependencies (except LaTeX) are handled by conda, you don't need to worry about needing to install additional dependencies. Optional Dependencies --------------------- In order to make use of Manim's interface to LaTeX to, for example, render equations, LaTeX has to be installed as well. Note that this is an optional dependency: if you don't intend to use LaTeX, you don't have to install it. Recommendations on how to install LaTeX on different operating systems can be found :doc:`in our local installation guide `. Working with Manim ------------------ At this point, you should have a working installation of Manim, head over to our :doc:`Quickstart Tutorial <../tutorials/quickstart>` to learn how to make your own *Manimations*! ================================================ FILE: docs/source/installation/docker.rst ================================================ Docker ====== The community maintains a docker image, which can be found `on DockerHub `__. For our image ``manimcommunity/manim``, there are the following tags: - ``latest``: the most recent version corresponding to `the main branch `__, - ``stable``: the latest released version (according to `the releases page `__), - ``vX.Y.Z``: any particular released version (according to `the releases page `__). .. note:: When using Manim's CLI within a Docker container, some flags like ``-p`` (preview file) and ``-f`` (show output file in the file browser) are not supported. Basic usage of the Docker container ----------------------------------- Assuming that you can access the docker installation on your system from a terminal (bash / PowerShell) via ``docker``, you can render a scene ``CircleToSquare`` in a file `test_scenes.py` with the following command. .. code-block:: bash docker run --rm -it -v "/full/path/to/your/directory:/manim" manimcommunity/manim manim -qm test_scenes.py CircleToSquare .. tip:: For Linux users there might be permission problems when letting the user in the container write to the mounted volume. Add ``--user="$(id -u):$(id -g)"`` to the ``docker`` CLI arguments to prevent the creation of output files not belonging to your user. Instead of using the "throwaway container" approach outlined above, you can also create a named container that you can modify to your liking. First, run .. code-block:: sh docker run -it --name my-manim-container -v "/full/path/to/your/directory:/manim" manimcommunity/manim bash to obtain an interactive shell inside your container allowing you to, e.g., install further dependencies (like texlive packages using ``tlmgr``). Exit the container as soon as you are satisfied. Then, before using it, start the container by running .. code-block:: sh docker start my-manim-container which starts the container in the background. Then, to render a scene ``CircleToSquare`` in a file ``test_scenes.py``, run .. code-block:: sh docker exec -it my-manim-container manim -qm test_scenes.py CircleToSquare Running JupyterLab via Docker ----------------------------- Another alternative to using the Docker image is to spin up a local JupyterLab instance. To do that, simply run .. code-block:: sh docker run -it -p 8888:8888 manimcommunity/manim jupyter lab --ip=0.0.0.0 and then follow the instructions in the terminal. ================================================ FILE: docs/source/installation/jupyter.rst ================================================ Jupyter Notebooks ================= Binder ------ `Binder `__ is an online platform that hosts shareable and customizable computing environments in the form of Jupyter notebooks. Manim ships with a built-in ``%%manim`` Jupyter magic command which makes it easy to use in these notebooks. To see an example for such an environment, visit our interactive tutorial over at https://try.manim.community/. It is relatively straightforward to prepare your own notebooks in a way that allows them to be shared interactively via Binder as well: #. First, prepare a directory containing one or multiple notebooks which you would like to share in an interactive environment. You can create these notebooks by using Jupyter notebooks with a local installation of Manim, or also by working in our pre-existing `interactive tutorial environment `__. #. In the same directory containing your notebooks, add a file named ``Dockerfile`` with the following content: .. code-block:: dockerfile FROM docker.io/manimcommunity/manim:v0.9.0 COPY --chown=manimuser:manimuser . /manim Don't forget to change the version tag ``v0.9.0`` to the version you were working with locally when creating your notebooks. #. Make the directory with your worksheets and the ``Dockerfile`` available to the public (and in particular: to Binder!). There are `several different options to do so `__, within the community we usually work with GitHub repositories or gists. #. Once your material is publicly available, visit https://mybinder.org and follow the instructions there to generate an interactive environment for your worksheets. .. hint:: The repository containing our `interactive tutorial `__ can be found at https://github.com/ManimCommunity/jupyter_examples. Google Colaboratory ------------------- It is also possible to install Manim in a `Google Colaboratory `__ environment. In contrast to Binder, where you can customize and prepare the environment beforehand (such that Manim is already installed and ready to be used), you will have to take care of that every time you start a new notebook in Google Colab. Fortunately, this is not particularly difficult. After creating a new notebook, paste the following code block in a cell, then execute it. .. code-block:: !sudo apt update !sudo apt install libcairo2-dev \ texlive texlive-latex-extra texlive-fonts-extra \ texlive-latex-recommended texlive-science \ tipa libpango1.0-dev !pip install manim !pip install IPython==8.21.0 You should start to see Colab installing all the dependencies specified in these commands. After the execution has completed, you will be prompted to restart the runtime. Click the "restart runtime" button at the bottom of the cell output. You are now ready to use Manim in Colab! To check that everything works as expected, first import Manim by running .. code-block:: from manim import * in a new code cell. Then create another cell containing the following code:: %%manim -qm -v WARNING SquareToCircle class SquareToCircle(Scene): def construct(self): square = Square() circle = Circle() circle.set_fill(PINK, opacity=0.5) self.play(Create(square)) self.play(Transform(square, circle)) self.wait() Upon running this cell, a short animation transforming a square into a circle should be rendered and displayed. ================================================ FILE: docs/source/installation/uv.md ================================================ # Installing Manim locally The standard way of installing Manim is by using Python's package manager `pip` to install the latest release from [PyPI](https://pypi.org/project/manim/). To make it easier for you to follow best practices when it comes to setting up a Python project for your Manim animations, we strongly recommend using a tool for managing Python environments and dependencies. In particular, [we strongly recommend using `uv`](https://docs.astral.sh/uv/#getting-started). For the two main ways of installing Manim described below, we assume that `uv` is available; we think it is particularly helpful if you are new to Python or programming in general. It is not a hard requirement whatsoever; if you know what you are doing you can just use `pip` to install Manim directly. :::::{admonition} Installing the Python management tool `uv` :class: seealso One way to install `uv` is via the dedicated console installer supporting all large operating systems. Simply paste the following snippet into your terminal / PowerShell -- or [consult `uv`'s documentation](https://docs.astral.sh/uv/#getting-started) for alternative ways to install the tool. ::::{tab-set} :::{tab-item} MacOS and Linux ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` ::: :::{tab-item} Windows ```powershell powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ``` ::: :::: ::::: Of course, if you know what you are doing and prefer to setup a virtual environment yourself, feel free to do so! :::{important} If you run into issues when following our instructions below, do not worry: check our [installation FAQs]() to see whether the problem is already addressed there -- and otherwise go and check [how to contact our community]() to get help. ::: ## Installation ### Step 1: Installing Python We first need to check that an appropriate version of Python is available on your machine. Open a terminal to run ```bash uv python install ``` to install the latest version of Python. If this is successful, continue to the next step. (installation-optional-latex)= ### Step 2 (optional): Installing LaTeX [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Mathematics) is a very well-known and widely used typesetting system allowing you to write formulas like \begin{equation*} \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{(z - z_0)^{n+1}}~dz = \frac{f^{(n)}(z_0)}{n!}. \end{equation*} If rendering plain text is sufficient for your needs and you don't want to render any typeset formulas, you can technically skip this step. Otherwise select your operating system from the tab list below and follow the instructions. :::::{tab-set} ::::{tab-item} Windows For Windows we recommend installing LaTeX via the [MiKTeX distribution](https://miktex.org). Simply grab the Windows installer available from their download page, and run it. :::: ::::{tab-item} MacOS If you are running MacOS, we recommend installing the [MacTeX distribution](https://www.tug.org/mactex/). The latest available PKG file can be downloaded from . Get it and follow the standard installation procedure. :::: ::::{tab-item} Linux Given the large number of Linux distributions with different ways of installing packages, we cannot give detailed instructions for all package managers. In general we recommend to install a *TeX Live* distribution (). For most Linux distributions, TeX Live has already been packaged such that it can be installed easily with your system package manager. Search the internet and your usual OS resources for detailed instructions. For example, on Debian-based systems with the package manager `apt`, a full TeX Live distribution can be installed by running ```bash sudo apt install texlive-full ``` For Fedora (managed via `dnf`), the corresponding command is ```bash sudo dnf install texlive-scheme-full ``` As soon as LaTeX is installed, continue with actually installing Manim itself. :::: ::::: :::{dropdown} I know what I am doing and I would like to setup a minimal LaTeX installation You are welcome to use a smaller, more customizable LaTeX distribution like [TinyTeX](https://yihui.org/tinytex/). Manim overall requires the following LaTeX packages to be installed in your distribution: ```text amsmath babel-english cbfonts-fd cm-super count1to ctex doublestroke dvisvgm everysel fontspec frcursive fundus-calligra gnu-freefont jknapltx latex-bin mathastext microtype multitoc physics preview prelim2e ragged2e relsize rsfs setspace standalone tipa wasy wasysym xcolor xetex xkeyval ``` ::: ### Step 3: Installing Manim These steps again differ slightly between different operating systems. Make sure you select the correct one from the tab list below, then follow the instructions below. ::::::{tab-set} :::::{tab-item} Windows The following commands will - create a new directory for a Python project, - and add Manim as a dependency, which installs it into the corresponding local Python environment. The name for the Python project is *manimations*, which you can change to anything you like. ```bash uv init manimations cd manimations uv add manim ``` Manim is now installed in your local project environment! ::::: :::::{tab-item} MacOS Before we can install Manim, we need to make sure that the system utilities `cairo` and `pkg-config` are present. They are needed for the [`pycairo` Python package](https://pycairo.readthedocs.io/en/latest/), a dependency of Manim. The easiest way of installing these utilities is by using [Homebrew](https://brew.sh/), a fairly popular 3rd party package manager for MacOS. Check whether Homebrew is already installed by running ```bash brew --version ``` which will report something along the lines of `Homebrew 4.4.15-54-...` if it is installed, and a message `command not found: brew` otherwise. In this case, use the shell installer [as instructed on Homebrew's website](https://brew.sh/), or get a `.pkg`-installer from [their GitHub release page](https://github.com/Homebrew/brew/releases). Make sure to follow the instructions of the installer carefully, especially when prompted to modify your `.zprofile` to add Homebrew to your system's PATH. With Homebrew available, the required utilities can be installed by running ```bash brew install cairo pkg-config ``` With all of this preparation out of the way, now it is time to actually install Manim itself! The following commands will - create a new directory for a Python project, - and add Manim as a dependency, which installs it into the corresponding local Python environment. The name for the Python project is *manimations*, which you can change to anything you like. ```bash uv init manimations cd manimations uv add manim ``` Manim is now installed in your local project environment! ::::: :::::{tab-item} Linux Practically, the instructions given in the *Windows* tab also apply for Linux -- however, some additional dependencies are required as Linux users need to build [ManimPango](https://github.com/ManimCommunity/ManimPango) (and potentially [pycairo](https://pycairo.readthedocs.io/en/latest/)) from source. More specifically, this includes: - A C compiler, - Python's development headers, - the `pkg-config` tool, - Pango and its development headers, - and Cairo and its development headers. Instructions for popular systems / package managers are given below. ::::{tab-set} :::{tab-item} Debian-based / apt ```bash sudo apt update sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev ``` ::: :::{tab-item} Fedora / dnf ```bash sudo dnf install python3-devel pkg-config cairo-devel pango-devel ``` ::: :::{tab-item} Arch Linux / pacman ```bash sudo pacman -Syu base-devel cairo pango ``` ::: :::: As soon as the required dependencies are installed, you can create a Python project (feel free to change the name *manimations* used below to some other name) with a local environment containing Manim by running ```bash uv init manimations cd manimations uv add manim ``` ::::: :::::: To verify that your local Python project is setup correctly and that Manim is available, simply run ```bash uv run manim checkhealth ``` At this point, you can also open your project folder with the IDE of your choice. All modern Python IDEs (for example VS Code with the Python extension, or PyCharm) should automatically detect the local environment created by `uv` such that if you put ```py import manim ``` into a new file `my-first-animation.py`, the import is resolved correctly and autocompletion is available. *Happy Manimating!* :::{dropdown} Alternative: Installing Manim as a global `uv`-managed tool If you have Manim projects in many different directories and you do not want to setup a local project environment for each of them, you could also install Manim as a `uv`-managed tool. See [`uv`'s documentation for more information](https://docs.astral.sh/uv/concepts/tools/) on their tool mechanism. To install Manim as a global `uv` tool, simply run ```bash uv tool install manim ``` after which the `manim` executable will be available on your global system path, without the need to activate any virtual environment or prefixing your commands with `uv run`. Note that when using this approach, setting up your code editor to properly resolve `import manim` requires additional work, as the global tool environment is not automatically detected: the base path of all tool environments can be determined by running ``` uv tool dir ``` which should now contain a directory `manim` in which the appropriate virtual environment is located. Set the Python interpreter of your IDE to this environment to make imports properly resolve themselves. ::: :::{dropdown} Installing Manim for a different version of Python In case you would like to use a different version of Python (for example, due to compatibility issues with other packages), then `uv` allows you to do so in a fairly straightforward way. When initializing the local Python project, simply pass the Python version you want to use as an argument to the `init` command: ``` uv init --python 3.12 manimations cd manimations uv add manim ``` To change the version for an existing package, you will need to edit the `pyproject.toml` file. If you are downgrading the python version, the `requires-python` entry needs to be updated such that your chosen version satisfies the requirement. Change the line to, for example `requires-python = ">=3.12"`. After that, run `uv python pin 3.12` to pin the python version to `3.12`. Finally, run `uv sync`, and your environment is updated! ::: ================================================ FILE: docs/source/reference_index/animations.rst ================================================ Animations ========== .. currentmodule:: manim .. autosummary:: :toctree: ../reference ~animation.animation ~animation.changing ~animation.composition ~animation.creation ~animation.fading ~animation.growing ~animation.indication ~animation.movement ~animation.numbers ~animation.rotation ~animation.specialized ~animation.speedmodifier ~animation.transform ~animation.transform_matching_parts ~animation.updaters ================================================ FILE: docs/source/reference_index/cameras.rst ================================================ Cameras ======= .. currentmodule:: manim .. autosummary:: :toctree: ../reference ~camera.camera ~camera.mapping_camera ~camera.moving_camera ~camera.multi_camera ~camera.three_d_camera ================================================ FILE: docs/source/reference_index/configuration.rst ================================================ Configuration ============= Module Index ------------ .. currentmodule:: manim .. autosummary:: :toctree: ../reference ~_config ~_config.utils ~_config.logger_utils ================================================ FILE: docs/source/reference_index/mobjects.rst ================================================ Mobjects ======== .. currentmodule:: manim .. autosummary:: :toctree: ../reference ~mobject.frame ~mobject.geometry ~mobject.graph ~mobject.graphing ~mobject.logo ~mobject.matrix ~mobject.mobject ~mobject.svg ~mobject.table ~mobject.text ~mobject.three_d ~mobject.types ~mobject.utils ~mobject.value_tracker ~mobject.vector_field ================================================ FILE: docs/source/reference_index/scenes.rst ================================================ Scenes ====== .. currentmodule:: manim .. autosummary:: :toctree: ../reference ~scene.moving_camera_scene ~scene.section ~scene.scene ~scene.scene_file_writer ~scene.three_d_scene ~scene.vector_space_scene ~scene.zoomed_scene ================================================ FILE: docs/source/reference_index/utilities_misc.rst ================================================ Utilities and other modules =========================== Module Index ------------ .. currentmodule:: manim .. autosummary:: :toctree: ../reference ~utils.bezier cli ~utils.color ~utils.commands ~utils.config_ops constants data_structures ~utils.debug ~utils.deprecation ~utils.docbuild ~utils.hashing ~utils.images ~utils.ipython_magic ~utils.iterables ~utils.paths ~utils.rate_functions ~utils.simple_functions ~utils.sounds ~utils.space_ops ~utils.testing ~utils.tex ~utils.tex_file_writing ~utils.tex_templates typing ================================================ FILE: docs/source/tutorials/building_blocks.rst ================================================ ####################### Manim's building blocks ####################### This document explains the building blocks of manim and will give you all the necessary tools to start producing your own videos. Essentially, manim puts at your disposal three different concepts that you can orchestrate together to produce mathematical animations: the **mathematical object** (or **mobject** for short), the **animation**, and the **scene**. As we will see in the following sections, each of these three concepts is implemented in manim as a separate class: the :class:`.Mobject`, :class:`.Animation`, and :class:`.Scene` classes. .. note:: It is recommended that you read the tutorials :doc:`quickstart` and :doc:`output_and_config` before reading this page. ******** Mobjects ******** Mobjects are the basic building blocks for all manim animations. Each class that derives from :class:`.Mobject` represents an object that can be displayed on the screen. For example, simple shapes such as :class:`.Circle`, :class:`.Arrow`, and :class:`.Rectangle` are all mobjects. More complicated constructs such as :class:`.Axes`, :class:`.FunctionGraph`, or :class:`.BarChart` are mobjects as well. If you try to display an instance of :class:`.Mobject` on the screen, you will only see an empty frame. The reason is that the :class:`.Mobject` class is an abstract base class of all other mobjects, i.e. it does not have any pre-determined visual shape that can be displayed on the screen. It is only the skeleton of a thing that *could* be displayed. Therefore, you will rarely need to use plain instances of :class:`.Mobject`; instead, you will most likely create instances of its derived classes. One of these derived classes is :class:`.VMobject`. The ``V`` stands for Vectorized Mobject. In essence, a vmobject is a mobject that uses `vector graphics `_ to be displayed. Most of the time, you will be dealing with vmobjects, though we will continue to use the term "mobject" to refer to the class of shapes that can be displayed on the screen, as it is more general. .. note:: Any object that can be displayed on the screen is a ``mobject``, even if it is not necessarily *mathematical* in nature. .. tip:: To see examples of classes derived from :class:`.Mobject`, see the :mod:`.geometry` module. Most of these are in fact derived from :class:`.VMobject` as well. Creating and displaying mobjects ================================ As explained in :doc:`quickstart`, usually all of the code in a manim script is put inside the :meth:`.construct` method of a :class:`.Scene` class. To display a mobject on the screen, call the :meth:`~.Scene.add` method of the containing :class:`.Scene`. This is the principal way of displaying a mobject on the screen when it is not being animated. To remove a mobject from the screen, simply call the :meth:`~.Scene.remove` method from the containing :class:`.Scene`. .. manim:: CreatingMobjects class CreatingMobjects(Scene): def construct(self): circle = Circle() self.add(circle) self.wait(1) self.remove(circle) self.wait(1) Placing mobjects ================ Let's define a new :class:`.Scene` called ``Shapes`` and :meth:`~.Scene.add` some mobjects to it. This script generates a static picture that displays a circle, a square, and a triangle: .. manim:: Shapes class Shapes(Scene): def construct(self): circle = Circle() square = Square() triangle = Triangle() circle.shift(LEFT) square.shift(UP) triangle.shift(RIGHT) self.add(circle, square, triangle) self.wait(1) By default, mobjects are placed at the center of coordinates, or *origin*, when they are first created. They are also given some default colors. Further, the ``Shapes`` scene places the mobjects by using the :meth:`.shift` method. The square is shifted one unit in the ``UP`` direction from the origin, while the circle and triangle are shifted one unit ``LEFT`` and ``RIGHT``, respectively. .. attention:: Unlike other graphics software, manim places the center of coordinates at the center of the screen. The positive vertical direction is up, and the positive horizontal direction is right. See also the constants ``ORIGIN``, ``UP``, ``DOWN``, ``LEFT``, ``RIGHT``, and others, defined in the :mod:`.constants` module. There are many other possible ways to place mobjects on the screen, for example :meth:`.move_to`, :meth:`.next_to`, and :meth:`.align_to`. The next scene ``MobjectPlacement`` uses all three. .. manim:: MobjectPlacement class MobjectPlacement(Scene): def construct(self): circle = Circle() square = Square() triangle = Triangle() # place the circle two units left from the origin circle.move_to(LEFT * 2) # place the square to the left of the circle square.next_to(circle, LEFT) # align the left border of the triangle to the left border of the circle triangle.align_to(circle, LEFT) self.add(circle, square, triangle) self.wait(1) The :meth:`.move_to` method uses absolute units (measured relative to the ``ORIGIN``), while :meth:`.next_to` uses relative units (measured from the mobject passed as the first argument). :meth:`align_to` uses ``LEFT`` not as measuring units but as a way to determine the border to use for alignment. The coordinates of the borders of a mobject are determined using an imaginary bounding box around it. .. tip:: Many methods in manim can be chained together. For example the two lines .. code-block:: python square = Square() square.shift(LEFT) can be replaced by .. code-block:: python square = Square().shift(LEFT) Technically, this is possible because most methods calls return the modified mobject. Styling mobjects ================ The following scene changes the default aesthetics of the mobjects. .. manim:: MobjectStyling class MobjectStyling(Scene): def construct(self): circle = Circle().shift(LEFT) square = Square().shift(UP) triangle = Triangle().shift(RIGHT) circle.set_stroke(color=GREEN, width=20) square.set_fill(YELLOW, opacity=1.0) triangle.set_fill(PINK, opacity=0.5) self.add(circle, square, triangle) self.wait(1) This scene uses two of the main functions that change the visual style of a mobject: :meth:`.set_stroke` and :meth:`.set_fill`. The former changes the visual style of the mobject's border while the latter changes the style of the interior. By default, most mobjects have a fully transparent interior so you must specify the ``opacity`` parameter to display the color. An opacity of ``1.0`` means fully opaque, while ``0.0`` means fully transparent. Only instances of :class:`.VMobject` implement :meth:`.set_stroke` and :meth:`.set_fill`. Instances of :class:`.Mobject` implement :meth:`.~Mobject.set_color` instead. The vast majority of pre-defined classes are derived from :class:`.VMobject` so it is usually safe to assume that you have access to :meth:`.set_stroke` and :meth:`.set_fill`. Mobject on-screen order ======================= The next scene is exactly the same as the ``MobjectStyling`` scene from the previous section, except for exactly one line. .. manim:: MobjectZOrder class MobjectZOrder(Scene): def construct(self): circle = Circle().shift(LEFT) square = Square().shift(UP) triangle = Triangle().shift(RIGHT) circle.set_stroke(color=GREEN, width=20) square.set_fill(YELLOW, opacity=1.0) triangle.set_fill(PINK, opacity=0.5) self.add(triangle, square, circle) self.wait(1) The only difference here (besides the scene name) is the order in which the mobjects are added to the scene. In ``MobjectStyling``, we added them as ``add(circle, square, triangle)``, whereas in ``MobjectZOrder`` we add 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 the screen, with the left-most arguments being put in the back. ********** Animations ********** At the heart of manim is animation. Generally, you can add an animation to your scene by calling the :meth:`~.Scene.play` method. .. manim:: SomeAnimations class SomeAnimations(Scene): def construct(self): square = Square() # some animations display mobjects, ... self.play(FadeIn(square)) # ... some move or rotate mobjects around... self.play(Rotate(square, PI/4)) # some animations remove mobjects from the screen self.play(FadeOut(square)) self.wait(1) Put simply, animations are procedures that interpolate between two mobjects. For example, :code:`FadeIn(square)` starts with a fully transparent version of :code:`square` and ends with a fully opaque version, interpolating between them by gradually increasing the opacity. :class:`.FadeOut` works in the opposite way: it interpolates from fully opaque to fully transparent. As another example, :class:`.Rotate` starts with the mobject passed to it as argument, and ends with the same object but rotated by a certain amount, this time interpolating the mobject's angle instead of its opacity. Animating methods ================= Any property of a mobject that can be changed can be animated. In fact, any method that changes a mobject's property can be used as an animation, through the use of :meth:`.animate`. .. manim:: AnimateExample :ref_classes: Animation class AnimateExample(Scene): def construct(self): square = Square().set_fill(RED, opacity=1.0) self.add(square) # animate the change of color self.play(square.animate.set_fill(WHITE)) self.wait(1) # animate the change of position and the rotation at the same time self.play(square.animate.shift(UP).rotate(PI / 3)) self.wait(1) :meth:`.animate` is a property of all mobjects that animates the methods that come afterward. For example, :code:`square.set_fill(WHITE)` sets the fill color of the square, while :code:`square.animate.set_fill(WHITE)` animates this action. Animation run time ================== By default, any animation passed to :meth:`play` lasts for exactly one second. Use the :code:`run_time` argument to control the duration. .. manim:: RunTime class RunTime(Scene): def construct(self): square = Square() self.add(square) self.play(square.animate.shift(UP), run_time=3) self.wait(1) Creating a custom animation =========================== Even though Manim has many built-in animations, you will find times when you need to smoothly animate from one state of a :class:`~.Mobject` to another. If you find yourself in that situation, then you can define your own custom animation. You start by extending the :class:`~.Animation` class and overriding its :meth:`~.Animation.interpolate_mobject`. The :meth:`~.Animation.interpolate_mobject` method receives alpha as a parameter that starts at 0 and changes throughout the animation. So, you just have to manipulate self.mobject inside Animation according to the alpha value in its interpolate_mobject method. Then you get all the benefits of :class:`~.Animation` such as playing it for different run times or using different rate functions. Let's say you start with a number and want to create a :class:`~.Transform` animation that transforms it to a target number. You can do it using :class:`~.FadeTransform`, which will fade out the starting number and fade in the target number. But when we think about transforming a number from one to another, an intuitive way of doing it is by incrementing or decrementing it smoothly. Manim has a feature that allows you to customize this behavior by defining your own custom animation. You can start by creating your own ``Count`` class that extends :class:`~.Animation`. The class can have a constructor with three arguments, a :class:`~.DecimalNumber` Mobject, start, and end. The constructor will pass the :class:`~.DecimalNumber` Mobject to the super constructor (in this case, the :class:`~.Animation` constructor) and will set start and end. The only thing that you need to do is to define how you want it to look at every step of the animation. Manim provides you with the alpha value in the :meth:`~.Animation.interpolate_mobject` method based on frame rate of video, rate function, and run time of animation played. The alpha parameter holds a value between 0 and 1 representing the step of the currently playing animation. For example, 0 means the beginning of the animation, 0.5 means halfway through the animation, and 1 means the end of the animation. In the case of the ``Count`` animation, you just have to figure out a way to determine the number to display at the given alpha value and then set that value in the :meth:`~.Animation.interpolate_mobject` method of the ``Count`` animation. Suppose you are starting at 50 and incrementing until the :class:`~.DecimalNumber` reaches 100 at the end of the animation. * If alpha is 0, you want the value to be 50. * If alpha is 0.5, you want the value to be 75. * If alpha is 1, you want the value to be 100. Generally, you start with the starting number and add only some part of the value to be increment according to the alpha value. So, the logic of calculating the number to display at each step will be ``50 + alpha * (100 - 50)``. Once you set the calculated value for the :class:`~.DecimalNumber`, you are done. .. note:: If you're creating a custom animation and want to use a ``rate_func``, you must explicitly apply ``self.rate_func(alpha)`` to the parameter you're animating. For example, try switching the rate function to ``rate_functions.there_and_back`` to observe how it affects the counting behavior. Once you have defined your ``Count`` animation, you can play it in your :class:`~.Scene` for any duration you want for any :class:`~.DecimalNumber` with any rate function. .. manim:: CountingScene :ref_classes: Animation DecimalNumber :ref_methods: Animation.interpolate_mobject Scene.play class Count(Animation): def __init__(self, number: DecimalNumber, start: float, end: float, **kwargs) -> None: # Pass number as the mobject of the animation super().__init__(number, **kwargs) # Set start and end self.start = start self.end = end def interpolate_mobject(self, alpha: float) -> None: # Set value of DecimalNumber according to alpha value = self.start + (self.rate_func(alpha) * (self.end - self.start)) self.mobject.set_value(value) class CountingScene(Scene): def construct(self): # Create Decimal Number and add it to scene number = DecimalNumber().set_color(WHITE).scale(5) # Add an updater to keep the DecimalNumber centered as its value changes number.add_updater(lambda number: number.move_to(ORIGIN)) self.add(number) self.wait() # Play the Count Animation to count from 0 to 100 in 4 seconds self.play(Count(number, 0, 100), run_time=4, rate_func=linear) self.wait() Using coordinates of a mobject ============================== Mobjects contain points that define their boundaries. These points can be used to add other mobjects respectively to each other, e.g. by methods like :meth:`~.Mobject.get_center` , :meth:`~.Mobject.get_top` and :meth:`~.Mobject.get_start`. Here is an example of some important coordinates: .. manim:: MobjectExample :save_last_frame: class MobjectExample(Scene): def construct(self): p1 = [-1,-1, 0] p2 = [ 1,-1, 0] p3 = [ 1, 1, 0] p4 = [-1, 1, 0] a = Line(p1,p2).append_points(Line(p2,p3).points).append_points(Line(p3,p4).points) point_start = a.get_start() point_end = a.get_end() point_center = a.get_center() self.add(Text(f"a.get_start() = {np.round(point_start,2).tolist()}", font_size=24).to_edge(UR).set_color(YELLOW)) self.add(Text(f"a.get_end() = {np.round(point_end,2).tolist()}", font_size=24).next_to(self.mobjects[-1],DOWN).set_color(RED)) self.add(Text(f"a.get_center() = {np.round(point_center,2).tolist()}", font_size=24).next_to(self.mobjects[-1],DOWN).set_color(BLUE)) self.add(Dot(a.get_start()).set_color(YELLOW).scale(2)) self.add(Dot(a.get_end()).set_color(RED).scale(2)) self.add(Dot(a.get_top()).set_color(GREEN_A).scale(2)) self.add(Dot(a.get_bottom()).set_color(GREEN_D).scale(2)) self.add(Dot(a.get_center()).set_color(BLUE).scale(2)) self.add(Dot(a.point_from_proportion(0.5)).set_color(ORANGE).scale(2)) self.add(*[Dot(x) for x in a.points]) self.add(a) Transforming mobjects into other mobjects ========================================= It is also possible to transform a mobject into another mobject like this: .. manim:: ExampleTransform class ExampleTransform(Scene): def construct(self): self.camera.background_color = WHITE m1 = Square().set_color(RED) m2 = Rectangle().set_color(RED).rotate(0.2) self.play(Transform(m1,m2)) The Transform function maps points of the previous mobject to the points of the next mobject. This might result in strange behaviour, e.g. when the dots of one mobject are arranged clockwise and the other points are arranged counterclockwise. Here it might help to use the `flip` function and reposition the points via the `roll `_ function of numpy: .. manim:: ExampleRotation class ExampleRotation(Scene): def construct(self): self.camera.background_color = WHITE m1a = Square().set_color(RED).shift(LEFT) m1b = Circle().set_color(RED).shift(LEFT) m2a = Square().set_color(BLUE).shift(RIGHT) m2b = Circle().set_color(BLUE).shift(RIGHT) points = m2a.points points = np.roll(points, int(len(points)/4), axis=0) m2a.points = points self.play(Transform(m1a,m1b),Transform(m2a,m2b), run_time=1) ****** Scenes ****** The :class:`.Scene` class is the connective tissue of manim. Every mobject has to be :meth:`added <.Scene.add>` to a scene to be displayed, or :meth:`removed <.Scene.remove>` from it to cease being displayed. Every animation has to be :meth:`played <.Scene.play>` by a scene, and every time interval where no animation occurs is determined by a call to :meth:`~.Scene.wait`. All of the code of your video must be contained in the :meth:`~.Scene.construct` method of a class that derives from :class:`.Scene`. Finally, a single file may contain multiple :class:`.Scene` subclasses if multiple scenes are to be rendered at the same time. ================================================ FILE: docs/source/tutorials/index.rst ================================================ Tutorials ========= .. toctree:: :caption: Table of Contents :maxdepth: 2 quickstart output_and_config building_blocks ================================================ FILE: docs/source/tutorials/output_and_config.rst ================================================ Manim's Output Settings ======================= This document will focus on understanding manim's output files and some of the main command-line flags available. .. note:: This tutorial picks up where :doc:`quickstart` left off, so please read that document before starting this one. Manim output folders ******************** At this point, you have just executed the following command. .. code-block:: bash manim -pql scene.py SquareToCircle Let's dissect what just happened step by step. First, this command executes manim on the file ``scene.py``, which contains our animation code. Further, 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 may contain more than one scene. Next, the flag `-p` tells manim to play the scene once it's rendered, and the `-ql` flag tells manim to render the scene in low quality. After the video is rendered, you will see that manim has generated some new files and the project folder will look as follows. .. code-block:: bash project/ ├─scene.py └─media ├─videos | └─scene | └─480p15 | ├─SquareToCircle.mp4 | └─partial_movie_files ├─text └─Tex There are quite a few new files. The main output is in ``media/videos/scene/480p15/SquareToCircle.mp4``. By default, the ``media`` folder will contain all of manim's output files. The ``media/videos`` subfolder contains the rendered videos. Inside of it, you will find one folder for each different video quality. In our case, since we used the ``-l`` flag, the video was generated at 480 resolution at 15 frames per second from the ``scene.py`` file. Therefore, the output can be found inside ``media/videos/scene/480p15``. The additional folders ``media/videos/scene/480p15/partial_movie_files`` as well as ``media/text`` and ``media/Tex`` contain files that are used by manim internally. You can see how manim makes use of the generated folder structure by executing the following command, .. code-block:: bash manim -pqh scene.py SquareToCircle The ``-ql`` flag (for low quality) has been replaced by the ``-qh`` flag, for high quality. Manim will take considerably longer to render this file, and it will play it once it's done since we are using the ``-p`` flag. The output should look like this: .. manim:: SquareToCircle3 :hide_source: :quality: high class SquareToCircle3(Scene): def construct(self): circle = Circle() # create a circle circle.set_fill(PINK, opacity=0.5) # set color and transparency square = Square() # create a square square.flip(RIGHT) # flip horizontally square.rotate(-3 * TAU / 8) # rotate a certain amount self.play(Create(square)) # animate the creation of the square self.play(Transform(square, circle)) # interpolate the square into the circle self.play(FadeOut(square)) # fade out animation And the folder structure should look as follows. .. code-block:: bash project/ ├─scene.py └─media ├─videos | └─scene | ├─480p15 | | ├─SquareToCircle.mp4 | | └─partial_movie_files | └─1080p60 | ├─SquareToCircle.mp4 | └─partial_movie_files ├─text └─Tex Manim has created a new folder ``media/videos/1080p60``, which corresponds to the high resolution and the 60 frames per second. Inside of it, you can find the new ``SquareToCircle.mp4``, as well as the corresponding ``partial_movie_files``. When working on a project with multiple scenes, and trying out multiple resolutions, the structure of the output directories will keep all your videos organized. Further, manim has the option to output the last frame of a scene, when adding the flag ``-s``. This is the fastest option to quickly get a preview of a scene. The corresponding folder structure looks like this: .. code-block:: bash project/ ├─scene.py └─media ├─images | └─scene | ├─SquareToCircle.png ├─videos | └─scene | ├─480p15 | | ├─SquareToCircle.mp4 | | └─partial_movie_files | └─1080p60 | ├─SquareToCircle.mp4 | └─partial_movie_files ├─text └─Tex Saving the last frame with ``-s`` can be combined with the flags for different resolutions, e.g. ``-s -ql``, ``-s -qh`` Sections ******** In addition to the movie output file one can use sections. Each section produces its own output video. The cuts between two sections can be set like this: .. code-block:: python def construct(self): # play the first animations... # you don't need a section in the very beginning as it gets created automatically self.next_section() # play more animations... self.next_section("this is an optional name that doesn't have to be unique") # play even more animations... self.next_section("this is a section without any animations, it will be removed") All the animations between two of these cuts get concatenated into a single output video file. Be aware that you need at least one animation in each section. For example this wouldn't create an output video: .. code-block:: python def construct(self): self.next_section() # this section doesn't have any animations and will be removed # but no error will be thrown # feel free to tend your flock of empty sections if you so desire self.add(Circle()) self.next_section() One way of fixing this is to wait a little: .. code-block:: python def construct(self): self.next_section() self.add(Circle()) # now we wait 1sec and have an animation to satisfy the section self.wait() self.next_section() For videos to be created for each section you have to add the ``--save_sections`` flag to the Manim call like this: .. code-block:: bash manim --save_sections scene.py If you do this, the ``media`` folder will look like this: .. code-block:: bash media ├── images │ └── simple_scenes └── videos └── simple_scenes └── 480p15 ├── ElaborateSceneWithSections.mp4 ├── partial_movie_files │ └── ElaborateSceneWithSections │ ├── 2201830969_104169243_1331664314.mp4 │ ├── 2201830969_398514950_125983425.mp4 │ ├── 2201830969_398514950_3447021159.mp4 │ ├── 2201830969_398514950_4144009089.mp4 │ ├── 2201830969_4218360830_1789939690.mp4 │ ├── 3163782288_524160878_1793580042.mp4 │ └── partial_movie_file_list.txt └── sections ├── ElaborateSceneWithSections_0000.mp4 ├── ElaborateSceneWithSections_0001.mp4 ├── ElaborateSceneWithSections_0002.mp4 └── ElaborateSceneWithSections.json As you can see each section receives their own output video in the ``sections`` directory. The JSON file in here contains some useful information for each section: .. code-block:: json [ { "name": "create square", "type": "default.normal", "video": "ElaborateSceneWithSections_0000.mp4", "codec_name": "h264", "width": 854, "height": 480, "avg_frame_rate": "15/1", "duration": "2.000000", "nb_frames": "30" }, { "name": "transform to circle", "type": "default.normal", "video": "ElaborateSceneWithSections_0001.mp4", "codec_name": "h264", "width": 854, "height": 480, "avg_frame_rate": "15/1", "duration": "2.000000", "nb_frames": "30" }, { "name": "fade out", "type": "default.normal", "video": "ElaborateSceneWithSections_0002.mp4", "codec_name": "h264", "width": 854, "height": 480, "avg_frame_rate": "15/1", "duration": "2.000000", "nb_frames": "30" } ] This data can be used by third party applications, like a presentation system or automated video editing tool. You can also skip rendering all animations belonging to a section like this: .. code-block:: python def construct(self): self.next_section(skip_animations=True) # play some animations that shall be skipped... self.next_section() # play some animations that won't get skipped... Some command line flags *********************** When executing the command .. code-block:: bash manim -pql scene.py SquareToCircle it specifies the scene to render. This is not necessary now. When a single file contains only one ``Scene`` class, it will just render the ``Scene`` class. When a single file contains more than one ``Scene`` class, manim will let you choose a ``Scene`` class. If your file contains multiple ``Scene`` classes, and you want to render them all, you can use the ``-a`` flag. As discussed previously, the ``-ql`` specifies low render quality (854x480 15FPS). This does not look very good, but is very useful for rapid prototyping and testing. The other options that specify render quality are ``-qm``, ``-qh``, ``-qp`` and ``-qk`` for medium (1280x720 30FPS), high (1920x1080 60FPS), 2k (2560x1440 60FPS) and 4k quality (3840x2160 60FPS), respectively. The ``-p`` flag plays the animation once it is rendered. If you want to open the file browser at the location of the animation instead of playing it, you can use the ``-f`` flag. You can also omit these two flags. Finally, by default manim will output .mp4 files. If you want your animations in .gif format instead, use the ``--format gif`` flag. The output files will be in the same folder as the .mp4 files, and with the same name, but a different file extension. This was a quick review of some of the most frequent command-line flags. For a thorough review of all flags available, see the :doc:`thematic guide on Manim's configuration system `. ================================================ FILE: docs/source/tutorials/quickstart.rst ================================================ ========== Quickstart ========== .. note:: Before proceeding, install Manim and make sure it is running properly by following the steps in :doc:`../installation`. For information on using Manim with Jupyterlab or Jupyter notebook, go to the documentation for the :meth:`IPython magic command `, ``%%manim``. .. important:: If you installed Manim in the recommended way, using the Python management tool ``uv``, then you either need to make sure the corresponding virtual environment is activated (follow the instructions printed on running ``uv venv``), or you need to remember to prefix the ``manim`` command in the console with ``uv run``; that is, ``uv run manim ...``. Overview ******** This quickstart guide will lead you through creating a sample project using Manim: an animation engine for precise programmatic animations. First, you will use a command line interface to create a ``Scene``, the class through which Manim generates videos. In the ``Scene`` you will animate a circle. Then you will add another ``Scene`` showing a square transforming into a circle. This will be your introduction to Manim's animation ability. Afterwards, you will position multiple mathematical objects (``Mobject``\s). Finally, you will learn the ``.animate`` syntax, a powerful feature that animates the methods you use to modify ``Mobject``\s. Starting a new project ********************** Start by creating a new folder:: manim init project my-project --default The ``my-project`` folder is the root folder for your project. It contains all the files that Manim needs to function, as well as any output that your project produces. Animating a circle ****************** 1. Open a text editor, such as Notepad. Open the file ``main.py`` in the ``my-project`` folder. It should look something like this: .. code-block:: python from manim import * class CreateCircle(Scene): def construct(self): circle = Circle() # create a circle circle.set_fill(PINK, opacity=0.5) # set the color and transparency self.play(Create(circle)) # show the circle on screen 2. Open the command line, navigate to your project folder, and execute the following command: .. code-block:: bash manim -pql main.py CreateCircle Manim will output rendering information, then create an MP4 file. Your default movie player will play the MP4 file, displaying the following animation. .. manim:: CreateCircle :hide_source: class CreateCircle(Scene): def construct(self): circle = Circle() # create a circle circle.set_fill(PINK, opacity=0.5) # set the color and transparency self.play(Create(circle)) # show the circle on screen If you see an animation of a pink circle being drawn, congratulations! You just wrote your first Manim scene from scratch. If you get an error message instead, you do not see a video, or if the video output does not look like the preceding animation, it is likely that Manim has not been installed correctly. Please refer to our :doc:`FAQ section ` for help with the most common issues. *********** Explanation *********** Let's go over the script you just executed line by line to see how Manim was able to draw the circle. The first line imports all of the contents of the library: .. code-block:: python from manim import * This is the recommended way of using Manim, as a single script often uses multiple names from the Manim namespace. In your script, you imported and used ``Scene``, ``Circle``, ``PINK`` and ``Create``. Now let's look at the next two lines: .. code-block:: python class CreateCircle(Scene): def construct(self): [...] Most of the time, the code for scripting an animation is entirely contained within the :meth:`~.Scene.construct` method of a :class:`.Scene` class. Inside :meth:`~.Scene.construct`, you can create objects, display them on screen, and animate them. The next two lines create a circle and set its color and opacity: .. code-block:: python circle = Circle() # create a circle circle.set_fill(PINK, opacity=0.5) # set the color and transparency Finally, the last line uses the animation :class:`.Create` to display the circle on your screen: .. code-block:: python self.play(Create(circle)) # show the circle on screen .. tip:: All animations must reside within the :meth:`~.Scene.construct` method of a class derived from :class:`.Scene`. Other code, such as auxiliary or mathematical functions, may reside outside the class. Transforming a square into a circle *********************************** With our circle animation complete, let's move on to something a little more complicated. 1. Open ``scene.py``, and add the following code snippet below the ``CreateCircle`` class: .. code-block:: python class SquareToCircle(Scene): def construct(self): circle = Circle() # create a circle circle.set_fill(PINK, opacity=0.5) # set color and transparency square = Square() # create a square square.rotate(PI / 4) # rotate a certain amount self.play(Create(square)) # animate the creation of the square self.play(Transform(square, circle)) # interpolate the square into the circle self.play(FadeOut(square)) # fade out animation 2. Render ``SquareToCircle`` by running the following command in the command line: .. code-block:: bash manim -pql scene.py SquareToCircle The following animation will render: .. manim:: SquareToCircle2 :hide_source: class SquareToCircle2(Scene): def construct(self): circle = Circle() # create a circle circle.set_fill(PINK, opacity=0.5) # set color and transparency square = Square() # create a square square.rotate(PI / 4) # rotate a certain amount self.play(Create(square)) # animate the creation of the square self.play(Transform(square, circle)) # interpolate the square into the circle self.play(FadeOut(square)) # fade out animation This example shows one of the primary features of Manim: the ability to implement complicated and mathematically intensive animations (such as cleanly interpolating between two geometric shapes) with just a few lines of code. Positioning ``Mobject``\s ************************* Next, let's go over some basic techniques for positioning ``Mobject``\s. 1. Open ``scene.py``, and add the following code snippet below the ``SquareToCircle`` method: .. code-block:: python class SquareAndCircle(Scene): def construct(self): circle = Circle() # create a circle circle.set_fill(PINK, opacity=0.5) # set the color and transparency square = Square() # create a square square.set_fill(BLUE, opacity=0.5) # set the color and transparency square.next_to(circle, RIGHT, buff=0.5) # set the position self.play(Create(circle), Create(square)) # show the shapes on screen 2. Render ``SquareAndCircle`` by running the following command in the command line: .. code-block:: bash manim -pql scene.py SquareAndCircle The following animation will render: .. manim:: SquareAndCircle2 :hide_source: class SquareAndCircle2(Scene): def construct(self): circle = Circle() # create a circle circle.set_fill(PINK, opacity=0.5) # set the color and transparency square = Square() # create a square square.set_fill(BLUE, opacity=0.5) # set the color and transparency square.next_to(circle, RIGHT, buff=0.5) # set the position self.play(Create(circle), Create(square)) # show the shapes on screen ``next_to`` is a ``Mobject`` method for positioning ``Mobject``\s. We first specified the pink circle as the square's reference point by passing ``circle`` as the method's first argument. The second argument is used to specify the direction the ``Mobject`` is placed relative to the reference point. In this case, we set the direction to ``RIGHT``, telling Manim to position the square to the right of the circle. Finally, ``buff=0.5`` applied a small distance buffer between the two objects. Try changing ``RIGHT`` to ``LEFT``, ``UP``, or ``DOWN`` instead, and see how that changes the position of the square. Using positioning methods, you can render a scene with multiple ``Mobject``\s, setting their locations in the scene using coordinates or positioning them relative to each other. For more information on ``next_to`` and other positioning methods, check out the list of :class:`.Mobject` methods in our reference manual. Using ``.animate`` syntax to animate methods ******************************************** The final lesson in this tutorial is using ``.animate``, a ``Mobject`` method which animates changes you make to a ``Mobject``. When you prepend ``.animate`` to any method call that modifies a ``Mobject``, the method becomes an animation which can be played using ``self.play``. Let's return to ``SquareToCircle`` to see the differences between using methods when creating a ``Mobject``, and animating those method calls with ``.animate``. 1. Open ``scene.py``, and add the following code snippet below the ``SquareAndCircle`` class: .. code-block:: python class AnimatedSquareToCircle(Scene): def construct(self): circle = Circle() # create a circle square = Square() # create a square self.play(Create(square)) # show the square on screen self.play(square.animate.rotate(PI / 4)) # rotate the square self.play(Transform(square, circle)) # transform the square into a circle self.play( square.animate.set_fill(PINK, opacity=0.5) ) # color the circle on screen 2. Render ``AnimatedSquareToCircle`` by running the following command in the command line: .. code-block:: bash manim -pql scene.py AnimatedSquareToCircle The following animation will render: .. manim:: AnimatedSquareToCircle2 :hide_source: class AnimatedSquareToCircle2(Scene): def construct(self): circle = Circle() # create a circle square = Square() # create a square self.play(Create(square)) # show the square on screen self.play(square.animate.rotate(PI / 4)) # rotate the square self.play(Transform(square, circle)) # transform the square into a circle self.play(square.animate.set_fill(PINK, opacity=0.5)) # color the circle on screen The first ``self.play`` creates the square. The second animates rotating it 45 degrees. The third transforms the square into a circle, and the last colors the circle pink. Although the end result is the same as that of ``SquareToCircle``, ``.animate`` shows ``rotate`` and ``set_fill`` being applied to the ``Mobject`` dynamically, instead of creating them with the changes already applied. Try other methods, like ``flip`` or ``shift``, and see what happens. 3. Open ``scene.py``, and add the following code snippet below the ``AnimatedSquareToCircle`` class: .. code-block:: python class DifferentRotations(Scene): def construct(self): left_square = Square(color=BLUE, fill_opacity=0.7).shift(2 * LEFT) right_square = Square(color=GREEN, fill_opacity=0.7).shift(2 * RIGHT) self.play( left_square.animate.rotate(PI), Rotate(right_square, angle=PI), run_time=2 ) self.wait() 4. Render ``DifferentRotations`` by running the following command in the command line: .. code-block:: bash manim -pql scene.py DifferentRotations The following animation will render: .. manim:: DifferentRotations2 :hide_source: class DifferentRotations2(Scene): def construct(self): left_square = Square(color=BLUE, fill_opacity=0.7).shift(2*LEFT) right_square = Square(color=GREEN, fill_opacity=0.7).shift(2*RIGHT) self.play(left_square.animate.rotate(PI), Rotate(right_square, angle=PI), run_time=2) self.wait() This ``Scene`` illustrates the quirks of ``.animate``. When using ``.animate``, Manim actually takes a ``Mobject``'s starting state and its ending state and interpolates the two. In the ``AnimatedSquareToCircle`` class, you can observe this when the square rotates: the corners of the square appear to contract slightly as they move into the positions required for the first square to transform into the second one. In ``DifferentRotations``, the difference between ``.animate``'s interpretation of rotation and the ``Rotate`` method is far more apparent. The starting and ending states of a ``Mobject`` rotated 180 degrees are the same, so ``.animate`` tries to interpolate two identical objects and the result is the left square. If you find that your own usage of ``.animate`` is causing similar unwanted behavior, consider using conventional animation methods like the right square, which uses ``Rotate``. ``Transform`` vs ``ReplacementTransform`` ***************************************** The difference between ``Transform`` and ``ReplacementTransform`` is that ``Transform(mob1, mob2)`` transforms the points (as well as other attributes like color) of ``mob1`` into the points/attributes of ``mob2``. ``ReplacementTransform(mob1, mob2)`` on the other hand literally replaces ``mob1`` on the scene with ``mob2``. The use of ``ReplacementTransform`` or ``Transform`` is mostly up to personal preference. They can be used to accomplish the same effect, as shown below. .. code-block:: python class TwoTransforms(Scene): def transform(self): a = Circle() b = Square() c = Triangle() self.play(Transform(a, b)) self.play(Transform(a, c)) self.play(FadeOut(a)) def replacement_transform(self): a = Circle() b = Square() c = Triangle() self.play(ReplacementTransform(a, b)) self.play(ReplacementTransform(b, c)) self.play(FadeOut(c)) def construct(self): self.transform() self.wait(0.5) # wait for 0.5 seconds self.replacement_transform() However, in some cases it is more beneficial to use ``Transform``, like when you are transforming several mobjects one after the other. The code below avoids having to keep a reference to the last mobject that was transformed. .. manim:: TransformCycle class TransformCycle(Scene): def construct(self): a = Circle() t1 = Square() t2 = Triangle() self.add(a) self.wait() for t in [t1,t2]: self.play(Transform(a,t)) ************ You're done! ************ With a working installation of Manim and this sample project under your belt, you're ready to start creating animations of your own. To learn more about what Manim is doing under the hood, move on to the next tutorial: :doc:`output_and_config`. For an overview of Manim's features, as well as its configuration and other settings, check out the other :doc:`Tutorials <../tutorials/index>`. For a list of all available features, refer to the :doc:`../reference` page. ================================================ FILE: example_scenes/advanced_tex_fonts.py ================================================ 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(Create(FrenchCursive("$f: A \\longrightarrow B$").shift(UP))) self.play(Create(FrenchCursive("Behold! We can write math in French Cursive"))) self.wait(1) self.play( Create( 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 Microsoft 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(Create(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 Exception: print("FAILURE on ", font.description, " - skipping.") self.play( Create( Tex( "See more font templates at \\\\ http://jf.burnol.free.fr/showcase.html", ).shift(2 * DOWN), ), ) self.wait(2) ================================================ FILE: example_scenes/basic.py ================================================ #!/usr/bin/env python from manim import * # To watch one of these scenes, run the following: # python --quality m manim -p example_scenes.py SquareToCircle # # 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 preview of the animation (or image, if -s was # used) pop up once done. # Use -n to skip ahead to the nth animation of a scene. # Use -r to specify a resolution (for example, -r 1920,1080 # for a 1920x1080 video) class OpeningManim(Scene): def construct(self): title = Tex(r"This is some \LaTeX") basel = MathTex(r"\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}") VGroup(title, basel).arrange(DOWN) self.play( Write(title), FadeIn(basel, shift=DOWN), ) self.wait() transform_title = Tex("That was a transform") transform_title.to_corner(UP + LEFT) self.play( Transform(title, transform_title), LaggedStart(*(FadeOut(obj, shift=DOWN) for obj in basel)), ) self.wait() grid = NumberPlane() grid_title = Tex("This is a grid", font_size=72) grid_title.move_to(transform_title) self.add(grid, grid_title) # Make sure title is on top of grid self.play( FadeOut(title), FadeIn(grid_title, shift=UP), Create(grid, run_time=3, lag_ratio=0.1), ) self.wait() grid_transform_title = Tex( r"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.animate.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() class SquareToCircle(Scene): def construct(self): circle = Circle() square = Square() square.flip(RIGHT) square.rotate(-3 * TAU / 8) circle.set_fill(PINK, opacity=0.5) self.play(Create(square)) self.play(Transform(square, circle)) self.play(FadeOut(square)) 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() 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.width = config["frame_width"] - 2 * LARGE_BUFF self.play(Write(example_text)) self.play(Write(example_tex)) self.wait() class UpdatersExample(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.animate.to_edge(DOWN), rate_func=there_and_back, run_time=5, ) self.wait() class SpiralInExample(Scene): def construct(self): logo_green = "#81b29a" logo_blue = "#454866" logo_red = "#e07a5f" font_color = "#ece6e2" pi = MathTex(r"\pi").scale(7).set_color(font_color) pi.shift(2.25 * LEFT + 1.5 * UP) circle = Circle(color=logo_green, fill_opacity=0.7, stroke_width=0).shift(LEFT) square = Square(color=logo_blue, fill_opacity=0.8, stroke_width=0).shift(UP) triangle = Triangle(color=logo_red, fill_opacity=0.9, stroke_width=0).shift( RIGHT ) pentagon = Polygon( *[ [np.cos(2 * np.pi / 5 * i), np.sin(2 * np.pi / 5 * i), 0] for i in range(5) ], color=PURPLE_B, fill_opacity=1, stroke_width=0, ).shift(UP + 2 * RIGHT) shapes = VGroup(triangle, square, circle, pentagon, pi) self.play(SpiralIn(shapes, fade_in_fraction=0.9)) self.wait() self.play(FadeOut(shapes)) Triangle.set_default(stroke_width=20) class LineJoints(Scene): def construct(self): t1 = Triangle() t2 = Triangle(joint_type=LineJointType.ROUND) t3 = Triangle(joint_type=LineJointType.BEVEL) grp = VGroup(t1, t2, t3).arrange(RIGHT) grp.set(width=config.frame_width - 1) self.add(grp) # See many more examples at https://docs.manim.community/en/stable/examples.html ================================================ FILE: example_scenes/custom_template.tex ================================================ \documentclass[preview]{standalone} \usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb} \usepackage[f]{esvect} \begin{document} YourTextHere \end{document} ================================================ FILE: example_scenes/customtex.py ================================================ from manim import * class TexTemplateFromCLI(Scene): """This scene uses a custom TexTemplate file. The path of the TexTemplate _must_ be passed with the command line argument `--tex_template `. For this scene, you can use the custom_template.tex file next to it. This scene will fail to render if a tex_template.tex that doesn't import esvect is passed, and will throw a LaTeX error in that case. """ def construct(self): text = MathTex(r"\vv{vb}") self.play(Write(text)) self.wait(1) class InCodeTexTemplate(Scene): """This example scene demonstrates how to modify the tex template for a particular scene from the code for the scene itself. """ def construct(self): # Create a new template myTemplate = TexTemplate() # 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 = "latex" myTemplate.output_format = ".dvi" # 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) ================================================ FILE: example_scenes/manim.cfg ================================================ #This is some custom configuration just as an example [logger] logging_keyword = magenta logging_level_notset = dim logging_level_debug = yellow logging_level_info = dim green logging_level_warning = dim red logging_level_error = red logging_level_critical = red log_level = log_time = dim yellow log_message = green log_path = dim ================================================ FILE: example_scenes/manim_jupyter_example.ipynb ================================================ # Jupyter notebook converted to Python script. from manim import * %%manim -v WARNING --disable_caching -ql -s Example1 class Example1(Scene): def construct(self): self.add(Circle()) %%manim -v WARNING --disable_caching -qm HelloManim # set the maximum width for video outputs to a predefined value config.media_width = "20vw" # embed video config.media_embed = True class HelloManim(Scene): def construct(self): self.camera.background_color = "#ece6e2" banner_large = ManimBanner(dark_theme=False).scale(0.7) self.play(banner_large.create()) self.play(banner_large.expand()) ================================================ FILE: example_scenes/opengl.py ================================================ from pathlib import Path import manim.utils.opengl as opengl from manim import * from manim.opengl import * # Copied from https://3b1b.github.io/manim/getting_started/example_scenes.html#surfaceexample. # Lines that do not yet work with the Community Version are commented. def get_plane_mesh(context): shader = Shader(context, name="vertex_colors") attributes = np.zeros( 18, dtype=[ ("in_vert", np.float32, (4,)), ("in_color", np.float32, (4,)), ], ) attributes["in_vert"] = np.array( [ # xy plane [-1, -1, 0, 1], [-1, 1, 0, 1], [1, 1, 0, 1], [-1, -1, 0, 1], [1, -1, 0, 1], [1, 1, 0, 1], # yz plane [0, -1, -1, 1], [0, -1, 1, 1], [0, 1, 1, 1], [0, -1, -1, 1], [0, 1, -1, 1], [0, 1, 1, 1], # xz plane [-1, 0, -1, 1], [-1, 0, 1, 1], [1, 0, 1, 1], [-1, 0, -1, 1], [1, 0, -1, 1], [1, 0, 1, 1], ], ) attributes["in_color"] = np.array( [ # xy plane [1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1], # yz plane [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1], # xz plane [0, 0, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], ], ) return Mesh(shader, attributes) class TextTest(Scene): def construct(self): import string text = Text(string.ascii_lowercase, stroke_width=4, stroke_color=BLUE).scale(2) text2 = ( Text(string.ascii_uppercase, stroke_width=4, stroke_color=BLUE) .scale(2) .next_to(text, DOWN) ) # self.add(text, text2) self.play(Write(text)) self.play(Write(text2)) self.interactive_embed() class GuiTest(Scene): def construct(self): mesh = get_plane_mesh(self.renderer.context) # mesh.attributes["in_vert"][:, 0] self.add(mesh) def update_mesh(mesh, dt): mesh.model_matrix = np.matmul( opengl.rotation_matrix(z=dt), mesh.model_matrix, ) mesh.add_updater(update_mesh) self.interactive_embed() class GuiTest2(Scene): def construct(self): mesh = get_plane_mesh(self.renderer.context) mesh.attributes["in_vert"][:, 0] -= 2 self.add(mesh) mesh2 = get_plane_mesh(self.renderer.context) mesh2.attributes["in_vert"][:, 0] += 2 self.add(mesh2) def callback(sender, data): mesh2.attributes["in_color"][:, 3] = dpg.get_value(sender) self.widgets.append( { "name": "mesh2 opacity", "widget": "slider_float", "callback": callback, "min_value": 0, "max_value": 1, "default_value": 1, }, ) self.interactive_embed() class ThreeDMobjectTest(Scene): def construct(self): # config["background_color"] = "#333333" s = Square(fill_opacity=0.5).shift(2 * RIGHT) self.add(s) sp = Sphere().shift(2 * LEFT) self.add(sp) mesh = get_plane_mesh(self.renderer.context) self.add(mesh) def update_mesh(mesh, dt): mesh.model_matrix = np.matmul( opengl.rotation_matrix(z=dt), mesh.model_matrix, ) mesh.add_updater(update_mesh) self.interactive_embed() class NamedFullScreenQuad(Scene): def construct(self): surface = FullScreenQuad(self.renderer.context, fragment_shader_name="design_3") surface.shader.set_uniform( "u_resolution", (config["pixel_width"], config["pixel_height"], 0.0), ) surface.shader.set_uniform("u_time", 0) self.add(surface) t = 0 def update_surface(surface, dt): nonlocal t t += dt surface.shader.set_uniform("u_time", t / 4) surface.add_updater(update_surface) # self.wait() self.interactive_embed() class InlineFullScreenQuad(Scene): def construct(self): surface = FullScreenQuad( self.renderer.context, """ #version 330 #define TWO_PI 6.28318530718 uniform vec2 u_resolution; uniform float u_time; out vec4 frag_color; // Function from Iñigo Quiles // https://www.shadertoy.com/view/MsS3Wc vec3 hsb2rgb( in vec3 c ){ vec3 rgb = clamp(abs(mod(c.x*6.0+vec3(0.0,4.0,2.0), 6.0)-3.0)-1.0, 0.0, 1.0 ); rgb = rgb*rgb*(3.0-2.0*rgb); return c.z * mix( vec3(1.0), rgb, c.y); } void main(){ vec2 st = gl_FragCoord.xy/u_resolution; vec3 color = vec3(0.0); // Use polar coordinates instead of cartesian vec2 toCenter = vec2(0.5)-st; float angle = atan(toCenter.y,toCenter.x); angle += u_time; float radius = length(toCenter)*2.0; // Map the angle (-PI to PI) to the Hue (from 0 to 1) // and the Saturation to the radius color = hsb2rgb(vec3((angle/TWO_PI)+0.5,radius,1.0)); frag_color = vec4(color,1.0); } """, ) surface.shader.set_uniform( "u_resolution", (config["pixel_width"], config["pixel_height"]), ) shader_time = 0 def update_surface(surface): nonlocal shader_time surface.shader.set_uniform("u_time", shader_time) shader_time += 1 / 60.0 surface.add_updater(update_surface) self.add(surface) # self.wait(5) self.interactive_embed() class SimpleInlineFullScreenQuad(Scene): def construct(self): surface = FullScreenQuad( self.renderer.context, """ #version 330 uniform float v_red; uniform float v_green; uniform float v_blue; out vec4 frag_color; void main() { frag_color = vec4(v_red, v_green, v_blue, 1); } """, ) surface.shader.set_uniform("v_red", 0) surface.shader.set_uniform("v_green", 0) surface.shader.set_uniform("v_blue", 0) increase = True val = 0.5 surface.shader.set_uniform("v_red", val) surface.shader.set_uniform("v_green", val) surface.shader.set_uniform("v_blue", val) def update_surface(mesh, dt): nonlocal increase nonlocal val if increase: val += dt else: val -= dt if val >= 1: increase = False elif val <= 0: increase = True surface.shader.set_uniform("v_red", val) surface.shader.set_uniform("v_green", val) surface.shader.set_uniform("v_blue", val) surface.add_updater(update_surface) self.add(surface) self.wait(5) class InlineShaderExample(Scene): def construct(self): config["background_color"] = "#333333" c = Circle(fill_opacity=0.7).shift(UL) self.add(c) shader = Shader( self.renderer.context, source={ "vertex_shader": """ #version 330 in vec4 in_vert; in vec4 in_color; out vec4 v_color; uniform mat4 u_model_view_matrix; uniform mat4 u_projection_matrix; void main() { v_color = in_color; vec4 camera_space_vertex = u_model_view_matrix * in_vert; vec4 clip_space_vertex = u_projection_matrix * camera_space_vertex; gl_Position = clip_space_vertex; } """, "fragment_shader": """ #version 330 in vec4 v_color; out vec4 frag_color; void main() { frag_color = v_color; } """, }, ) shader.set_uniform("u_model_view_matrix", opengl.view_matrix()) shader.set_uniform( "u_projection_matrix", opengl.orthographic_projection_matrix(), ) attributes = np.zeros( 6, dtype=[ ("in_vert", np.float32, (4,)), ("in_color", np.float32, (4,)), ], ) attributes["in_vert"] = np.array( [ [-1, -1, 0, 1], [-1, 1, 0, 1], [1, 1, 0, 1], [-1, -1, 0, 1], [1, -1, 0, 1], [1, 1, 0, 1], ], ) attributes["in_color"] = np.array( [ [0, 0, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], [0, 0, 1, 1], ], ) mesh = Mesh(shader, attributes) self.add(mesh) self.wait(5) # self.embed_2() class NamedShaderExample(Scene): def construct(self): shader = Shader(self.renderer.context, "manim_coords") shader.set_uniform("u_color", (0.0, 1.0, 0.0, 1.0)) view_matrix = self.camera.formatted_view_matrix shader.set_uniform("u_model_view_matrix", view_matrix) shader.set_uniform( "u_projection_matrix", opengl.perspective_projection_matrix(), ) attributes = np.zeros( 6, dtype=[ ("in_vert", np.float32, (4,)), ], ) attributes["in_vert"] = np.array( [ [-1, -1, 0, 1], [-1, 1, 0, 1], [1, 1, 0, 1], [-1, -1, 0, 1], [1, -1, 0, 1], [1, 1, 0, 1], ], ) mesh = Mesh(shader, attributes) self.add(mesh) self.wait(5) class InteractiveDevelopment(Scene): def construct(self): circle = Circle() circle.set_fill(BLUE, opacity=0.5) circle.set_stroke(BLUE_E, width=4) square = Square() self.play(Create(square)) self.wait() # This opens an iPython terminal where you can keep writing # lines as if they were part of this construct method. # In particular, 'square', 'circle' and 'self' will all be # part of the local namespace in that terminal. # self.embed() # Try copying and pasting some of the lines below into # the interactive shell self.play(ReplacementTransform(square, circle)) self.wait() self.play(circle.animate.stretch(4, 0)) self.play(Rotate(circle, 90 * DEGREES)) self.play(circle.animate.shift(2 * RIGHT).scale(0.25)) # text = Text( # """ # In general, using the interactive shell # is very helpful when developing new scenes # """ # ) # self.play(Write(text)) # # In the interactive shell, you can just type # # play, add, remove, clear, wait, save_state and restore, # # instead of self.play, self.add, self.remove, etc. # # To interact with the window, type touch(). You can then # # scroll in the window, or zoom by holding down 'z' while scrolling, # # and change camera perspective by holding down 'd' while moving # # the mouse. Press 'r' to reset to the standard camera position. # # Press 'q' to stop interacting with the window and go back to # # typing new commands into the shell. # # In principle you can customize a scene to be responsive to # # mouse and keyboard interactions # always(circle.move_to, self.mouse_point) class SurfaceExample(Scene): def construct(self): # surface_text = Text("For 3d scenes, try using surfaces") # surface_text.fix_in_frame() # surface_text.to_edge(UP) # self.add(surface_text) # self.wait(0.1) torus1 = Torus(major_radius=1, minor_radius=1) torus2 = Torus(major_radius=3, minor_radius=1) sphere = Sphere(radius=3, resolution=torus1.resolution) # You can texture a surface with up to two images, which will # be interpreted as the side towards the light, and away from # the light. These can be either urls, or paths to a local file # in whatever you've set as the image directory in # the custom_config.yml file script_location = Path(__file__).resolve().parent day_texture = ( script_location / "assets" / "1280px-Whole_world_-_land_and_oceans.jpg" ) night_texture = script_location / "assets" / "1280px-The_earth_at_night.jpg" surfaces = [ OpenGLTexturedSurface(surface, day_texture, night_texture) for surface in [sphere, torus1, torus2] ] for mob in surfaces: mob.shift(IN) mob.mesh = OpenGLSurfaceMesh(mob) mob.mesh.set_stroke(BLUE, 1, opacity=0.5) # Set perspective frame = self.renderer.camera frame.set_euler_angles( theta=-30 * DEGREES, phi=70 * DEGREES, ) surface = surfaces[0] self.play( FadeIn(surface), Create(surface.mesh, lag_ratio=0.01, run_time=3), ) for mob in surfaces: mob.add(mob.mesh) surface.save_state() self.play(Rotate(surface, PI / 2), run_time=2) for mob in surfaces[1:]: mob.rotate(PI / 2) self.play(Transform(surface, surfaces[1]), run_time=3) self.play( Transform(surface, surfaces[2]), # Move camera frame during the transition frame.animate.increment_phi(-10 * DEGREES), frame.animate.increment_theta(-20 * DEGREES), run_time=3, ) # Add ambient rotation frame.add_updater(lambda m, dt: m.increment_theta(-0.1 * dt)) # Play around with where the light is # light_text = Text("You can move around the light source") # light_text.move_to(surface_text) # light_text.fix_in_frame() # self.play(FadeTransform(surface_text, light_text)) light = self.camera.light_source self.add(light) light.save_state() self.play(light.animate.move_to(3 * IN), run_time=5) self.play(light.animate.shift(10 * OUT), run_time=5) # drag_text = Text("Try moving the mouse while pressing d or s") # drag_text.move_to(light_text) # drag_text.fix_in_frame() ================================================ FILE: manim/__init__.py ================================================ #!/usr/bin/env python from __future__ import annotations from importlib.metadata import PackageNotFoundError, version # Use installed distribution version if available; otherwise fall back to a # sensible default so that importing from a source checkout works without an # editable install (pip install -e .). try: __version__ = version(__name__) except PackageNotFoundError: # Package is not installed; provide a fallback version string. __version__ = "0.0.0+unknown" # isort: off # Importing the config module should be the first thing we do, since other # modules depend on the global config dict for initialization. from ._config import * # many scripts depend on this -> has to be loaded first from .utils.commands import * # isort: on import numpy as np from .animation.animation import * from .animation.changing import * from .animation.composition import * from .animation.creation import * from .animation.fading import * from .animation.growing import * from .animation.indication import * from .animation.movement import * from .animation.numbers import * from .animation.rotation import * from .animation.specialized import * from .animation.speedmodifier import * from .animation.transform import * from .animation.transform_matching_parts import * from .animation.updaters.mobject_update_utils import * from .animation.updaters.update import * from .camera.camera import * from .camera.mapping_camera import * from .camera.moving_camera import * from .camera.multi_camera import * from .camera.three_d_camera import * from .constants import * from .mobject.frame import * from .mobject.geometry.arc import * from .mobject.geometry.boolean_ops import * from .mobject.geometry.labeled import * from .mobject.geometry.line import * from .mobject.geometry.polygram import * from .mobject.geometry.shape_matchers import * from .mobject.geometry.tips import * from .mobject.graph import * from .mobject.graphing.coordinate_systems import * from .mobject.graphing.functions import * from .mobject.graphing.number_line import * from .mobject.graphing.probability import * from .mobject.graphing.scale import * from .mobject.logo import * from .mobject.matrix import * from .mobject.mobject import * from .mobject.opengl.dot_cloud import * from .mobject.opengl.opengl_point_cloud_mobject import * from .mobject.svg.brace import * from .mobject.svg.svg_mobject import * from .mobject.table import * from .mobject.text.code_mobject import * from .mobject.text.numbers import * from .mobject.text.tex_mobject import * from .mobject.text.text_mobject import * from .mobject.three_d.polyhedra import * from .mobject.three_d.three_d_utils import * from .mobject.three_d.three_dimensions import * from .mobject.types.image_mobject import * from .mobject.types.point_cloud_mobject import * from .mobject.types.vectorized_mobject import * from .mobject.value_tracker import * from .mobject.vector_field import * from .renderer.cairo_renderer import * from .scene.moving_camera_scene import * from .scene.scene import * from .scene.scene_file_writer import * from .scene.section import * from .scene.three_d_scene import * from .scene.vector_space_scene import * from .scene.zoomed_scene import * from .utils import color, rate_functions, unit from .utils.bezier import * from .utils.color import * from .utils.config_ops import * from .utils.debug import * from .utils.file_ops import * from .utils.images import * from .utils.iterables import * from .utils.paths import * from .utils.rate_functions import * from .utils.simple_functions import * from .utils.sounds import * from .utils.space_ops import * from .utils.tex import * from .utils.tex_templates import * try: from IPython import get_ipython from .utils.ipython_magic import ManimMagic except ImportError: pass else: ipy = get_ipython() if ipy is not None: ipy.register_magics(ManimMagic) from .plugins import * ================================================ FILE: manim/__main__.py ================================================ from __future__ import annotations import click import cloup from manim import __version__ from manim._config import cli_ctx_settings, console from manim.cli.cfg.group import cfg from manim.cli.checkhealth.commands import checkhealth from manim.cli.default_group import DefaultGroup from manim.cli.init.commands import init from manim.cli.plugins.commands import plugins from manim.cli.render.commands import render from manim.constants import EPILOG def show_splash(ctx: click.Context, param: click.Option, value: str | None) -> None: """When giving a value by console, show an initial message with the Manim version before executing any other command: ``Manim Community vA.B.C``. Parameters ---------- ctx The Click context. param A Click option. value A string value given by console, or None. """ if value: console.print(f"Manim Community [green]v{__version__}[/green]\n") def print_version_and_exit( ctx: click.Context, param: click.Option, value: str | None ) -> None: """Same as :func:`show_splash`, but also exit when giving a value by console. Parameters ---------- ctx The Click context. param A Click option. value A string value given by console, or None. """ show_splash(ctx, param, value) if value: ctx.exit() @cloup.group( context_settings=cli_ctx_settings, cls=DefaultGroup, default="render", no_args_is_help=True, help="Animation engine for explanatory math videos.", epilog="See 'manim ' to read about a specific subcommand.\n\n" "Note: the subcommand 'manim render' is called if no other subcommand " "is specified. Run 'manim render --help' if you would like to know what the " f"'-ql' or '-p' flags do, for example.\n\n{EPILOG}", ) @cloup.option( "--version", is_flag=True, help="Show version and exit.", callback=print_version_and_exit, is_eager=True, expose_value=False, ) @click.option( "--show-splash/--hide-splash", is_flag=True, default=True, help="Print splash message with version information.", callback=show_splash, is_eager=True, expose_value=False, ) @cloup.pass_context def main(ctx: click.Context) -> None: """The entry point for Manim. Parameters ---------- ctx The Click context. """ pass main.add_command(checkhealth) main.add_command(cfg) main.add_command(plugins) main.add_command(init) main.add_command(render) if __name__ == "__main__": main() ================================================ FILE: manim/constants.py ================================================ """Constant definitions.""" from __future__ import annotations from enum import Enum from typing import TypedDict import numpy as np from cloup import Context from PIL.Image import Resampling from manim.typing import Vector3D __all__ = [ "SCENE_NOT_FOUND_MESSAGE", "CHOOSE_NUMBER_MESSAGE", "INVALID_NUMBER_MESSAGE", "NO_SCENE_MESSAGE", "NORMAL", "ITALIC", "OBLIQUE", "BOLD", "THIN", "ULTRALIGHT", "LIGHT", "SEMILIGHT", "BOOK", "MEDIUM", "SEMIBOLD", "ULTRABOLD", "HEAVY", "ULTRAHEAVY", "RESAMPLING_ALGORITHMS", "ORIGIN", "UP", "DOWN", "RIGHT", "LEFT", "IN", "OUT", "X_AXIS", "Y_AXIS", "Z_AXIS", "UL", "UR", "DL", "DR", "START_X", "START_Y", "DEFAULT_DOT_RADIUS", "DEFAULT_SMALL_DOT_RADIUS", "DEFAULT_DASH_LENGTH", "DEFAULT_ARROW_TIP_LENGTH", "SMALL_BUFF", "MED_SMALL_BUFF", "MED_LARGE_BUFF", "LARGE_BUFF", "DEFAULT_MOBJECT_TO_EDGE_BUFFER", "DEFAULT_MOBJECT_TO_MOBJECT_BUFFER", "DEFAULT_POINTWISE_FUNCTION_RUN_TIME", "DEFAULT_WAIT_TIME", "DEFAULT_POINT_DENSITY_2D", "DEFAULT_POINT_DENSITY_1D", "DEFAULT_STROKE_WIDTH", "DEFAULT_FONT_SIZE", "SCALE_FACTOR_PER_FONT_POINT", "PI", "TAU", "DEGREES", "QUALITIES", "DEFAULT_QUALITY", "EPILOG", "CONTEXT_SETTINGS", "SHIFT_VALUE", "CTRL_VALUE", "RendererType", "LineJointType", "CapStyleType", ] # Messages SCENE_NOT_FOUND_MESSAGE = """ {} is not in the script """ CHOOSE_NUMBER_MESSAGE = """ Choose number corresponding to desired scene/arguments. (Use comma separated list for multiple entries) Choice(s): """ INVALID_NUMBER_MESSAGE = "Invalid scene numbers have been specified. Aborting." NO_SCENE_MESSAGE = """ There are no scenes inside that module """ # Pango stuff NORMAL = "NORMAL" ITALIC = "ITALIC" OBLIQUE = "OBLIQUE" BOLD = "BOLD" # Only for Pango from below THIN = "THIN" ULTRALIGHT = "ULTRALIGHT" LIGHT = "LIGHT" SEMILIGHT = "SEMILIGHT" BOOK = "BOOK" MEDIUM = "MEDIUM" SEMIBOLD = "SEMIBOLD" ULTRABOLD = "ULTRABOLD" HEAVY = "HEAVY" ULTRAHEAVY = "ULTRAHEAVY" RESAMPLING_ALGORITHMS = { "nearest": Resampling.NEAREST, "none": Resampling.NEAREST, "lanczos": Resampling.LANCZOS, "antialias": Resampling.LANCZOS, "bilinear": Resampling.BILINEAR, "linear": Resampling.BILINEAR, "bicubic": Resampling.BICUBIC, "cubic": Resampling.BICUBIC, "box": Resampling.BOX, "hamming": Resampling.HAMMING, } # Geometry: directions ORIGIN: Vector3D = np.array((0.0, 0.0, 0.0)) """The center of the coordinate system.""" UP: Vector3D = np.array((0.0, 1.0, 0.0)) """One unit step in the positive Y direction.""" DOWN: Vector3D = np.array((0.0, -1.0, 0.0)) """One unit step in the negative Y direction.""" RIGHT: Vector3D = np.array((1.0, 0.0, 0.0)) """One unit step in the positive X direction.""" LEFT: Vector3D = np.array((-1.0, 0.0, 0.0)) """One unit step in the negative X direction.""" IN: Vector3D = np.array((0.0, 0.0, -1.0)) """One unit step in the negative Z direction.""" OUT: Vector3D = np.array((0.0, 0.0, 1.0)) """One unit step in the positive Z direction.""" # Geometry: axes X_AXIS: Vector3D = np.array((1.0, 0.0, 0.0)) Y_AXIS: Vector3D = np.array((0.0, 1.0, 0.0)) Z_AXIS: Vector3D = np.array((0.0, 0.0, 1.0)) # Geometry: useful abbreviations for diagonals UL: Vector3D = UP + LEFT """One step up plus one step left.""" UR: Vector3D = UP + RIGHT """One step up plus one step right.""" DL: Vector3D = DOWN + LEFT """One step down plus one step left.""" DR: Vector3D = DOWN + RIGHT """One step down plus one step right.""" # Geometry START_X = 30 START_Y = 20 DEFAULT_DOT_RADIUS = 0.08 DEFAULT_SMALL_DOT_RADIUS = 0.04 DEFAULT_DASH_LENGTH = 0.05 DEFAULT_ARROW_TIP_LENGTH = 0.35 # Default buffers (padding) SMALL_BUFF = 0.1 MED_SMALL_BUFF = 0.25 MED_LARGE_BUFF = 0.5 LARGE_BUFF = 1 DEFAULT_MOBJECT_TO_EDGE_BUFFER = MED_LARGE_BUFF DEFAULT_MOBJECT_TO_MOBJECT_BUFFER = MED_SMALL_BUFF # Times in seconds DEFAULT_POINTWISE_FUNCTION_RUN_TIME = 3.0 DEFAULT_WAIT_TIME = 1.0 # Misc DEFAULT_POINT_DENSITY_2D = 25 DEFAULT_POINT_DENSITY_1D = 10 DEFAULT_STROKE_WIDTH = 4 DEFAULT_FONT_SIZE = 48 SCALE_FACTOR_PER_FONT_POINT = 1 / 960 # Mathematical constants PI = np.pi """The ratio of the circumference of a circle to its diameter.""" TAU = 2 * PI """The ratio of the circumference of a circle to its radius.""" DEGREES = TAU / 360 """The exchange rate between radians and degrees.""" class QualityDict(TypedDict): flag: str | None pixel_height: int pixel_width: int frame_rate: int # Video qualities QUALITIES: dict[str, QualityDict] = { "fourk_quality": { "flag": "k", "pixel_height": 2160, "pixel_width": 3840, "frame_rate": 60, }, "production_quality": { "flag": "p", "pixel_height": 1440, "pixel_width": 2560, "frame_rate": 60, }, "high_quality": { "flag": "h", "pixel_height": 1080, "pixel_width": 1920, "frame_rate": 60, }, "medium_quality": { "flag": "m", "pixel_height": 720, "pixel_width": 1280, "frame_rate": 30, }, "low_quality": { "flag": "l", "pixel_height": 480, "pixel_width": 854, "frame_rate": 15, }, "example_quality": { "flag": None, "pixel_height": 480, "pixel_width": 854, "frame_rate": 30, }, } DEFAULT_QUALITY = "high_quality" EPILOG = "Made with <3 by Manim Community developers." SHIFT_VALUE = 65505 CTRL_VALUE = 65507 CONTEXT_SETTINGS = Context.settings( align_option_groups=True, align_sections=True, show_constraints=True, ) class RendererType(Enum): """An enumeration of all renderer types that can be assigned to the ``config.renderer`` attribute. Manim's configuration allows assigning string values to the renderer setting, the values are then replaced by the corresponding enum object. In other words, you can run:: config.renderer = "opengl" and checking the renderer afterwards reveals that the attribute has assumed the value:: """ CAIRO = "cairo" #: A renderer based on the cairo backend. OPENGL = "opengl" #: An OpenGL-based renderer. class LineJointType(Enum): """Collection of available line joint types. See the example below for a visual illustration of the different joint types. Examples -------- .. manim:: LineJointVariants :save_last_frame: class LineJointVariants(Scene): def construct(self): mob = VMobject(stroke_width=20, color=GREEN).set_points_as_corners([ np.array([-2, 0, 0]), np.array([0, 0, 0]), np.array([-2, 1, 0]), ]) lines = VGroup(*[mob.copy() for _ in range(len(LineJointType))]) for line, joint_type in zip(lines, LineJointType): line.joint_type = joint_type lines.arrange(RIGHT, buff=1) self.add(lines) for line in lines: label = Text(line.joint_type.name).next_to(line, DOWN) self.add(label) """ AUTO = 0 ROUND = 1 BEVEL = 2 MITER = 3 class CapStyleType(Enum): """Collection of available cap styles. See the example below for a visual illustration of the different cap styles. Examples -------- .. manim:: CapStyleVariants :save_last_frame: class CapStyleVariants(Scene): def construct(self): arcs = VGroup(*[ Arc( radius=1, start_angle=0, angle=TAU / 4, stroke_width=20, color=GREEN, cap_style=cap_style, ) for cap_style in CapStyleType ]) arcs.arrange(RIGHT, buff=1) self.add(arcs) for arc in arcs: label = Text(arc.cap_style.name, font_size=24).next_to(arc, DOWN) self.add(label) """ AUTO = 0 ROUND = 1 BUTT = 2 SQUARE = 3 ================================================ FILE: manim/data_structures.py ================================================ """Data classes and other necessary data structures for use in Manim.""" from __future__ import annotations from collections.abc import Iterable from dataclasses import dataclass from types import MethodType from typing import Any @dataclass class MethodWithArgs: """Object containing a :attr:`method` which is intended to be called later with the positional arguments :attr:`args` and the keyword arguments :attr:`kwargs`. Attributes ---------- method : MethodType A callable representing a method of some class. args : Iterable[Any] Positional arguments for :attr:`method`. kwargs : dict[str, Any] Keyword arguments for :attr:`method`. """ __slots__ = ["method", "args", "kwargs"] method: MethodType args: Iterable[Any] kwargs: dict[str, Any] ================================================ FILE: manim/typing.py ================================================ """Custom type definitions used in Manim. .. admonition:: Note for developers :class: important Around the source code there are multiple strings which look like this: .. code-block:: ''' [CATEGORY] ''' All type aliases defined under those strings will be automatically classified under that category. If you need to define a new category, respect the format described above. """ from __future__ import annotations from collections.abc import Callable, Sequence from os import PathLike from typing import Union import numpy as np import numpy.typing as npt from typing_extensions import TypeAlias __all__ = [ "ManimFloat", "ManimInt", "ManimColorDType", "FloatRGB", "FloatRGBLike", "FloatRGB_Array", "FloatRGBLike_Array", "IntRGB", "IntRGBLike", "FloatRGBA", "FloatRGBALike", "FloatRGBA_Array", "FloatRGBALike_Array", "IntRGBA", "IntRGBALike", "FloatHSV", "FloatHSVLike", "FloatHSL", "FloatHSLLike", "FloatHSVA", "FloatHSVALike", "ManimColorInternal", "PointDType", "Point2D", "Point2DLike", "Point2D_Array", "Point2DLike_Array", "Point3D", "Point3DLike", "Point3D_Array", "Point3DLike_Array", "PointND", "PointNDLike", "PointND_Array", "PointNDLike_Array", "Vector2D", "Vector2DLike", "Vector2D_Array", "Vector2DLike_Array", "Vector3D", "Vector3DLike", "Vector3D_Array", "Vector3DLike_Array", "VectorND", "VectorNDLike", "VectorND_Array", "VectorNDLike_Array", "RowVector", "ColVector", "MatrixMN", "Zeros", "QuadraticBezierPoints", "QuadraticBezierPointsLike", "QuadraticBezierPoints_Array", "QuadraticBezierPointsLike_Array", "QuadraticBezierPath", "QuadraticBezierPathLike", "QuadraticSpline", "QuadraticSplineLike", "CubicBezierPoints", "CubicBezierPointsLike", "CubicBezierPoints_Array", "CubicBezierPointsLike_Array", "CubicBezierPath", "CubicBezierPathLike", "CubicSpline", "CubicSplineLike", "BezierPoints", "BezierPointsLike", "BezierPoints_Array", "BezierPointsLike_Array", "BezierPath", "BezierPathLike", "Spline", "SplineLike", "FlatBezierPoints", "FunctionOverride", "PathFuncType", "MappingFunction", "MultiMappingFunction", "PixelArray", "GrayscalePixelArray", "RGBPixelArray", "RGBAPixelArray", "StrPath", "StrOrBytesPath", ] """ [CATEGORY] Primitive data types """ ManimFloat: TypeAlias = np.float64 """A double-precision floating-point value (64 bits, or 8 bytes), according to the IEEE 754 standard. """ ManimInt: TypeAlias = np.int64 r"""A long integer (64 bits, or 8 bytes). It can take values between :math:`-2^{63}` and :math:`+2^{63} - 1`, which expressed in base 10 is a range between around :math:`-9.223 \cdot 10^{18}` and :math:`+9.223 \cdot 10^{18}`. """ """ [CATEGORY] Color types """ ManimColorDType: TypeAlias = ManimFloat """Data type used in :class:`~.ManimColorInternal`: a double-precision float between 0 and 1. """ FloatRGB: TypeAlias = npt.NDArray[ManimColorDType] """``shape: (3,)`` A :class:`numpy.ndarray` of 3 floats between 0 and 1, representing a color in RGB format. Its components describe, in order, the intensity of Red, Green, and Blue in the represented color. """ FloatRGBLike: TypeAlias = Union[FloatRGB, tuple[float, float, float]] """``shape: (3,)`` An array of 3 floats between 0 and 1, representing a color in RGB format. This represents anything which can be converted to a :class:`.FloatRGB` NumPy array. """ FloatRGB_Array: TypeAlias = npt.NDArray[ManimColorDType] """``shape: (M, 3)`` A :class:`numpy.ndarray` of many rows of 3 floats representing RGB colors. """ FloatRGBLike_Array: TypeAlias = Union[FloatRGB_Array, Sequence[FloatRGBLike]] """``shape: (M, 3)`` An array of many rows of 3 floats representing RGB colors. This represents anything which can be converted to a :class:`.FloatRGB_Array` NumPy array. """ IntRGB: TypeAlias = npt.NDArray[ManimInt] """``shape: (3,)`` A :class:`numpy.ndarray` of 3 integers between 0 and 255, representing a color in RGB format. Its components describe, in order, the intensity of Red, Green, and Blue in the represented color. """ IntRGBLike: TypeAlias = Union[IntRGB, tuple[int, int, int]] """``shape: (3,)`` An array of 3 integers between 0 and 255, representing a color in RGB format. This represents anything which can be converted to an :class:`.IntRGB` NumPy array. """ FloatRGBA: TypeAlias = npt.NDArray[ManimColorDType] """``shape: (4,)`` A :class:`numpy.ndarray` of 4 floats between 0 and 1, representing a color in RGBA format. Its components describe, in order, the intensity of Red, Green, Blue and Alpha (opacity) in the represented color. """ FloatRGBALike: TypeAlias = Union[FloatRGBA, tuple[float, float, float, float]] """``shape: (4,)`` An array of 4 floats between 0 and 1, representing a color in RGBA format. This represents anything which can be converted to a :class:`.FloatRGBA` NumPy array. """ FloatRGBA_Array: TypeAlias = npt.NDArray[ManimColorDType] """``shape: (M, 4)`` A :class:`numpy.ndarray` of many rows of 4 floats representing RGBA colors. """ FloatRGBALike_Array: TypeAlias = Union[FloatRGBA_Array, Sequence[FloatRGBALike]] """``shape: (M, 4)`` An array of many rows of 4 floats representing RGBA colors. This represents anything which can be converted to a :class:`.FloatRGBA_Array` NumPy array. """ IntRGBA: TypeAlias = npt.NDArray[ManimInt] """``shape: (4,)`` A :class:`numpy.ndarray` of 4 integers between 0 and 255, representing a color in RGBA format. Its components describe, in order, the intensity of Red, Green, Blue and Alpha (opacity) in the represented color. """ IntRGBALike: TypeAlias = Union[IntRGBA, tuple[int, int, int, int]] """``shape: (4,)`` An array of 4 integers between 0 and 255, representing a color in RGBA format. This represents anything which can be converted to an :class:`.IntRGBA` NumPy array. """ FloatHSV: TypeAlias = FloatRGB """``shape: (3,)`` A :class:`numpy.ndarray` of 3 floats between 0 and 1, representing a color in HSV (or HSB) format. Its components describe, in order, the Hue, Saturation and Value (or Brightness) in the represented color. """ FloatHSVLike: TypeAlias = FloatRGBLike """``shape: (3,)`` An array of 3 floats between 0 and 1, representing a color in HSV (or HSB) format. This represents anything which can be converted to a :class:`.FloatHSV` NumPy array. """ FloatHSVA: TypeAlias = FloatRGBA """``shape: (4,)`` A :class:`numpy.ndarray` of 4 floats between 0 and 1, representing a color in HSVA (or HSBA) format. Its components describe, in order, the Hue, Saturation and Value (or Brightness) in the represented color. """ FloatHSVALike: TypeAlias = FloatRGBALike """``shape: (4,)`` An array of 4 floats between 0 and 1, representing a color in HSVA (or HSBA) format. This represents anything which can be converted to a :class:`.FloatHSVA` NumPy array. """ FloatHSL: TypeAlias = FloatRGB """``shape: (3,)`` A :class:`numpy.ndarray` of 3 floats between 0 and 1, representing a color in HSL format. Its components describe, in order, the Hue, Saturation and Lightness in the represented color. """ FloatHSLLike: TypeAlias = FloatRGBLike """``shape: (3,)`` An array of 3 floats between 0 and 1, representing a color in HSL format. This represents anything which can be converted to a :class:`.FloatHSL` NumPy array. """ ManimColorInternal: TypeAlias = FloatRGBA """``shape: (4,)`` Internal color representation used by :class:`~.ManimColor`, following the RGBA format. It is a :class:`numpy.ndarray` consisting of 4 floats between 0 and 1, describing respectively the intensities of Red, Green, Blue and Alpha (opacity) in the represented color. """ """ [CATEGORY] Point types """ PointDType: TypeAlias = ManimFloat """Default type for arrays representing points: a double-precision floating point value. """ Point2D: TypeAlias = npt.NDArray[PointDType] """``shape: (2,)`` A NumPy array representing a 2-dimensional point: ``[float, float]``. """ Point2DLike: TypeAlias = Union[Point2D, tuple[float, float]] """``shape: (2,)`` A 2-dimensional point: ``[float, float]``. This represents anything which can be converted to a :class:`.Point2D` NumPy array. """ Point2D_Array: TypeAlias = npt.NDArray[PointDType] """``shape: (M, 2)`` A NumPy array representing a sequence of :class:`.Point2D` objects: ``[[float, float], ...]``. """ Point2DLike_Array: TypeAlias = Union[Point2D_Array, Sequence[Point2DLike]] """``shape: (M, 2)`` An array of :class:`.Point2DLike` objects: ``[[float, float], ...]``. This represents anything which can be converted to a :class:`.Point2D_Array` NumPy array. Please refer to the documentation of the function you are using for further type information. """ Point3D: TypeAlias = npt.NDArray[PointDType] """``shape: (3,)`` A NumPy array representing a 3-dimensional point: ``[float, float, float]``. """ Point3DLike: TypeAlias = Union[Point3D, tuple[float, float, float]] """``shape: (3,)`` A 3-dimensional point: ``[float, float, float]``. This represents anything which can be converted to a :class:`.Point3D` NumPy array. """ Point3D_Array: TypeAlias = npt.NDArray[PointDType] """``shape: (M, 3)`` A NumPy array representing a sequence of :class:`.Point3D` objects: ``[[float, float, float], ...]``. """ Point3DLike_Array: TypeAlias = Union[Point3D_Array, Sequence[Point3DLike]] """``shape: (M, 3)`` An array of :class:`.Point3DLike` objects: ``[[float, float, float], ...]``. This represents anything which can be converted to a :class:`.Point3D_Array` NumPy array. Please refer to the documentation of the function you are using for further type information. """ PointND: TypeAlias = npt.NDArray[PointDType] """``shape: (N,)`` A NumPy array representing an N-dimensional point: ``[float, ...]``. """ PointNDLike: TypeAlias = Union[PointND, Sequence[float]] """``shape: (N,)`` An N-dimensional point: ``[float, ...]``. This represents anything which can be converted to a :class:`.PointND` NumPy array. """ PointND_Array: TypeAlias = npt.NDArray[PointDType] """``shape: (M, N)`` A NumPy array representing a sequence of :class:`.PointND` objects: ``[[float, ...], ...]``. """ PointNDLike_Array: TypeAlias = Union[PointND_Array, Sequence[PointNDLike]] """``shape: (M, N)`` An array of :class:`.PointNDLike` objects: ``[[float, ...], ...]``. This represents anything which can be converted to a :class:`.PointND_Array` NumPy array. Please refer to the documentation of the function you are using for further type information. """ """ [CATEGORY] Vector types """ Vector2D: TypeAlias = npt.NDArray[PointDType] """``shape: (2,)`` A NumPy array representing a 2-dimensional vector: ``[float, float]``. .. caution:: Do not confuse with the :class:`~.Vector` or :class:`~.Arrow` VMobjects! """ Vector2DLike: TypeAlias = Union[npt.NDArray[PointDType], tuple[float, float]] """``shape: (2,)`` A 2-dimensional vector: ``[float, float]``. This represents anything which can be converted to a :class:`.Vector2D` NumPy array. .. caution:: Do not confuse with the :class:`~.Vector` or :class:`~.Arrow` VMobjects! """ Vector2D_Array: TypeAlias = npt.NDArray[PointDType] """``shape: (M, 2)`` A NumPy array representing a sequence of :class:`.Vector2D` objects: ``[[float, float], ...]``. """ Vector2DLike_Array: TypeAlias = Union[Vector2D_Array, Sequence[Vector2DLike]] """``shape: (M, 2)`` An array of :class:`.Vector2DLike` objects: ``[[float, float], ...]``. This represents anything which can be converted to a :class:`.Vector2D_Array` NumPy array. """ Vector3D: TypeAlias = npt.NDArray[PointDType] """``shape: (3,)`` A NumPy array representing a 3-dimensional vector: ``[float, float, float]``. .. caution:: Do not confuse with the :class:`~.Vector` or :class:`~.Arrow3D` VMobjects! """ Vector3DLike: TypeAlias = Union[npt.NDArray[PointDType], tuple[float, float, float]] """``shape: (3,)`` A 3-dimensional vector: ``[float, float, float]``. This represents anything which can be converted to a :class:`.Vector3D` NumPy array. .. caution:: Do not confuse with the :class:`~.Vector` or :class:`~.Arrow3D` VMobjects! """ Vector3D_Array: TypeAlias = npt.NDArray[PointDType] """``shape: (M, 3)`` An NumPy array representing a sequence of :class:`.Vector3D` objects: ``[[float, float, float], ...]``. """ Vector3DLike_Array: TypeAlias = Union[npt.NDArray[PointDType], Sequence[Vector3DLike]] """``shape: (M, 3)`` An array of :class:`.Vector3DLike` objects: ``[[float, float, float], ...]``. This represents anything which can be converted to a :class:`.Vector3D_Array` NumPy array. """ VectorND: TypeAlias = npt.NDArray[PointDType] """``shape (N,)`` A NumPy array representing an :math:`N`-dimensional vector: ``[float, ...]``. .. caution:: Do not confuse with the :class:`~.Vector` VMobject! This type alias is named "VectorND" instead of "Vector" to avoid potential name collisions. """ VectorNDLike: TypeAlias = Union[npt.NDArray[PointDType], Sequence[float]] """``shape (N,)`` An :math:`N`-dimensional vector: ``[float, ...]``. This represents anything which can be converted to a :class:`.VectorND` NumPy array. .. caution:: Do not confuse with the :class:`~.Vector` VMobject! This type alias is named "VectorND" instead of "Vector" to avoid potential name collisions. """ VectorND_Array: TypeAlias = npt.NDArray[PointDType] """``shape (M, N)`` A NumPy array representing a sequence of :class:`.VectorND` objects: ``[[float, ...], ...]``. """ VectorNDLike_Array: TypeAlias = Union[npt.NDArray[PointDType], Sequence[VectorNDLike]] """``shape (M, N)`` An array of :class:`.VectorNDLike` objects: ``[[float, ...], ...]``. This represents anything which can be converted to a :class:`.VectorND_Array` NumPy array. """ RowVector: TypeAlias = npt.NDArray[PointDType] """``shape: (1, N)`` A row vector: ``[[float, ...]]``. """ ColVector: TypeAlias = npt.NDArray[PointDType] """``shape: (N, 1)`` A column vector: ``[[float], [float], ...]``. """ """ [CATEGORY] Matrix types """ MatrixMN: TypeAlias = npt.NDArray[PointDType] """``shape: (M, N)`` A matrix: ``[[float, ...], [float, ...], ...]``. """ Zeros: TypeAlias = MatrixMN """``shape: (M, N)`` A :class:`.MatrixMN` filled with zeros, typically created with ``numpy.zeros((M, N))``. """ """ [CATEGORY] Bézier types """ QuadraticBezierPoints: TypeAlias = Point3D_Array """``shape: (3, 3)`` A :class:`.Point3D_Array` of three 3D control points for a single quadratic Bézier curve: ``[[float, float, float], [float, float, float], [float, float, float]]``. """ QuadraticBezierPointsLike: TypeAlias = Union[ QuadraticBezierPoints, tuple[Point3DLike, Point3DLike, Point3DLike] ] """``shape: (3, 3)`` A :class:`.Point3DLike_Array` of three 3D control points for a single quadratic Bézier curve: ``[[float, float, float], [float, float, float], [float, float, float]]``. This represents anything which can be converted to a :class:`.QuadraticBezierPoints` NumPy array. """ QuadraticBezierPoints_Array: TypeAlias = npt.NDArray[PointDType] """``shape: (N, 3, 3)`` A NumPy array containing :math:`N` :class:`.QuadraticBezierPoints` objects: ``[[[float, float, float], [float, float, float], [float, float, float]], ...]``. """ QuadraticBezierPointsLike_Array: TypeAlias = Union[ QuadraticBezierPoints_Array, Sequence[QuadraticBezierPointsLike] ] """``shape: (N, 3, 3)`` A sequence of :math:`N` :class:`.QuadraticBezierPointsLike` objects: ``[[[float, float, float], [float, float, float], [float, float, float]], ...]``. This represents anything which can be converted to a :class:`.QuadraticBezierPoints_Array` NumPy array. """ QuadraticBezierPath: TypeAlias = Point3D_Array """``shape: (3*N, 3)`` A :class:`.Point3D_Array` of :math:`3N` points, where each one of the :math:`N` consecutive blocks of 3 points represents a quadratic Bézier curve: ``[[float, float, float], ...], ...]``. Please refer to the documentation of the function you are using for further type information. """ QuadraticBezierPathLike: TypeAlias = Point3DLike_Array """``shape: (3*N, 3)`` A :class:`.Point3DLike_Array` of :math:`3N` points, where each one of the :math:`N` consecutive blocks of 3 points represents a quadratic Bézier curve: ``[[float, float, float], ...], ...]``. This represents anything which can be converted to a :class:`.QuadraticBezierPath` NumPy array. Please refer to the documentation of the function you are using for further type information. """ QuadraticSpline: TypeAlias = QuadraticBezierPath """``shape: (3*N, 3)`` A special case of :class:`.QuadraticBezierPath` where all the :math:`N` quadratic Bézier curves are connected, forming a quadratic spline: ``[[float, float, float], ...], ...]``. Please refer to the documentation of the function you are using for further type information. """ QuadraticSplineLike: TypeAlias = QuadraticBezierPathLike """``shape: (3*N, 3)`` A special case of :class:`.QuadraticBezierPathLike` where all the :math:`N` quadratic Bézier curves are connected, forming a quadratic spline: ``[[float, float, float], ...], ...]``. This represents anything which can be converted to a :class:`.QuadraticSpline` NumPy array. Please refer to the documentation of the function you are using for further type information. """ CubicBezierPoints: TypeAlias = Point3D_Array """``shape: (4, 3)`` A :class:`.Point3D_Array` of four 3D control points for a single cubic Bézier curve: ``[[float, float, float], [float, float, float], [float, float, float], [float, float, float]]``. """ CubicBezierPointsLike: TypeAlias = Union[ CubicBezierPoints, tuple[Point3DLike, Point3DLike, Point3DLike, Point3DLike] ] """``shape: (4, 3)`` A :class:`.Point3DLike_Array` of 4 control points for a single cubic Bézier curve: ``[[float, float, float], [float, float, float], [float, float, float], [float, float, float]]``. This represents anything which can be converted to a :class:`.CubicBezierPoints` NumPy array. """ CubicBezierPoints_Array: TypeAlias = npt.NDArray[PointDType] """``shape: (N, 4, 3)`` A NumPy array containing :math:`N` :class:`.CubicBezierPoints` objects: ``[[[float, float, float], [float, float, float], [float, float, float], [float, float, float]], ...]``. """ CubicBezierPointsLike_Array: TypeAlias = Union[ CubicBezierPoints_Array, Sequence[CubicBezierPointsLike] ] """``shape: (N, 4, 3)`` A sequence of :math:`N` :class:`.CubicBezierPointsLike` objects: ``[[[float, float, float], [float, float, float], [float, float, float], [float, float, float]], ...]``. This represents anything which can be converted to a :class:`.CubicBezierPoints_Array` NumPy array. """ CubicBezierPath: TypeAlias = Point3D_Array """``shape: (4*N, 3)`` A :class:`.Point3D_Array` of :math:`4N` points, where each one of the :math:`N` consecutive blocks of 4 points represents a cubic Bézier curve: ``[[float, float, float], ...], ...]``. Please refer to the documentation of the function you are using for further type information. """ CubicBezierPathLike: TypeAlias = Point3DLike_Array """``shape: (4*N, 3)`` A :class:`.Point3DLike_Array` of :math:`4N` points, where each one of the :math:`N` consecutive blocks of 4 points represents a cubic Bézier curve: ``[[float, float, float], ...], ...]``. This represents anything which can be converted to a :class:`.CubicBezierPath` NumPy array. Please refer to the documentation of the function you are using for further type information. """ CubicSpline: TypeAlias = CubicBezierPath """``shape: (4*N, 3)`` A special case of :class:`.CubicBezierPath` where all the :math:`N` cubic Bézier curves are connected, forming a quadratic spline: ``[[float, float, float], ...], ...]``. Please refer to the documentation of the function you are using for further type information. """ CubicSplineLike: TypeAlias = CubicBezierPathLike """``shape: (4*N, 3)`` A special case of :class:`.CubicBezierPath` where all the :math:`N` cubic Bézier curves are connected, forming a quadratic spline: ``[[float, float, float], ...], ...]``. This represents anything which can be converted to a :class:`.CubicSpline` NumPy array. Please refer to the documentation of the function you are using for further type information. """ BezierPoints: TypeAlias = Point3D_Array r"""``shape: (PPC, 3)`` A :class:`.Point3D_Array` of :math:`\text{PPC}` control points (:math:`\text{PPC: Points Per Curve} = n + 1`) for a single :math:`n`-th degree Bézier curve: ``[[float, float, float], ...]``. Please refer to the documentation of the function you are using for further type information. """ BezierPointsLike: TypeAlias = Point3DLike_Array r"""``shape: (PPC, 3)`` A :class:`.Point3DLike_Array` of :math:`\text{PPC}` control points (:math:`\text{PPC: Points Per Curve} = n + 1`) for a single :math:`n`-th degree Bézier curve: ``[[float, float, float], ...]``. This represents anything which can be converted to a :class:`.BezierPoints` NumPy array. Please refer to the documentation of the function you are using for further type information. """ BezierPoints_Array: TypeAlias = npt.NDArray[PointDType] r"""``shape: (N, PPC, 3)`` A NumPy array of :math:`N` :class:`.BezierPoints` objects containing :math:`\text{PPC}` :class:`.Point3D` objects each (:math:`\text{PPC: Points Per Curve} = n + 1`): ``[[[float, float, float], ...], ...]``. Please refer to the documentation of the function you are using for further type information. """ BezierPointsLike_Array: TypeAlias = Union[ BezierPoints_Array, Sequence[BezierPointsLike] ] r"""``shape: (N, PPC, 3)`` A sequence of :math:`N` :class:`.BezierPointsLike` objects containing :math:`\text{PPC}` :class:`.Point3DLike` objects each (:math:`\text{PPC: Points Per Curve} = n + 1`): ``[[[float, float, float], ...], ...]``. This represents anything which can be converted to a :class:`.BezierPoints_Array` NumPy array. Please refer to the documentation of the function you are using for further type information. """ BezierPath: TypeAlias = Point3D_Array r"""``shape: (PPC*N, 3)`` A :class:`.Point3D_Array` of :math:`\text{PPC} \cdot N` points, where each one of the :math:`N` consecutive blocks of :math:`\text{PPC}` control points (:math:`\text{PPC: Points Per Curve} = n + 1`) represents a Bézier curve of :math:`n`-th degree: ``[[float, float, float], ...], ...]``. Please refer to the documentation of the function you are using for further type information. """ BezierPathLike: TypeAlias = Point3DLike_Array r"""``shape: (PPC*N, 3)`` A :class:`.Point3DLike_Array` of :math:`\text{PPC} \cdot N` points, where each one of the :math:`N` consecutive blocks of :math:`\text{PPC}` control points (:math:`\text{PPC: Points Per Curve} = n + 1`) represents a Bézier curve of :math:`n`-th degree: ``[[float, float, float], ...], ...]``. This represents anything which can be converted to a :class:`.BezierPath` NumPy array. Please refer to the documentation of the function you are using for further type information. """ Spline: TypeAlias = BezierPath r"""``shape: (PPC*N, 3)`` A special case of :class:`.BezierPath` where all the :math:`N` Bézier curves consisting of :math:`\text{PPC}` :class:`.Point3D` objects (:math:`\text{PPC: Points Per Curve} = n + 1`) are connected, forming an :math:`n`-th degree spline: ``[[float, float, float], ...], ...]``. Please refer to the documentation of the function you are using for further type information. """ SplineLike: TypeAlias = BezierPathLike r"""``shape: (PPC*N, 3)`` A special case of :class:`.BezierPathLike` where all the :math:`N` Bézier curves consisting of :math:`\text{PPC}` :class:`.Point3D` objects (:math:`\text{PPC: Points Per Curve} = n + 1`) are connected, forming an :math:`n`-th degree spline: ``[[float, float, float], ...], ...]``. This represents anything which can be converted to a :class:`.Spline` NumPy array. Please refer to the documentation of the function you are using for further type information. """ FlatBezierPoints: TypeAlias = Union[npt.NDArray[PointDType], tuple[float, ...]] """``shape: (3*PPC*N,)`` A flattened array of Bézier control points: ``[float, ...]``. """ """ [CATEGORY] Function types """ # Due to current limitations # (see https://github.com/python/mypy/issues/14656 / 8263), # we don't specify the first argument type (Mobject). # Nor are we able to specify the return type (Animation) since we cannot import # that here. FunctionOverride: TypeAlias = Callable """Function type returning an :class:`~.Animation` for the specified :class:`~.Mobject`. """ PathFuncType: TypeAlias = Callable[[Point3DLike, Point3DLike, float], Point3DLike] """Function mapping two :class:`.Point3D` objects and an alpha value to a new :class:`.Point3D`. """ MappingFunction: TypeAlias = Callable[[Point3D], Point3D] """A function mapping a :class:`.Point3D` to another :class:`.Point3D`.""" MultiMappingFunction: TypeAlias = Callable[[Point3D_Array], Point3D_Array] """A function mapping a :class:`.Point3D_Array` to another :class:`.Point3D_Array`. """ """ [CATEGORY] Image types """ PixelArray: TypeAlias = npt.NDArray[ManimInt] """``shape: (height, width) | (height, width, 3) | (height, width, 4)`` A rasterized image with a height of ``height`` pixels and a width of ``width`` pixels. Every value in the array is an integer from 0 to 255. Every pixel is represented either by a single integer indicating its lightness (for greyscale images), an :class:`.RGB_Array_Int` or an `RGBA_Array_Int`. """ GrayscalePixelArray: TypeAlias = PixelArray """``shape: (height, width)`` A 100% opaque grayscale :class:`.PixelArray`, where every pixel value is a `ManimInt` indicating its lightness (black -> gray -> white). """ RGBPixelArray: TypeAlias = PixelArray """``shape: (height, width, 3)`` A 100% opaque :class:`.PixelArray` in color, where every pixel value is an `RGB_Array_Int` object. """ RGBAPixelArray: TypeAlias = PixelArray """``shape: (height, width, 4)`` A :class:`.PixelArray` in color where pixels can be transparent. Every pixel value is an :class:`.RGBA_Array_Int` object. """ """ [CATEGORY] Path types """ StrPath: TypeAlias = Union[str, PathLike[str]] """A string or :class:`.os.PathLike` representing a path to a directory or file. """ StrOrBytesPath: TypeAlias = Union[str, bytes, PathLike[str], PathLike[bytes]] """A string, bytes or :class:`.os.PathLike` object representing a path to a directory or file. """ ================================================ FILE: manim/_config/__init__.py ================================================ """Set the global config and logger.""" from __future__ import annotations import logging from collections.abc import Generator from contextlib import contextmanager from typing import Any from .cli_colors import parse_cli_ctx from .logger_utils import make_logger from .utils import ManimConfig, ManimFrame, make_config_parser __all__ = [ "logger", "console", "error_console", "config", "frame", "tempconfig", "cli_ctx_settings", ] parser = make_config_parser() # Logger usage: accessible globally as `manim.logger` or via `logging.getLogger("manim")`. # For printing, use `manim.console.print()` instead of the built-in `print()`. # For error output, use `error_console`, which prints to stderr. logger, console, error_console = make_logger( parser["logger"], parser["CLI"]["verbosity"], ) cli_ctx_settings = parse_cli_ctx(parser["CLI_CTX"]) # TODO: temporary to have a clean terminal output when working with PIL or matplotlib logging.getLogger("PIL").setLevel(logging.INFO) logging.getLogger("matplotlib").setLevel(logging.INFO) config = ManimConfig().digest_parser(parser) # TODO: to be used in the future - see PR #620 # https://github.com/ManimCommunity/manim/pull/620 frame = ManimFrame(config) # This has to go here because it needs access to this module's config @contextmanager def tempconfig(temp: ManimConfig | dict[str, Any]) -> Generator[None, None, None]: """Temporarily modifies the global ``config`` object using a context manager. Inside the ``with`` statement, the modified config will be used. After context manager exits, the config will be restored to its original state. Parameters ---------- temp Object whose keys will be used to temporarily update the global ``config``. Examples -------- Use ``with tempconfig({...})`` to temporarily change the default values of certain config options. .. code-block:: pycon >>> config["frame_height"] 8.0 >>> with tempconfig({"frame_height": 100.0}): ... print(config["frame_height"]) 100.0 >>> config["frame_height"] 8.0 """ global config original = config.copy() temp = {k: v for k, v in temp.items() if k in original} # In order to change the config that every module has access to, use # update(), DO NOT use assignment. Assigning config = some_dict will just # make the local variable named config point to a new dictionary, it will # NOT change the dictionary that every module has a reference to. config.update(temp) try: yield finally: config.update(original) # update, not assignment! ================================================ FILE: manim/_config/cli_colors.py ================================================ """Parses CLI context settings from the configuration file and returns a Cloup Context settings dictionary. This module reads configuration values for help formatting, theme styles, and alignment options used when rendering command-line interfaces in Manim. """ from __future__ import annotations import configparser from typing import Any from cloup import Context, HelpFormatter, HelpTheme, Style __all__ = ["parse_cli_ctx"] def parse_cli_ctx(parser: configparser.SectionProxy) -> dict[str, Any]: formatter_settings: dict[str, str | int | None] = { "indent_increment": int(parser["indent_increment"]), "width": int(parser["width"]), "col1_max_width": int(parser["col1_max_width"]), "col2_min_width": int(parser["col2_min_width"]), "col_spacing": int(parser["col_spacing"]), "row_sep": parser["row_sep"] if parser["row_sep"] else None, } theme_settings = {} theme_keys = { "command_help", "invoked_command", "heading", "constraint", "section_help", "col1", "col2", "epilog", } # Extract and apply any style-related keys defined in the config section. for k, v in parser.items(): if k in theme_keys and v: theme_settings.update({k: Style(v)}) formatter = {} theme = parser["theme"] if parser["theme"] else None if theme is None: formatter = HelpFormatter.settings( theme=HelpTheme(**theme_settings), **formatter_settings, ) elif theme.lower() == "dark": formatter = HelpFormatter.settings( theme=HelpTheme.dark().with_(**theme_settings), **formatter_settings, ) elif theme.lower() == "light": formatter = HelpFormatter.settings( theme=HelpTheme.light().with_(**theme_settings), **formatter_settings, ) return_val: dict[str, Any] = Context.settings( align_option_groups=parser["align_option_groups"].lower() == "true", align_sections=parser["align_sections"].lower() == "true", show_constraints=True, formatter_settings=formatter, ) return return_val ================================================ FILE: manim/_config/default.cfg ================================================ # manim.cfg # Default configuration for manim # Configure how manim behaves when called from the command line without # specifying any flags [CLI] # Each of the following will be set to True if the corresponding CLI flag # is present when executing manim. If the flag is not present, they will # be set to the value found here. For example, running manim with the -w # flag will set WRITE_TO_MOVIE to True. However, since the default value # of WRITE_TO_MOVIE defined in this file is also True, running manim # without the -w value will also output a movie file. To change that, set # WRITE_TO_MOVIE = False so that running manim without the -w flag will not # generate a movie file. Note all of the following accept boolean values. # --notify_outdated_version notify_outdated_version = True # -w, --write_to_movie write_to_movie = True format = mp4 # -s, --save_last_frame # setting save_last_frame to True forces write_to_movie to False save_last_frame = False # -a, --write_all write_all = False # -g, --save_pngs save_pngs = False # -0, --zero_pad zero_pad = 4 # -i, --save_as_gif save_as_gif = False # --save_sections save_sections = False # -p, --preview preview = False # -f, --show_in_file_browser show_in_file_browser = False # -v, --verbosity verbosity = INFO # --progress_bar progress_bar = display # -o, --output_file output_file = # --log_to_file log_to_file = False # -c, --background_color background_color = BLACK # --background_opacity background_opacity = 1 # The following two are both set by the -n (or --from_animation_number) # flag. See manim -h for more information. from_animation_number = 0 # Use -1 to render all animations upto_animation_number = -1 # The following are meant to be paths relative to the point of execution. # Set them at the CLI with the corresponding flag, or set their default # values here. # --media_dir media_dir = ./media # --log_dir log_dir = {media_dir}/logs # --assets_dir assets_dir = ./ # the following do not have CLI arguments but depend on media_dir video_dir = {media_dir}/videos/{module_name}/{quality} sections_dir = {video_dir}/sections images_dir = {media_dir}/images/{module_name} tex_dir = {media_dir}/Tex text_dir = {media_dir}/texts partial_movie_dir = {video_dir}/partial_movie_files/{scene_name} # --renderer [cairo|opengl] renderer = cairo # --enable_gui enable_gui = False # --gui_location gui_location = 0,0 # --fullscreen fullscreen = False # "Set the position of preview window. You can use directions, e.g. UL/DR/LEFT/ORIGIN # or the position (pixel) of the upper left corner of the window, e.g. '960,540'", # --window_position window_position = UR # Manually adjust the size of the window, or use default to automatically scale the window based on # the dimensions of the monitor. # --window_size window_size = default # --window_monitor window_monitor = 0 # --force_window force_window = False # --use_projection_fill_shaders use_projection_fill_shaders = False # --use_projection_stroke_shaders use_projection_stroke_shaders = False movie_file_extension = .mp4 # These now override the --quality option. frame_rate = 60 pixel_height = 1080 pixel_width = 1920 # Use -1 to set max_files_cached to infinity. max_files_cached = 100 #Flush cache will delete all the cached partial-movie-files. flush_cache = False disable_caching = False # Disable the warning when there are too much submobjects to hash. disable_caching_warning = False # --enable_wireframe enable_wireframe = False # --dry_run dry_run = False # Default tex_template # --tex_template tex_template = # specify the plugins as comma separated values # manim will load that plugin if it specified here. plugins = # CLI Context/Formatter # Visit the cloup documentation to understand the formatting options available: # https://cloup.readthedocs.io/en/latest/index.html#a-simple-example [CLI_CTX] # CTX settings align_option_groups = True align_sections = True show_constraints = True # Formatter settings indent_increment = 2 width = 80 col1_max_width = 30 col2_min_width = 35 col_spacing = 2 row_sep = # Dark/Light, or leave empty theme = # Theme Settings - The following options override the theme colors. command_help = invoked_command = heading = constraint = section_help = col1 = col2 = epilog = # Overrides the default output folders, NOT the output file names. Note that # if the custom_folders flag is present, the Tex and text files will not be put # under media_dir, as is the default. [custom_folders] media_dir = videos video_dir = {media_dir} sections_dir = {media_dir} images_dir = {media_dir} text_dir = {media_dir}/temp_files tex_dir = {media_dir}/temp_files log_dir = {media_dir}/temp_files partial_movie_dir = {media_dir}/partial_movie_files/{scene_name} # Rich settings [logger] logging_keyword = bold yellow logging_level_notset = dim logging_level_debug = green logging_level_info = green logging_level_warning = red logging_level_error = red bold logging_level_critical = red bold reverse log_level = log_time = cyan dim log_message = log_path = dim log_width = -1 log_height = -1 log_timestamps = True repr_number = green [ffmpeg] # Uncomment the following line to manually set the loglevel for ffmpeg. See # ffmpeg manpage for accepted values loglevel = ERROR [jupyter] media_embed = False media_width = 60%% ================================================ FILE: manim/_config/logger_utils.py ================================================ """Utilities to create and set the logger. Manim's logger can be accessed as ``manim.logger``, or as ``logging.getLogger("manim")``, once the library has been imported. Manim also exports a second object, ``console``, which should be used to print on screen messages that need not be logged. Both ``logger`` and ``console`` use the ``rich`` library to produce rich text format. """ from __future__ import annotations import configparser import copy import json import logging from typing import TYPE_CHECKING, Any from rich import color, errors from rich import print as printf from rich.console import Console from rich.logging import RichHandler from rich.theme import Theme if TYPE_CHECKING: from pathlib import Path __all__ = ["make_logger", "parse_theme", "set_file_logger", "JSONFormatter"] HIGHLIGHTED_KEYWORDS = [ # these keywords are highlighted specially "Played", "animations", "scene", "Reading", "Writing", "script", "arguments", "Invalid", "Aborting", "module", "File", "Rendering", "Rendered", ] WRONG_COLOR_CONFIG_MSG = """ [logging.level.error]Your colour configuration couldn't be parsed. Loading the default color configuration.[/logging.level.error] """ def make_logger( parser: configparser.SectionProxy, verbosity: str, ) -> tuple[logging.Logger, Console, Console]: """Make the manim logger and console. Parameters ---------- parser A parser containing any .cfg files in use. verbosity The verbosity level of the logger. Returns ------- :class:`logging.Logger`, :class:`rich.Console`, :class:`rich.Console` The manim logger and consoles. The first console outputs to stdout, the second to stderr. All use the theme returned by :func:`parse_theme`. See Also -------- :func:`~._config.utils.make_config_parser`, :func:`parse_theme` Notes ----- The ``parser`` is assumed to contain only the options related to configuring the logger at the top level. """ # Throughout the codebase, use console.print() instead of print() theme = parse_theme(parser) console = Console(theme=theme) error_console = Console(theme=theme, stderr=True) # set the rich handler rich_handler = RichHandler( console=console, show_time=parser.getboolean("log_timestamps", fallback=False), keywords=HIGHLIGHTED_KEYWORDS, ) # finally, the logger logger = logging.getLogger("manim") logger.addHandler(rich_handler) logger.setLevel(verbosity) logger.propagate = False if not (libav_logger := logging.getLogger()).hasHandlers(): libav_logger.addHandler(rich_handler) libav_logger.setLevel(verbosity) return logger, console, error_console def parse_theme(parser: configparser.SectionProxy) -> Theme | None: """Configure the rich style of logger and console output. Parameters ---------- parser A parser containing any .cfg files in use. Returns ------- :class:`rich.Theme` The rich theme to be used by the manim logger. See Also -------- :func:`make_logger`. """ theme: dict[str, Any] = {key.replace("_", "."): parser[key] for key in parser} theme["log.width"] = None if theme["log.width"] == "-1" else int(theme["log.width"]) theme["log.height"] = ( None if theme["log.height"] == "-1" else int(theme["log.height"]) ) theme["log.timestamps"] = False try: custom_theme = Theme( { k: v for k, v in theme.items() if k not in ["log.width", "log.height", "log.timestamps"] }, ) except (color.ColorParseError, errors.StyleSyntaxError): printf(WRONG_COLOR_CONFIG_MSG) custom_theme = None return custom_theme def set_file_logger(scene_name: str, module_name: str, log_dir: Path) -> None: """Add a file handler to manim logger. The path to the file is built using ``config.log_dir``. Parameters ---------- scene_name The name of the scene, used in the name of the log file. module_name The name of the module, used in the name of the log file. log_dir Path to the folder where log files are stored. """ # Note: The log file name will be # _.log, gotten from config. So it # can differ from the real name of the scene. would only # appear if scene name was provided when manim was called. log_file_name = f"{module_name}_{scene_name}.log" log_file_path = log_dir / log_file_name file_handler = logging.FileHandler(log_file_path, mode="w") file_handler.setFormatter(JSONFormatter()) logger = logging.getLogger("manim") logger.addHandler(file_handler) logger.info("Log file will be saved in %(logpath)s", {"logpath": log_file_path}) class JSONFormatter(logging.Formatter): """A formatter that outputs logs in a custom JSON format. This class is used internally for testing purposes. """ def format(self, record: logging.LogRecord) -> str: """Format the record in a custom JSON format.""" record_c = copy.deepcopy(record) if record_c.args: if isinstance(record_c.args, dict): for arg in record_c.args: record_c.args[arg] = "<>" else: record_c.args = ("<>",) * len(record_c.args) return json.dumps( { "levelname": record_c.levelname, "module": record_c.module, "message": super().format(record_c), }, ) ================================================ FILE: manim/animation/__init__.py ================================================ [Empty file] ================================================ FILE: manim/animation/animation.py ================================================ """Animate mobjects.""" from __future__ import annotations from manim.mobject.opengl.opengl_mobject import OpenGLMobject from .. import config, logger from ..constants import RendererType from ..mobject import mobject from ..mobject.mobject import Group, Mobject from ..mobject.opengl import opengl_mobject from ..utils.rate_functions import linear, smooth __all__ = ["Animation", "Wait", "Add", "override_animation"] from collections.abc import Callable, Iterable, Sequence from copy import deepcopy from functools import partialmethod from typing import TYPE_CHECKING, Any from typing_extensions import Self if TYPE_CHECKING: from manim.scene.scene import Scene DEFAULT_ANIMATION_RUN_TIME: float = 1.0 DEFAULT_ANIMATION_LAG_RATIO: float = 0.0 class Animation: """An animation. Animations have a fixed time span. Parameters ---------- mobject The mobject to be animated. This is not required for all types of animations. lag_ratio Defines the delay after which the animation is applied to submobjects. This lag is relative to the duration of the animation. This does not influence the total runtime of the animation. Instead the runtime of individual animations is adjusted so that the complete animation has the defined run time. run_time The duration of the animation in seconds. rate_func The function defining the animation progress based on the relative runtime (see :mod:`~.rate_functions`) . For example ``rate_func(0.5)`` is the proportion of the animation that is done after half of the animations run time. reverse_rate_function Reverses the rate function of the animation. Setting ``reverse_rate_function`` does not have any effect on ``remover`` or ``introducer``. These need to be set explicitly if an introducer-animation should be turned into a remover one and vice versa. name The name of the animation. This gets displayed while rendering the animation. Defaults to (). remover Whether the given mobject should be removed from the scene after this animation. suspend_mobject_updating Whether updaters of the mobject should be suspended during the animation. .. NOTE:: In the current implementation of this class, the specified rate function is applied within :meth:`.Animation.interpolate_mobject` call as part of the call to :meth:`.Animation.interpolate_submobject`. For subclasses of :class:`.Animation` that are implemented by overriding :meth:`interpolate_mobject`, the rate function has to be applied manually (e.g., by passing ``self.rate_func(alpha)`` instead of just ``alpha``). Examples -------- .. manim:: LagRatios class LagRatios(Scene): def construct(self): ratios = [0, 0.1, 0.5, 1, 2] # demonstrated lag_ratios # Create dot groups group = VGroup(*[Dot() for _ in range(4)]).arrange_submobjects() groups = VGroup(*[group.copy() for _ in ratios]).arrange_submobjects(buff=1) self.add(groups) # Label groups self.add(Text("lag_ratio = ", font_size=36).next_to(groups, UP, buff=1.5)) for group, ratio in zip(groups, ratios): self.add(Text(str(ratio), font_size=36).next_to(group, UP)) #Animate groups with different lag_ratios self.play(AnimationGroup(*[ group.animate(lag_ratio=ratio, run_time=1.5).shift(DOWN * 2) for group, ratio in zip(groups, ratios) ])) # lag_ratio also works recursively on nested submobjects: self.play(groups.animate(run_time=1, lag_ratio=0.1).shift(UP * 2)) """ def __new__( cls, mobject=None, *args, use_override=True, **kwargs, ) -> Self: if isinstance(mobject, Mobject) and use_override: func = mobject.animation_override_for(cls) if func is not None: anim = func(mobject, *args, **kwargs) logger.debug( f"The {cls.__name__} animation has been overridden for " f"{type(mobject).__name__} mobjects. use_override = False can " f" be used as keyword argument to prevent animation overriding.", ) return anim return super().__new__(cls) def __init__( self, mobject: Mobject | OpenGLMobject | None, lag_ratio: float = DEFAULT_ANIMATION_LAG_RATIO, run_time: float = DEFAULT_ANIMATION_RUN_TIME, rate_func: Callable[[float], float] = smooth, reverse_rate_function: bool = False, name: str = None, remover: bool = False, # remove a mobject from the screen? suspend_mobject_updating: bool = True, introducer: bool = False, *, _on_finish: Callable[[], None] = lambda _: None, use_override: bool = True, # included here to avoid TypeError if passed from a subclass' constructor ) -> None: self._typecheck_input(mobject) self.run_time: float = run_time self.rate_func: Callable[[float], float] = rate_func self.reverse_rate_function: bool = reverse_rate_function self.name: str | None = name self.remover: bool = remover self.introducer: bool = introducer self.suspend_mobject_updating: bool = suspend_mobject_updating self.lag_ratio: float = lag_ratio self._on_finish: Callable[[Scene], None] = _on_finish if config["renderer"] == RendererType.OPENGL: self.starting_mobject: OpenGLMobject = OpenGLMobject() self.mobject: OpenGLMobject = ( mobject if mobject is not None else OpenGLMobject() ) else: self.starting_mobject: Mobject = Mobject() self.mobject: Mobject = mobject if mobject is not None else Mobject() if hasattr(self, "CONFIG"): logger.error( ( "CONFIG has been removed from ManimCommunity.", "Please use keyword arguments instead.", ), ) @property def run_time(self) -> float: return self._run_time @run_time.setter def run_time(self, value: float) -> None: if value < 0: raise ValueError( f"The run_time of {self.__class__.__name__} cannot be " f"negative. The given value was {value}." ) self._run_time = value def _typecheck_input(self, mobject: Mobject | None) -> None: if mobject is None: logger.debug("Animation with empty mobject") elif not isinstance(mobject, (Mobject, OpenGLMobject)): raise TypeError("Animation only works on Mobjects") def __str__(self) -> str: if self.name: return self.name return f"{self.__class__.__name__}({str(self.mobject)})" def __repr__(self) -> str: return str(self) def begin(self) -> None: """Begin the animation. This method is called right as an animation is being played. As much initialization as possible, especially any mobject copying, should live in this method. """ self.starting_mobject = self.create_starting_mobject() if self.suspend_mobject_updating: # All calls to self.mobject's internal updaters # during the animation, either from this Animation # or from the surrounding scene, should do nothing. # It is, however, okay and desirable to call # the internal updaters of self.starting_mobject, # or any others among self.get_all_mobjects() self.mobject.suspend_updating() self.interpolate(0) def finish(self) -> None: # TODO: begin and finish should require a scene as parameter. # That way Animation.clean_up_from_screen and Scene.add_mobjects_from_animations # could be removed as they fulfill basically the same purpose. """Finish the animation. This method gets called when the animation is over. """ self.interpolate(1) if self.suspend_mobject_updating and self.mobject is not None: self.mobject.resume_updating() def clean_up_from_scene(self, scene: Scene) -> None: """Clean up the :class:`~.Scene` after finishing the animation. This includes to :meth:`~.Scene.remove` the Animation's :class:`~.Mobject` if the animation is a remover. Parameters ---------- scene The scene the animation should be cleaned up from. """ self._on_finish(scene) if self.is_remover(): scene.remove(self.mobject) def _setup_scene(self, scene: Scene) -> None: """Setup up the :class:`~.Scene` before starting the animation. This includes to :meth:`~.Scene.add` the Animation's :class:`~.Mobject` if the animation is an introducer. Parameters ---------- scene The scene the animation should be cleaned up from. """ if scene is None: return if ( self.is_introducer() and self.mobject not in scene.get_mobject_family_members() ): scene.add(self.mobject) def create_starting_mobject(self) -> Mobject | OpenGLMobject: # Keep track of where the mobject starts return self.mobject.copy() def get_all_mobjects(self) -> Sequence[Mobject | OpenGLMobject]: """Get all mobjects involved in the animation. Ordering must match the ordering of arguments to interpolate_submobject Returns ------- Sequence[Mobject] The sequence of mobjects. """ return self.mobject, self.starting_mobject def get_all_families_zipped(self) -> Iterable[tuple]: if config["renderer"] == RendererType.OPENGL: return zip(*(mob.get_family() for mob in self.get_all_mobjects())) return zip( *(mob.family_members_with_points() for mob in self.get_all_mobjects()) ) def update_mobjects(self, dt: float) -> None: """ Updates things like starting_mobject, and (for Transforms) target_mobject. Note, since typically (always?) self.mobject will have its updating suspended during the animation, this will do nothing to self.mobject. """ for mob in self.get_all_mobjects_to_update(): mob.update(dt) def get_all_mobjects_to_update(self) -> list[Mobject]: """Get all mobjects to be updated during the animation. Returns ------- List[Mobject] The list of mobjects to be updated during the animation. """ # The surrounding scene typically handles # updating of self.mobject. Besides, in # most cases its updating is suspended anyway return list(filter(lambda m: m is not self.mobject, self.get_all_mobjects())) def copy(self) -> Animation: """Create a copy of the animation. Returns ------- Animation A copy of ``self`` """ return deepcopy(self) # Methods for interpolation, the mean of an Animation # TODO: stop using alpha as parameter name in different meanings. def interpolate(self, alpha: float) -> None: """Set the animation progress. This method gets called for every frame during an animation. Parameters ---------- alpha The relative time to set the animation to, 0 meaning the start, 1 meaning the end. """ self.interpolate_mobject(alpha) def interpolate_mobject(self, alpha: float) -> None: """Interpolates the mobject of the :class:`Animation` based on alpha value. Parameters ---------- alpha A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively. """ families = list(self.get_all_families_zipped()) for i, mobs in enumerate(families): sub_alpha = self.get_sub_alpha(alpha, i, len(families)) self.interpolate_submobject(*mobs, sub_alpha) def interpolate_submobject( self, submobject: Mobject, starting_submobject: Mobject, # target_copy: Mobject, #Todo: fix - signature of interpolate_submobject differs in Transform(). alpha: float, ) -> Animation: # Typically implemented by subclass pass def get_sub_alpha(self, alpha: float, index: int, num_submobjects: int) -> float: """Get the animation progress of any submobjects subanimation. Parameters ---------- alpha The overall animation progress index The index of the subanimation. num_submobjects The total count of subanimations. Returns ------- float The progress of the subanimation. """ # TODO, make this more understandable, and/or combine # its functionality with AnimationGroup's method # build_animations_with_timings lag_ratio = self.lag_ratio full_length = (num_submobjects - 1) * lag_ratio + 1 value = alpha * full_length lower = index * lag_ratio if self.reverse_rate_function: return self.rate_func(1 - (value - lower)) else: return self.rate_func(value - lower) # Getters and setters def set_run_time(self, run_time: float) -> Animation: """Set the run time of the animation. Parameters ---------- run_time The new time the animation should take in seconds. .. note:: The run_time of an animation should not be changed while it is already running. Returns ------- Animation ``self`` """ self.run_time = run_time return self # TODO: is this getter even necessary? def get_run_time(self) -> float: """Get the run time of the animation. Returns ------- float The time the animation takes in seconds. """ return self.run_time def set_rate_func( self, rate_func: Callable[[float], float], ) -> Animation: """Set the rate function of the animation. Parameters ---------- rate_func The new function defining the animation progress based on the relative runtime (see :mod:`~.rate_functions`). Returns ------- Animation ``self`` """ self.rate_func = rate_func return self def get_rate_func( self, ) -> Callable[[float], float]: """Get the rate function of the animation. Returns ------- Callable[[float], float] The rate function of the animation. """ return self.rate_func def set_name(self, name: str) -> Animation: """Set the name of the animation. Parameters ---------- name The new name of the animation. Returns ------- Animation ``self`` """ self.name = name return self def is_remover(self) -> bool: """Test if the animation is a remover. Returns ------- bool ``True`` if the animation is a remover, ``False`` otherwise. """ return self.remover def is_introducer(self) -> bool: """Test if the animation is an introducer. Returns ------- bool ``True`` if the animation is an introducer, ``False`` otherwise. """ return self.introducer @classmethod def __init_subclass__(cls, **kwargs) -> None: super().__init_subclass__(**kwargs) cls._original__init__ = cls.__init__ _original__init__ = __init__ # needed if set_default() is called with no kwargs directly from Animation @classmethod def set_default(cls, **kwargs) -> None: """Sets the default values of keyword arguments. If this method is called without any additional keyword arguments, the original default values of the initialization method of this class are restored. Parameters ---------- kwargs Passing any keyword argument will update the default values of the keyword arguments of the initialization function of this class. Examples -------- .. manim:: ChangeDefaultAnimation class ChangeDefaultAnimation(Scene): def construct(self): Rotate.set_default(run_time=2, rate_func=rate_functions.linear) Indicate.set_default(color=None) S = Square(color=BLUE, fill_color=BLUE, fill_opacity=0.25) self.add(S) self.play(Rotate(S, PI)) self.play(Indicate(S)) Rotate.set_default() Indicate.set_default() """ if kwargs: cls.__init__ = partialmethod(cls.__init__, **kwargs) else: cls.__init__ = cls._original__init__ def prepare_animation( anim: Animation | mobject._AnimationBuilder | opengl_mobject._AnimationBuilder, ) -> Animation: r"""Returns either an unchanged animation, or the animation built from a passed animation factory. Examples -------- :: >>> from manim import Square, FadeIn >>> s = Square() >>> prepare_animation(FadeIn(s)) FadeIn(Square) :: >>> prepare_animation(s.animate.scale(2).rotate(42)) _MethodAnimation(Square) :: >>> prepare_animation(42) Traceback (most recent call last): ... TypeError: Object 42 cannot be converted to an animation """ if isinstance(anim, mobject._AnimationBuilder): return anim.build() if isinstance(anim, opengl_mobject._AnimationBuilder): return anim.build() if isinstance(anim, Animation): return anim raise TypeError(f"Object {anim} cannot be converted to an animation") class Wait(Animation): """A "no operation" animation. Parameters ---------- run_time The amount of time that should pass. stop_condition A function without positional arguments that evaluates to a boolean. The function is evaluated after every new frame has been rendered. Playing the animation stops after the return value is truthy, or after the specified ``run_time`` has passed. frozen_frame Controls whether or not the wait animation is static, i.e., corresponds to a frozen frame. If ``False`` is passed, the render loop still progresses through the animation as usual and (among other things) continues to call updater functions. If ``None`` (the default value), the :meth:`.Scene.play` call tries to determine whether the Wait call can be static or not itself via :meth:`.Scene.should_mobjects_update`. kwargs Keyword arguments to be passed to the parent class, :class:`.Animation`. """ def __init__( self, run_time: float = 1, stop_condition: Callable[[], bool] | None = None, frozen_frame: bool | None = None, rate_func: Callable[[float], float] = linear, **kwargs, ): if stop_condition and frozen_frame: raise ValueError("A static Wait animation cannot have a stop condition.") self.duration: float = run_time self.stop_condition = stop_condition self.is_static_wait: bool = frozen_frame super().__init__(None, run_time=run_time, rate_func=rate_func, **kwargs) # quick fix to work in opengl setting: self.mobject.shader_wrapper_list = [] def begin(self) -> None: pass def finish(self) -> None: pass def clean_up_from_scene(self, scene: Scene) -> None: pass def update_mobjects(self, dt: float) -> None: pass def interpolate(self, alpha: float) -> None: pass class Add(Animation): """Add Mobjects to a scene, without animating them in any other way. This is similar to the :meth:`.Scene.add` method, but :class:`Add` is an animation which can be grouped into other animations. Parameters ---------- mobjects One :class:`~.Mobject` or more to add to a scene. run_time The duration of the animation after adding the ``mobjects``. Defaults to 0, which means this is an instant animation without extra wait time after adding them. **kwargs Additional arguments to pass to the parent :class:`Animation` class. Examples -------- .. manim:: DefaultAddScene class DefaultAddScene(Scene): def construct(self): text_1 = Text("I was added with Add!") text_2 = Text("Me too!") text_3 = Text("And me!") texts = VGroup(text_1, text_2, text_3).arrange(DOWN) rect = SurroundingRectangle(texts, buff=0.5) self.play( Create(rect, run_time=3.0), Succession( Wait(1.0), # You can Add a Mobject in the middle of an animation... Add(text_1), Wait(1.0), # ...or multiple Mobjects at once! Add(text_2, text_3), ), ) self.wait() .. manim:: AddWithRunTimeScene class AddWithRunTimeScene(Scene): def construct(self): # A 5x5 grid of circles circles = VGroup( *[Circle(radius=0.5) for _ in range(25)] ).arrange_in_grid(5, 5) self.play( Succession( # Add a run_time of 0.2 to wait for 0.2 seconds after # adding the circle, instead of using Wait(0.2) after Add! *[Add(circle, run_time=0.2) for circle in circles], rate_func=smooth, ) ) self.wait() """ def __init__( self, *mobjects: Mobject, run_time: float = 0.0, **kwargs: Any ) -> None: mobject = mobjects[0] if len(mobjects) == 1 else Group(*mobjects) super().__init__(mobject, run_time=run_time, introducer=True, **kwargs) def begin(self) -> None: pass def finish(self) -> None: pass def clean_up_from_scene(self, scene: Scene) -> None: pass def update_mobjects(self, dt: float) -> None: pass def interpolate(self, alpha: float) -> None: pass def override_animation( animation_class: type[Animation], ) -> Callable[[Callable], Callable]: """Decorator used to mark methods as overrides for specific :class:`~.Animation` types. Should only be used to decorate methods of classes derived from :class:`~.Mobject`. ``Animation`` overrides get inherited to subclasses of the ``Mobject`` who defined them. They don't override subclasses of the ``Animation`` they override. See Also -------- :meth:`~.Mobject.add_animation_override` Parameters ---------- animation_class The animation to be overridden. Returns ------- Callable[[Callable], Callable] The actual decorator. This marks the method as overriding an animation. Examples -------- .. manim:: OverrideAnimationExample class MySquare(Square): @override_animation(FadeIn) def _fade_in_override(self, **kwargs): return Create(self, **kwargs) class OverrideAnimationExample(Scene): def construct(self): self.play(FadeIn(MySquare())) """ def decorator(func): func._override_animation = animation_class return func return decorator ================================================ FILE: manim/animation/changing.py ================================================ """Animation of a mobject boundary and tracing of points.""" from __future__ import annotations __all__ = ["AnimatedBoundary", "TracedPath"] from collections.abc import Callable, Sequence from typing import Any from typing_extensions import Self from manim.mobject.mobject import Mobject from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.types.vectorized_mobject import VGroup, VMobject from manim.utils.color import ( BLUE_B, BLUE_D, BLUE_E, GREY_BROWN, WHITE, ParsableManimColor, ) from manim.utils.rate_functions import RateFunction, smooth class AnimatedBoundary(VGroup): """Boundary of a :class:`.VMobject` with animated color change. Examples -------- .. manim:: AnimatedBoundaryExample class AnimatedBoundaryExample(Scene): def construct(self): text = Text("So shiny!") boundary = AnimatedBoundary(text, colors=[RED, GREEN, BLUE], cycle_rate=3) self.add(text, boundary) self.wait(2) """ def __init__( self, vmobject: VMobject, colors: Sequence[ParsableManimColor] = [BLUE_D, BLUE_B, BLUE_E, GREY_BROWN], max_stroke_width: float = 3, cycle_rate: float = 0.5, back_and_forth: bool = True, draw_rate_func: RateFunction = smooth, fade_rate_func: RateFunction = smooth, **kwargs: Any, ): super().__init__(**kwargs) self.colors = colors self.max_stroke_width = max_stroke_width self.cycle_rate = cycle_rate self.back_and_forth = back_and_forth self.draw_rate_func = draw_rate_func self.fade_rate_func = fade_rate_func self.vmobject = vmobject self.boundary_copies = [ vmobject.copy().set_style(stroke_width=0, fill_opacity=0) for x in range(2) ] self.add(*self.boundary_copies) self.total_time = 0.0 self.add_updater(lambda m, dt: self.update_boundary_copies(dt)) def update_boundary_copies(self, dt: float) -> None: # Not actual time, but something which passes at # an altered rate to make the implementation below # cleaner time = self.total_time * self.cycle_rate growing, fading = self.boundary_copies colors = self.colors msw = self.max_stroke_width vmobject = self.vmobject index = int(time % len(colors)) alpha = time % 1 draw_alpha = self.draw_rate_func(alpha) fade_alpha = self.fade_rate_func(alpha) if self.back_and_forth and int(time) % 2 == 1: bounds = (1.0 - draw_alpha, 1.0) else: bounds = (0.0, draw_alpha) self.full_family_become_partial(growing, vmobject, *bounds) growing.set_stroke(colors[index], width=msw) if time >= 1: self.full_family_become_partial(fading, vmobject, 0, 1) fading.set_stroke(color=colors[index - 1], width=(1 - fade_alpha) * msw) self.total_time += dt def full_family_become_partial( self, mob1: VMobject, mob2: VMobject, a: float, b: float ) -> Self: family1 = mob1.family_members_with_points() family2 = mob2.family_members_with_points() for sm1, sm2 in zip(family1, family2): sm1.pointwise_become_partial(sm2, a, b) return self class TracedPath(VMobject, metaclass=ConvertToOpenGL): """Traces the path of a point returned by a function call. Parameters ---------- traced_point_func The function to be traced. stroke_width The width of the trace. stroke_color The color of the trace. dissipating_time The time taken for the path to dissipate. Default set to ``None`` which disables dissipation. Examples -------- .. manim:: TracedPathExample class TracedPathExample(Scene): def construct(self): circ = Circle(color=RED).shift(4*LEFT) dot = Dot(color=RED).move_to(circ.get_start()) rolling_circle = VGroup(circ, dot) trace = TracedPath(circ.get_start) rolling_circle.add_updater(lambda m: m.rotate(-0.3)) self.add(trace, rolling_circle) self.play(rolling_circle.animate.shift(8*RIGHT), run_time=4, rate_func=linear) .. manim:: DissipatingPathExample class DissipatingPathExample(Scene): def construct(self): a = Dot(RIGHT * 2) b = TracedPath(a.get_center, dissipating_time=0.5, stroke_opacity=[0, 1]) self.add(a, b) self.play(a.animate(path_arc=PI / 4).shift(LEFT * 2)) self.play(a.animate(path_arc=-PI / 4).shift(LEFT * 2)) self.wait() """ def __init__( self, traced_point_func: Callable, stroke_width: float = 2, stroke_color: ParsableManimColor | None = WHITE, dissipating_time: float | None = None, **kwargs: Any, ) -> None: super().__init__(stroke_color=stroke_color, stroke_width=stroke_width, **kwargs) self.traced_point_func = traced_point_func self.dissipating_time = dissipating_time self.time = 1.0 if self.dissipating_time else None self.add_updater(self.update_path) def update_path(self, mob: Mobject, dt: float) -> None: new_point = self.traced_point_func() if not self.has_points(): self.start_new_path(new_point) self.add_line_to(new_point) if self.dissipating_time: assert self.time is not None self.time += dt if self.time - 1 > self.dissipating_time: nppcc = self.n_points_per_curve self.set_points(self.points[nppcc:]) ================================================ FILE: manim/animation/composition.py ================================================ """Tools for displaying multiple animations at once.""" from __future__ import annotations from collections.abc import Callable, Iterable, Sequence from typing import TYPE_CHECKING, Any import numpy as np from manim._config import config from manim.animation.animation import Animation, prepare_animation from manim.constants import RendererType from manim.mobject.mobject import Group, Mobject from manim.mobject.opengl.opengl_mobject import OpenGLGroup, OpenGLMobject from manim.scene.scene import Scene from manim.utils.iterables import remove_list_redundancies from manim.utils.parameter_parsing import flatten_iterable_parameters from manim.utils.rate_functions import linear if TYPE_CHECKING: from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVGroup from manim.mobject.types.vectorized_mobject import VGroup __all__ = ["AnimationGroup", "Succession", "LaggedStart", "LaggedStartMap"] DEFAULT_LAGGED_START_LAG_RATIO: float = 0.05 class AnimationGroup(Animation): """Plays a group or series of :class:`~.Animation`. Parameters ---------- animations Sequence of :class:`~.Animation` objects to be played. group A group of multiple :class:`~.Mobject`. run_time The duration of the animation in seconds. rate_func The function defining the animation progress based on the relative runtime (see :mod:`~.rate_functions`) . lag_ratio Defines the delay after which the animation is applied to submobjects. A lag_ratio of ``n.nn`` means the next animation will play when ``nnn%`` of the current animation has played. Defaults to 0.0, meaning that all animations will be played together. This does not influence the total runtime of the animation. Instead the runtime of individual animations is adjusted so that the complete animation has the defined run time. """ def __init__( self, *animations: Animation | Iterable[Animation], group: Group | VGroup | OpenGLGroup | OpenGLVGroup | None = None, run_time: float | None = None, rate_func: Callable[[float], float] = linear, lag_ratio: float = 0, **kwargs: Any, ): arg_anim = flatten_iterable_parameters(animations) self.animations = [prepare_animation(anim) for anim in arg_anim] self.rate_func = rate_func if group is None: mobjects = remove_list_redundancies( [anim.mobject for anim in self.animations if not anim.is_introducer()], ) if config["renderer"] == RendererType.OPENGL: self.group: Group | VGroup | OpenGLGroup | OpenGLVGroup = OpenGLGroup( *mobjects ) else: self.group = Group(*mobjects) else: self.group = group super().__init__( self.group, rate_func=self.rate_func, lag_ratio=lag_ratio, **kwargs ) self.run_time: float = self.init_run_time(run_time) def get_all_mobjects(self) -> Sequence[Mobject | OpenGLMobject]: return list(self.group) def begin(self) -> None: if not self.animations: raise ValueError( f"Trying to play {self} without animations, this is not supported. " "Please add at least one subanimation." ) self.anim_group_time = 0.0 if self.suspend_mobject_updating: self.group.suspend_updating() for anim in self.animations: anim.begin() def _setup_scene(self, scene: Scene) -> None: for anim in self.animations: anim._setup_scene(scene) def finish(self) -> None: for anim in self.animations: anim.finish() self.anims_begun[:] = True self.anims_finished[:] = True if self.suspend_mobject_updating: self.group.resume_updating() def clean_up_from_scene(self, scene: Scene) -> None: self._on_finish(scene) for anim in self.animations: if self.remover: anim.remover = self.remover anim.clean_up_from_scene(scene) def update_mobjects(self, dt: float) -> None: for anim in self.anims_with_timings["anim"][ self.anims_begun & ~self.anims_finished ]: anim.update_mobjects(dt) def init_run_time(self, run_time: float | None) -> float: """Calculates the run time of the animation, if different from ``run_time``. Parameters ---------- run_time The duration of the animation in seconds. Returns ------- run_time The duration of the animation in seconds. """ self.build_animations_with_timings() # Note: if lag_ratio < 1, then not necessarily the final animation's # end time will be the max end time! Therefore we must calculate the # maximum over all the end times, and not just take the last one. # Example: if you want to play 2 animations of 10s and 1s with a # lag_ratio of 0.1, the 1st one will end at t=10 and the 2nd one will # end at t=2, so the AnimationGroup will end at t=10. self.max_end_time = max(self.anims_with_timings["end"], default=0) return self.max_end_time if run_time is None else run_time def build_animations_with_timings(self) -> None: """Creates a list of triplets of the form (anim, start_time, end_time).""" run_times = np.array([anim.run_time for anim in self.animations]) num_animations = run_times.shape[0] dtype = [("anim", "O"), ("start", "f8"), ("end", "f8")] self.anims_with_timings: np.ndarray = np.zeros(num_animations, dtype=dtype) self.anims_begun: np.ndarray = np.zeros(num_animations, dtype=bool) self.anims_finished: np.ndarray = np.zeros(num_animations, dtype=bool) if num_animations == 0: return lags = run_times[:-1] * self.lag_ratio self.anims_with_timings["anim"] = self.animations self.anims_with_timings["start"][1:] = np.add.accumulate(lags) self.anims_with_timings["end"] = self.anims_with_timings["start"] + run_times def interpolate(self, alpha: float) -> None: # Note, if the run_time of AnimationGroup has been # set to something other than its default, these # times might not correspond to actual times, # e.g. of the surrounding scene. Instead they'd # be a rescaled version. But that's okay! anim_group_time = self.rate_func(alpha) * self.max_end_time time_goes_back = anim_group_time < self.anim_group_time # Only update ongoing animations awt = self.anims_with_timings new_begun = anim_group_time >= awt["start"] new_finished = anim_group_time > awt["end"] to_update = awt[ (self.anims_begun | new_begun) & (~self.anims_finished | ~new_finished) ] run_times = to_update["end"] - to_update["start"] with_zero_run_time = run_times == 0 run_times[with_zero_run_time] = 1 sub_alphas = (anim_group_time - to_update["start"]) / run_times if time_goes_back: sub_alphas[(sub_alphas < 0) | with_zero_run_time] = 0 else: sub_alphas[(sub_alphas > 1) | with_zero_run_time] = 1 for anim_to_update, sub_alpha in zip(to_update["anim"], sub_alphas): anim_to_update.interpolate(sub_alpha) self.anim_group_time = anim_group_time self.anims_begun = new_begun self.anims_finished = new_finished class Succession(AnimationGroup): """Plays a series of animations in succession. Parameters ---------- animations Sequence of :class:`~.Animation` objects to be played. lag_ratio Defines the delay after which the animation is applied to submobjects. A lag_ratio of ``n.nn`` means the next animation will play when ``nnn%`` of the current animation has played. Defaults to 1.0, meaning that the next animation will begin when 100% of the current animation has played. This does not influence the total runtime of the animation. Instead the runtime of individual animations is adjusted so that the complete animation has the defined run time. Examples -------- .. manim:: SuccessionExample class SuccessionExample(Scene): def construct(self): dot1 = Dot(point=LEFT * 2 + UP * 2, radius=0.16, color=BLUE) dot2 = Dot(point=LEFT * 2 + DOWN * 2, radius=0.16, color=MAROON) dot3 = Dot(point=RIGHT * 2 + DOWN * 2, radius=0.16, color=GREEN) dot4 = Dot(point=RIGHT * 2 + UP * 2, radius=0.16, color=YELLOW) self.add(dot1, dot2, dot3, dot4) self.play(Succession( dot1.animate.move_to(dot2), dot2.animate.move_to(dot3), dot3.animate.move_to(dot4), dot4.animate.move_to(dot1) )) """ def __init__(self, *animations: Animation, lag_ratio: float = 1, **kwargs: Any): super().__init__(*animations, lag_ratio=lag_ratio, **kwargs) def begin(self) -> None: if not self.animations: raise ValueError( f"Trying to play {self} without animations, this is not supported. " "Please add at least one subanimation." ) self.update_active_animation(0) def finish(self) -> None: while self.active_animation is not None: self.next_animation() def update_mobjects(self, dt: float) -> None: if self.active_animation: self.active_animation.update_mobjects(dt) def _setup_scene(self, scene: Scene | None) -> None: if scene is None: return if self.is_introducer(): for anim in self.animations: if not anim.is_introducer() and anim.mobject is not None: scene.add(anim.mobject) self.scene = scene def update_active_animation(self, index: int) -> None: self.active_index = index if index >= len(self.animations): self.active_animation: Animation | None = None self.active_start_time: float | None = None self.active_end_time: float | None = None else: self.active_animation = self.animations[index] self.active_animation._setup_scene(self.scene) self.active_animation.begin() self.active_start_time = self.anims_with_timings[index]["start"] self.active_end_time = self.anims_with_timings[index]["end"] def next_animation(self) -> None: """Proceeds to the next animation. This method is called right when the active animation finishes. """ if self.active_animation is not None: self.active_animation.finish() self.update_active_animation(self.active_index + 1) def interpolate(self, alpha: float) -> None: current_time = self.rate_func(alpha) * self.max_end_time while self.active_end_time is not None and current_time >= self.active_end_time: self.next_animation() if self.active_animation is not None and self.active_start_time is not None: elapsed = current_time - self.active_start_time active_run_time = self.active_animation.run_time subalpha = elapsed / active_run_time if active_run_time != 0.0 else 1.0 self.active_animation.interpolate(subalpha) class LaggedStart(AnimationGroup): """Adjusts the timing of a series of :class:`~.Animation` according to ``lag_ratio``. Parameters ---------- animations Sequence of :class:`~.Animation` objects to be played. lag_ratio Defines the delay after which the animation is applied to submobjects. A lag_ratio of ``n.nn`` means the next animation will play when ``nnn%`` of the current animation has played. Defaults to 0.05, meaning that the next animation will begin when 5% of the current animation has played. This does not influence the total runtime of the animation. Instead the runtime of individual animations is adjusted so that the complete animation has the defined run time. Examples -------- .. manim:: LaggedStartExample class LaggedStartExample(Scene): def construct(self): title = Text("lag_ratio = 0.25").to_edge(UP) dot1 = Dot(point=LEFT * 2 + UP, radius=0.16) dot2 = Dot(point=LEFT * 2, radius=0.16) dot3 = Dot(point=LEFT * 2 + DOWN, radius=0.16) line_25 = DashedLine( start=LEFT + UP * 2, end=LEFT + DOWN * 2, color=RED ) label = Text("25%", font_size=24).next_to(line_25, UP) self.add(title, dot1, dot2, dot3, line_25, label) self.play(LaggedStart( dot1.animate.shift(RIGHT * 4), dot2.animate.shift(RIGHT * 4), dot3.animate.shift(RIGHT * 4), lag_ratio=0.25, run_time=4 )) """ def __init__( self, *animations: Animation, lag_ratio: float = DEFAULT_LAGGED_START_LAG_RATIO, **kwargs: Any, ): super().__init__(*animations, lag_ratio=lag_ratio, **kwargs) class LaggedStartMap(LaggedStart): """Plays a series of :class:`~.Animation` while mapping a function to submobjects. Parameters ---------- AnimationClass :class:`~.Animation` to apply to mobject. mobject :class:`~.Mobject` whose submobjects the animation, and optionally the function, are to be applied. arg_creator Function which will be applied to :class:`~.Mobject`. run_time The duration of the animation in seconds. Examples -------- .. manim:: LaggedStartMapExample class LaggedStartMapExample(Scene): def construct(self): title = Tex("LaggedStartMap").to_edge(UP, buff=LARGE_BUFF) dots = VGroup( *[Dot(radius=0.16) for _ in range(35)] ).arrange_in_grid(rows=5, cols=7, buff=MED_LARGE_BUFF) self.add(dots, title) # Animate yellow ripple effect for mob in dots, title: self.play(LaggedStartMap( ApplyMethod, mob, lambda m : (m.set_color, YELLOW), lag_ratio = 0.1, rate_func = there_and_back, run_time = 2 )) """ def __init__( self, animation_class: type[Animation], mobject: Mobject, arg_creator: Callable[[Mobject], Iterable[Any]] | None = None, run_time: float = 2, **kwargs: Any, ): if arg_creator is None: def identity(mob: Mobject) -> Mobject: return mob arg_creator = identity args_list = [arg_creator(submob) for submob in mobject] anim_kwargs = dict(kwargs) if "lag_ratio" in anim_kwargs: anim_kwargs.pop("lag_ratio") animations = [animation_class(*args, **anim_kwargs) for args in args_list] super().__init__(*animations, run_time=run_time, **kwargs) ================================================ FILE: manim/animation/creation.py ================================================ r"""Animate the display or removal of a mobject from a scene. .. manim:: CreationModule :hide_source: from manim import ManimBanner class CreationModule(Scene): def construct(self): s1 = Square() s2 = Square() s3 = Square() s4 = Square() VGroup(s1, s2, s3, s4).set_x(0).arrange(buff=1.9).shift(UP) s5 = Square() s6 = Square() s7 = Square() VGroup(s5, s6, s7).set_x(0).arrange(buff=2.6).shift(2 * DOWN) t1 = Text("Write", font_size=24).next_to(s1, UP) t2 = Text("AddTextLetterByLetter", font_size=24).next_to(s2, UP) t3 = Text("Create", font_size=24).next_to(s3, UP) t4 = Text("Uncreate", font_size=24).next_to(s4, UP) t5 = Text("DrawBorderThenFill", font_size=24).next_to(s5, UP) t6 = Text("ShowIncreasingSubsets", font_size=22).next_to(s6, UP) t7 = Text("ShowSubmobjectsOneByOne", font_size=22).next_to(s7, UP) self.add(s1, s2, s3, s4, s5, s6, s7, t1, t2, t3, t4, t5, t6, t7) texts = [Text("manim", font_size=29), Text("manim", font_size=29)] texts[0].move_to(s1.get_center()) texts[1].move_to(s2.get_center()) self.add(*texts) objs = [ManimBanner().scale(0.25) for _ in range(5)] objs[0].move_to(s3.get_center()) objs[1].move_to(s4.get_center()) objs[2].move_to(s5.get_center()) objs[3].move_to(s6.get_center()) objs[4].move_to(s7.get_center()) self.add(*objs) self.play( # text creation Write(texts[0]), AddTextLetterByLetter(texts[1]), # mobject creation Create(objs[0]), Uncreate(objs[1]), DrawBorderThenFill(objs[2]), ShowIncreasingSubsets(objs[3]), ShowSubmobjectsOneByOne(objs[4]), run_time=3, ) self.wait() """ from __future__ import annotations __all__ = [ "Create", "Uncreate", "DrawBorderThenFill", "Write", "Unwrite", "ShowPartial", "ShowIncreasingSubsets", "SpiralIn", "AddTextLetterByLetter", "RemoveTextLetterByLetter", "ShowSubmobjectsOneByOne", "AddTextWordByWord", "TypeWithCursor", "UntypeWithCursor", ] import itertools as it from collections.abc import Callable, Iterable, Sequence from typing import TYPE_CHECKING import numpy as np if TYPE_CHECKING: from manim.mobject.text.text_mobject import Text from manim.scene.scene import Scene from manim.constants import RIGHT, TAU from manim.mobject.opengl.opengl_surface import OpenGLSurface from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVMobject from manim.utils.color import ManimColor from .. import config from ..animation.animation import Animation from ..animation.composition import Succession from ..mobject.mobject import Group, Mobject from ..mobject.types.vectorized_mobject import VMobject from ..utils.bezier import integer_interpolate from ..utils.rate_functions import double_smooth, linear class ShowPartial(Animation): """Abstract class for Animations that show the VMobject partially. Raises ------ :class:`TypeError` If ``mobject`` is not an instance of :class:`~.VMobject`. See Also -------- :class:`Create`, :class:`~.ShowPassingFlash` """ def __init__( self, mobject: VMobject | OpenGLVMobject | OpenGLSurface | None, **kwargs, ): pointwise = getattr(mobject, "pointwise_become_partial", None) if not callable(pointwise): raise TypeError(f"{self.__class__.__name__} only works for VMobjects.") super().__init__(mobject, **kwargs) def interpolate_submobject( self, submobject: Mobject, starting_submobject: Mobject, alpha: float, ) -> None: submobject.pointwise_become_partial( starting_submobject, *self._get_bounds(alpha) ) def _get_bounds(self, alpha: float) -> tuple[float, float]: raise NotImplementedError("Please use Create or ShowPassingFlash") class Create(ShowPartial): """Incrementally show a VMobject. Parameters ---------- mobject The VMobject to animate. Raises ------ :class:`TypeError` If ``mobject`` is not an instance of :class:`~.VMobject`. Examples -------- .. manim:: CreateScene class CreateScene(Scene): def construct(self): self.play(Create(Square())) See Also -------- :class:`~.ShowPassingFlash` """ def __init__( self, mobject: VMobject | OpenGLVMobject | OpenGLSurface, lag_ratio: float = 1.0, introducer: bool = True, **kwargs, ) -> None: super().__init__(mobject, lag_ratio=lag_ratio, introducer=introducer, **kwargs) def _get_bounds(self, alpha: float) -> tuple[float, float]: return (0, alpha) class Uncreate(Create): """Like :class:`Create` but in reverse. Examples -------- .. manim:: ShowUncreate class ShowUncreate(Scene): def construct(self): self.play(Uncreate(Square())) See Also -------- :class:`Create` """ def __init__( self, mobject: VMobject | OpenGLVMobject, reverse_rate_function: bool = True, remover: bool = True, **kwargs, ) -> None: super().__init__( mobject, reverse_rate_function=reverse_rate_function, introducer=False, remover=remover, **kwargs, ) class DrawBorderThenFill(Animation): """Draw the border first and then show the fill. Examples -------- .. manim:: ShowDrawBorderThenFill class ShowDrawBorderThenFill(Scene): def construct(self): self.play(DrawBorderThenFill(Square(fill_opacity=1, fill_color=ORANGE))) """ def __init__( self, vmobject: VMobject | OpenGLVMobject, run_time: float = 2, rate_func: Callable[[float], float] = double_smooth, stroke_width: float = 2, stroke_color: str = None, introducer: bool = True, **kwargs, ) -> None: self._typecheck_input(vmobject) super().__init__( vmobject, run_time=run_time, introducer=introducer, rate_func=rate_func, **kwargs, ) self.stroke_width = stroke_width self.stroke_color = stroke_color self.outline = self.get_outline() def _typecheck_input(self, vmobject: VMobject | OpenGLVMobject) -> None: if not isinstance(vmobject, (VMobject, OpenGLVMobject)): raise TypeError( f"{self.__class__.__name__} only works for vectorized Mobjects" ) def begin(self) -> None: self.outline = self.get_outline() super().begin() def get_outline(self) -> Mobject: outline = self.mobject.copy() outline.set_fill(opacity=0) for sm in outline.family_members_with_points(): sm.set_stroke(color=self.get_stroke_color(sm), width=self.stroke_width) return outline def get_stroke_color(self, vmobject: VMobject | OpenGLVMobject) -> ManimColor: if self.stroke_color: return self.stroke_color elif vmobject.get_stroke_width() > 0: return vmobject.get_stroke_color() return vmobject.get_color() def get_all_mobjects(self) -> Sequence[Mobject]: return [*super().get_all_mobjects(), self.outline] def interpolate_submobject( self, submobject: Mobject, starting_submobject: Mobject, outline, alpha: float, ) -> None: # Fixme: not matching the parent class? What is outline doing here? index: int subalpha: float index, subalpha = integer_interpolate(0, 2, alpha) if index == 0: submobject.pointwise_become_partial(outline, 0, subalpha) submobject.match_style(outline) else: submobject.interpolate(outline, starting_submobject, subalpha) class Write(DrawBorderThenFill): """Simulate hand-writing a :class:`~.Text` or hand-drawing a :class:`~.VMobject`. Examples -------- .. manim:: ShowWrite class ShowWrite(Scene): def construct(self): self.play(Write(Text("Hello", font_size=144))) .. manim:: ShowWriteReversed class ShowWriteReversed(Scene): def construct(self): self.play(Write(Text("Hello", font_size=144), reverse=True, remover=False)) Tests ----- Check that creating empty :class:`.Write` animations works:: >>> from manim import Write, Text >>> Write(Text('')) Write(Text('')) """ def __init__( self, vmobject: VMobject | OpenGLVMobject, rate_func: Callable[[float], float] = linear, reverse: bool = False, **kwargs, ) -> None: run_time: float | None = kwargs.pop("run_time", None) lag_ratio: float | None = kwargs.pop("lag_ratio", None) run_time, lag_ratio = self._set_default_config_from_length( vmobject, run_time, lag_ratio, ) self.reverse = reverse if "remover" not in kwargs: kwargs["remover"] = reverse super().__init__( vmobject, rate_func=rate_func, run_time=run_time, lag_ratio=lag_ratio, introducer=not reverse, **kwargs, ) def _set_default_config_from_length( self, vmobject: VMobject | OpenGLVMobject, run_time: float | None, lag_ratio: float | None, ) -> tuple[float, float]: length = len(vmobject.family_members_with_points()) if run_time is None: run_time = 1 if length < 15 else 2 if lag_ratio is None: lag_ratio = min(4.0 / max(1.0, length), 0.2) return run_time, lag_ratio def reverse_submobjects(self) -> None: self.mobject.invert(recursive=True) def begin(self) -> None: if self.reverse: self.reverse_submobjects() super().begin() def finish(self) -> None: super().finish() if self.reverse: self.reverse_submobjects() class Unwrite(Write): """Simulate erasing by hand a :class:`~.Text` or a :class:`~.VMobject`. Parameters ---------- reverse Set True to have the animation start erasing from the last submobject first. Examples -------- .. manim :: UnwriteReverseTrue class UnwriteReverseTrue(Scene): def construct(self): text = Tex("Alice and Bob").scale(3) self.add(text) self.play(Unwrite(text)) .. manim:: UnwriteReverseFalse class UnwriteReverseFalse(Scene): def construct(self): text = Tex("Alice and Bob").scale(3) self.add(text) self.play(Unwrite(text, reverse=False)) """ def __init__( self, vmobject: VMobject, rate_func: Callable[[float], float] = linear, reverse: bool = True, **kwargs, ) -> None: run_time: float | None = kwargs.pop("run_time", None) lag_ratio: float | None = kwargs.pop("lag_ratio", None) run_time, lag_ratio = self._set_default_config_from_length( vmobject, run_time, lag_ratio, ) super().__init__( vmobject, run_time=run_time, lag_ratio=lag_ratio, reverse_rate_function=True, reverse=reverse, **kwargs, ) class SpiralIn(Animation): r"""Create the Mobject with sub-Mobjects flying in on spiral trajectories. Parameters ---------- shapes The Mobject on which to be operated. scale_factor The factor used for scaling the effect. fade_in_fraction Fractional duration of initial fade-in of sub-Mobjects as they fly inward. Examples -------- .. manim :: SpiralInExample class SpiralInExample(Scene): def construct(self): pi = MathTex(r"\pi").scale(7) pi.shift(2.25 * LEFT + 1.5 * UP) circle = Circle(color=GREEN_C, fill_opacity=1).shift(LEFT) square = Square(color=BLUE_D, fill_opacity=1).shift(UP) shapes = VGroup(pi, circle, square) self.play(SpiralIn(shapes)) """ def __init__( self, shapes: Mobject, scale_factor: float = 8, fade_in_fraction=0.3, **kwargs, ) -> None: self.shapes = shapes.copy() self.scale_factor = scale_factor self.shape_center = shapes.get_center() self.fade_in_fraction = fade_in_fraction for shape in shapes: shape.final_position = shape.get_center() shape.initial_position = ( shape.final_position + (shape.final_position - self.shape_center) * self.scale_factor ) shape.move_to(shape.initial_position) shape.save_state() super().__init__(shapes, introducer=True, **kwargs) def interpolate_mobject(self, alpha: float) -> None: alpha = self.rate_func(alpha) for original_shape, shape in zip(self.shapes, self.mobject): shape.restore() fill_opacity = original_shape.get_fill_opacity() stroke_opacity = original_shape.get_stroke_opacity() new_fill_opacity = min( fill_opacity, alpha * fill_opacity / self.fade_in_fraction ) new_stroke_opacity = min( stroke_opacity, alpha * stroke_opacity / self.fade_in_fraction ) shape.shift((shape.final_position - shape.initial_position) * alpha) shape.rotate(TAU * alpha, about_point=self.shape_center) shape.rotate(-TAU * alpha, about_point=shape.get_center_of_mass()) shape.set_fill(opacity=new_fill_opacity) shape.set_stroke(opacity=new_stroke_opacity) class ShowIncreasingSubsets(Animation): """Show one submobject at a time, leaving all previous ones displayed on screen. Examples -------- .. manim:: ShowIncreasingSubsetsScene class ShowIncreasingSubsetsScene(Scene): def construct(self): p = VGroup(Dot(), Square(), Triangle()) self.add(p) self.play(ShowIncreasingSubsets(p)) self.wait() """ def __init__( self, group: Mobject, suspend_mobject_updating: bool = False, int_func: Callable[[np.ndarray], np.ndarray] = np.floor, reverse_rate_function=False, **kwargs, ) -> None: self.all_submobs = list(group.submobjects) self.int_func = int_func for mobj in self.all_submobs: mobj.set_opacity(0) super().__init__( group, suspend_mobject_updating=suspend_mobject_updating, reverse_rate_function=reverse_rate_function, **kwargs, ) def interpolate_mobject(self, alpha: float) -> None: n_submobs = len(self.all_submobs) value = ( 1 - self.rate_func(alpha) if self.reverse_rate_function else self.rate_func(alpha) ) index = int(self.int_func(value * n_submobs)) self.update_submobject_list(index) def update_submobject_list(self, index: int) -> None: for mobj in self.all_submobs[:index]: mobj.set_opacity(1) for mobj in self.all_submobs[index:]: mobj.set_opacity(0) class AddTextLetterByLetter(ShowIncreasingSubsets): """Show a :class:`~.Text` letter by letter on the scene. Parameters ---------- time_per_char Frequency of appearance of the letters. .. tip:: This is currently only possible for class:`~.Text` and not for class:`~.MathTex` """ def __init__( self, text: Text, suspend_mobject_updating: bool = False, int_func: Callable[[np.ndarray], np.ndarray] = np.ceil, rate_func: Callable[[float], float] = linear, time_per_char: float = 0.1, run_time: float | None = None, reverse_rate_function=False, introducer=True, **kwargs, ) -> None: self.time_per_char = time_per_char # Check for empty text using family_members_with_points() if not text.family_members_with_points(): raise ValueError( f"The text mobject {text} does not seem to contain any characters." ) if run_time is None: # minimum time per character is 1/frame_rate, otherwise # the animation does not finish. run_time = np.max((1 / config.frame_rate, self.time_per_char)) * len(text) super().__init__( text, suspend_mobject_updating=suspend_mobject_updating, int_func=int_func, rate_func=rate_func, run_time=run_time, reverse_rate_function=reverse_rate_function, introducer=introducer, **kwargs, ) class RemoveTextLetterByLetter(AddTextLetterByLetter): """Remove a :class:`~.Text` letter by letter from the scene. Parameters ---------- time_per_char Frequency of appearance of the letters. .. tip:: This is currently only possible for class:`~.Text` and not for class:`~.MathTex` """ def __init__( self, text: Text, suspend_mobject_updating: bool = False, int_func: Callable[[np.ndarray], np.ndarray] = np.ceil, rate_func: Callable[[float], float] = linear, time_per_char: float = 0.1, run_time: float | None = None, reverse_rate_function=True, introducer=False, remover=True, **kwargs, ) -> None: super().__init__( text, suspend_mobject_updating=suspend_mobject_updating, int_func=int_func, rate_func=rate_func, time_per_char=time_per_char, run_time=run_time, reverse_rate_function=reverse_rate_function, introducer=introducer, remover=remover, **kwargs, ) class ShowSubmobjectsOneByOne(ShowIncreasingSubsets): """Show one submobject at a time, removing all previously displayed ones from screen.""" def __init__( self, group: Iterable[Mobject], int_func: Callable[[np.ndarray], np.ndarray] = np.ceil, **kwargs, ) -> None: new_group = Group(*group) super().__init__(new_group, int_func=int_func, **kwargs) def update_submobject_list(self, index: int) -> None: current_submobjects = self.all_submobs[:index] for mobj in current_submobjects[:-1]: mobj.set_opacity(0) if len(current_submobjects) > 0: current_submobjects[-1].set_opacity(1) # TODO, this is broken... class AddTextWordByWord(Succession): """Show a :class:`~.Text` word by word on the scene. Note: currently broken.""" def __init__( self, text_mobject: Text, run_time: float = None, time_per_char: float = 0.06, **kwargs, ) -> None: self.time_per_char = time_per_char tpc = self.time_per_char anims = it.chain( *( [ ShowIncreasingSubsets(word, run_time=tpc * len(word)), Animation(word, run_time=0.005 * len(word) ** 1.5), ] for word in text_mobject ) ) super().__init__(*anims, **kwargs) class TypeWithCursor(AddTextLetterByLetter): """Similar to :class:`~.AddTextLetterByLetter` , but with an additional cursor mobject at the end. Parameters ---------- time_per_char Frequency of appearance of the letters. cursor :class:`~.Mobject` shown after the last added letter. buff Controls how far away the cursor is to the right of the last added letter. keep_cursor_y If ``True``, the cursor's y-coordinate is set to the center of the ``Text`` and remains the same throughout the animation. Otherwise, it is set to the center of the last added letter. leave_cursor_on Whether to show the cursor after the animation. .. tip:: This is currently only possible for class:`~.Text` and not for class:`~.MathTex`. Examples -------- .. manim:: InsertingTextExample :ref_classes: Blink class InsertingTextExample(Scene): def construct(self): text = Text("Inserting", color=PURPLE).scale(1.5).to_edge(LEFT) cursor = Rectangle( color = GREY_A, fill_color = GREY_A, fill_opacity = 1.0, height = 1.1, width = 0.5, ).move_to(text[0]) # Position the cursor self.play(TypeWithCursor(text, cursor)) self.play(Blink(cursor, blinks=2)) """ def __init__( self, text: Text, cursor: Mobject, buff: float = 0.1, keep_cursor_y: bool = True, leave_cursor_on: bool = True, time_per_char: float = 0.1, reverse_rate_function=False, introducer=True, **kwargs, ) -> None: self.cursor = cursor self.buff = buff self.keep_cursor_y = keep_cursor_y self.leave_cursor_on = leave_cursor_on super().__init__( text, time_per_char=time_per_char, reverse_rate_function=reverse_rate_function, introducer=introducer, **kwargs, ) def begin(self) -> None: self.y_cursor = self.cursor.get_y() self.cursor.initial_position = self.mobject.get_center() if self.keep_cursor_y: self.cursor.set_y(self.y_cursor) self.cursor.set_opacity(0) self.mobject.add(self.cursor) super().begin() def finish(self) -> None: if self.leave_cursor_on: self.cursor.set_opacity(1) else: self.cursor.set_opacity(0) self.mobject.remove(self.cursor) super().finish() def clean_up_from_scene(self, scene: Scene) -> None: if not self.leave_cursor_on: scene.remove(self.cursor) super().clean_up_from_scene(scene) def update_submobject_list(self, index: int) -> None: for mobj in self.all_submobs[:index]: mobj.set_opacity(1) for mobj in self.all_submobs[index:]: mobj.set_opacity(0) if index != 0: self.cursor.next_to( self.all_submobs[index - 1], RIGHT, buff=self.buff ).set_y(self.cursor.initial_position[1]) else: self.cursor.move_to(self.all_submobs[0]).set_y( self.cursor.initial_position[1] ) if self.keep_cursor_y: self.cursor.set_y(self.y_cursor) self.cursor.set_opacity(1) class UntypeWithCursor(TypeWithCursor): """Similar to :class:`~.RemoveTextLetterByLetter` , but with an additional cursor mobject at the end. Parameters ---------- time_per_char Frequency of appearance of the letters. cursor :class:`~.Mobject` shown after the last added letter. buff Controls how far away the cursor is to the right of the last added letter. keep_cursor_y If ``True``, the cursor's y-coordinate is set to the center of the ``Text`` and remains the same throughout the animation. Otherwise, it is set to the center of the last added letter. leave_cursor_on Whether to show the cursor after the animation. .. tip:: This is currently only possible for class:`~.Text` and not for class:`~.MathTex`. Examples -------- .. manim:: DeletingTextExample :ref_classes: Blink class DeletingTextExample(Scene): def construct(self): text = Text("Deleting", color=PURPLE).scale(1.5).to_edge(LEFT) cursor = Rectangle( color = GREY_A, fill_color = GREY_A, fill_opacity = 1.0, height = 1.1, width = 0.5, ).move_to(text[0]) # Position the cursor self.play(UntypeWithCursor(text, cursor)) self.play(Blink(cursor, blinks=2)) """ def __init__( self, text: Text, cursor: VMobject | None = None, time_per_char: float = 0.1, reverse_rate_function=True, introducer=False, remover=True, **kwargs, ) -> None: super().__init__( text, cursor=cursor, time_per_char=time_per_char, reverse_rate_function=reverse_rate_function, introducer=introducer, remover=remover, **kwargs, ) ================================================ FILE: manim/animation/fading.py ================================================ """Fading in and out of view. .. manim:: Fading class Fading(Scene): def construct(self): tex_in = Tex("Fade", "In").scale(3) tex_out = Tex("Fade", "Out").scale(3) self.play(FadeIn(tex_in, shift=DOWN, scale=0.66)) self.play(ReplacementTransform(tex_in, tex_out)) self.play(FadeOut(tex_out, shift=DOWN * 2, scale=1.5)) """ from __future__ import annotations __all__ = [ "FadeOut", "FadeIn", ] from typing import Any import numpy as np from manim.mobject.opengl.opengl_mobject import OpenGLMobject from ..animation.transform import Transform from ..constants import ORIGIN from ..mobject.mobject import Group, Mobject from ..scene.scene import Scene class _Fade(Transform): """Fade :class:`~.Mobject` s in or out. Parameters ---------- mobjects The mobjects to be faded. shift The vector by which the mobject shifts while being faded. target_position The position to/from which the mobject moves while being faded in. In case another mobject is given as target position, its center is used. scale The factor by which the mobject is scaled initially before being rescaling to its original size while being faded in. """ def __init__( self, *mobjects: Mobject, shift: np.ndarray | None = None, target_position: np.ndarray | Mobject | None = None, scale: float = 1, **kwargs: Any, ) -> None: if not mobjects: raise ValueError("At least one mobject must be passed.") mobject = mobjects[0] if len(mobjects) == 1 else Group(*mobjects) self.point_target = False if shift is None: if target_position is not None: if isinstance(target_position, (Mobject, OpenGLMobject)): target_position = target_position.get_center() shift = target_position - mobject.get_center() self.point_target = True else: shift = ORIGIN self.shift_vector = shift self.scale_factor = scale super().__init__(mobject, **kwargs) def _create_faded_mobject(self, fadeIn: bool) -> Mobject: """Create a faded, shifted and scaled copy of the mobject. Parameters ---------- fadeIn Whether the faded mobject is used to fade in. Returns ------- Mobject The faded, shifted and scaled copy of the mobject. """ faded_mobject: Mobject = self.mobject.copy() # type: ignore[assignment] faded_mobject.fade(1) direction_modifier = -1 if fadeIn and not self.point_target else 1 faded_mobject.shift(self.shift_vector * direction_modifier) faded_mobject.scale(self.scale_factor) return faded_mobject class FadeIn(_Fade): r"""Fade in :class:`~.Mobject` s. Parameters ---------- mobjects The mobjects to be faded in. shift The vector by which the mobject shifts while being faded in. target_position The position from which the mobject starts while being faded in. In case another mobject is given as target position, its center is used. scale The factor by which the mobject is scaled initially before being rescaling to its original size while being faded in. Examples -------- .. manim :: FadeInExample class FadeInExample(Scene): def construct(self): dot = Dot(UP * 2 + LEFT) self.add(dot) tex = Tex( "FadeIn with ", "shift ", r" or target\_position", " and scale" ).scale(1) animations = [ FadeIn(tex[0]), FadeIn(tex[1], shift=DOWN), FadeIn(tex[2], target_position=dot), FadeIn(tex[3], scale=1.5), ] self.play(AnimationGroup(*animations, lag_ratio=0.5)) """ def __init__(self, *mobjects: Mobject, **kwargs: Any) -> None: super().__init__(*mobjects, introducer=True, **kwargs) def create_target(self) -> Mobject: return self.mobject # type: ignore[return-value] def create_starting_mobject(self) -> Mobject: return self._create_faded_mobject(fadeIn=True) class FadeOut(_Fade): r"""Fade out :class:`~.Mobject` s. Parameters ---------- mobjects The mobjects to be faded out. shift The vector by which the mobject shifts while being faded out. target_position The position to which the mobject moves while being faded out. In case another mobject is given as target position, its center is used. scale The factor by which the mobject is scaled while being faded out. Examples -------- .. manim :: FadeInExample class FadeInExample(Scene): def construct(self): dot = Dot(UP * 2 + LEFT) self.add(dot) tex = Tex( "FadeOut with ", "shift ", r" or target\_position", " and scale" ).scale(1) animations = [ FadeOut(tex[0]), FadeOut(tex[1], shift=DOWN), FadeOut(tex[2], target_position=dot), FadeOut(tex[3], scale=0.5), ] self.play(AnimationGroup(*animations, lag_ratio=0.5)) """ def __init__(self, *mobjects: Mobject, **kwargs: Any) -> None: super().__init__(*mobjects, remover=True, **kwargs) def create_target(self) -> Mobject: return self._create_faded_mobject(fadeIn=False) def clean_up_from_scene(self, scene: Scene) -> None: super().clean_up_from_scene(scene) self.interpolate(0) ================================================ FILE: manim/animation/growing.py ================================================ """Animations that introduce mobjects to scene by growing them from points. .. manim:: Growing class Growing(Scene): def construct(self): square = Square() circle = Circle() triangle = Triangle() arrow = Arrow(LEFT, RIGHT) star = Star() VGroup(square, circle, triangle).set_x(0).arrange(buff=1.5).set_y(2) VGroup(arrow, star).move_to(DOWN).set_x(0).arrange(buff=1.5).set_y(-2) self.play(GrowFromPoint(square, ORIGIN)) self.play(GrowFromCenter(circle)) self.play(GrowFromEdge(triangle, DOWN)) self.play(GrowArrow(arrow)) self.play(SpinInFromNothing(star)) """ from __future__ import annotations __all__ = [ "GrowFromPoint", "GrowFromCenter", "GrowFromEdge", "GrowArrow", "SpinInFromNothing", ] from typing import TYPE_CHECKING, Any from ..animation.transform import Transform from ..constants import PI from ..utils.paths import spiral_path if TYPE_CHECKING: from manim.mobject.geometry.line import Arrow from manim.mobject.opengl.opengl_mobject import OpenGLMobject from manim.typing import Point3DLike, Vector3DLike from manim.utils.color import ParsableManimColor from ..mobject.mobject import Mobject class GrowFromPoint(Transform): """Introduce an :class:`~.Mobject` by growing it from a point. Parameters ---------- mobject The mobjects to be introduced. point The point from which the mobject grows. point_color Initial color of the mobject before growing to its full size. Leave empty to match mobject's color. Examples -------- .. manim :: GrowFromPointExample class GrowFromPointExample(Scene): def construct(self): dot = Dot(3 * UR, color=GREEN) squares = [Square() for _ in range(4)] VGroup(*squares).set_x(0).arrange(buff=1) self.add(dot) self.play(GrowFromPoint(squares[0], ORIGIN)) self.play(GrowFromPoint(squares[1], [-2, 2, 0])) self.play(GrowFromPoint(squares[2], [3, -2, 0], RED)) self.play(GrowFromPoint(squares[3], dot, dot.get_color())) """ def __init__( self, mobject: Mobject, point: Point3DLike, point_color: ParsableManimColor | None = None, **kwargs: Any, ): self.point = point self.point_color = point_color super().__init__(mobject, introducer=True, **kwargs) def create_target(self) -> Mobject | OpenGLMobject: return self.mobject def create_starting_mobject(self) -> Mobject | OpenGLMobject: start = super().create_starting_mobject() start.scale(0) start.move_to(self.point) if self.point_color: start.set_color(self.point_color) return start class GrowFromCenter(GrowFromPoint): """Introduce an :class:`~.Mobject` by growing it from its center. Parameters ---------- mobject The mobjects to be introduced. point_color Initial color of the mobject before growing to its full size. Leave empty to match mobject's color. Examples -------- .. manim :: GrowFromCenterExample class GrowFromCenterExample(Scene): def construct(self): squares = [Square() for _ in range(2)] VGroup(*squares).set_x(0).arrange(buff=2) self.play(GrowFromCenter(squares[0])) self.play(GrowFromCenter(squares[1], point_color=RED)) """ def __init__( self, mobject: Mobject, point_color: ParsableManimColor | None = None, **kwargs: Any, ): point = mobject.get_center() super().__init__(mobject, point, point_color=point_color, **kwargs) class GrowFromEdge(GrowFromPoint): """Introduce an :class:`~.Mobject` by growing it from one of its bounding box edges. Parameters ---------- mobject The mobjects to be introduced. edge The direction to seek bounding box edge of mobject. point_color Initial color of the mobject before growing to its full size. Leave empty to match mobject's color. Examples -------- .. manim :: GrowFromEdgeExample class GrowFromEdgeExample(Scene): def construct(self): squares = [Square() for _ in range(4)] VGroup(*squares).set_x(0).arrange(buff=1) self.play(GrowFromEdge(squares[0], DOWN)) self.play(GrowFromEdge(squares[1], RIGHT)) self.play(GrowFromEdge(squares[2], UR)) self.play(GrowFromEdge(squares[3], UP, point_color=RED)) """ def __init__( self, mobject: Mobject, edge: Vector3DLike, point_color: ParsableManimColor | None = None, **kwargs: Any, ): point = mobject.get_critical_point(edge) super().__init__(mobject, point, point_color=point_color, **kwargs) class GrowArrow(GrowFromPoint): """Introduce an :class:`~.Arrow` by growing it from its start toward its tip. Parameters ---------- arrow The arrow to be introduced. point_color Initial color of the arrow before growing to its full size. Leave empty to match arrow's color. Examples -------- .. manim :: GrowArrowExample class GrowArrowExample(Scene): def construct(self): arrows = [Arrow(2 * LEFT, 2 * RIGHT), Arrow(2 * DR, 2 * UL)] VGroup(*arrows).set_x(0).arrange(buff=2) self.play(GrowArrow(arrows[0])) self.play(GrowArrow(arrows[1], point_color=RED)) """ def __init__( self, arrow: Arrow, point_color: ParsableManimColor | None = None, **kwargs: Any ): point = arrow.get_start() super().__init__(arrow, point, point_color=point_color, **kwargs) def create_starting_mobject(self) -> Mobject | OpenGLMobject: start_arrow = self.mobject.copy() start_arrow.scale(0, scale_tips=True, about_point=self.point) if self.point_color: start_arrow.set_color(self.point_color) return start_arrow class SpinInFromNothing(GrowFromCenter): """Introduce an :class:`~.Mobject` spinning and growing it from its center. Parameters ---------- mobject The mobjects to be introduced. angle The amount of spinning before mobject reaches its full size. E.g. 2*PI means that the object will do one full spin before being fully introduced. point_color Initial color of the mobject before growing to its full size. Leave empty to match mobject's color. Examples -------- .. manim :: SpinInFromNothingExample class SpinInFromNothingExample(Scene): def construct(self): squares = [Square() for _ in range(3)] VGroup(*squares).set_x(0).arrange(buff=2) self.play(SpinInFromNothing(squares[0])) self.play(SpinInFromNothing(squares[1], angle=2 * PI)) self.play(SpinInFromNothing(squares[2], point_color=RED)) """ def __init__( self, mobject: Mobject, angle: float = PI / 2, point_color: ParsableManimColor | None = None, **kwargs: Any, ): self.angle = angle super().__init__( mobject, path_func=spiral_path(angle), point_color=point_color, **kwargs ) ================================================ FILE: manim/animation/indication.py ================================================ """Animations drawing attention to particular mobjects. Examples -------- .. manim:: Indications class Indications(Scene): def construct(self): indications = [ApplyWave,Circumscribe,Flash,FocusOn,Indicate,ShowPassingFlash,Wiggle] names = [Tex(i.__name__).scale(3) for i in indications] self.add(names[0]) for i in range(len(names)): if indications[i] is Flash: self.play(Flash(UP)) elif indications[i] is ShowPassingFlash: self.play(ShowPassingFlash(Underline(names[i]))) else: self.play(indications[i](names[i])) self.play(AnimationGroup( FadeOut(names[i], shift=UP*1.5), FadeIn(names[(i+1)%len(names)], shift=UP*1.5), )) """ from __future__ import annotations __all__ = [ "FocusOn", "Indicate", "Flash", "ShowPassingFlash", "ShowPassingFlashWithThinningStrokeWidth", "ApplyWave", "Circumscribe", "Wiggle", "Blink", ] from collections.abc import Iterable from typing import Any import numpy as np from typing_extensions import Self from manim.mobject.geometry.arc import Circle, Dot from manim.mobject.geometry.line import Line from manim.mobject.geometry.polygram import Rectangle from manim.mobject.geometry.shape_matchers import SurroundingRectangle from manim.mobject.opengl.opengl_mobject import OpenGLMobject from manim.scene.scene import Scene from .. import config from ..animation.animation import Animation from ..animation.composition import AnimationGroup, Succession from ..animation.creation import Create, ShowPartial, Uncreate from ..animation.fading import FadeIn, FadeOut from ..animation.movement import Homotopy from ..animation.transform import Transform from ..animation.updaters.update import UpdateFromFunc from ..constants import * from ..mobject.mobject import Mobject from ..mobject.types.vectorized_mobject import VGroup, VMobject from ..typing import Point3D, Point3DLike, Vector3DLike from ..utils.bezier import interpolate, inverse_interpolate from ..utils.color import GREY, YELLOW, ParsableManimColor from ..utils.rate_functions import RateFunction, smooth, there_and_back, wiggle from ..utils.space_ops import normalize class FocusOn(Transform): """Shrink a spotlight to a position. Parameters ---------- focus_point The point at which to shrink the spotlight. If it is a :class:`.~Mobject` its center will be used. opacity The opacity of the spotlight. color The color of the spotlight. run_time The duration of the animation. Examples -------- .. manim:: UsingFocusOn class UsingFocusOn(Scene): def construct(self): dot = Dot(color=YELLOW).shift(DOWN) self.add(Tex("Focusing on the dot below:"), dot) self.play(FocusOn(dot)) self.wait() """ def __init__( self, focus_point: Point3DLike | Mobject, opacity: float = 0.2, color: ParsableManimColor = GREY, run_time: float = 2, **kwargs: Any, ): self.focus_point = focus_point self.color = color self.opacity = opacity remover = True starting_dot = Dot( radius=config["frame_x_radius"] + config["frame_y_radius"], stroke_width=0, fill_color=self.color, fill_opacity=0, ) super().__init__(starting_dot, run_time=run_time, remover=remover, **kwargs) def create_target(self) -> Dot: little_dot = Dot(radius=0) little_dot.set_fill(self.color, opacity=self.opacity) little_dot.add_updater(lambda d: d.move_to(self.focus_point)) return little_dot class Indicate(Transform): """Indicate a Mobject by temporarily resizing and recoloring it. Parameters ---------- mobject The mobject to indicate. scale_factor The factor by which the mobject will be temporally scaled color The color the mobject temporally takes. rate_func The function defining the animation progress at every point in time. kwargs Additional arguments to be passed to the :class:`~.Succession` constructor Examples -------- .. manim:: UsingIndicate class UsingIndicate(Scene): def construct(self): tex = Tex("Indicate").scale(3) self.play(Indicate(tex)) self.wait() """ def __init__( self, mobject: Mobject, scale_factor: float = 1.2, color: ParsableManimColor = YELLOW, rate_func: RateFunction = there_and_back, **kwargs: Any, ): self.color = color self.scale_factor = scale_factor super().__init__(mobject, rate_func=rate_func, **kwargs) def create_target(self) -> Mobject | OpenGLMobject: target = self.mobject.copy() target.scale(self.scale_factor) target.set_color(self.color) return target class Flash(AnimationGroup): """Send out lines in all directions. Parameters ---------- point The center of the flash lines. If it is a :class:`.~Mobject` its center will be used. line_length The length of the flash lines. num_lines The number of flash lines. flash_radius The distance from `point` at which the flash lines start. line_stroke_width The stroke width of the flash lines. color The color of the flash lines. time_width The time width used for the flash lines. See :class:`.~ShowPassingFlash` for more details. run_time The duration of the animation. kwargs Additional arguments to be passed to the :class:`~.Succession` constructor Examples -------- .. manim:: UsingFlash class UsingFlash(Scene): def construct(self): dot = Dot(color=YELLOW).shift(DOWN) self.add(Tex("Flash the dot below:"), dot) self.play(Flash(dot)) self.wait() .. manim:: FlashOnCircle class FlashOnCircle(Scene): def construct(self): radius = 2 circle = Circle(radius) self.add(circle) self.play(Flash( circle, line_length=1, num_lines=30, color=RED, flash_radius=radius+SMALL_BUFF, time_width=0.3, run_time=2, rate_func = rush_from )) """ def __init__( self, point: Point3DLike | Mobject, line_length: float = 0.2, num_lines: int = 12, flash_radius: float = 0.1, line_stroke_width: int = 3, color: ParsableManimColor = YELLOW, time_width: float = 1, run_time: float = 1.0, **kwargs: Any, ): if isinstance(point, Mobject): self.point: Point3D = point.get_center() else: self.point = np.asarray(point) self.color = color self.line_length = line_length self.num_lines = num_lines self.flash_radius = flash_radius self.line_stroke_width = line_stroke_width self.run_time = run_time self.time_width = time_width self.animation_config = kwargs self.lines = self.create_lines() animations = self.create_line_anims() super().__init__(*animations, group=self.lines) def create_lines(self) -> VGroup: lines = VGroup() for angle in np.arange(0, TAU, TAU / self.num_lines): line = Line(self.point, self.point + self.line_length * RIGHT) line.shift((self.flash_radius) * RIGHT) line.rotate(angle, about_point=self.point) lines.add(line) lines.set_color(self.color) lines.set_stroke(width=self.line_stroke_width) return lines def create_line_anims(self) -> Iterable[ShowPassingFlash]: return [ ShowPassingFlash( line, time_width=self.time_width, run_time=self.run_time, **self.animation_config, ) for line in self.lines ] class ShowPassingFlash(ShowPartial): r"""Show only a sliver of the VMobject each frame. Parameters ---------- mobject The mobject whose stroke is animated. time_width The length of the sliver relative to the length of the stroke. Examples -------- .. manim:: TimeWidthValues class TimeWidthValues(Scene): def construct(self): p = RegularPolygon(5, color=DARK_GRAY, stroke_width=6).scale(3) lbl = VMobject() self.add(p, lbl) p = p.copy().set_color(BLUE) for time_width in [0.2, 0.5, 1, 2]: lbl.become(Tex(r"\texttt{time\_width={{%.1f}}}"%time_width)) self.play(ShowPassingFlash( p.copy().set_color(BLUE), run_time=2, time_width=time_width )) See Also -------- :class:`~.Create` """ def __init__( self, mobject: VMobject, time_width: float = 0.1, **kwargs: Any ) -> None: self.time_width = time_width super().__init__(mobject, remover=True, introducer=True, **kwargs) def _get_bounds(self, alpha: float) -> tuple[float, float]: tw = self.time_width upper = interpolate(0, 1 + tw, alpha) lower = upper - tw upper = min(upper, 1) lower = max(lower, 0) return (lower, upper) def clean_up_from_scene(self, scene: Scene) -> None: super().clean_up_from_scene(scene) for submob, start in self.get_all_families_zipped(): submob.pointwise_become_partial(start, 0, 1) class ShowPassingFlashWithThinningStrokeWidth(AnimationGroup): def __init__( self, vmobject: VMobject, n_segments: int = 10, time_width: float = 0.1, remover: bool = True, **kwargs: Any, ): self.n_segments = n_segments self.time_width = time_width self.remover = remover max_stroke_width = vmobject.get_stroke_width() max_time_width = kwargs.pop("time_width", self.time_width) super().__init__( *( ShowPassingFlash( vmobject.copy().set_stroke(width=stroke_width), time_width=time_width, **kwargs, ) for stroke_width, time_width in zip( np.linspace(0, max_stroke_width, self.n_segments), np.linspace(max_time_width, 0, self.n_segments), ) ), ) class ApplyWave(Homotopy): """Send a wave through the Mobject distorting it temporarily. Parameters ---------- mobject The mobject to be distorted. direction The direction in which the wave nudges points of the shape amplitude The distance points of the shape get shifted wave_func The function defining the shape of one wave flank. time_width The length of the wave relative to the width of the mobject. ripples The number of ripples of the wave run_time The duration of the animation. Examples -------- .. manim:: ApplyingWaves class ApplyingWaves(Scene): def construct(self): tex = Tex("WaveWaveWaveWaveWave").scale(2) self.play(ApplyWave(tex)) self.play(ApplyWave( tex, direction=RIGHT, time_width=0.5, amplitude=0.3 )) self.play(ApplyWave( tex, rate_func=linear, ripples=4 )) """ def __init__( self, mobject: Mobject, direction: Vector3DLike = UP, amplitude: float = 0.2, wave_func: RateFunction = smooth, time_width: float = 1, ripples: int = 1, run_time: float = 2, **kwargs: Any, ): x_min = mobject.get_left()[0] x_max = mobject.get_right()[0] vect = amplitude * normalize(direction) def wave(t: float) -> float: # Creates a wave with n ripples from a simple rate_func # This wave is build up as follows: # The time is split into 2*ripples phases. In every phase the amplitude # either rises to one or goes down to zero. Consecutive ripples will have # their amplitudes in opposing directions (first ripple from 0 to 1 to 0, # second from 0 to -1 to 0 and so on). This is how two ripples would be # divided into phases: # ####|#### | | # ## | ## | | # ## | ## | | # #### | ####|#### | #### # | | ## | ## # | | ## | ## # | | ####|#### # However, this looks weird in the middle between two ripples. Therefore the # middle phases do actually use only one appropriately scaled version of the # rate like this: # 1 / 4 Time | 2 / 4 Time | 1 / 4 Time # ####|###### | # ## | ### | # ## | ## | # #### | # | #### # | ## | ## # | ### | ## # | ######|#### # Mirrored looks better in the way the wave is used. t = 1 - t # Clamp input if t >= 1 or t <= 0: return 0 phases = ripples * 2 phase = int(t * phases) if phase == 0: # First rising ripple return wave_func(t * phases) elif phase == phases - 1: # last ripple. Rising or falling depending on the number of ripples # The (ripples % 2)-term is used to make this distinction. t -= phase / phases # Time relative to the phase return (1 - wave_func(t * phases)) * (2 * (ripples % 2) - 1) else: # Longer phases: phase = int((phase - 1) / 2) t -= (2 * phase + 1) / phases # Similar to last ripple: return (1 - 2 * wave_func(t * ripples)) * (1 - 2 * ((phase) % 2)) def homotopy( x: float, y: float, z: float, t: float, ) -> tuple[float, float, float]: upper = interpolate(0, 1 + time_width, t) lower = upper - time_width relative_x = inverse_interpolate(x_min, x_max, x) wave_phase = inverse_interpolate(lower, upper, relative_x) nudge = wave(wave_phase) * vect return_value: tuple[float, float, float] = np.array([x, y, z]) + nudge return return_value super().__init__(homotopy, mobject, run_time=run_time, **kwargs) class Wiggle(Animation): """Wiggle a Mobject. Parameters ---------- mobject The mobject to wiggle. scale_value The factor by which the mobject will be temporarily scaled. rotation_angle The wiggle angle. n_wiggles The number of wiggles. scale_about_point The point about which the mobject gets scaled. rotate_about_point The point around which the mobject gets rotated. run_time The duration of the animation Examples -------- .. manim:: ApplyingWaves class ApplyingWaves(Scene): def construct(self): tex = Tex("Wiggle").scale(3) self.play(Wiggle(tex)) self.wait() """ def __init__( self, mobject: Mobject, scale_value: float = 1.1, rotation_angle: float = 0.01 * TAU, n_wiggles: int = 6, scale_about_point: Point3DLike | None = None, rotate_about_point: Point3DLike | None = None, run_time: float = 2, **kwargs: Any, ): self.scale_value = scale_value self.rotation_angle = rotation_angle self.n_wiggles = n_wiggles self.scale_about_point = scale_about_point if scale_about_point is not None: self.scale_about_point = np.array(scale_about_point) self.rotate_about_point = rotate_about_point if rotate_about_point is not None: self.rotate_about_point = np.array(rotate_about_point) super().__init__(mobject, run_time=run_time, **kwargs) def get_scale_about_point(self) -> Point3D: if self.scale_about_point is None: return self.mobject.get_center() return self.scale_about_point def get_rotate_about_point(self) -> Point3D: if self.rotate_about_point is None: return self.mobject.get_center() return self.rotate_about_point def interpolate_submobject( self, submobject: Mobject, starting_submobject: Mobject, alpha: float, ) -> Self: submobject.points[:, :] = starting_submobject.points submobject.scale( interpolate(1, self.scale_value, there_and_back(alpha)), about_point=self.get_scale_about_point(), ) submobject.rotate( wiggle(alpha, self.n_wiggles) * self.rotation_angle, about_point=self.get_rotate_about_point(), ) return self class Circumscribe(Succession): r"""Draw a temporary line surrounding the mobject. Parameters ---------- mobject The mobject to be circumscribed. shape The shape with which to surround the given mobject. Should be either :class:`~.Rectangle` or :class:`~.Circle` fade_in Whether to make the surrounding shape to fade in. It will be drawn otherwise. fade_out Whether to make the surrounding shape to fade out. It will be undrawn otherwise. time_width The time_width of the drawing and undrawing. Gets ignored if either `fade_in` or `fade_out` is `True`. buff The distance between the surrounding shape and the given mobject. color The color of the surrounding shape. run_time The duration of the entire animation. kwargs Additional arguments to be passed to the :class:`~.Succession` constructor Examples -------- .. manim:: UsingCircumscribe class UsingCircumscribe(Scene): def construct(self): lbl = Tex(r"Circum-\\scribe").scale(2) self.add(lbl) self.play(Circumscribe(lbl)) self.play(Circumscribe(lbl, Circle)) self.play(Circumscribe(lbl, fade_out=True)) self.play(Circumscribe(lbl, time_width=2)) self.play(Circumscribe(lbl, Circle, True)) """ def __init__( self, mobject: Mobject, shape: type[Rectangle] | type[Circle] = Rectangle, fade_in: bool = False, fade_out: bool = False, time_width: float = 0.3, buff: float = SMALL_BUFF, color: ParsableManimColor = YELLOW, run_time: float = 1, stroke_width: float = DEFAULT_STROKE_WIDTH, **kwargs: Any, ): if shape is Rectangle: frame: SurroundingRectangle | Circle = SurroundingRectangle( mobject, color=color, buff=buff, stroke_width=stroke_width, ) elif shape is Circle: frame = Circle(color=color, stroke_width=stroke_width).surround( mobject, buffer_factor=1, ) radius = frame.width / 2 frame.scale((radius + buff) / radius) else: raise ValueError("shape should be either Rectangle or Circle.") if fade_in and fade_out: super().__init__( FadeIn(frame, run_time=run_time / 2), FadeOut(frame, run_time=run_time / 2), **kwargs, ) elif fade_in: frame.reverse_direction() super().__init__( FadeIn(frame, run_time=run_time / 2), Uncreate(frame, run_time=run_time / 2), **kwargs, ) elif fade_out: super().__init__( Create(frame, run_time=run_time / 2), FadeOut(frame, run_time=run_time / 2), **kwargs, ) else: super().__init__( ShowPassingFlash(frame, time_width, run_time=run_time), **kwargs ) class Blink(Succession): """Blink the mobject. Parameters ---------- mobject The mobject to be blinked. time_on The duration that the mobject is shown for one blink. time_off The duration that the mobject is hidden for one blink. blinks The number of blinks hide_at_end Whether to hide the mobject at the end of the animation. kwargs Additional arguments to be passed to the :class:`~.Succession` constructor. Examples -------- .. manim:: BlinkingExample class BlinkingExample(Scene): def construct(self): text = Text("Blinking").scale(1.5) self.add(text) self.play(Blink(text, blinks=3)) """ def __init__( self, mobject: Mobject, time_on: float = 0.5, time_off: float = 0.5, blinks: int = 1, hide_at_end: bool = False, **kwargs: Any, ): animations = [ UpdateFromFunc( mobject, update_function=lambda mob: mob.set_opacity(1.0), run_time=time_on, ), UpdateFromFunc( mobject, update_function=lambda mob: mob.set_opacity(0.0), run_time=time_off, ), ] * blinks if not hide_at_end: animations.append( UpdateFromFunc( mobject, update_function=lambda mob: mob.set_opacity(1.0), run_time=time_on, ), ) super().__init__(*animations, **kwargs) ================================================ FILE: manim/animation/movement.py ================================================ """Animations related to movement.""" from __future__ import annotations __all__ = [ "Homotopy", "SmoothedVectorizedHomotopy", "ComplexHomotopy", "PhaseFlow", "MoveAlongPath", ] from typing import TYPE_CHECKING, Any, Callable import numpy as np from ..animation.animation import Animation from ..utils.rate_functions import linear if TYPE_CHECKING: from typing_extensions import Self from manim.mobject.types.vectorized_mobject import VMobject from manim.typing import MappingFunction, Point3D from manim.utils.rate_functions import RateFunction from ..mobject.mobject import Mobject class Homotopy(Animation): """A Homotopy. This is an animation transforming the points of a mobject according to the specified transformation function. With the parameter :math:`t` moving from 0 to 1 throughout the animation and :math:`(x, y, z)` describing the coordinates of the point of a mobject, the function passed to the ``homotopy`` keyword argument should transform the tuple :math:`(x, y, z, t)` to :math:`(x', y', z')`, the coordinates the original point is transformed to at time :math:`t`. Parameters ---------- homotopy A function mapping :math:`(x, y, z, t)` to :math:`(x', y', z')`. mobject The mobject transformed under the given homotopy. run_time The run time of the animation. apply_function_kwargs Keyword arguments propagated to :meth:`.Mobject.apply_function`. kwargs Further keyword arguments passed to the parent class. Examples -------- .. manim:: HomotopyExample class HomotopyExample(Scene): def construct(self): square = Square() def homotopy(x, y, z, t): if t <= 0.25: progress = t / 0.25 return (x, y + progress * 0.2 * np.sin(x), z) else: wave_progress = (t - 0.25) / 0.75 return (x, y + 0.2 * np.sin(x + 10 * wave_progress), z) self.play(Homotopy(homotopy, square, rate_func= linear, run_time=2)) """ def __init__( self, homotopy: Callable[[float, float, float, float], tuple[float, float, float]], mobject: Mobject, run_time: float = 3, apply_function_kwargs: dict[str, Any] | None = None, **kwargs: Any, ): self.homotopy = homotopy self.apply_function_kwargs = ( apply_function_kwargs if apply_function_kwargs is not None else {} ) super().__init__(mobject, run_time=run_time, **kwargs) def function_at_time_t(self, t: float) -> MappingFunction: def mapping_function(p: Point3D) -> Point3D: x, y, z = p return np.array(self.homotopy(x, y, z, t)) return mapping_function def interpolate_submobject( self, submobject: Mobject, starting_submobject: Mobject, alpha: float, ) -> Self: submobject.points = starting_submobject.points submobject.apply_function( self.function_at_time_t(alpha), **self.apply_function_kwargs, ) return self class SmoothedVectorizedHomotopy(Homotopy): def interpolate_submobject( self, submobject: Mobject, starting_submobject: Mobject, alpha: float, ) -> Self: assert isinstance(submobject, VMobject) super().interpolate_submobject(submobject, starting_submobject, alpha) submobject.make_smooth() return self class ComplexHomotopy(Homotopy): def __init__( self, complex_homotopy: Callable[[complex, float], float], mobject: Mobject, **kwargs: Any, ): """Complex Homotopy a function Cx[0, 1] to C""" def homotopy( x: float, y: float, z: float, t: float, ) -> tuple[float, float, float]: c = complex_homotopy(complex(x, y), t) return (c.real, c.imag, z) super().__init__(homotopy, mobject, **kwargs) class PhaseFlow(Animation): def __init__( self, function: Callable[[np.ndarray], np.ndarray], mobject: Mobject, virtual_time: float = 1, suspend_mobject_updating: bool = False, rate_func: RateFunction = linear, **kwargs: Any, ): self.virtual_time = virtual_time self.function = function super().__init__( mobject, suspend_mobject_updating=suspend_mobject_updating, rate_func=rate_func, **kwargs, ) def interpolate_mobject(self, alpha: float) -> None: if hasattr(self, "last_alpha"): dt = self.virtual_time * ( self.rate_func(alpha) - self.rate_func(self.last_alpha) ) self.mobject.apply_function(lambda p: p + dt * self.function(p)) self.last_alpha: float = alpha class MoveAlongPath(Animation): """Make one mobject move along the path of another mobject. .. manim:: MoveAlongPathExample class MoveAlongPathExample(Scene): def construct(self): d1 = Dot().set_color(ORANGE) l1 = Line(LEFT, RIGHT) l2 = VMobject() self.add(d1, l1, l2) l2.add_updater(lambda x: x.become(Line(LEFT, d1.get_center()).set_color(ORANGE))) self.play(MoveAlongPath(d1, l1), rate_func=linear) """ def __init__( self, mobject: Mobject, path: VMobject, suspend_mobject_updating: bool = False, **kwargs: Any, ): self.path = path super().__init__( mobject, suspend_mobject_updating=suspend_mobject_updating, **kwargs ) def interpolate_mobject(self, alpha: float) -> None: point = self.path.point_from_proportion(self.rate_func(alpha)) self.mobject.move_to(point) ================================================ FILE: manim/animation/numbers.py ================================================ """Animations for changing numbers.""" from __future__ import annotations __all__ = ["ChangingDecimal", "ChangeDecimalToValue"] from collections.abc import Callable from typing import Any from manim.mobject.text.numbers import DecimalNumber from ..animation.animation import Animation from ..utils.bezier import interpolate class ChangingDecimal(Animation): """Animate a :class:`~.DecimalNumber` to values specified by a user-supplied function. Parameters ---------- decimal_mob The :class:`~.DecimalNumber` instance to animate. number_update_func A function that returns the number to display at each point in the animation. suspend_mobject_updating If ``True``, the mobject is not updated outside this animation. Raises ------ TypeError If ``decimal_mob`` is not an instance of :class:`~.DecimalNumber`. Examples -------- .. manim:: ChangingDecimalExample class ChangingDecimalExample(Scene): def construct(self): number = DecimalNumber(0) self.add(number) self.play( ChangingDecimal( number, lambda a: 5 * a, run_time=3 ) ) self.wait() """ def __init__( self, decimal_mob: DecimalNumber, number_update_func: Callable[[float], float], suspend_mobject_updating: bool = False, **kwargs: Any, ) -> None: self.check_validity_of_input(decimal_mob) self.number_update_func = number_update_func super().__init__( decimal_mob, suspend_mobject_updating=suspend_mobject_updating, **kwargs ) def check_validity_of_input(self, decimal_mob: DecimalNumber) -> None: if not isinstance(decimal_mob, DecimalNumber): raise TypeError("ChangingDecimal can only take in a DecimalNumber") def interpolate_mobject(self, alpha: float) -> None: self.mobject.set_value(self.number_update_func(self.rate_func(alpha))) # type: ignore[attr-defined] class ChangeDecimalToValue(ChangingDecimal): """Animate a :class:`~.DecimalNumber` to a target value using linear interpolation. Parameters ---------- decimal_mob The :class:`~.DecimalNumber` instance to animate. target_number The target value to transition to. Examples -------- .. manim:: ChangeDecimalToValueExample class ChangeDecimalToValueExample(Scene): def construct(self): number = DecimalNumber(0) self.add(number) self.play(ChangeDecimalToValue(number, 10, run_time=3)) self.wait() """ def __init__( self, decimal_mob: DecimalNumber, target_number: int, **kwargs: Any ) -> None: start_number = decimal_mob.number super().__init__( decimal_mob, lambda a: interpolate(start_number, target_number, a), **kwargs ) ================================================ FILE: manim/animation/rotation.py ================================================ """Animations related to rotation.""" from __future__ import annotations __all__ = ["Rotating", "Rotate"] from collections.abc import Callable, Sequence from typing import TYPE_CHECKING, Any import numpy as np from ..animation.animation import Animation from ..animation.transform import Transform from ..constants import OUT, PI, TAU from ..utils.rate_functions import linear if TYPE_CHECKING: from ..mobject.mobject import Mobject class Rotating(Animation): """Animation that rotates a Mobject. Parameters ---------- mobject The mobject to be rotated. angle The rotation angle in radians. Predefined constants such as ``DEGREES`` can also be used to specify the angle in degrees. axis The rotation axis as a numpy vector. about_point The rotation center. about_edge If ``about_point`` is ``None``, this argument specifies the direction of the bounding box point to be taken as the rotation center. run_time The duration of the animation in seconds. rate_func The function defining the animation progress based on the relative runtime (see :mod:`~.rate_functions`) . **kwargs Additional keyword arguments passed to :class:`~.Animation`. Examples -------- .. manim:: RotatingDemo class RotatingDemo(Scene): def construct(self): circle = Circle(radius=1, color=BLUE) line = Line(start=ORIGIN, end=RIGHT) arrow = Arrow(start=ORIGIN, end=RIGHT, buff=0, color=GOLD) vg = VGroup(circle,line,arrow) self.add(vg) anim_kw = {"about_point": arrow.get_start(), "run_time": 1} self.play(Rotating(arrow, 180*DEGREES, **anim_kw)) self.play(Rotating(arrow, PI, **anim_kw)) self.play(Rotating(vg, PI, about_point=RIGHT)) self.play(Rotating(vg, PI, axis=UP, about_point=ORIGIN)) self.play(Rotating(vg, PI, axis=RIGHT, about_edge=UP)) self.play(vg.animate.move_to(ORIGIN)) .. manim:: RotatingDifferentAxis class RotatingDifferentAxis(ThreeDScene): def construct(self): axes = ThreeDAxes() cube = Cube() arrow2d = Arrow(start=[0, -1.2, 1], end=[0, 1.2, 1], color=YELLOW_E) cube_group = VGroup(cube,arrow2d) self.set_camera_orientation(gamma=0, phi=40*DEGREES, theta=40*DEGREES) self.add(axes, cube_group) play_kw = {"run_time": 1.5} self.play(Rotating(cube_group, PI), **play_kw) self.play(Rotating(cube_group, PI, axis=UP), **play_kw) self.play(Rotating(cube_group, 180*DEGREES, axis=RIGHT), **play_kw) self.wait(0.5) See also -------- :class:`~.Rotate`, :meth:`~.Mobject.rotate` """ def __init__( self, mobject: Mobject, angle: float = TAU, axis: np.ndarray = OUT, about_point: np.ndarray | None = None, about_edge: np.ndarray | None = None, run_time: float = 5, rate_func: Callable[[float], float] = linear, **kwargs: Any, ) -> None: self.angle = angle self.axis = axis self.about_point = about_point self.about_edge = about_edge super().__init__(mobject, run_time=run_time, rate_func=rate_func, **kwargs) def interpolate_mobject(self, alpha: float) -> None: self.mobject.become(self.starting_mobject) self.mobject.rotate( self.rate_func(alpha) * self.angle, axis=self.axis, about_point=self.about_point, about_edge=self.about_edge, ) class Rotate(Transform): """Animation that rotates a Mobject. Parameters ---------- mobject The mobject to be rotated. angle The rotation angle. axis The rotation axis as a numpy vector. about_point The rotation center. about_edge If ``about_point`` is ``None``, this argument specifies the direction of the bounding box point to be taken as the rotation center. Examples -------- .. manim:: UsingRotate class UsingRotate(Scene): def construct(self): self.play( Rotate( Square(side_length=0.5).shift(UP * 2), angle=2*PI, about_point=ORIGIN, rate_func=linear, ), Rotate(Square(side_length=0.5), angle=2*PI, rate_func=linear), ) See also -------- :class:`~.Rotating`, :meth:`~.Mobject.rotate` """ def __init__( self, mobject: Mobject, angle: float = PI, axis: np.ndarray = OUT, about_point: Sequence[float] | None = None, about_edge: Sequence[float] | None = None, **kwargs: Any, ) -> None: if "path_arc" not in kwargs: kwargs["path_arc"] = angle if "path_arc_axis" not in kwargs: kwargs["path_arc_axis"] = axis self.angle = angle self.axis = axis self.about_edge = about_edge self.about_point = about_point if self.about_point is None: self.about_point = mobject.get_center() super().__init__(mobject, path_arc_centers=self.about_point, **kwargs) def create_target(self) -> Mobject: target = self.mobject.copy() target.rotate( self.angle, axis=self.axis, about_point=self.about_point, about_edge=self.about_edge, ) return target ================================================ FILE: manim/animation/specialized.py ================================================ from __future__ import annotations __all__ = ["Broadcast"] from collections.abc import Sequence from typing import Any from manim.animation.transform import Restore from manim.mobject.mobject import Mobject from ..constants import * from .composition import LaggedStart class Broadcast(LaggedStart): """Broadcast a mobject starting from an ``initial_width``, up to the actual size of the mobject. Parameters ---------- mobject The mobject to be broadcast. focal_point The center of the broadcast, by default ORIGIN. n_mobs The number of mobjects that emerge from the focal point, by default 5. initial_opacity The starting stroke opacity of the mobjects emitted from the broadcast, by default 1. final_opacity The final stroke opacity of the mobjects emitted from the broadcast, by default 0. initial_width The initial width of the mobjects, by default 0.0. remover Whether the mobjects should be removed from the scene after the animation, by default True. lag_ratio The time between each iteration of the mobject, by default 0.2. run_time The total duration of the animation, by default 3. kwargs Additional arguments to be passed to :class:`~.LaggedStart`. Examples --------- .. manim:: BroadcastExample class BroadcastExample(Scene): def construct(self): mob = Circle(radius=4, color=TEAL_A) self.play(Broadcast(mob)) """ def __init__( self, mobject: Mobject, focal_point: Sequence[float] = ORIGIN, n_mobs: int = 5, initial_opacity: float = 1, final_opacity: float = 0, initial_width: float = 0.0, remover: bool = True, lag_ratio: float = 0.2, run_time: float = 3, **kwargs: Any, ): self.focal_point = focal_point self.n_mobs = n_mobs self.initial_opacity = initial_opacity self.final_opacity = final_opacity self.initial_width = initial_width anims = [] # Works by saving the mob that is passed into the animation, scaling it to 0 (or the initial_width) and then restoring the original mob. fill_o = bool(mobject.fill_opacity) for _ in range(self.n_mobs): mob = mobject.copy() if fill_o: mob.set_opacity(self.final_opacity) else: mob.set_stroke(opacity=self.final_opacity) mob.move_to(self.focal_point) mob.save_state() mob.set(width=self.initial_width) if fill_o: mob.set_opacity(self.initial_opacity) else: mob.set_stroke(opacity=self.initial_opacity) anims.append(Restore(mob, remover=remover)) super().__init__(*anims, run_time=run_time, lag_ratio=lag_ratio, **kwargs) ================================================ FILE: manim/animation/speedmodifier.py ================================================ """Utilities for modifying the speed at which animations are played.""" from __future__ import annotations import inspect import types from collections.abc import Callable from typing import TYPE_CHECKING from numpy import piecewise from ..animation.animation import Animation, Wait, prepare_animation from ..animation.composition import AnimationGroup from ..mobject.mobject import Mobject, _AnimationBuilder from ..scene.scene import Scene if TYPE_CHECKING: from ..mobject.mobject import Updater __all__ = ["ChangeSpeed"] class ChangeSpeed(Animation): """Modifies the speed of passed animation. :class:`AnimationGroup` with different ``lag_ratio`` can also be used which combines multiple animations into one. The ``run_time`` of the passed animation is changed to modify the speed. Parameters ---------- anim Animation of which the speed is to be modified. speedinfo Contains nodes (percentage of ``run_time``) and its corresponding speed factor. rate_func Overrides ``rate_func`` of passed animation, applied before changing speed. Examples -------- .. manim:: SpeedModifierExample class SpeedModifierExample(Scene): def construct(self): a = Dot().shift(LEFT * 4) b = Dot().shift(RIGHT * 4) self.add(a, b) self.play( ChangeSpeed( AnimationGroup( a.animate(run_time=1).shift(RIGHT * 8), b.animate(run_time=1).shift(LEFT * 8), ), speedinfo={0.3: 1, 0.4: 0.1, 0.6: 0.1, 1: 1}, rate_func=linear, ) ) .. manim:: SpeedModifierUpdaterExample class SpeedModifierUpdaterExample(Scene): def construct(self): a = Dot().shift(LEFT * 4) self.add(a) ChangeSpeed.add_updater(a, lambda x, dt: x.shift(RIGHT * 4 * dt)) self.play( ChangeSpeed( Wait(2), speedinfo={0.4: 1, 0.5: 0.2, 0.8: 0.2, 1: 1}, affects_speed_updaters=True, ) ) .. manim:: SpeedModifierUpdaterExample2 class SpeedModifierUpdaterExample2(Scene): def construct(self): a = Dot().shift(LEFT * 4) self.add(a) ChangeSpeed.add_updater(a, lambda x, dt: x.shift(RIGHT * 4 * dt)) self.wait() self.play( ChangeSpeed( Wait(), speedinfo={1: 0}, affects_speed_updaters=True, ) ) """ dt = 0 is_changing_dt = False def __init__( self, anim: Animation | _AnimationBuilder, speedinfo: dict[float, float], rate_func: Callable[[float], float] | None = None, affects_speed_updaters: bool = True, **kwargs, ) -> None: if issubclass(type(anim), AnimationGroup): self.anim = type(anim)( *map(self.setup, anim.animations), group=anim.group, run_time=anim.run_time, rate_func=anim.rate_func, lag_ratio=anim.lag_ratio, ) else: self.anim = self.setup(anim) if affects_speed_updaters: assert ChangeSpeed.is_changing_dt is False, ( "Only one animation at a time can play that changes speed (dt) for ChangeSpeed updaters" ) ChangeSpeed.is_changing_dt = True self.t = 0 self.affects_speed_updaters = affects_speed_updaters self.rate_func = self.anim.rate_func if rate_func is None else rate_func # A function where, f(0) = 0, f'(0) = initial speed, f'( f-1(1) ) = final speed # Following function obtained when conditions applied to vertical parabola self.speed_modifier = lambda x, init_speed, final_speed: ( (final_speed**2 - init_speed**2) * x**2 / 4 + init_speed * x ) # f-1(1), returns x for which f(x) = 1 in `speed_modifier` function self.f_inv_1 = lambda init_speed, final_speed: 2 / (init_speed + final_speed) # if speed factors for the starting node (0) and the final node (1) are # not set, set them to 1 and the penultimate factor, respectively if 0 not in speedinfo: speedinfo[0] = 1 if 1 not in speedinfo: speedinfo[1] = sorted(speedinfo.items())[-1][1] self.speedinfo = dict(sorted(speedinfo.items())) self.functions = [] self.conditions = [] # Get the time taken by amimation if `run_time` is assumed to be 1 scaled_total_time = self.get_scaled_total_time() prevnode = 0 init_speed = self.speedinfo[0] curr_time = 0 for node, final_speed in list(self.speedinfo.items())[1:]: dur = node - prevnode def condition( t, curr_time=curr_time, init_speed=init_speed, final_speed=final_speed, dur=dur, ): lower_bound = curr_time / scaled_total_time upper_bound = ( curr_time + self.f_inv_1(init_speed, final_speed) * dur ) / scaled_total_time return lower_bound <= t <= upper_bound self.conditions.append(condition) def function( t, curr_time=curr_time, init_speed=init_speed, final_speed=final_speed, dur=dur, prevnode=prevnode, ): return ( self.speed_modifier( (scaled_total_time * t - curr_time) / dur, init_speed, final_speed, ) * dur + prevnode ) self.functions.append(function) curr_time += self.f_inv_1(init_speed, final_speed) * dur prevnode = node init_speed = final_speed def func(t): if t == 1: ChangeSpeed.is_changing_dt = False new_t = piecewise( self.rate_func(t), [condition(self.rate_func(t)) for condition in self.conditions], self.functions, ) if self.affects_speed_updaters: ChangeSpeed.dt = (new_t - self.t) * self.anim.run_time self.t = new_t return new_t self.anim.set_rate_func(func) super().__init__( self.anim.mobject, rate_func=self.rate_func, run_time=scaled_total_time * self.anim.run_time, **kwargs, ) def setup(self, anim): if type(anim) is Wait: anim.interpolate = types.MethodType( lambda self, alpha: self.rate_func(alpha), anim ) return prepare_animation(anim) def get_scaled_total_time(self) -> float: """The time taken by the animation under the assumption that the ``run_time`` is 1.""" prevnode = 0 init_speed = self.speedinfo[0] total_time = 0 for node, final_speed in list(self.speedinfo.items())[1:]: dur = node - prevnode total_time += dur * self.f_inv_1(init_speed, final_speed) prevnode = node init_speed = final_speed return total_time @classmethod def add_updater( cls, mobject: Mobject, update_function: Updater, index: int | None = None, call_updater: bool = False, ): """This static method can be used to apply speed change to updaters. This updater will follow speed and rate function of any :class:`.ChangeSpeed` animation that is playing with ``affects_speed_updaters=True``. By default, updater functions added via the usual :meth:`.Mobject.add_updater` method do not respect the change of animation speed. Parameters ---------- mobject The mobject to which the updater should be attached. update_function The function that is called whenever a new frame is rendered. index The position in the list of the mobject's updaters at which the function should be inserted. call_updater If ``True``, calls the update function when attaching it to the mobject. See also -------- :class:`.ChangeSpeed` :meth:`.Mobject.add_updater` """ if "dt" in inspect.signature(update_function).parameters: mobject.add_updater( lambda mob, dt: update_function( mob, ChangeSpeed.dt if ChangeSpeed.is_changing_dt else dt ), index=index, call_updater=call_updater, ) else: mobject.add_updater(update_function, index=index, call_updater=call_updater) def interpolate(self, alpha: float) -> None: self.anim.interpolate(alpha) def update_mobjects(self, dt: float) -> None: self.anim.update_mobjects(dt) def finish(self) -> None: ChangeSpeed.is_changing_dt = False self.anim.finish() def begin(self) -> None: self.anim.begin() def clean_up_from_scene(self, scene: Scene) -> None: self.anim.clean_up_from_scene(scene) def _setup_scene(self, scene) -> None: self.anim._setup_scene(scene) ================================================ FILE: manim/animation/transform.py ================================================ """Animations transforming one mobject into another.""" from __future__ import annotations __all__ = [ "Transform", "ReplacementTransform", "TransformFromCopy", "ClockwiseTransform", "CounterclockwiseTransform", "MoveToTarget", "ApplyMethod", "ApplyPointwiseFunction", "ApplyPointwiseFunctionToCenter", "FadeToColor", "FadeTransform", "FadeTransformPieces", "ScaleInPlace", "ShrinkToCenter", "Restore", "ApplyFunction", "ApplyMatrix", "ApplyComplexFunction", "CyclicReplace", "Swap", "TransformAnimations", ] import inspect import types from collections.abc import Callable, Iterable, Sequence from typing import TYPE_CHECKING, Any import numpy as np from manim.data_structures import MethodWithArgs from manim.mobject.opengl.opengl_mobject import OpenGLGroup, OpenGLMobject from .. import config from ..animation.animation import Animation from ..constants import ( DEFAULT_POINTWISE_FUNCTION_RUN_TIME, DEGREES, ORIGIN, OUT, RendererType, ) from ..mobject.mobject import Group, Mobject from ..utils.paths import path_along_arc, path_along_circles from ..utils.rate_functions import smooth, squish_rate_func if TYPE_CHECKING: from ..scene.scene import Scene class Transform(Animation): """A Transform transforms a Mobject into a target Mobject. Parameters ---------- mobject The :class:`.Mobject` to be transformed. It will be mutated to become the ``target_mobject``. target_mobject The target of the transformation. path_func A function defining the path that the points of the ``mobject`` are being moved along until they match the points of the ``target_mobject``, see :mod:`.utils.paths`. path_arc The arc angle (in radians) that the points of ``mobject`` will follow to reach the points of the target if using a circular path arc, see ``path_arc_centers``. See also :func:`manim.utils.paths.path_along_arc`. path_arc_axis The axis to rotate along if using a circular path arc, see ``path_arc_centers``. path_arc_centers The center of the circular arcs along which the points of ``mobject`` are moved by the transformation. If this is set and ``path_func`` is not set, then a ``path_along_circles`` path will be generated using the ``path_arc`` parameters and stored in ``path_func``. If ``path_func`` is set, this and the other ``path_arc`` fields are set as attributes, but a ``path_func`` is not generated from it. replace_mobject_with_target_in_scene Controls which mobject is replaced when the transformation is complete. If set to True, ``mobject`` will be removed from the scene and ``target_mobject`` will replace it. Otherwise, ``target_mobject`` is never added and ``mobject`` just takes its shape. Examples -------- .. manim :: TransformPathArc class TransformPathArc(Scene): def construct(self): def make_arc_path(start, end, arc_angle): points = [] p_fn = path_along_arc(arc_angle) # alpha animates between 0.0 and 1.0, where 0.0 # is the beginning of the animation and 1.0 is the end. for alpha in range(0, 11): points.append(p_fn(start, end, alpha / 10.0)) path = VMobject(stroke_color=YELLOW) path.set_points_smoothly(points) return path left = Circle(stroke_color=BLUE_E, fill_opacity=1.0, radius=0.5).move_to(LEFT * 2) colors = [TEAL_A, TEAL_B, TEAL_C, TEAL_D, TEAL_E, GREEN_A] # Positive angles move counter-clockwise, negative angles move clockwise. examples = [-90, 0, 30, 90, 180, 270] anims = [] for idx, angle in enumerate(examples): left_c = left.copy().shift((3 - idx) * UP) left_c.fill_color = colors[idx] right_c = left_c.copy().shift(4 * RIGHT) path_arc = make_arc_path(left_c.get_center(), right_c.get_center(), arc_angle=angle * DEGREES) desc = Text('%d°' % examples[idx]).next_to(left_c, LEFT) # Make the circles in front of the text in front of the arcs. self.add( path_arc.set_z_index(1), desc.set_z_index(2), left_c.set_z_index(3), ) anims.append(Transform(left_c, right_c, path_arc=angle * DEGREES)) self.play(*anims, run_time=2) self.wait() See also -------- :class:`~.ReplacementTransform`, :meth:`~.Mobject.interpolate`, :meth:`~.Mobject.align_data` """ def __init__( self, mobject: Mobject | None, target_mobject: Mobject | None = None, path_func: Callable | None = None, path_arc: float = 0, path_arc_axis: np.ndarray = OUT, path_arc_centers: np.ndarray = None, replace_mobject_with_target_in_scene: bool = False, **kwargs, ) -> None: self.path_arc_axis: np.ndarray = path_arc_axis self.path_arc_centers: np.ndarray = path_arc_centers self.path_arc: float = path_arc # path_func is a property a few lines below so it doesn't need to be set in any case if path_func is not None: self.path_func: Callable = path_func elif self.path_arc_centers is not None: self.path_func = path_along_circles( path_arc, self.path_arc_centers, self.path_arc_axis, ) self.replace_mobject_with_target_in_scene: bool = ( replace_mobject_with_target_in_scene ) self.target_mobject: Mobject = ( target_mobject if target_mobject is not None else Mobject() ) super().__init__(mobject, **kwargs) @property def path_arc(self) -> float: return self._path_arc @path_arc.setter def path_arc(self, path_arc: float) -> None: self._path_arc = path_arc self._path_func = path_along_arc( arc_angle=self._path_arc, axis=self.path_arc_axis, ) @property def path_func( self, ) -> Callable[ [Iterable[np.ndarray], Iterable[np.ndarray], float], Iterable[np.ndarray], ]: return self._path_func @path_func.setter def path_func( self, path_func: Callable[ [Iterable[np.ndarray], Iterable[np.ndarray], float], Iterable[np.ndarray], ], ) -> None: if path_func is not None: self._path_func = path_func def begin(self) -> None: # Use a copy of target_mobject for the align_data # call so that the actual target_mobject stays # preserved. self.target_mobject = self.create_target() self.target_copy = self.target_mobject.copy() # Note, this potentially changes the structure # of both mobject and target_mobject if config.renderer == RendererType.OPENGL: self.mobject.align_data_and_family(self.target_copy) else: self.mobject.align_data(self.target_copy) super().begin() def create_target(self) -> Mobject | OpenGLMobject: # Has no meaningful effect here, but may be useful # in subclasses return self.target_mobject def clean_up_from_scene(self, scene: Scene) -> None: super().clean_up_from_scene(scene) if self.replace_mobject_with_target_in_scene: scene.replace(self.mobject, self.target_mobject) def get_all_mobjects(self) -> Sequence[Mobject]: return [ self.mobject, self.starting_mobject, self.target_mobject, self.target_copy, ] def get_all_families_zipped(self) -> Iterable[tuple]: # more precise typing? mobs = [ self.mobject, self.starting_mobject, self.target_copy, ] if config.renderer == RendererType.OPENGL: return zip(*(mob.get_family() for mob in mobs)) return zip(*(mob.family_members_with_points() for mob in mobs)) def interpolate_submobject( self, submobject: Mobject, starting_submobject: Mobject, target_copy: Mobject, alpha: float, ) -> Transform: submobject.interpolate(starting_submobject, target_copy, alpha, self.path_func) return self class ReplacementTransform(Transform): """Replaces and morphs a mobject into a target mobject. Parameters ---------- mobject The starting :class:`~.Mobject`. target_mobject The target :class:`~.Mobject`. kwargs Further keyword arguments that are passed to :class:`Transform`. Examples -------- .. manim:: ReplacementTransformOrTransform :quality: low class ReplacementTransformOrTransform(Scene): def construct(self): # set up the numbers r_transform = VGroup(*[Integer(i) for i in range(1,4)]) text_1 = Text("ReplacementTransform", color=RED) r_transform.add(text_1) transform = VGroup(*[Integer(i) for i in range(4,7)]) text_2 = Text("Transform", color=BLUE) transform.add(text_2) ints = VGroup(r_transform, transform) texts = VGroup(text_1, text_2).scale(0.75) r_transform.arrange(direction=UP, buff=1) transform.arrange(direction=UP, buff=1) ints.arrange(buff=2) self.add(ints, texts) # The mobs replace each other and none are left behind self.play(ReplacementTransform(r_transform[0], r_transform[1])) self.play(ReplacementTransform(r_transform[1], r_transform[2])) # The mobs linger after the Transform() self.play(Transform(transform[0], transform[1])) self.play(Transform(transform[1], transform[2])) self.wait() """ def __init__(self, mobject: Mobject, target_mobject: Mobject, **kwargs) -> None: super().__init__( mobject, target_mobject, replace_mobject_with_target_in_scene=True, **kwargs ) class TransformFromCopy(Transform): """Performs a reversed Transform""" def __init__(self, mobject: Mobject, target_mobject: Mobject, **kwargs) -> None: super().__init__(target_mobject, mobject, **kwargs) def interpolate(self, alpha: float) -> None: super().interpolate(1 - alpha) class ClockwiseTransform(Transform): """Transforms the points of a mobject along a clockwise oriented arc. See also -------- :class:`.Transform`, :class:`.CounterclockwiseTransform` Examples -------- .. manim:: ClockwiseExample class ClockwiseExample(Scene): def construct(self): dl, dr = Dot(), Dot() sl, sr = Square(), Square() VGroup(dl, sl).arrange(DOWN).shift(2*LEFT) VGroup(dr, sr).arrange(DOWN).shift(2*RIGHT) self.add(dl, dr) self.wait() self.play( ClockwiseTransform(dl, sl), Transform(dr, sr) ) self.wait() """ def __init__( self, mobject: Mobject, target_mobject: Mobject, path_arc: float = -np.pi, **kwargs, ) -> None: super().__init__(mobject, target_mobject, path_arc=path_arc, **kwargs) class CounterclockwiseTransform(Transform): """Transforms the points of a mobject along a counterclockwise oriented arc. See also -------- :class:`.Transform`, :class:`.ClockwiseTransform` Examples -------- .. manim:: CounterclockwiseTransform_vs_Transform class CounterclockwiseTransform_vs_Transform(Scene): def construct(self): # set up the numbers c_transform = VGroup(DecimalNumber(number=3.141, num_decimal_places=3), DecimalNumber(number=1.618, num_decimal_places=3)) text_1 = Text("CounterclockwiseTransform", color=RED) c_transform.add(text_1) transform = VGroup(DecimalNumber(number=1.618, num_decimal_places=3), DecimalNumber(number=3.141, num_decimal_places=3)) text_2 = Text("Transform", color=BLUE) transform.add(text_2) ints = VGroup(c_transform, transform) texts = VGroup(text_1, text_2).scale(0.75) c_transform.arrange(direction=UP, buff=1) transform.arrange(direction=UP, buff=1) ints.arrange(buff=2) self.add(ints, texts) # The mobs move in clockwise direction for ClockwiseTransform() self.play(CounterclockwiseTransform(c_transform[0], c_transform[1])) # The mobs move straight up for Transform() self.play(Transform(transform[0], transform[1])) """ def __init__( self, mobject: Mobject, target_mobject: Mobject, path_arc: float = np.pi, **kwargs, ) -> None: super().__init__(mobject, target_mobject, path_arc=path_arc, **kwargs) class MoveToTarget(Transform): """Transforms a mobject to the mobject stored in its ``target`` attribute. After calling the :meth:`~.Mobject.generate_target` method, the :attr:`target` attribute of the mobject is populated with a copy of it. After modifying the attribute, playing the :class:`.MoveToTarget` animation transforms the original mobject into the modified one stored in the :attr:`target` attribute. Examples -------- .. manim:: MoveToTargetExample class MoveToTargetExample(Scene): def construct(self): c = Circle() c.generate_target() c.target.set_fill(color=GREEN, opacity=0.5) c.target.shift(2*RIGHT + UP).scale(0.5) self.add(c) self.play(MoveToTarget(c)) """ def __init__(self, mobject: Mobject, **kwargs) -> None: self.check_validity_of_input(mobject) super().__init__(mobject, mobject.target, **kwargs) def check_validity_of_input(self, mobject: Mobject) -> None: if not hasattr(mobject, "target"): raise ValueError( "MoveToTarget called on mobjectwithout attribute 'target'", ) class _MethodAnimation(MoveToTarget): def __init__(self, mobject: Mobject, methods: list[MethodWithArgs]) -> None: self.methods = methods super().__init__(mobject) def finish(self) -> None: for item in self.methods: item.method.__func__(self.mobject, *item.args, **item.kwargs) super().finish() class ApplyMethod(Transform): """Animates a mobject by applying a method. Note that only the method needs to be passed to this animation, it is not required to pass the corresponding mobject. Furthermore, this animation class only works if the method returns the modified mobject. Parameters ---------- method The method that will be applied in the animation. args Any positional arguments to be passed when applying the method. kwargs Any keyword arguments passed to :class:`~.Transform`. """ def __init__( self, method: Callable, *args, **kwargs ) -> None: # method typing (we want to specify Mobject method)? for args? self.check_validity_of_input(method) self.method = method self.method_args = args super().__init__(method.__self__, **kwargs) def check_validity_of_input(self, method: Callable) -> None: if not inspect.ismethod(method): raise ValueError( "Whoops, looks like you accidentally invoked " "the method you want to animate", ) assert isinstance(method.__self__, (Mobject, OpenGLMobject)) def create_target(self) -> Mobject: method = self.method # Make sure it's a list so that args.pop() works args = list(self.method_args) if len(args) > 0 and isinstance(args[-1], dict): method_kwargs = args.pop() else: method_kwargs = {} target = method.__self__.copy() method.__func__(target, *args, **method_kwargs) return target class ApplyPointwiseFunction(ApplyMethod): """Animation that applies a pointwise function to a mobject. Examples -------- .. 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() """ def __init__( self, function: types.MethodType, mobject: Mobject, run_time: float = DEFAULT_POINTWISE_FUNCTION_RUN_TIME, **kwargs, ) -> None: super().__init__(mobject.apply_function, function, run_time=run_time, **kwargs) class ApplyPointwiseFunctionToCenter(ApplyPointwiseFunction): def __init__(self, function: types.MethodType, mobject: Mobject, **kwargs) -> None: self.function = function super().__init__(mobject.move_to, **kwargs) def begin(self) -> None: self.method_args = [self.function(self.mobject.get_center())] super().begin() class FadeToColor(ApplyMethod): """Animation that changes color of a mobject. Examples -------- .. manim:: FadeToColorExample class FadeToColorExample(Scene): def construct(self): self.play(FadeToColor(Text("Hello World!"), color=RED)) """ def __init__(self, mobject: Mobject, color: str, **kwargs) -> None: super().__init__(mobject.set_color, color, **kwargs) class ScaleInPlace(ApplyMethod): """Animation that scales a mobject by a certain factor. Examples -------- .. manim:: ScaleInPlaceExample class ScaleInPlaceExample(Scene): def construct(self): self.play(ScaleInPlace(Text("Hello World!"), 2)) """ def __init__(self, mobject: Mobject, scale_factor: float, **kwargs) -> None: super().__init__(mobject.scale, scale_factor, **kwargs) class ShrinkToCenter(ScaleInPlace): """Animation that makes a mobject shrink to center. Examples -------- .. manim:: ShrinkToCenterExample class ShrinkToCenterExample(Scene): def construct(self): self.play(ShrinkToCenter(Text("Hello World!"))) """ def __init__(self, mobject: Mobject, **kwargs) -> None: super().__init__(mobject, 0, **kwargs) class Restore(ApplyMethod): """Transforms a mobject to its last saved state. To save the state of a mobject, use the :meth:`~.Mobject.save_state` method. Examples -------- .. manim:: RestoreExample class RestoreExample(Scene): def construct(self): s = Square() s.save_state() self.play(FadeIn(s)) self.play(s.animate.set_color(PURPLE).set_opacity(0.5).shift(2*LEFT).scale(3)) self.play(s.animate.shift(5*DOWN).rotate(PI/4)) self.wait() self.play(Restore(s), run_time=2) """ def __init__(self, mobject: Mobject, **kwargs) -> None: super().__init__(mobject.restore, **kwargs) class ApplyFunction(Transform): def __init__(self, function: types.MethodType, mobject: Mobject, **kwargs) -> None: self.function = function super().__init__(mobject, **kwargs) def create_target(self) -> Any: target = self.function(self.mobject.copy()) if not isinstance(target, (Mobject, OpenGLMobject)): raise TypeError( "Functions passed to ApplyFunction must return object of type Mobject", ) return target class ApplyMatrix(ApplyPointwiseFunction): """Applies a matrix transform to an mobject. Parameters ---------- matrix The transformation matrix. mobject The :class:`~.Mobject`. about_point The origin point for the transform. Defaults to ``ORIGIN``. kwargs Further keyword arguments that are passed to :class:`ApplyPointwiseFunction`. Examples -------- .. manim:: ApplyMatrixExample class ApplyMatrixExample(Scene): def construct(self): matrix = [[1, 1], [0, 2/3]] self.play(ApplyMatrix(matrix, Text("Hello World!")), ApplyMatrix(matrix, NumberPlane())) """ def __init__( self, matrix: np.ndarray, mobject: Mobject, about_point: np.ndarray = ORIGIN, **kwargs, ) -> None: matrix = self.initialize_matrix(matrix) def func(p): return np.dot(p - about_point, matrix.T) + about_point super().__init__(func, mobject, **kwargs) def initialize_matrix(self, matrix: np.ndarray) -> np.ndarray: matrix = np.array(matrix) if matrix.shape == (2, 2): new_matrix = np.identity(3) new_matrix[:2, :2] = matrix matrix = new_matrix elif matrix.shape != (3, 3): raise ValueError("Matrix has bad dimensions") return matrix class ApplyComplexFunction(ApplyMethod): def __init__(self, function: types.MethodType, mobject: Mobject, **kwargs) -> None: self.function = function method = mobject.apply_complex_function super().__init__(method, function, **kwargs) def _init_path_func(self) -> None: func1 = self.function(complex(1)) self.path_arc = np.log(func1).imag super()._init_path_func() ### class CyclicReplace(Transform): """An animation moving mobjects cyclically. In particular, this means: the first mobject takes the place of the second mobject, the second one takes the place of the third mobject, and so on. The last mobject takes the place of the first one. Parameters ---------- mobjects List of mobjects to be transformed. path_arc The angle of the arc (in radians) that the mobjects will follow to reach their target. kwargs Further keyword arguments that are passed to :class:`.Transform`. Examples -------- .. manim :: CyclicReplaceExample class CyclicReplaceExample(Scene): def construct(self): group = VGroup(Square(), Circle(), Triangle(), Star()) group.arrange(RIGHT) self.add(group) for _ in range(4): self.play(CyclicReplace(*group)) """ def __init__( self, *mobjects: Mobject, path_arc: float = 90 * DEGREES, **kwargs ) -> None: self.group = Group(*mobjects) super().__init__(self.group, path_arc=path_arc, **kwargs) def create_target(self) -> Group: target = self.group.copy() cycled_targets = [target[-1], *target[:-1]] for m1, m2 in zip(cycled_targets, self.group): m1.move_to(m2) return target class Swap(CyclicReplace): pass # Renaming, more understandable for two entries # TODO, this may be deprecated...worth reimplementing? class TransformAnimations(Transform): def __init__( self, start_anim: Animation, end_anim: Animation, rate_func: Callable = squish_rate_func(smooth), **kwargs, ) -> None: self.start_anim = start_anim self.end_anim = end_anim if "run_time" in kwargs: self.run_time = kwargs.pop("run_time") else: self.run_time = max(start_anim.run_time, end_anim.run_time) for anim in start_anim, end_anim: anim.set_run_time(self.run_time) if ( start_anim.starting_mobject is not None and end_anim.starting_mobject is not None and start_anim.starting_mobject.get_num_points() != end_anim.starting_mobject.get_num_points() ): start_anim.starting_mobject.align_data(end_anim.starting_mobject) for anim in start_anim, end_anim: if isinstance(anim, Transform) and anim.starting_mobject is not None: anim.starting_mobject.align_data(anim.target_mobject) super().__init__( start_anim.mobject, end_anim.mobject, rate_func=rate_func, **kwargs ) # Rewire starting and ending mobjects start_anim.mobject = self.starting_mobject end_anim.mobject = self.target_mobject def interpolate(self, alpha: float) -> None: self.start_anim.interpolate(alpha) self.end_anim.interpolate(alpha) super().interpolate(alpha) class FadeTransform(Transform): """Fades one mobject into another. Parameters ---------- mobject The starting :class:`~.Mobject`. target_mobject The target :class:`~.Mobject`. stretch Controls whether the target :class:`~.Mobject` is stretched during the animation. Default: ``True``. dim_to_match If the target mobject is not stretched automatically, this allows to adjust the initial scale of the target :class:`~.Mobject` while it is shifted in. Setting this to 0, 1, and 2, respectively, matches the length of the target with the length of the starting :class:`~.Mobject` in x, y, and z direction, respectively. kwargs Further keyword arguments are passed to the parent class. Examples -------- .. manim:: DifferentFadeTransforms class DifferentFadeTransforms(Scene): def construct(self): starts = [Rectangle(width=4, height=1) for _ in range(3)] VGroup(*starts).arrange(DOWN, buff=1).shift(3*LEFT) targets = [Circle(fill_opacity=1).scale(0.25) for _ in range(3)] VGroup(*targets).arrange(DOWN, buff=1).shift(3*RIGHT) self.play(*[FadeIn(s) for s in starts]) self.play( FadeTransform(starts[0], targets[0], stretch=True), FadeTransform(starts[1], targets[1], stretch=False, dim_to_match=0), FadeTransform(starts[2], targets[2], stretch=False, dim_to_match=1) ) self.play(*[FadeOut(mobj) for mobj in self.mobjects]) """ def __init__(self, mobject, target_mobject, stretch=True, dim_to_match=1, **kwargs): self.to_add_on_completion = target_mobject self.stretch = stretch self.dim_to_match = dim_to_match mobject.save_state() if config.renderer == RendererType.OPENGL: group = OpenGLGroup(mobject, target_mobject.copy()) else: group = Group(mobject, target_mobject.copy()) super().__init__(group, **kwargs) def begin(self): """Initial setup for the animation. The mobject to which this animation is bound is a group consisting of both the starting and the ending mobject. At the start, the ending mobject replaces the starting mobject (and is completely faded). In the end, it is set to be the other way around. """ self.ending_mobject = self.mobject.copy() Animation.begin(self) # Both 'start' and 'end' consists of the source and target mobjects. # At the start, the target should be faded replacing the source, # and at the end it should be the other way around. start, end = self.starting_mobject, self.ending_mobject for m0, m1 in ((start[1], start[0]), (end[0], end[1])): self.ghost_to(m0, m1) def ghost_to(self, source, target): """Replaces the source by the target and sets the opacity to 0. If the provided target has no points, and thus a location of [0, 0, 0] the source will simply fade out where it currently is. """ # mobject.replace() does not work if the target has no points. if target.get_num_points() or target.submobjects: source.replace(target, stretch=self.stretch, dim_to_match=self.dim_to_match) source.set_opacity(0) def get_all_mobjects(self) -> Sequence[Mobject]: return [ self.mobject, self.starting_mobject, self.ending_mobject, ] def get_all_families_zipped(self): return Animation.get_all_families_zipped(self) def clean_up_from_scene(self, scene): Animation.clean_up_from_scene(self, scene) scene.remove(self.mobject) self.mobject[0].restore() scene.add(self.to_add_on_completion) class FadeTransformPieces(FadeTransform): """Fades submobjects of one mobject into submobjects of another one. See also -------- :class:`~.FadeTransform` Examples -------- .. manim:: FadeTransformSubmobjects class FadeTransformSubmobjects(Scene): def construct(self): src = VGroup(Square(), Circle().shift(LEFT + UP)) src.shift(3*LEFT + 2*UP) src_copy = src.copy().shift(4*DOWN) target = VGroup(Circle(), Triangle().shift(RIGHT + DOWN)) target.shift(3*RIGHT + 2*UP) target_copy = target.copy().shift(4*DOWN) self.play(FadeIn(src), FadeIn(src_copy)) self.play( FadeTransform(src, target), FadeTransformPieces(src_copy, target_copy) ) self.play(*[FadeOut(mobj) for mobj in self.mobjects]) """ def begin(self): self.mobject[0].align_submobjects(self.mobject[1]) super().begin() def ghost_to(self, source, target): """Replaces the source submobjects by the target submobjects and sets the opacity to 0. """ for sm0, sm1 in zip(source.get_family(), target.get_family()): super().ghost_to(sm0, sm1) ================================================ FILE: manim/animation/transform_matching_parts.py ================================================ """Animations that try to transform Mobjects while keeping track of identical parts.""" from __future__ import annotations __all__ = ["TransformMatchingShapes", "TransformMatchingTex"] from typing import TYPE_CHECKING import numpy as np from manim.mobject.opengl.opengl_mobject import OpenGLGroup, OpenGLMobject from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVGroup, OpenGLVMobject from .._config import config from ..constants import RendererType from ..mobject.mobject import Group, Mobject from ..mobject.types.vectorized_mobject import VGroup, VMobject from .composition import AnimationGroup from .fading import FadeIn, FadeOut from .transform import FadeTransformPieces, Transform if TYPE_CHECKING: from ..scene.scene import Scene class TransformMatchingAbstractBase(AnimationGroup): """Abstract base class for transformations that keep track of matching parts. Subclasses have to implement the two static methods :meth:`~.TransformMatchingAbstractBase.get_mobject_parts` and :meth:`~.TransformMatchingAbstractBase.get_mobject_key`. Basically, this transformation first maps all submobjects returned by the ``get_mobject_parts`` method to certain keys by applying the ``get_mobject_key`` method. Then, submobjects with matching keys are transformed into each other. Parameters ---------- mobject The starting :class:`~.Mobject`. target_mobject The target :class:`~.Mobject`. transform_mismatches Controls whether submobjects without a matching key are transformed into each other by using :class:`~.Transform`. Default: ``False``. fade_transform_mismatches Controls whether submobjects without a matching key are transformed into each other by using :class:`~.FadeTransform`. Default: ``False``. key_map Optional. A dictionary mapping keys belonging to some of the starting mobject's submobjects (i.e., the return values of the ``get_mobject_key`` method) to some keys belonging to the target mobject's submobjects that should be transformed although the keys don't match. kwargs All further keyword arguments are passed to the submobject transformations. Note ---- If neither ``transform_mismatches`` nor ``fade_transform_mismatches`` are set to ``True``, submobjects without matching keys in the starting mobject are faded out in the direction of the unmatched submobjects in the target mobject, and unmatched submobjects in the target mobject are faded in from the direction of the unmatched submobjects in the start mobject. """ def __init__( self, mobject: Mobject, target_mobject: Mobject, transform_mismatches: bool = False, fade_transform_mismatches: bool = False, key_map: dict | None = None, **kwargs, ): if isinstance(mobject, OpenGLVMobject): group_type = OpenGLVGroup elif isinstance(mobject, OpenGLMobject): group_type = OpenGLGroup elif isinstance(mobject, VMobject): group_type = VGroup else: group_type = Group source_map = self.get_shape_map(mobject) target_map = self.get_shape_map(target_mobject) if key_map is None: key_map = {} # Create two mobjects whose submobjects all match each other # according to whatever keys are used for source_map and # target_map transform_source = group_type() transform_target = group_type() for key in set(source_map).intersection(target_map): transform_source.add(source_map[key]) transform_target.add(target_map[key]) anims = [Transform(transform_source, transform_target, **kwargs)] # User can manually specify when one part should transform # into another despite not matching by using key_map key_mapped_source = group_type() key_mapped_target = group_type() for key1, key2 in key_map.items(): if key1 in source_map and key2 in target_map: key_mapped_source.add(source_map[key1]) key_mapped_target.add(target_map[key2]) source_map.pop(key1, None) target_map.pop(key2, None) if len(key_mapped_source) > 0: anims.append( FadeTransformPieces(key_mapped_source, key_mapped_target, **kwargs), ) fade_source = group_type() fade_target = group_type() for key in set(source_map).difference(target_map): fade_source.add(source_map[key]) for key in set(target_map).difference(source_map): fade_target.add(target_map[key]) fade_target_copy = fade_target.copy() if transform_mismatches: if "replace_mobject_with_target_in_scene" not in kwargs: kwargs["replace_mobject_with_target_in_scene"] = True anims.append(Transform(fade_source, fade_target, **kwargs)) elif fade_transform_mismatches: anims.append(FadeTransformPieces(fade_source, fade_target, **kwargs)) else: anims.append(FadeOut(fade_source, target_position=fade_target, **kwargs)) anims.append( FadeIn(fade_target_copy, target_position=fade_target, **kwargs), ) super().__init__(*anims) self.to_remove = [mobject, fade_target_copy] self.to_add = target_mobject def get_shape_map(self, mobject: Mobject) -> dict: shape_map = {} for sm in self.get_mobject_parts(mobject): key = self.get_mobject_key(sm) if key not in shape_map: if config["renderer"] == RendererType.OPENGL: shape_map[key] = OpenGLVGroup() else: shape_map[key] = VGroup() shape_map[key].add(sm) return shape_map def clean_up_from_scene(self, scene: Scene) -> None: # Interpolate all animations back to 0 to ensure source mobjects remain unchanged. for anim in self.animations: anim.interpolate(0) scene.remove(self.mobject) scene.remove(*self.to_remove) scene.add(self.to_add) @staticmethod def get_mobject_parts(mobject: Mobject): raise NotImplementedError("To be implemented in subclass.") @staticmethod def get_mobject_key(mobject: Mobject): raise NotImplementedError("To be implemented in subclass.") class TransformMatchingShapes(TransformMatchingAbstractBase): """An animation trying to transform groups by matching the shape of their submobjects. Two submobjects match if the hash of their point coordinates after normalization (i.e., after translation to the origin, fixing the submobject height at 1 unit, and rounding the coordinates to three decimal places) matches. See also -------- :class:`~.TransformMatchingAbstractBase` Examples -------- .. manim:: Anagram class Anagram(Scene): def construct(self): src = Text("the morse code") tar = Text("here come dots") self.play(Write(src)) self.wait(0.5) self.play(TransformMatchingShapes(src, tar, path_arc=PI/2)) self.wait(0.5) """ def __init__( self, mobject: Mobject, target_mobject: Mobject, transform_mismatches: bool = False, fade_transform_mismatches: bool = False, key_map: dict | None = None, **kwargs, ): super().__init__( mobject, target_mobject, transform_mismatches=transform_mismatches, fade_transform_mismatches=fade_transform_mismatches, key_map=key_map, **kwargs, ) @staticmethod def get_mobject_parts(mobject: Mobject) -> list[Mobject]: return mobject.family_members_with_points() @staticmethod def get_mobject_key(mobject: Mobject) -> int: mobject.save_state() mobject.center() mobject.set(height=1) rounded_points = np.round(mobject.points, 3) + 0.0 result = hash(rounded_points.tobytes()) mobject.restore() return result class TransformMatchingTex(TransformMatchingAbstractBase): """A transformation trying to transform rendered LaTeX strings. Two submobjects match if their ``tex_string`` matches. See also -------- :class:`~.TransformMatchingAbstractBase` Examples -------- .. manim:: MatchingEquationParts class MatchingEquationParts(Scene): def construct(self): variables = VGroup(MathTex("a"), MathTex("b"), MathTex("c")).arrange_submobjects().shift(UP) eq1 = MathTex("{{x}}^2", "+", "{{y}}^2", "=", "{{z}}^2") eq2 = MathTex("{{a}}^2", "+", "{{b}}^2", "=", "{{c}}^2") eq3 = MathTex("{{a}}^2", "=", "{{c}}^2", "-", "{{b}}^2") self.add(eq1) self.wait(0.5) self.play(TransformMatchingTex(Group(eq1, variables), eq2)) self.wait(0.5) self.play(TransformMatchingTex(eq2, eq3)) self.wait(0.5) """ def __init__( self, mobject: Mobject, target_mobject: Mobject, transform_mismatches: bool = False, fade_transform_mismatches: bool = False, key_map: dict | None = None, **kwargs, ): super().__init__( mobject, target_mobject, transform_mismatches=transform_mismatches, fade_transform_mismatches=fade_transform_mismatches, key_map=key_map, **kwargs, ) @staticmethod def get_mobject_parts(mobject: Mobject) -> list[Mobject]: if isinstance(mobject, (Group, VGroup, OpenGLGroup, OpenGLVGroup)): return [ p for s in mobject.submobjects for p in TransformMatchingTex.get_mobject_parts(s) ] else: assert hasattr(mobject, "tex_string") return mobject.submobjects @staticmethod def get_mobject_key(mobject: Mobject) -> str: return mobject.tex_string ================================================ FILE: manim/animation/updaters/__init__.py ================================================ """Animations and utility mobjects related to update functions. Modules ======= .. autosummary:: :toctree: ../reference ~mobject_update_utils ~update """ ================================================ FILE: manim/animation/updaters/mobject_update_utils.py ================================================ """Utility functions for continuous animation of mobjects.""" from __future__ import annotations __all__ = [ "assert_is_mobject_method", "always", "f_always", "always_redraw", "always_shift", "always_rotate", "turn_animation_into_updater", "cycle_animation", ] import inspect from collections.abc import Callable from typing import TYPE_CHECKING import numpy as np from manim.constants import DEGREES, RIGHT from manim.mobject.mobject import Mobject from manim.opengl import OpenGLMobject from manim.utils.space_ops import normalize if TYPE_CHECKING: from manim.animation.animation import Animation def assert_is_mobject_method(method: Callable) -> None: assert inspect.ismethod(method) mobject = method.__self__ assert isinstance(mobject, (Mobject, OpenGLMobject)) def always(method: Callable, *args, **kwargs) -> Mobject: assert_is_mobject_method(method) mobject = method.__self__ func = method.__func__ mobject.add_updater(lambda m: func(m, *args, **kwargs)) return mobject def f_always(method: Callable[[Mobject], None], *arg_generators, **kwargs) -> Mobject: """ More functional version of always, where instead of taking in args, it takes in functions which output the relevant arguments. """ assert_is_mobject_method(method) mobject = method.__self__ func = method.__func__ def updater(mob): args = [arg_generator() for arg_generator in arg_generators] func(mob, *args, **kwargs) mobject.add_updater(updater) return mobject def always_redraw(func: Callable[[], Mobject]) -> Mobject: """Redraw the mobject constructed by a function every frame. This function returns a mobject with an attached updater that continuously regenerates the mobject according to the specified function. Parameters ---------- func A function without (required) input arguments that returns a mobject. Examples -------- .. manim:: TangentAnimation class TangentAnimation(Scene): def construct(self): ax = Axes() sine = ax.plot(np.sin, color=RED) alpha = ValueTracker(0) point = always_redraw( lambda: Dot( sine.point_from_proportion(alpha.get_value()), color=BLUE ) ) tangent = always_redraw( lambda: TangentLine( sine, alpha=alpha.get_value(), color=YELLOW, length=4 ) ) self.add(ax, sine, point, tangent) self.play(alpha.animate.set_value(1), rate_func=linear, run_time=2) """ mob = func() mob.add_updater(lambda _: mob.become(func())) return mob def always_shift( mobject: Mobject, direction: np.ndarray[np.float64] = RIGHT, rate: float = 0.1 ) -> Mobject: """A mobject which is continuously shifted along some direction at a certain rate. Parameters ---------- mobject The mobject to shift. direction The direction to shift. The vector is normalized, the specified magnitude is not relevant. rate Length in Manim units which the mobject travels in one second along the specified direction. Examples -------- .. manim:: ShiftingSquare class ShiftingSquare(Scene): def construct(self): sq = Square().set_fill(opacity=1) tri = Triangle() VGroup(sq, tri).arrange(LEFT) # construct a square which is continuously # shifted to the right always_shift(sq, RIGHT, rate=5) self.add(sq) self.play(tri.animate.set_fill(opacity=1)) """ mobject.add_updater(lambda m, dt: m.shift(dt * rate * normalize(direction))) return mobject def always_rotate(mobject: Mobject, rate: float = 20 * DEGREES, **kwargs) -> Mobject: """A mobject which is continuously rotated at a certain rate. Parameters ---------- mobject The mobject to be rotated. rate The angle which the mobject is rotated by over one second. kwags Further arguments to be passed to :meth:`.Mobject.rotate`. Examples -------- .. manim:: SpinningTriangle class SpinningTriangle(Scene): def construct(self): tri = Triangle().set_fill(opacity=1).set_z_index(2) sq = Square().to_edge(LEFT) # will keep spinning while there is an animation going on always_rotate(tri, rate=2*PI, about_point=ORIGIN) self.add(tri, sq) self.play(sq.animate.to_edge(RIGHT), rate_func=linear, run_time=1) """ mobject.add_updater(lambda m, dt: m.rotate(dt * rate, **kwargs)) return mobject def turn_animation_into_updater( animation: Animation, cycle: bool = False, delay: float = 0, **kwargs ) -> Mobject: """ Add an updater to the animation's mobject which applies the interpolation and update functions of the animation If cycle is True, this repeats over and over. Otherwise, the updater will be popped upon completion The ``delay`` parameter is the delay (in seconds) before the animation starts.. Examples -------- .. manim:: WelcomeToManim class WelcomeToManim(Scene): def construct(self): words = Text("Welcome to") banner = ManimBanner().scale(0.5) VGroup(words, banner).arrange(DOWN) turn_animation_into_updater(Write(words, run_time=0.9)) self.add(words) self.wait(0.5) self.play(banner.expand(), run_time=0.5) """ mobject = animation.mobject animation.suspend_mobject_updating = False animation.begin() animation.total_time = -delay def update(m: Mobject, dt: float): if animation.total_time >= 0: run_time = animation.get_run_time() time_ratio = animation.total_time / run_time if cycle: alpha = time_ratio % 1 else: alpha = np.clip(time_ratio, 0, 1) if alpha >= 1: animation.finish() m.remove_updater(update) return animation.interpolate(alpha) animation.update_mobjects(dt) animation.total_time += dt mobject.add_updater(update) return mobject def cycle_animation(animation: Animation, **kwargs) -> Mobject: return turn_animation_into_updater(animation, cycle=True, **kwargs) ================================================ FILE: manim/animation/updaters/update.py ================================================ """Animations that update mobjects.""" from __future__ import annotations __all__ = ["UpdateFromFunc", "UpdateFromAlphaFunc", "MaintainPositionRelativeTo"] import operator as op from collections.abc import Callable from typing import TYPE_CHECKING, Any from manim.animation.animation import Animation if TYPE_CHECKING: from manim.mobject.mobject import Mobject class UpdateFromFunc(Animation): """ update_function of the form func(mobject), presumably to be used when the state of one mobject is dependent on another simultaneously animated mobject """ def __init__( self, mobject: Mobject, update_function: Callable[[Mobject], Any], suspend_mobject_updating: bool = False, **kwargs: Any, ) -> None: self.update_function = update_function super().__init__( mobject, suspend_mobject_updating=suspend_mobject_updating, **kwargs ) def interpolate_mobject(self, alpha: float) -> None: self.update_function(self.mobject) # type: ignore[arg-type] class UpdateFromAlphaFunc(UpdateFromFunc): def interpolate_mobject(self, alpha: float) -> None: self.update_function(self.mobject, self.rate_func(alpha)) # type: ignore[call-arg, arg-type] class MaintainPositionRelativeTo(Animation): def __init__( self, mobject: Mobject, tracked_mobject: Mobject, **kwargs: Any ) -> None: self.tracked_mobject = tracked_mobject self.diff = op.sub( mobject.get_center(), tracked_mobject.get_center(), ) super().__init__(mobject, **kwargs) def interpolate_mobject(self, alpha: float) -> None: target = self.tracked_mobject.get_center() location = self.mobject.get_center() self.mobject.shift(target - location + self.diff) ================================================ FILE: manim/camera/__init__.py ================================================ [Empty file] ================================================ FILE: manim/camera/camera.py ================================================ """A camera converts the mobjects contained in a Scene into an array of pixels.""" from __future__ import annotations __all__ = ["Camera", "BackgroundColoredVMobjectDisplayer"] import copy import itertools as it import operator as op import pathlib from collections.abc import Callable, Iterable from functools import reduce from typing import TYPE_CHECKING, Any import cairo import numpy as np import numpy.typing as npt from PIL import Image from scipy.spatial.distance import pdist from typing_extensions import Self from manim.typing import ( FloatRGBA_Array, FloatRGBALike_Array, ManimInt, PixelArray, Point3D, Point3D_Array, ) from .. import config, logger from ..constants import * from ..mobject.mobject import Mobject from ..mobject.types.point_cloud_mobject import PMobject from ..mobject.types.vectorized_mobject import VMobject from ..utils.color import ManimColor, ParsableManimColor, color_to_int_rgba from ..utils.family import extract_mobject_family_members from ..utils.images import get_full_raster_image_path from ..utils.iterables import list_difference_update from ..utils.space_ops import angle_of_vector if TYPE_CHECKING: from ..mobject.types.image_mobject import AbstractImageMobject LINE_JOIN_MAP = { LineJointType.AUTO: None, # TODO: this could be improved LineJointType.ROUND: cairo.LineJoin.ROUND, LineJointType.BEVEL: cairo.LineJoin.BEVEL, LineJointType.MITER: cairo.LineJoin.MITER, } CAP_STYLE_MAP = { CapStyleType.AUTO: None, # TODO: this could be improved CapStyleType.ROUND: cairo.LineCap.ROUND, CapStyleType.BUTT: cairo.LineCap.BUTT, CapStyleType.SQUARE: cairo.LineCap.SQUARE, } class Camera: """Base camera class. This is the object which takes care of what exactly is displayed on screen at any given moment. Parameters ---------- background_image The path to an image that should be the background image. If not set, the background is filled with :attr:`self.background_color` background What :attr:`background` is set to. By default, ``None``. pixel_height The height of the scene in pixels. pixel_width The width of the scene in pixels. kwargs Additional arguments (``background_color``, ``background_opacity``) to be set. """ def __init__( self, background_image: str | None = None, frame_center: Point3D = ORIGIN, image_mode: str = "RGBA", n_channels: int = 4, pixel_array_dtype: str = "uint8", cairo_line_width_multiple: float = 0.01, use_z_index: bool = True, background: PixelArray | None = None, pixel_height: int | None = None, pixel_width: int | None = None, frame_height: float | None = None, frame_width: float | None = None, frame_rate: float | None = None, background_color: ParsableManimColor | None = None, background_opacity: float | None = None, **kwargs: Any, ) -> None: self.background_image = background_image self.frame_center = frame_center self.image_mode = image_mode self.n_channels = n_channels self.pixel_array_dtype = pixel_array_dtype self.cairo_line_width_multiple = cairo_line_width_multiple self.use_z_index = use_z_index self.background = background self.background_colored_vmobject_displayer: ( BackgroundColoredVMobjectDisplayer | None ) = None if pixel_height is None: pixel_height = config["pixel_height"] self.pixel_height = pixel_height if pixel_width is None: pixel_width = config["pixel_width"] self.pixel_width = pixel_width if frame_height is None: frame_height = config["frame_height"] self.frame_height = frame_height if frame_width is None: frame_width = config["frame_width"] self.frame_width = frame_width if frame_rate is None: frame_rate = config["frame_rate"] self.frame_rate = frame_rate if background_color is None: self._background_color: ManimColor = ManimColor.parse( config["background_color"] ) else: self._background_color = ManimColor.parse(background_color) if background_opacity is None: self._background_opacity: float = config["background_opacity"] else: self._background_opacity = background_opacity # This one is in the same boat as the above, but it doesn't have the # same name as the corresponding key so it has to be handled on its own self.max_allowable_norm = config["frame_width"] self.rgb_max_val = np.iinfo(self.pixel_array_dtype).max self.pixel_array_to_cairo_context: dict[int, cairo.Context] = {} # Contains the correct method to process a list of Mobjects of the # corresponding class. If a Mobject is not an instance of a class in # this dict (or an instance of a class that inherits from a class in # this dict), then it cannot be rendered. self.init_background() self.resize_frame_shape() self.reset() def __deepcopy__(self, memo: Any) -> Camera: # This is to address a strange bug where deepcopying # will result in a segfault, which is somehow related # to the aggdraw library self.canvas = None return copy.copy(self) @property def background_color(self) -> ManimColor: return self._background_color @background_color.setter def background_color(self, color: ManimColor) -> None: self._background_color = color self.init_background() @property def background_opacity(self) -> float: return self._background_opacity @background_opacity.setter def background_opacity(self, alpha: float) -> None: self._background_opacity = alpha self.init_background() def type_or_raise( self, mobject: Mobject ) -> type[VMobject] | type[PMobject] | type[AbstractImageMobject] | type[Mobject]: """Return the type of mobject, if it is a type that can be rendered. If `mobject` is an instance of a class that inherits from a class that can be rendered, return the super class. For example, an instance of a Square is also an instance of VMobject, and these can be rendered. Therefore, `type_or_raise(Square())` returns True. Parameters ---------- mobject The object to take the type of. Notes ----- For a list of classes that can currently be rendered, see :meth:`display_funcs`. Returns ------- Type[:class:`~.Mobject`] The type of mobjects, if it can be rendered. Raises ------ :exc:`TypeError` When mobject is not an instance of a class that can be rendered. """ from ..mobject.types.image_mobject import AbstractImageMobject self.display_funcs: dict[ type[Mobject], Callable[[list[Mobject], PixelArray], Any] ] = { VMobject: self.display_multiple_vectorized_mobjects, # type: ignore[dict-item] PMobject: self.display_multiple_point_cloud_mobjects, # type: ignore[dict-item] AbstractImageMobject: self.display_multiple_image_mobjects, # type: ignore[dict-item] Mobject: lambda batch, pa: batch, # Do nothing } # We have to check each type in turn because we are dealing with # super classes. For example, if square = Square(), then # type(square) != VMobject, but isinstance(square, VMobject) == True. for _type in self.display_funcs: if isinstance(mobject, _type): return _type raise TypeError(f"Displaying an object of class {_type} is not supported") def reset_pixel_shape(self, new_height: float, new_width: float) -> None: """This method resets the height and width of a single pixel to the passed new_height and new_width. Parameters ---------- new_height The new height of the entire scene in pixels new_width The new width of the entire scene in pixels """ self.pixel_width = new_width self.pixel_height = new_height self.init_background() self.resize_frame_shape() self.reset() def resize_frame_shape(self, fixed_dimension: int = 0) -> None: """ Changes frame_shape to match the aspect ratio of the pixels, where fixed_dimension determines whether frame_height or frame_width remains fixed while the other changes accordingly. Parameters ---------- fixed_dimension If 0, height is scaled with respect to width else, width is scaled with respect to height. """ pixel_height = self.pixel_height pixel_width = self.pixel_width frame_height = self.frame_height frame_width = self.frame_width aspect_ratio = pixel_width / pixel_height if fixed_dimension == 0: frame_height = frame_width / aspect_ratio else: frame_width = aspect_ratio * frame_height self.frame_height = frame_height self.frame_width = frame_width def init_background(self) -> None: """Initialize the background. If self.background_image is the path of an image the image is set as background; else, the default background color fills the background. """ height = self.pixel_height width = self.pixel_width if self.background_image is not None: path = get_full_raster_image_path(self.background_image) image = Image.open(path).convert(self.image_mode) # TODO, how to gracefully handle backgrounds # with different sizes? self.background = np.array(image)[:height, :width] self.background = self.background.astype(self.pixel_array_dtype) else: background_rgba = color_to_int_rgba( self.background_color, self.background_opacity, ) self.background = np.zeros( (height, width, self.n_channels), dtype=self.pixel_array_dtype, ) self.background[:, :] = background_rgba def get_image( self, pixel_array: PixelArray | list | tuple | None = None ) -> Image.Image: """Returns an image from the passed pixel array, or from the current frame if the passed pixel array is none. Parameters ---------- pixel_array The pixel array from which to get an image, by default None Returns ------- PIL.Image.Image The PIL image of the array. """ if pixel_array is None: pixel_array = self.pixel_array return Image.fromarray(pixel_array, mode=self.image_mode) def convert_pixel_array( self, pixel_array: PixelArray | list | tuple, convert_from_floats: bool = False ) -> PixelArray: """Converts a pixel array from values that have floats in then to proper RGB values. Parameters ---------- pixel_array Pixel array to convert. convert_from_floats Whether or not to convert float values to ints, by default False Returns ------- np.array The new, converted pixel array. """ retval = np.array(pixel_array) if convert_from_floats: retval = np.apply_along_axis( lambda f: (f * self.rgb_max_val).astype(self.pixel_array_dtype), 2, retval, ) return retval def set_pixel_array( self, pixel_array: PixelArray | list | tuple, convert_from_floats: bool = False ) -> None: """Sets the pixel array of the camera to the passed pixel array. Parameters ---------- pixel_array The pixel array to convert and then set as the camera's pixel array. convert_from_floats Whether or not to convert float values to proper RGB values, by default False """ converted_array: PixelArray = self.convert_pixel_array( pixel_array, convert_from_floats ) if not ( hasattr(self, "pixel_array") and self.pixel_array.shape == converted_array.shape ): self.pixel_array: PixelArray = converted_array else: # Set in place self.pixel_array[:, :, :] = converted_array[:, :, :] def set_background( self, pixel_array: PixelArray | list | tuple, convert_from_floats: bool = False ) -> None: """Sets the background to the passed pixel_array after converting to valid RGB values. Parameters ---------- pixel_array The pixel array to set the background to. convert_from_floats Whether or not to convert floats values to proper RGB valid ones, by default False """ self.background = self.convert_pixel_array(pixel_array, convert_from_floats) # TODO, this should live in utils, not as a method of Camera def make_background_from_func( self, coords_to_colors_func: Callable[[np.ndarray], np.ndarray] ) -> PixelArray: """ Makes a pixel array for the background by using coords_to_colors_func to determine each pixel's color. Each input pixel's color. Each input to coords_to_colors_func is an (x, y) pair in space (in ordinary space coordinates; not pixel coordinates), and each output is expected to be an RGBA array of 4 floats. Parameters ---------- coords_to_colors_func The function whose input is an (x,y) pair of coordinates and whose return values must be the colors for that point Returns ------- np.array The pixel array which can then be passed to set_background. """ logger.info("Starting set_background") coords = self.get_coords_of_all_pixels() new_background = np.apply_along_axis(coords_to_colors_func, 2, coords) logger.info("Ending set_background") return self.convert_pixel_array(new_background, convert_from_floats=True) def set_background_from_func( self, coords_to_colors_func: Callable[[np.ndarray], np.ndarray] ) -> None: """ Sets the background to a pixel array using coords_to_colors_func to determine each pixel's color. Each input pixel's color. Each input to coords_to_colors_func is an (x, y) pair in space (in ordinary space coordinates; not pixel coordinates), and each output is expected to be an RGBA array of 4 floats. Parameters ---------- coords_to_colors_func The function whose input is an (x,y) pair of coordinates and whose return values must be the colors for that point """ self.set_background(self.make_background_from_func(coords_to_colors_func)) def reset(self) -> Self: """Resets the camera's pixel array to that of the background Returns ------- Camera The camera object after setting the pixel array. """ self.set_pixel_array(self.background) return self def set_frame_to_background(self, background: PixelArray) -> None: self.set_pixel_array(background) #### def get_mobjects_to_display( self, mobjects: Iterable[Mobject], include_submobjects: bool = True, excluded_mobjects: list | None = None, ) -> list[Mobject]: """Used to get the list of mobjects to display with the camera. Parameters ---------- mobjects The Mobjects include_submobjects Whether or not to include the submobjects of mobjects, by default True excluded_mobjects Any mobjects to exclude, by default None Returns ------- list list of mobjects """ if include_submobjects: mobjects = extract_mobject_family_members( mobjects, use_z_index=self.use_z_index, only_those_with_points=True, ) if 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 list(mobjects) def is_in_frame(self, mobject: Mobject) -> bool: """Checks whether the passed mobject is in frame or not. Parameters ---------- mobject The mobject for which the checking needs to be done. Returns ------- bool True if in frame, False otherwise. """ fc = self.frame_center fh = self.frame_height fw = self.frame_width return not reduce( op.or_, [ mobject.get_right()[0] < fc[0] - fw / 2, mobject.get_bottom()[1] > fc[1] + fh / 2, mobject.get_left()[0] > fc[0] + fw / 2, mobject.get_top()[1] < fc[1] - fh / 2, ], ) def capture_mobject(self, mobject: Mobject, **kwargs: Any) -> None: """Capture mobjects by storing it in :attr:`pixel_array`. This is a single-mobject version of :meth:`capture_mobjects`. Parameters ---------- mobject Mobject to capture. kwargs Keyword arguments to be passed to :meth:`get_mobjects_to_display`. """ return self.capture_mobjects([mobject], **kwargs) def capture_mobjects(self, mobjects: Iterable[Mobject], **kwargs: Any) -> None: """Capture mobjects by printing them on :attr:`pixel_array`. This is the essential function that converts the contents of a Scene into an array, which is then converted to an image or video. Parameters ---------- mobjects Mobjects to capture. kwargs Keyword arguments to be passed to :meth:`get_mobjects_to_display`. Notes ----- For a list of classes that can currently be rendered, see :meth:`display_funcs`. """ # The mobjects will be processed in batches (or runs) of mobjects of # the same type. That is, if the list mobjects contains objects of # types [VMobject, VMobject, VMobject, PMobject, PMobject, VMobject], # then they will be captured in three batches: [VMobject, VMobject, # VMobject], [PMobject, PMobject], and [VMobject]. This must be done # without altering their order. it.groupby computes exactly this # partition while at the same time preserving order. mobjects = self.get_mobjects_to_display(mobjects, **kwargs) for group_type, group in it.groupby(mobjects, self.type_or_raise): self.display_funcs[group_type](list(group), self.pixel_array) # Methods associated with svg rendering # NOTE: None of the methods below have been mentioned outside of their definitions. Their DocStrings are not as # detailed as possible. def get_cached_cairo_context(self, pixel_array: PixelArray) -> cairo.Context | None: """Returns the cached cairo context of the passed pixel array if it exists, and None if it doesn't. Parameters ---------- pixel_array The pixel array to check. Returns ------- cairo.Context The cached cairo context. """ return self.pixel_array_to_cairo_context.get(id(pixel_array), None) def cache_cairo_context(self, pixel_array: PixelArray, ctx: cairo.Context) -> None: """Caches the passed Pixel array into a Cairo Context Parameters ---------- pixel_array The pixel array to cache ctx The context to cache it into. """ self.pixel_array_to_cairo_context[id(pixel_array)] = ctx def get_cairo_context(self, pixel_array: PixelArray) -> cairo.Context: """Returns the cairo context for a pixel array after caching it to self.pixel_array_to_cairo_context If that array has already been cached, it returns the cached version instead. Parameters ---------- pixel_array The Pixel array to get the cairo context of. Returns ------- cairo.Context The cairo context of the pixel array. """ cached_ctx = self.get_cached_cairo_context(pixel_array) if cached_ctx: return cached_ctx pw = self.pixel_width ph = self.pixel_height fw = self.frame_width fh = self.frame_height fc = self.frame_center surface = cairo.ImageSurface.create_for_data( pixel_array.data, cairo.FORMAT_ARGB32, pw, ph, ) ctx = cairo.Context(surface) ctx.scale(pw, ph) ctx.set_matrix( cairo.Matrix( (pw / fw), 0, 0, -(ph / fh), (pw / 2) - fc[0] * (pw / fw), (ph / 2) + fc[1] * (ph / fh), ), ) self.cache_cairo_context(pixel_array, ctx) return ctx def display_multiple_vectorized_mobjects( self, vmobjects: list[VMobject], pixel_array: PixelArray ) -> None: """Displays multiple VMobjects in the pixel_array Parameters ---------- vmobjects list of VMobjects to display pixel_array The pixel array """ if len(vmobjects) == 0: return batch_image_pairs = it.groupby(vmobjects, lambda vm: vm.get_background_image()) for image, batch in batch_image_pairs: if image: self.display_multiple_background_colored_vmobjects(batch, pixel_array) else: self.display_multiple_non_background_colored_vmobjects( batch, pixel_array, ) def display_multiple_non_background_colored_vmobjects( self, vmobjects: Iterable[VMobject], pixel_array: PixelArray ) -> None: """Displays multiple VMobjects in the cairo context, as long as they don't have background colors. Parameters ---------- vmobjects list of the VMobjects pixel_array The Pixel array to add the VMobjects to. """ ctx = self.get_cairo_context(pixel_array) for vmobject in vmobjects: self.display_vectorized(vmobject, ctx) def display_vectorized(self, vmobject: VMobject, ctx: cairo.Context) -> Self: """Displays a VMobject in the cairo context Parameters ---------- vmobject The Vectorized Mobject to display ctx The cairo context to use. Returns ------- Camera The camera object """ self.set_cairo_context_path(ctx, vmobject) self.apply_stroke(ctx, vmobject, background=True) self.apply_fill(ctx, vmobject) self.apply_stroke(ctx, vmobject) return self def set_cairo_context_path(self, ctx: cairo.Context, vmobject: VMobject) -> Self: """Sets a path for the cairo context with the vmobject passed Parameters ---------- ctx The cairo context vmobject The VMobject Returns ------- Camera Camera object after setting cairo_context_path """ points = self.transform_points_pre_display(vmobject, vmobject.points) # TODO, shouldn't this be handled in transform_points_pre_display? # points = points - self.get_frame_center() if len(points) == 0: return self ctx.new_path() subpaths = vmobject.gen_subpaths_from_points_2d(points) for subpath in subpaths: quads = vmobject.gen_cubic_bezier_tuples_from_points(subpath) ctx.new_sub_path() start = subpath[0] ctx.move_to(*start[:2]) for _p0, p1, p2, p3 in quads: ctx.curve_to(*p1[:2], *p2[:2], *p3[:2]) if vmobject.consider_points_equals_2d(subpath[0], subpath[-1]): ctx.close_path() return self def set_cairo_context_color( self, ctx: cairo.Context, rgbas: FloatRGBALike_Array, vmobject: VMobject ) -> Self: """Sets the color of the cairo context Parameters ---------- ctx The cairo context rgbas The RGBA array with which to color the context. vmobject The VMobject with which to set the color. Returns ------- Camera The camera object """ if len(rgbas) == 1: # Use reversed rgb because cairo surface is # encodes it in reverse order ctx.set_source_rgba(*rgbas[0][2::-1], rgbas[0][3]) else: points = vmobject.get_gradient_start_and_end_points() points = self.transform_points_pre_display(vmobject, points) pat = cairo.LinearGradient(*it.chain(*(point[:2] for point in points))) step = 1.0 / (len(rgbas) - 1) offsets = np.arange(0, 1 + step, step) for rgba, offset in zip(rgbas, offsets): pat.add_color_stop_rgba(offset, *rgba[2::-1], rgba[3]) ctx.set_source(pat) return self def apply_fill(self, ctx: cairo.Context, vmobject: VMobject) -> Self: """Fills the cairo context Parameters ---------- ctx The cairo context vmobject The VMobject Returns ------- Camera The camera object. """ self.set_cairo_context_color(ctx, self.get_fill_rgbas(vmobject), vmobject) ctx.fill_preserve() return self def apply_stroke( self, ctx: cairo.Context, vmobject: VMobject, background: bool = False ) -> Self: """Applies a stroke to the VMobject in the cairo context. Parameters ---------- ctx The cairo context vmobject The VMobject background Whether or not to consider the background when applying this stroke width, by default False Returns ------- Camera The camera object with the stroke applied. """ width = vmobject.get_stroke_width(background) if width == 0: return self self.set_cairo_context_color( ctx, self.get_stroke_rgbas(vmobject, background=background), vmobject, ) ctx.set_line_width( width * self.cairo_line_width_multiple * (self.frame_width / self.frame_width), # This ensures lines have constant width as you zoom in on them. ) if vmobject.joint_type != LineJointType.AUTO: ctx.set_line_join(LINE_JOIN_MAP[vmobject.joint_type]) if vmobject.cap_style != CapStyleType.AUTO: ctx.set_line_cap(CAP_STYLE_MAP[vmobject.cap_style]) ctx.stroke_preserve() return self def get_stroke_rgbas( self, vmobject: VMobject, background: bool = False ) -> FloatRGBA_Array: """Gets the RGBA array for the stroke of the passed VMobject. Parameters ---------- vmobject The VMobject background Whether or not to consider the background when getting the stroke RGBAs, by default False Returns ------- np.ndarray The RGBA array of the stroke. """ return vmobject.get_stroke_rgbas(background) def get_fill_rgbas(self, vmobject: VMobject) -> FloatRGBA_Array: """Returns the RGBA array of the fill of the passed VMobject Parameters ---------- vmobject The VMobject Returns ------- np.array The RGBA Array of the fill of the VMobject """ return vmobject.get_fill_rgbas() def get_background_colored_vmobject_displayer( self, ) -> BackgroundColoredVMobjectDisplayer: """Returns the background_colored_vmobject_displayer if it exists or makes one and returns it if not. Returns ------- BackgroundColoredVMobjectDisplayer Object that displays VMobjects that have the same color as the background. """ if self.background_colored_vmobject_displayer is None: self.background_colored_vmobject_displayer = ( BackgroundColoredVMobjectDisplayer(self) ) return self.background_colored_vmobject_displayer def display_multiple_background_colored_vmobjects( self, cvmobjects: Iterable[VMobject], pixel_array: PixelArray ) -> Self: """Displays multiple vmobjects that have the same color as the background. Parameters ---------- cvmobjects List of Colored VMobjects pixel_array The pixel array. Returns ------- Camera The camera object. """ displayer = self.get_background_colored_vmobject_displayer() cvmobject_pixel_array = displayer.display(*cvmobjects) self.overlay_rgba_array(pixel_array, cvmobject_pixel_array) return self # Methods for other rendering # NOTE: Out of the following methods, only `transform_points_pre_display` and `points_to_pixel_coords` have been mentioned outside of their definitions. # As a result, the other methods do not have as detailed docstrings as would be preferred. def display_multiple_point_cloud_mobjects( self, pmobjects: Iterable[PMobject], pixel_array: PixelArray ) -> None: """Displays multiple PMobjects by modifying the passed pixel array. Parameters ---------- pmobjects List of PMobjects pixel_array The pixel array to modify. """ for pmobject in pmobjects: self.display_point_cloud( pmobject, pmobject.points, pmobject.rgbas, self.adjusted_thickness(pmobject.stroke_width), pixel_array, ) def display_point_cloud( self, pmobject: PMobject, points: Point3D_Array, rgbas: FloatRGBA_Array, thickness: float, pixel_array: PixelArray, ) -> None: """Displays a PMobject by modifying the pixel array suitably. TODO: Write a description for the rgbas argument. Parameters ---------- pmobject Point Cloud Mobject points The points to display in the point cloud mobject rgbas thickness The thickness of each point of the PMobject pixel_array The pixel array to modify. """ if len(points) == 0: return pixel_coords = self.points_to_pixel_coords(pmobject, points) pixel_coords = self.thickened_coordinates(pixel_coords, thickness) rgba_len = pixel_array.shape[2] rgbas = (self.rgb_max_val * rgbas).astype(self.pixel_array_dtype) target_len = len(pixel_coords) factor = target_len // len(rgbas) rgbas = np.array([rgbas] * factor).reshape((target_len, rgba_len)) on_screen_indices = self.on_screen_pixels(pixel_coords) pixel_coords = pixel_coords[on_screen_indices] rgbas = rgbas[on_screen_indices] ph = self.pixel_height pw = self.pixel_width flattener = np.array([1, pw], dtype="int") flattener = flattener.reshape((2, 1)) indices = np.dot(pixel_coords, flattener)[:, 0] indices = indices.astype("int") new_pa = pixel_array.reshape((ph * pw, rgba_len)) new_pa[indices] = rgbas pixel_array[:, :] = new_pa.reshape((ph, pw, rgba_len)) def display_multiple_image_mobjects( self, image_mobjects: Iterable[AbstractImageMobject], pixel_array: PixelArray, ) -> None: """Displays multiple image mobjects by modifying the passed pixel_array. Parameters ---------- image_mobjects list of ImageMobjects pixel_array The pixel array to modify. """ for image_mobject in image_mobjects: self.display_image_mobject(image_mobject, pixel_array) def display_image_mobject( self, image_mobject: AbstractImageMobject, pixel_array: np.ndarray ) -> None: """Displays an ImageMobject by changing the pixel_array suitably. Parameters ---------- image_mobject The imageMobject to display pixel_array The Pixel array to put the imagemobject in. """ corner_coords = self.points_to_pixel_coords(image_mobject, image_mobject.points) ul_coords, ur_coords, dl_coords, _ = corner_coords right_vect = ur_coords - ul_coords down_vect = dl_coords - ul_coords center_coords = ul_coords + (right_vect + down_vect) / 2 sub_image = Image.fromarray(image_mobject.get_pixel_array(), mode="RGBA") # Reshape pixel_width = max(int(pdist([ul_coords, ur_coords]).item()), 1) pixel_height = max(int(pdist([ul_coords, dl_coords]).item()), 1) sub_image = sub_image.resize( (pixel_width, pixel_height), resample=image_mobject.resampling_algorithm, ) # Rotate angle = angle_of_vector(right_vect) adjusted_angle = -int(360 * angle / TAU) if adjusted_angle != 0: sub_image = sub_image.rotate( adjusted_angle, resample=image_mobject.resampling_algorithm, expand=1, ) # TODO, there is no accounting for a shear... # Paste into an image as large as the camera's pixel array full_image = Image.fromarray( np.zeros((self.pixel_height, self.pixel_width)), mode="RGBA", ) new_ul_coords = center_coords - np.array(sub_image.size) / 2 new_ul_coords = new_ul_coords.astype(int) full_image.paste( sub_image, box=( new_ul_coords[0], new_ul_coords[1], new_ul_coords[0] + sub_image.size[0], new_ul_coords[1] + sub_image.size[1], ), ) # Paint on top of existing pixel array self.overlay_PIL_image(pixel_array, full_image) def overlay_rgba_array( self, pixel_array: np.ndarray, new_array: np.ndarray ) -> None: """Overlays an RGBA array on top of the given Pixel array. Parameters ---------- pixel_array The original pixel array to modify. new_array The new pixel array to overlay. """ self.overlay_PIL_image(pixel_array, self.get_image(new_array)) def overlay_PIL_image(self, pixel_array: np.ndarray, image: Image) -> None: """Overlays a PIL image on the passed pixel array. Parameters ---------- pixel_array The Pixel array image The Image to overlay. """ pixel_array[:, :] = np.array( Image.alpha_composite(self.get_image(pixel_array), image), dtype="uint8", ) def adjust_out_of_range_points(self, points: np.ndarray) -> np.ndarray: """If any of the points in the passed array are out of the viable range, they are adjusted suitably. Parameters ---------- points The points to adjust Returns ------- np.array The adjusted points. """ if not np.any(points > self.max_allowable_norm): return points norms = np.apply_along_axis(np.linalg.norm, 1, points) violator_indices = norms > self.max_allowable_norm violators = points[violator_indices, :] violator_norms = norms[violator_indices] reshaped_norms = np.repeat( violator_norms.reshape((len(violator_norms), 1)), points.shape[1], 1, ) rescaled = self.max_allowable_norm * violators / reshaped_norms points[violator_indices] = rescaled return points def transform_points_pre_display( self, mobject: Mobject, points: Point3D_Array, ) -> Point3D_Array: # TODO: Write more detailed docstrings for this method. # NOTE: There seems to be an unused argument `mobject`. # Subclasses (like ThreeDCamera) may want to # adjust points further before they're shown if not np.all(np.isfinite(points)): # TODO, print some kind of warning about # mobject having invalid points? points = np.zeros((1, 3)) return points def points_to_pixel_coords( self, mobject: Mobject, points: Point3D_Array, ) -> npt.NDArray[ManimInt]: # TODO: Write more detailed docstrings for this method. points = self.transform_points_pre_display(mobject, points) shifted_points = points - self.frame_center result = np.zeros((len(points), 2)) pixel_height = self.pixel_height pixel_width = self.pixel_width frame_height = self.frame_height frame_width = self.frame_width width_mult = pixel_width / frame_width width_add = pixel_width / 2 height_mult = pixel_height / frame_height height_add = pixel_height / 2 # Flip on y-axis as you go height_mult *= -1 result[:, 0] = shifted_points[:, 0] * width_mult + width_add result[:, 1] = shifted_points[:, 1] * height_mult + height_add return result.astype("int") def on_screen_pixels(self, pixel_coords: np.ndarray) -> PixelArray: """Returns array of pixels that are on the screen from a given array of pixel_coordinates Parameters ---------- pixel_coords The pixel coords to check. Returns ------- np.array The pixel coords on screen. """ return reduce( op.and_, [ pixel_coords[:, 0] >= 0, pixel_coords[:, 0] < self.pixel_width, pixel_coords[:, 1] >= 0, pixel_coords[:, 1] < self.pixel_height, ], ) def adjusted_thickness(self, thickness: float) -> float: """Computes the adjusted stroke width for a zoomed camera. Parameters ---------- thickness The stroke width of a mobject. Returns ------- float The adjusted stroke width that reflects zooming in with the camera. """ # TODO: This seems...unsystematic big_sum: float = op.add(config["pixel_height"], config["pixel_width"]) this_sum: float = op.add(self.pixel_height, self.pixel_width) factor = big_sum / this_sum return 1 + (thickness - 1) * factor def get_thickening_nudges(self, thickness: float) -> PixelArray: """Determine a list of vectors used to nudge two-dimensional pixel coordinates. Parameters ---------- thickness Returns ------- np.array """ thickness = int(thickness) _range = list(range(-thickness // 2 + 1, thickness // 2 + 1)) return np.array(list(it.product(_range, _range))) def thickened_coordinates( self, pixel_coords: np.ndarray, thickness: float ) -> PixelArray: """Returns thickened coordinates for a passed array of pixel coords and a thickness to thicken by. Parameters ---------- pixel_coords Pixel coordinates thickness Thickness Returns ------- np.array Array of thickened pixel coords. """ nudges = self.get_thickening_nudges(thickness) pixel_coords = np.array([pixel_coords + nudge for nudge in nudges]) size = pixel_coords.size return pixel_coords.reshape((size // 2, 2)) # TODO, reimplement using cairo matrix def get_coords_of_all_pixels(self) -> PixelArray: """Returns the cartesian coordinates of each pixel. Returns ------- np.ndarray The array of cartesian coordinates. """ # These are in x, y order, to help me keep things straight full_space_dims = np.array([self.frame_width, self.frame_height]) full_pixel_dims = np.array([self.pixel_width, self.pixel_height]) # These are addressed in the same y, x order as in pixel_array, but the values in them # are listed in x, y order uncentered_pixel_coords = np.indices([self.pixel_height, self.pixel_width])[ ::-1 ].transpose(1, 2, 0) uncentered_space_coords = ( uncentered_pixel_coords * full_space_dims ) / full_pixel_dims # Could structure above line's computation slightly differently, but figured (without much # thought) multiplying by frame_shape first, THEN dividing by pixel_shape, is probably # better than the other order, for avoiding underflow quantization in the division (whereas # overflow is unlikely to be a problem) centered_space_coords = uncentered_space_coords - (full_space_dims / 2) # Have to also flip the y coordinates to account for pixel array being listed in # top-to-bottom order, opposite of screen coordinate convention centered_space_coords = centered_space_coords * (1, -1) return centered_space_coords # NOTE: The methods of the following class have not been mentioned outside of their definitions. # Their DocStrings are not as detailed as preferred. class BackgroundColoredVMobjectDisplayer: """Auxiliary class that handles displaying vectorized mobjects with a set background image. Parameters ---------- camera Camera object to use. """ def __init__(self, camera: Camera): self.camera = camera self.file_name_to_pixel_array_map: dict[str, PixelArray] = {} self.pixel_array = np.array(camera.pixel_array) self.reset_pixel_array() def reset_pixel_array(self) -> None: self.pixel_array[:, :] = 0 def resize_background_array( self, background_array: PixelArray, new_width: float, new_height: float, mode: str = "RGBA", ) -> PixelArray: """Resizes the pixel array representing the background. Parameters ---------- background_array The pixel new_width The new width of the background new_height The new height of the background mode The PIL image mode, by default "RGBA" Returns ------- np.array The numpy pixel array of the resized background. """ image = Image.fromarray(background_array) image = image.convert(mode) resized_image = image.resize((new_width, new_height)) return np.array(resized_image) def resize_background_array_to_match( self, background_array: PixelArray, pixel_array: PixelArray ) -> PixelArray: """Resizes the background array to match the passed pixel array. Parameters ---------- background_array The prospective pixel array. pixel_array The pixel array whose width and height should be matched. Returns ------- np.array The resized background array. """ height, width = pixel_array.shape[:2] mode = "RGBA" if pixel_array.shape[2] == 4 else "RGB" return self.resize_background_array(background_array, width, height, mode) def get_background_array( self, image: Image.Image | pathlib.Path | str ) -> PixelArray: """Gets the background array that has the passed file_name. Parameters ---------- image The background image or its file name. Returns ------- np.ndarray The pixel array of the image. """ image_key = str(image) if image_key in self.file_name_to_pixel_array_map: return self.file_name_to_pixel_array_map[image_key] if isinstance(image, str): full_path = get_full_raster_image_path(image) image = Image.open(full_path) back_array = np.array(image) pixel_array = self.pixel_array if not np.all(pixel_array.shape == back_array.shape): back_array = self.resize_background_array_to_match(back_array, pixel_array) self.file_name_to_pixel_array_map[image_key] = back_array return back_array def display(self, *cvmobjects: VMobject) -> PixelArray | None: """Displays the colored VMobjects. Parameters ---------- *cvmobjects The VMobjects Returns ------- np.array The pixel array with the `cvmobjects` displayed. """ batch_image_pairs = it.groupby(cvmobjects, lambda cv: cv.get_background_image()) curr_array = None for image, batch in batch_image_pairs: background_array = self.get_background_array(image) pixel_array = self.pixel_array self.camera.display_multiple_non_background_colored_vmobjects( batch, pixel_array, ) new_array = np.array( (background_array * pixel_array.astype("float") / 255), dtype=self.camera.pixel_array_dtype, ) if curr_array is None: curr_array = new_array else: curr_array = np.maximum(curr_array, new_array) self.reset_pixel_array() return curr_array ================================================ FILE: manim/camera/mapping_camera.py ================================================ """A camera module that supports spatial mapping between objects for distortion effects.""" from __future__ import annotations __all__ = ["MappingCamera", "OldMultiCamera", "SplitScreenCamera"] import math import numpy as np from ..camera.camera import Camera from ..mobject.types.vectorized_mobject import VMobject from ..utils.config_ops import DictAsObject # TODO: Add an attribute to mobjects under which they can specify that they should just # map their centers but remain otherwise undistorted (useful for labels, etc.) class MappingCamera(Camera): """Parameters ---------- mapping_func : callable Function to map 3D points to new 3D points (identity by default). min_num_curves : int Minimum number of curves for VMobjects to avoid visual glitches. allow_object_intrusion : bool If True, modifies original mobjects; else works on copies. kwargs : dict Additional arguments passed to Camera base class. """ def __init__( self, mapping_func=lambda p: p, min_num_curves=50, allow_object_intrusion=False, **kwargs, ): self.mapping_func = mapping_func self.min_num_curves = min_num_curves self.allow_object_intrusion = allow_object_intrusion super().__init__(**kwargs) def points_to_pixel_coords(self, mobject, points): # Map points with custom function before converting to pixels return super().points_to_pixel_coords( mobject, np.apply_along_axis(self.mapping_func, 1, points), ) def capture_mobjects(self, mobjects, **kwargs): """Capture mobjects for rendering after applying the spatial mapping. Copies mobjects unless intrusion is allowed, and ensures vector objects have enough curves for smooth distortion. """ mobjects = self.get_mobjects_to_display(mobjects, **kwargs) if self.allow_object_intrusion: mobject_copies = mobjects else: mobject_copies = [mobject.copy() for mobject in mobjects] for mobject in mobject_copies: if ( isinstance(mobject, VMobject) and 0 < mobject.get_num_curves() < self.min_num_curves ): mobject.insert_n_curves(self.min_num_curves) super().capture_mobjects( mobject_copies, include_submobjects=False, excluded_mobjects=None, ) # Note: This allows layering of multiple cameras onto the same portion of the pixel array, # the later cameras overwriting the former # # TODO: Add optional separator borders between cameras (or perhaps peel this off into a # CameraPlusOverlay class) # TODO, the classes below should likely be deleted class OldMultiCamera(Camera): """Parameters ---------- cameras_with_start_positions : tuple Tuples of (Camera, (start_y, start_x)) indicating camera and its pixel offset on the final frame. """ def __init__(self, *cameras_with_start_positions, **kwargs): self.shifted_cameras = [ DictAsObject( { "camera": camera_with_start_positions[0], "start_x": camera_with_start_positions[1][1], "start_y": camera_with_start_positions[1][0], "end_x": camera_with_start_positions[1][1] + camera_with_start_positions[0].pixel_width, "end_y": camera_with_start_positions[1][0] + camera_with_start_positions[0].pixel_height, }, ) for camera_with_start_positions in cameras_with_start_positions ] super().__init__(**kwargs) def capture_mobjects(self, mobjects, **kwargs): for shifted_camera in self.shifted_cameras: shifted_camera.camera.capture_mobjects(mobjects, **kwargs) self.pixel_array[ shifted_camera.start_y : shifted_camera.end_y, shifted_camera.start_x : shifted_camera.end_x, ] = shifted_camera.camera.pixel_array def set_background(self, pixel_array, **kwargs): for shifted_camera in self.shifted_cameras: shifted_camera.camera.set_background( pixel_array[ shifted_camera.start_y : shifted_camera.end_y, shifted_camera.start_x : shifted_camera.end_x, ], **kwargs, ) def set_pixel_array(self, pixel_array, **kwargs): super().set_pixel_array(pixel_array, **kwargs) for shifted_camera in self.shifted_cameras: shifted_camera.camera.set_pixel_array( pixel_array[ shifted_camera.start_y : shifted_camera.end_y, shifted_camera.start_x : shifted_camera.end_x, ], **kwargs, ) def init_background(self): super().init_background() for shifted_camera in self.shifted_cameras: shifted_camera.camera.init_background() # A OldMultiCamera which, when called with two full-size cameras, initializes itself # as a split screen, also taking care to resize each individual camera within it class SplitScreenCamera(OldMultiCamera): """Initializes a split screen camera setup with two side-by-side cameras. Parameters ---------- left_camera : Camera right_camera : Camera kwargs : dict """ def __init__(self, left_camera, right_camera, **kwargs): Camera.__init__(self, **kwargs) # to set attributes such as pixel_width self.left_camera = left_camera self.right_camera = right_camera half_width = math.ceil(self.pixel_width / 2) for camera in [self.left_camera, self.right_camera]: camera.reset_pixel_shape(camera.pixel_height, half_width) super().__init__( (left_camera, (0, 0)), (right_camera, (0, half_width)), ) ================================================ FILE: manim/camera/moving_camera.py ================================================ """Defines the MovingCamera class, a camera that can pan and zoom through a scene. .. SEEALSO:: :mod:`.moving_camera_scene` """ from __future__ import annotations __all__ = ["MovingCamera"] from collections.abc import Iterable from typing import Any from cairo import Context from manim.typing import PixelArray, Point3D, Point3DLike from .. import config from ..camera.camera import Camera from ..constants import DOWN, LEFT, RIGHT, UP from ..mobject.frame import ScreenRectangle from ..mobject.mobject import Mobject from ..utils.color import WHITE, ManimColor class MovingCamera(Camera): """A camera that follows and matches the size and position of its 'frame', a Rectangle (or similar Mobject). The frame defines the region of space the camera displays and can move or resize dynamically. .. SEEALSO:: :class:`.MovingCameraScene` """ def __init__( self, frame: Mobject | None = None, fixed_dimension: int = 0, # width default_frame_stroke_color: ManimColor = WHITE, default_frame_stroke_width: int = 0, **kwargs: Any, ): """Frame is a Mobject, (should almost certainly be a rectangle) determining which region of space the camera displays """ self.fixed_dimension = fixed_dimension self.default_frame_stroke_color = default_frame_stroke_color self.default_frame_stroke_width = default_frame_stroke_width if frame is None: frame = ScreenRectangle(height=config["frame_height"]) frame.set_stroke( self.default_frame_stroke_color, self.default_frame_stroke_width, ) self.frame = frame super().__init__(**kwargs) # TODO, make these work for a rotated frame @property def frame_height(self) -> float: """Returns the height of the frame. Returns ------- float The height of the frame. """ return self.frame.height @frame_height.setter def frame_height(self, frame_height: float) -> None: """Sets the height of the frame in MUnits. Parameters ---------- frame_height The new frame_height. """ self.frame.stretch_to_fit_height(frame_height) @property def frame_width(self) -> float: """Returns the width of the frame Returns ------- float The width of the frame. """ return self.frame.width @frame_width.setter def frame_width(self, frame_width: float) -> None: """Sets the width of the frame in MUnits. Parameters ---------- frame_width The new frame_width. """ self.frame.stretch_to_fit_width(frame_width) @property def frame_center(self) -> Point3D: """Returns the centerpoint of the frame in cartesian coordinates. Returns ------- np.array The cartesian coordinates of the center of the frame. """ return self.frame.get_center() @frame_center.setter def frame_center(self, frame_center: Point3DLike | Mobject) -> None: """Sets the centerpoint of the frame. Parameters ---------- frame_center The point to which the frame must be moved. If is of type mobject, the frame will be moved to the center of that mobject. """ self.frame.move_to(frame_center) def capture_mobjects(self, mobjects: Iterable[Mobject], **kwargs: Any) -> None: # self.reset_frame_center() # self.realign_frame_shape() super().capture_mobjects(mobjects, **kwargs) def get_cached_cairo_context(self, pixel_array: PixelArray) -> None: """Since the frame can be moving around, the cairo context used for updating should be regenerated at each frame. So no caching. """ return None def cache_cairo_context(self, pixel_array: PixelArray, ctx: Context) -> None: """Since the frame can be moving around, the cairo context used for updating should be regenerated at each frame. So no caching. """ pass # def reset_frame_center(self): # self.frame_center = self.frame.get_center() # def realign_frame_shape(self): # height, width = self.frame_shape # if self.fixed_dimension == 0: # self.frame_shape = (height, self.frame.width # else: # self.frame_shape = (self.frame.height, width) # self.resize_frame_shape(fixed_dimension=self.fixed_dimension) def get_mobjects_indicating_movement(self) -> list[Mobject]: """Returns all mobjects whose movement implies that the camera should think of all other mobjects on the screen as moving Returns ------- list[Mobject] """ return [self.frame] def auto_zoom( self, mobjects: Iterable[Mobject], margin: float = 0, only_mobjects_in_frame: bool = False, animate: bool = True, ) -> Mobject: """Zooms on to a given array of mobjects (or a singular mobject) and automatically resizes to frame all the mobjects. .. NOTE:: This method only works when 2D-objects in the XY-plane are considered, it will not work correctly when the camera has been rotated. Parameters ---------- mobjects The mobject or array of mobjects that the camera will focus on. margin The width of the margin that is added to the frame (optional, 0 by default). only_mobjects_in_frame If set to ``True``, only allows focusing on mobjects that are already in frame. animate If set to ``False``, applies the changes instead of returning the corresponding animation Returns ------- Union[_AnimationBuilder, ScreenRectangle] _AnimationBuilder that zooms the camera view to a given list of mobjects or ScreenRectangle with position and size updated to zoomed position. """ ( scene_critical_x_left, scene_critical_x_right, scene_critical_y_up, scene_critical_y_down, ) = self._get_bounding_box(mobjects, only_mobjects_in_frame) # calculate center x and y x = (scene_critical_x_left + scene_critical_x_right) / 2 y = (scene_critical_y_up + scene_critical_y_down) / 2 # calculate proposed width and height of zoomed scene new_width = abs(scene_critical_x_left - scene_critical_x_right) new_height = abs(scene_critical_y_up - scene_critical_y_down) m_target = self.frame.animate if animate else self.frame # zoom to fit all mobjects along the side that has the largest size if new_width / self.frame.width > new_height / self.frame.height: return m_target.set_x(x).set_y(y).set(width=new_width + margin) else: return m_target.set_x(x).set_y(y).set(height=new_height + margin) def _get_bounding_box( self, mobjects: Iterable[Mobject], only_mobjects_in_frame: bool ) -> tuple[float, float, float, float]: bounding_box_located = False scene_critical_x_left: float = 0 scene_critical_x_right: float = 1 scene_critical_y_up: float = 1 scene_critical_y_down: float = 0 for m in mobjects: if (m == self.frame) or ( only_mobjects_in_frame and not self.is_in_frame(m) ): # detected camera frame, should not be used to calculate final position of camera continue # initialize scene critical points with first mobjects critical points if not bounding_box_located: scene_critical_x_left = m.get_critical_point(LEFT)[0] scene_critical_x_right = m.get_critical_point(RIGHT)[0] scene_critical_y_up = m.get_critical_point(UP)[1] scene_critical_y_down = m.get_critical_point(DOWN)[1] bounding_box_located = True else: if m.get_critical_point(LEFT)[0] < scene_critical_x_left: scene_critical_x_left = m.get_critical_point(LEFT)[0] if m.get_critical_point(RIGHT)[0] > scene_critical_x_right: scene_critical_x_right = m.get_critical_point(RIGHT)[0] if m.get_critical_point(UP)[1] > scene_critical_y_up: scene_critical_y_up = m.get_critical_point(UP)[1] if m.get_critical_point(DOWN)[1] < scene_critical_y_down: scene_critical_y_down = m.get_critical_point(DOWN)[1] if not bounding_box_located: raise Exception( "Could not determine bounding box of the mobjects given to 'auto_zoom'." ) return ( scene_critical_x_left, scene_critical_x_right, scene_critical_y_up, scene_critical_y_down, ) ================================================ FILE: manim/camera/multi_camera.py ================================================ """A camera supporting multiple perspectives.""" from __future__ import annotations __all__ = ["MultiCamera"] from collections.abc import Iterable from typing import Any from typing_extensions import Self from manim.mobject.mobject import Mobject from manim.mobject.types.image_mobject import ImageMobjectFromCamera from ..camera.moving_camera import MovingCamera from ..utils.iterables import list_difference_update class MultiCamera(MovingCamera): """Camera Object that allows for multiple perspectives.""" def __init__( self, image_mobjects_from_cameras: Iterable[ImageMobjectFromCamera] | None = None, allow_cameras_to_capture_their_own_display: bool = False, **kwargs: Any, ) -> None: """Initialises the MultiCamera Parameters ---------- image_mobjects_from_cameras kwargs Any valid keyword arguments of MovingCamera. """ self.image_mobjects_from_cameras: list[ImageMobjectFromCamera] = [] if image_mobjects_from_cameras is not None: for imfc in image_mobjects_from_cameras: self.add_image_mobject_from_camera(imfc) self.allow_cameras_to_capture_their_own_display = ( allow_cameras_to_capture_their_own_display ) super().__init__(**kwargs) def add_image_mobject_from_camera( self, image_mobject_from_camera: ImageMobjectFromCamera ) -> None: """Adds an ImageMobject that's been obtained from the camera into the list ``self.image_mobject_from_cameras`` Parameters ---------- image_mobject_from_camera The ImageMobject to add to self.image_mobject_from_cameras """ # A silly method to have right now, but maybe there are things # we want to guarantee about any imfc's added later. imfc = image_mobject_from_camera assert isinstance(imfc.camera, MovingCamera) self.image_mobjects_from_cameras.append(imfc) def update_sub_cameras(self) -> None: """Reshape sub_camera pixel_arrays""" for imfc in self.image_mobjects_from_cameras: pixel_height, pixel_width = self.pixel_array.shape[:2] # imfc.camera.frame_shape = ( # imfc.camera.frame.height, # imfc.camera.frame.width, # ) imfc.camera.reset_pixel_shape( int(pixel_height * imfc.height / self.frame_height), int(pixel_width * imfc.width / self.frame_width), ) def reset(self) -> Self: """Resets the MultiCamera. Returns ------- MultiCamera The reset MultiCamera """ for imfc in self.image_mobjects_from_cameras: imfc.camera.reset() super().reset() return self def capture_mobjects(self, mobjects: Iterable[Mobject], **kwargs: Any) -> None: self.update_sub_cameras() for imfc in self.image_mobjects_from_cameras: to_add = list(mobjects) if not self.allow_cameras_to_capture_their_own_display: to_add = list_difference_update(to_add, imfc.get_family()) imfc.camera.capture_mobjects(to_add, **kwargs) super().capture_mobjects(mobjects, **kwargs) def get_mobjects_indicating_movement(self) -> list[Mobject]: """Returns all mobjects whose movement implies that the camera should think of all other mobjects on the screen as moving Returns ------- list """ return [self.frame] + [ imfc.camera.frame for imfc in self.image_mobjects_from_cameras ] ================================================ FILE: manim/camera/three_d_camera.py ================================================ """A camera that can be positioned and oriented in three-dimensional space.""" from __future__ import annotations __all__ = ["ThreeDCamera"] from collections.abc import Callable, Iterable from typing import Any import numpy as np from manim.mobject.mobject import Mobject from manim.mobject.three_d.three_d_utils import ( get_3d_vmob_end_corner, get_3d_vmob_end_corner_unit_normal, get_3d_vmob_start_corner, get_3d_vmob_start_corner_unit_normal, ) from manim.mobject.types.vectorized_mobject import VMobject from manim.mobject.value_tracker import ValueTracker from manim.typing import ( FloatRGBA_Array, MatrixMN, Point3D, Point3D_Array, Point3DLike, ) from .. import config from ..camera.camera import Camera from ..constants import * from ..mobject.types.point_cloud_mobject import Point from ..utils.color import get_shaded_rgb from ..utils.family import extract_mobject_family_members from ..utils.space_ops import rotation_about_z, rotation_matrix class ThreeDCamera(Camera): def __init__( self, focal_distance: float = 20.0, shading_factor: float = 0.2, default_distance: float = 5.0, light_source_start_point: Point3DLike = 9 * DOWN + 7 * LEFT + 10 * OUT, should_apply_shading: bool = True, exponential_projection: bool = False, phi: float = 0, theta: float = -90 * DEGREES, gamma: float = 0, zoom: float = 1, **kwargs: Any, ): """Initializes the ThreeDCamera Parameters ---------- *kwargs Any keyword argument of Camera. """ self._frame_center = Point(kwargs.get("frame_center", ORIGIN), stroke_width=0) super().__init__(**kwargs) self.focal_distance = focal_distance self.phi = phi self.theta = theta self.gamma = gamma self.zoom = zoom self.shading_factor = shading_factor self.default_distance = default_distance self.light_source_start_point = light_source_start_point self.light_source = Point(self.light_source_start_point) self.should_apply_shading = should_apply_shading self.exponential_projection = exponential_projection self.max_allowable_norm = 3 * config["frame_width"] self.phi_tracker = ValueTracker(self.phi) self.theta_tracker = ValueTracker(self.theta) self.focal_distance_tracker = ValueTracker(self.focal_distance) self.gamma_tracker = ValueTracker(self.gamma) self.zoom_tracker = ValueTracker(self.zoom) self.fixed_orientation_mobjects: dict[Mobject, Callable[[], Point3D]] = {} self.fixed_in_frame_mobjects: set[Mobject] = set() self.reset_rotation_matrix() @property def frame_center(self) -> Point3D: return self._frame_center.points[0] @frame_center.setter def frame_center(self, point: Point3DLike) -> None: self._frame_center.move_to(point) def capture_mobjects(self, mobjects: Iterable[Mobject], **kwargs: Any) -> None: self.reset_rotation_matrix() super().capture_mobjects(mobjects, **kwargs) def get_value_trackers(self) -> list[ValueTracker]: """A list of :class:`ValueTrackers <.ValueTracker>` of phi, theta, focal_distance, gamma and zoom. Returns ------- list list of ValueTracker objects """ return [ self.phi_tracker, self.theta_tracker, self.focal_distance_tracker, self.gamma_tracker, self.zoom_tracker, ] def modified_rgbas( self, vmobject: VMobject, rgbas: FloatRGBA_Array ) -> FloatRGBA_Array: if not self.should_apply_shading: return rgbas if vmobject.shade_in_3d and (vmobject.get_num_points() > 0): light_source_point = self.light_source.points[0] if len(rgbas) < 2: shaded_rgbas = rgbas.repeat(2, axis=0) else: shaded_rgbas = np.array(rgbas[:2]) shaded_rgbas[0, :3] = get_shaded_rgb( shaded_rgbas[0, :3], get_3d_vmob_start_corner(vmobject), get_3d_vmob_start_corner_unit_normal(vmobject), light_source_point, ) shaded_rgbas[1, :3] = get_shaded_rgb( shaded_rgbas[1, :3], get_3d_vmob_end_corner(vmobject), get_3d_vmob_end_corner_unit_normal(vmobject), light_source_point, ) return shaded_rgbas return rgbas def get_stroke_rgbas( self, vmobject: VMobject, background: bool = False, ) -> FloatRGBA_Array: # NOTE : DocStrings From parent return self.modified_rgbas(vmobject, vmobject.get_stroke_rgbas(background)) def get_fill_rgbas( self, vmobject: VMobject ) -> FloatRGBA_Array: # NOTE : DocStrings From parent return self.modified_rgbas(vmobject, vmobject.get_fill_rgbas()) def get_mobjects_to_display( self, *args: Any, **kwargs: Any ) -> list[Mobject]: # NOTE : DocStrings From parent mobjects = super().get_mobjects_to_display(*args, **kwargs) rot_matrix = self.get_rotation_matrix() def z_key(mob: Mobject) -> float: if not (hasattr(mob, "shade_in_3d") and mob.shade_in_3d): return np.inf # type: ignore[no-any-return] # Assign a number to a three dimensional mobjects # based on how close it is to the camera distance: float = np.dot(mob.get_z_index_reference_point(), rot_matrix.T)[2] return distance return sorted(mobjects, key=z_key) def get_phi(self) -> float: """Returns the Polar angle (the angle off Z_AXIS) phi. Returns ------- float The Polar angle in radians. """ return self.phi_tracker.get_value() def get_theta(self) -> float: """Returns the Azimuthal i.e the angle that spins the camera around the Z_AXIS. Returns ------- float The Azimuthal angle in radians. """ return self.theta_tracker.get_value() def get_focal_distance(self) -> float: """Returns focal_distance of the Camera. Returns ------- float The focal_distance of the Camera in MUnits. """ return self.focal_distance_tracker.get_value() def get_gamma(self) -> float: """Returns the rotation of the camera about the vector from the ORIGIN to the Camera. Returns ------- float The angle of rotation of the camera about the vector from the ORIGIN to the Camera in radians """ return self.gamma_tracker.get_value() def get_zoom(self) -> float: """Returns the zoom amount of the camera. Returns ------- float The zoom amount of the camera. """ return self.zoom_tracker.get_value() def set_phi(self, value: float) -> None: """Sets the polar angle i.e the angle between Z_AXIS and Camera through ORIGIN in radians. Parameters ---------- value The new value of the polar angle in radians. """ self.phi_tracker.set_value(value) def set_theta(self, value: float) -> None: """Sets the azimuthal angle i.e the angle that spins the camera around Z_AXIS in radians. Parameters ---------- value The new value of the azimuthal angle in radians. """ self.theta_tracker.set_value(value) def set_focal_distance(self, value: float) -> None: """Sets the focal_distance of the Camera. Parameters ---------- value The focal_distance of the Camera. """ self.focal_distance_tracker.set_value(value) def set_gamma(self, value: float) -> None: """Sets the angle of rotation of the camera about the vector from the ORIGIN to the Camera. Parameters ---------- value The new angle of rotation of the camera. """ self.gamma_tracker.set_value(value) def set_zoom(self, value: float) -> None: """Sets the zoom amount of the camera. Parameters ---------- value The zoom amount of the camera. """ self.zoom_tracker.set_value(value) def reset_rotation_matrix(self) -> None: """Sets the value of self.rotation_matrix to the matrix corresponding to the current position of the camera """ self.rotation_matrix = self.generate_rotation_matrix() def get_rotation_matrix(self) -> MatrixMN: """Returns the matrix corresponding to the current position of the camera. Returns ------- np.array The matrix corresponding to the current position of the camera. """ return self.rotation_matrix def generate_rotation_matrix(self) -> MatrixMN: """Generates a rotation matrix based off the current position of the camera. Returns ------- np.array The matrix corresponding to the current position of the camera. """ phi = self.get_phi() theta = self.get_theta() gamma = self.get_gamma() matrices = [ rotation_about_z(-theta - 90 * DEGREES), rotation_matrix(-phi, RIGHT), rotation_about_z(gamma), ] result = np.identity(3) for matrix in matrices: result = np.dot(matrix, result) return result def project_points(self, points: Point3D_Array) -> Point3D_Array: """Applies the current rotation_matrix as a projection matrix to the passed array of points. Parameters ---------- points The list of points to project. Returns ------- np.array The points after projecting. """ frame_center = self.frame_center focal_distance = self.get_focal_distance() zoom = self.get_zoom() rot_matrix = self.get_rotation_matrix() points = points - frame_center points = np.dot(points, rot_matrix.T) zs = points[:, 2] for i in 0, 1: if self.exponential_projection: # Proper projection would involve multiplying # x and y by d / (d-z). But for points with high # z value that causes weird artifacts, and applying # the exponential helps smooth it out. factor = np.exp(zs / focal_distance) lt0 = zs < 0 factor[lt0] = focal_distance / (focal_distance - zs[lt0]) else: factor = focal_distance / (focal_distance - zs) factor[(focal_distance - zs) < 0] = 10**6 points[:, i] *= factor * zoom return points def project_point(self, point: Point3D) -> Point3D: """Applies the current rotation_matrix as a projection matrix to the passed point. Parameters ---------- point The point to project. Returns ------- np.array The point after projection. """ return self.project_points(point.reshape((1, 3)))[0, :] def transform_points_pre_display( self, mobject: Mobject, points: Point3D_Array, ) -> Point3D_Array: # TODO: Write Docstrings for this Method. points = super().transform_points_pre_display(mobject, points) fixed_orientation = mobject in self.fixed_orientation_mobjects fixed_in_frame = mobject in self.fixed_in_frame_mobjects if fixed_in_frame: return points if fixed_orientation: center_func = self.fixed_orientation_mobjects[mobject] center = center_func() new_center = self.project_point(center) return points + (new_center - center) else: return self.project_points(points) def add_fixed_orientation_mobjects( self, *mobjects: Mobject, use_static_center_func: bool = False, center_func: Callable[[], Point3D] | None = None, ) -> None: """This method allows the mobject to have a fixed orientation, even when the camera moves around. E.G If it was passed through this method, facing the camera, it will continue to face the camera even as the camera moves. Highly useful when adding labels to graphs and the like. Parameters ---------- *mobjects The mobject whose orientation must be fixed. use_static_center_func Whether or not to use the function that takes the mobject's center as centerpoint, by default False center_func The function which returns the centerpoint with respect to which the mobject will be oriented, by default None """ # This prevents the computation of mobject.get_center # every single time a projection happens def get_static_center_func(mobject: Mobject) -> Callable[[], Point3D]: point = mobject.get_center() return lambda: point for mobject in mobjects: if center_func: func = center_func elif use_static_center_func: func = get_static_center_func(mobject) else: func = mobject.get_center for submob in mobject.get_family(): self.fixed_orientation_mobjects[submob] = func def add_fixed_in_frame_mobjects(self, *mobjects: Mobject) -> None: """This method allows the mobject to have a fixed position, even when the camera moves around. E.G If it was passed through this method, at the top of the frame, it will continue to be displayed at the top of the frame. Highly useful when displaying Titles or formulae or the like. Parameters ---------- **mobjects The mobject to fix in frame. """ for mobject in extract_mobject_family_members(mobjects): self.fixed_in_frame_mobjects.add(mobject) def remove_fixed_orientation_mobjects(self, *mobjects: Mobject) -> None: """If a mobject was fixed in its orientation by passing it through :meth:`.add_fixed_orientation_mobjects`, then this undoes that fixing. The Mobject will no longer have a fixed orientation. Parameters ---------- mobjects The mobjects whose orientation need not be fixed any longer. """ for mobject in extract_mobject_family_members(mobjects): if mobject in self.fixed_orientation_mobjects: del self.fixed_orientation_mobjects[mobject] def remove_fixed_in_frame_mobjects(self, *mobjects: Mobject) -> None: """If a mobject was fixed in frame by passing it through :meth:`.add_fixed_in_frame_mobjects`, then this undoes that fixing. The Mobject will no longer be fixed in frame. Parameters ---------- mobjects The mobjects which need not be fixed in frame any longer. """ for mobject in extract_mobject_family_members(mobjects): if mobject in self.fixed_in_frame_mobjects: self.fixed_in_frame_mobjects.remove(mobject) ================================================ FILE: manim/cli/__init__.py ================================================ """The Manim CLI, and the available commands for ``manim``. This page is a work in progress. Please run ``manim`` or ``manim --help`` in your terminal to find more information on the following commands. Available commands ------------------ .. autosummary:: :toctree: ../reference cfg checkhealth init plugins render """ ================================================ FILE: manim/cli/default_group.py ================================================ """``DefaultGroup`` allows a subcommand to act as the main command. In particular, this class is what allows ``manim`` to act as ``manim render``. .. note:: This is a vendored version of https://github.com/click-contrib/click-default-group/ under the BSD 3-Clause "New" or "Revised" License. This library isn't used as a dependency, as we need to inherit from :class:`cloup.Group` instead of :class:`click.Group`. """ from __future__ import annotations import warnings from collections.abc import Callable from typing import TYPE_CHECKING, Any import cloup from manim.utils.deprecation import deprecated __all__ = ["DefaultGroup"] if TYPE_CHECKING: from click import Command, Context class DefaultGroup(cloup.Group): """Invokes a subcommand marked with ``default=True`` if any subcommand is not chosen. Parameters ---------- *args Positional arguments to forward to :class:`cloup.Group`. **kwargs Keyword arguments to forward to :class:`cloup.Group`. The keyword ``ignore_unknown_options`` must be set to ``False``. Attributes ---------- default_cmd_name : str | None The name of the default command, if specified through the ``default`` keyword argument. Otherwise, this is set to ``None``. default_if_no_args : bool Whether to include or not the default command, if no command arguments are supplied. This can be specified through the ``default_if_no_args`` keyword argument. Default is ``False``. """ def __init__(self, *args: Any, **kwargs: Any): # To resolve as the default command. if not kwargs.get("ignore_unknown_options", True): raise ValueError("Default group accepts unknown options") self.ignore_unknown_options = True self.default_cmd_name: str | None = kwargs.pop("default", None) self.default_if_no_args: bool = kwargs.pop("default_if_no_args", False) super().__init__(*args, **kwargs) def set_default_command(self, command: Command) -> None: """Sets a command function as the default command. Parameters ---------- command The command to set as default. """ cmd_name = command.name self.add_command(command) self.default_cmd_name = cmd_name def parse_args(self, ctx: Context, args: list[str]) -> list[str]: """Parses the list of ``args`` by forwarding it to :meth:`cloup.Group.parse_args`. Before doing so, if :attr:`default_if_no_args` is set to ``True`` and ``args`` is empty, this function appends to it the name of the default command specified by :attr:`default_cmd_name`. Parameters ---------- ctx The Click context. args A list of arguments. If it's empty and :attr:`default_if_no_args` is ``True``, append the name of the default command to it. Returns ------- list[str] The parsed arguments. """ if not args and self.default_if_no_args and self.default_cmd_name: args.insert(0, self.default_cmd_name) parsed_args: list[str] = super().parse_args(ctx, args) return parsed_args def get_command(self, ctx: Context, cmd_name: str) -> Command | None: """Get a command function by its name, by forwarding the arguments to :meth:`cloup.Group.get_command`. If ``cmd_name`` does not match any of the command names in :attr:`commands`, attempt to get the default command instead. Parameters ---------- ctx The Click context. cmd_name The name of the command to get. Returns ------- :class:`click.Command` | None The command, if found. Otherwise, ``None``. """ if cmd_name not in self.commands and self.default_cmd_name: # No command name matched. ctx.meta["arg0"] = cmd_name cmd_name = self.default_cmd_name return super().get_command(ctx, cmd_name) def resolve_command( self, ctx: Context, args: list[str] ) -> tuple[str | None, Command | None, list[str]]: """Given a list of ``args`` given by a CLI, find a command which matches the first element, and return its name (``cmd_name``), the command function itself (``cmd``) and the rest of the arguments which shall be passed to the function (``cmd_args``). If not found, return ``None``, ``None`` and the rest of the arguments. After resolving the command, if the Click context given by ``ctx`` contains an ``arg0`` attribute in its :attr:`click.Context.meta` dictionary, insert it as the first element of the returned ``cmd_args``. Parameters ---------- ctx The Click context. cmd_name The name of the command to get. Returns ------- cmd_name : str | None The command name, if found. Otherwise, ``None``. cmd : :class:`click.Command` | None The command, if found. Otherwise, ``None``. cmd_args : list[str] The rest of the arguments to be passed to ``cmd``. """ cmd_name, cmd, args = super().resolve_command(ctx, args) if "arg0" in ctx.meta: args.insert(0, ctx.meta["arg0"]) if cmd is not None: cmd_name = cmd.name return cmd_name, cmd, args @deprecated def command( self, *args: Any, **kwargs: Any ) -> Callable[[Callable[..., object]], Command]: """Return a decorator which converts any function into the default subcommand for this :class:`DefaultGroup`. .. warning:: This method is deprecated. Use the ``default`` parameter of :class:`DefaultGroup` or :meth:`set_default_command` instead. Parameters ---------- *args Positional arguments to pass to :meth:`cloup.Group.command`. **kwargs Keyword arguments to pass to :meth:`cloup.Group.command`. Returns ------- Callable[[Callable[..., object]], click.Command] A decorator which transforms its input into this :class:`DefaultGroup`'s default subcommand. """ default = kwargs.pop("default", False) decorator: Callable[[Callable[..., object]], Command] = super().command( *args, **kwargs ) if not default: return decorator warnings.warn( "Use default param of DefaultGroup or set_default_command() instead", DeprecationWarning, stacklevel=1, ) def _decorator(f: Callable) -> Command: cmd = decorator(f) self.set_default_command(cmd) return cmd return _decorator ================================================ FILE: manim/cli/cfg/__init__.py ================================================ [Empty file] ================================================ FILE: manim/cli/cfg/group.py ================================================ """Manim's cfg subcommand. Manim's cfg subcommand is accessed in the command-line interface via ``manim cfg``. Here you can specify options, subcommands, and subgroups for the cfg group. """ from __future__ import annotations import contextlib from ast import literal_eval from pathlib import Path from typing import Any, cast import cloup from rich.errors import StyleSyntaxError from rich.style import Style from manim._config import cli_ctx_settings, console from manim._config.utils import config_file_paths, make_config_parser from manim.constants import EPILOG from manim.utils.file_ops import guarantee_existence, open_file RICH_COLOUR_INSTRUCTIONS: str = """ [red]The default colour is used by the input statement. If left empty, the default colour will be used.[/red] [magenta] For a full list of styles, visit[/magenta] [green]https://rich.readthedocs.io/en/latest/style.html[/green] """ RICH_NON_STYLE_ENTRIES: list[str] = ["log.width", "log.height", "log.timestamps"] __all__ = [ "value_from_string", "value_from_string", "is_valid_style", "replace_keys", "cfg", "write", "show", "export", ] def value_from_string(value: str) -> str | int | bool: """Extract the literal of proper datatype from a ``value`` string. Parameters ---------- value The value to check get the literal from. Returns ------- :class:`str` | :class:`int` | :class:`bool` The literal of appropriate datatype. """ with contextlib.suppress(SyntaxError, ValueError): value = literal_eval(value) return value def _is_expected_datatype( value: str, expected: str, validate_style: bool = False ) -> bool: """Check whether the literal from ``value`` is the same datatype as the literal from ``expected``. If ``validate_style`` is ``True``, also check if the style given by ``value`` is valid, according to ``rich``. Parameters ---------- value The string of the value to check, obtained from reading the user input. expected The string of the literal datatype which must be matched by ``value``. This is obtained from reading the ``cfg`` file. validate_style Whether or not to confirm if ``value`` is a valid style, according to ``rich``. Default is ``False``. Returns ------- :class:`bool` Whether or not the literal from ``value`` matches the datatype of the literal from ``expected``. """ value_literal = value_from_string(value) ExpectedLiteralType = type(value_from_string(expected)) return isinstance(value_literal, ExpectedLiteralType) and ( (isinstance(value_literal, str) and is_valid_style(value_literal)) if validate_style else True ) def is_valid_style(style: str) -> bool: """Checks whether the entered color style is valid, according to ``rich``. Parameters ---------- style The style to check whether it is valid. Returns ------- :class:`bool` Whether the color style is valid or not, according to ``rich``. """ try: Style.parse(style) return True except StyleSyntaxError: return False def replace_keys(default: dict[str, Any]) -> dict[str, Any]: """Replace ``_`` with ``.`` and vice versa in a dictionary's keys for ``rich``. Parameters ---------- default The dictionary whose keys will be checked and replaced. Returns ------- :class:`dict` The dictionary whose keys are modified by replacing ``_`` with ``.`` and vice versa. """ for key in default: if "_" in key: temp = default[key] del default[key] key = key.replace("_", ".") default[key] = temp else: temp = default[key] del default[key] key = key.replace(".", "_") default[key] = temp return default @cloup.group( context_settings=cli_ctx_settings, invoke_without_command=True, no_args_is_help=True, epilog=EPILOG, help="Manages Manim configuration files.", ) @cloup.pass_context def cfg(ctx: cloup.Context) -> None: """Responsible for the cfg subcommand.""" pass @cfg.command(context_settings=cli_ctx_settings, no_args_is_help=True) @cloup.option( "-l", "--level", type=cloup.Choice(["user", "cwd"], case_sensitive=False), default="cwd", help="Specify if this config is for user or the working directory.", ) @cloup.option("-o", "--open", "openfile", is_flag=True) def write(level: str | None = None, openfile: bool = False) -> None: config_paths = config_file_paths() console.print( "[yellow bold]Manim Configuration File Writer[/yellow bold]", justify="center", ) USER_CONFIG_MSG = f"""A configuration file at [yellow]{config_paths[1]}[/yellow] has been created with your required changes. This will be used when running the manim command. If you want to override this config, you will have to create a manim.cfg in the local directory, where you want those changes to be overridden.""" CWD_CONFIG_MSG = f"""A configuration file at [yellow]{config_paths[2]}[/yellow] has been created. To save your config please save that file and place it in your current working directory, from where you run the manim command.""" parser = make_config_parser() if not openfile: action = "save this as" for category in parser: console.print(f"{category}", style="bold green underline") default = cast(dict[str, Any], parser[category]) if category == "logger": console.print(RICH_COLOUR_INSTRUCTIONS) default = replace_keys(default) for key in default: # All the cfg entries for logger need to be validated as styles, # as long as they aren't setting the log width or height etc if category == "logger" and key not in RICH_NON_STYLE_ENTRIES: desc = "style" style = default[key] else: desc = "value" style = None console.print(f"Enter the {desc} for {key} ", style=style, end="") if category != "logger" or key in RICH_NON_STYLE_ENTRIES: defaultval = ( repr(default[key]) if isinstance(value_from_string(default[key]), str) else default[key] ) console.print(f"(defaults to {defaultval}) :", end="") try: temp = input() except EOFError: raise Exception( """Not enough values in input. You may have added a new entry to default.cfg, in which case you will have to modify write_cfg_subcmd_input to account for it.""", ) from None if temp: while temp and not _is_expected_datatype( temp, default[key], bool(style), ): console.print( f"[red bold]Invalid {desc}. Try again.[/red bold]", ) console.print( f"Enter the {desc} for {key}:", style=style, end="", ) temp = input() default[key] = temp.replace("%", "%%") default = replace_keys(default) if category == "logger" else default parser[category] = { i: v.replace("%", "%%") for i, v in dict(default).items() } else: action = "open" if level is None: console.print( f"Do you want to {action} the default config for this User?(y/n)[[n]]", style="dim purple", end="", ) action_to_userpath = input() else: action_to_userpath = "" if action_to_userpath.lower() == "y" or level == "user": cfg_file_path = config_paths[1] guarantee_existence(config_paths[1].parents[0]) console.print(USER_CONFIG_MSG) else: cfg_file_path = config_paths[2] guarantee_existence(config_paths[2].parents[0]) console.print(CWD_CONFIG_MSG) with cfg_file_path.open("w") as fp: parser.write(fp) if openfile: open_file(cfg_file_path) @cfg.command(context_settings=cli_ctx_settings) def show() -> None: console.print("CONFIG FILES READ", style="bold green underline") for path in config_file_paths(): if path.exists(): console.print(f"{path}") console.print() parser = make_config_parser() rich_non_style_entries = [a.replace(".", "_") for a in RICH_NON_STYLE_ENTRIES] for category in parser: console.print(f"{category}", style="bold green underline") for entry in parser[category]: if category == "logger" and entry not in rich_non_style_entries: console.print(f"{entry} :", end="") console.print( f" {parser[category][entry]}", style=parser[category][entry], ) else: console.print(f"{entry} : {parser[category][entry]}") console.print("\n") @cfg.command(context_settings=cli_ctx_settings) @cloup.option("-d", "--directory", default=Path.cwd()) @cloup.pass_context def export(ctx: cloup.Context, directory: str) -> None: directory_path = Path(directory) if directory_path.absolute == Path.cwd().absolute: console.print( """You are reading the config from the same directory you are exporting to. This means that the exported config will overwrite the config for this directory. Are you sure you want to continue? (y/n)""", style="red bold", end="", ) proceed = input().lower() == "y" else: proceed = True if proceed: if not directory_path.is_dir(): console.print(f"Creating folder: {directory}.", style="red bold") directory_path.mkdir(parents=True) ctx.invoke(write) from_path = Path.cwd() / "manim.cfg" to_path = directory_path / "manim.cfg" console.print(f"Exported final Config at {from_path} to {to_path}.") else: console.print("Aborted...", style="red bold") ================================================ FILE: manim/cli/checkhealth/__init__.py ================================================ [Empty file] ================================================ FILE: manim/cli/checkhealth/checks.py ================================================ """Auxiliary module for the checkhealth subcommand, contains the actual check implementations. """ from __future__ import annotations import os import shutil from collections.abc import Callable from typing import Protocol, cast __all__ = ["HEALTH_CHECKS"] class HealthCheckFunction(Protocol): description: str recommendation: str skip_on_failed: list[str] post_fail_fix_hook: Callable[..., object] | None __name__: str def __call__(self) -> bool: ... HEALTH_CHECKS: list[HealthCheckFunction] = [] def healthcheck( description: str, recommendation: str, skip_on_failed: list[HealthCheckFunction | str] | None = None, post_fail_fix_hook: Callable[..., object] | None = None, ) -> Callable[[Callable[[], bool]], HealthCheckFunction]: """Decorator used for declaring health checks. This decorator attaches some data to a function, which is then added to a a list containing all checks. Parameters ---------- description A brief description of this check, displayed when the ``checkhealth`` subcommand is run. recommendation Help text which is displayed in case the check fails. skip_on_failed A list of check functions which, if they fail, cause the current check to be skipped. post_fail_fix_hook A function that is meant to (interactively) help to fix the detected problem, if possible. This is only called upon explicit confirmation of the user. Returns ------- Callable[Callable[[], bool], :class:`HealthCheckFunction`] A decorator which converts a function into a health check function, as required by the ``checkhealth`` subcommand. """ new_skip_on_failed: list[str] if skip_on_failed is None: new_skip_on_failed = [] else: new_skip_on_failed = [ skip.__name__ if callable(skip) else skip for skip in skip_on_failed ] def wrapper(func: Callable[[], bool]) -> HealthCheckFunction: health_func = cast(HealthCheckFunction, func) health_func.description = description health_func.recommendation = recommendation health_func.skip_on_failed = new_skip_on_failed health_func.post_fail_fix_hook = post_fail_fix_hook HEALTH_CHECKS.append(health_func) return health_func return wrapper @healthcheck( description="Checking whether manim is on your PATH", recommendation=( "The command is currently not on your system's PATH.\n\n" "You can work around this by calling the manim module directly " "via instead of just .\n\n" "To fix the PATH issue properly: " "Usually, the Python package installer pip issues a warning " "during the installation which contains more information. " "Consider reinstalling manim via " "followed by to see the warning again, " "then consult the internet on how to modify your system's " "PATH variable." ), ) def is_manim_on_path() -> bool: """Check whether ``manim`` is in ``PATH``. Returns ------- :class:`bool` Whether ``manim`` is in ``PATH`` or not. """ path_to_manim = shutil.which("manim") return path_to_manim is not None @healthcheck( description="Checking whether the executable belongs to manim", recommendation=( "The command does not belong to your installed version " "of this library, it likely belongs to manimgl / manimlib.\n\n" "Run manim via or via , or uninstall " "and reinstall manim via to fix this." ), skip_on_failed=[is_manim_on_path], ) def is_manim_executable_associated_to_this_library() -> bool: """Check whether the ``manim`` executable in ``PATH`` is associated to this library. To verify this, the executable should look like this: .. code-block:: python #!/.../python import sys from manim.__main__ import main if __name__ == "__main__": sys.exit(main()) Returns ------- :class:`bool` Whether the ``manim`` executable in ``PATH`` is associated to this library or not. """ path_to_manim = shutil.which("manim") assert path_to_manim is not None with open(path_to_manim, "rb") as manim_binary: manim_exec = manim_binary.read() # first condition below corresponds to the executable being # some sort of python script. second condition happens when # the executable is actually a Windows batch file. return b"manim.__main__" in manim_exec or b'"%~dp0\\manim"' in manim_exec @healthcheck( description="Checking whether latex is available", recommendation=( "Manim cannot find on your system's PATH. " "You will not be able to use Tex and MathTex mobjects " "in your scenes.\n\n" "Consult our installation instructions " "at https://docs.manim.community/en/stable/installation.html " "or search the web for instructions on how to install a " "LaTeX distribution on your operating system." ), ) def is_latex_available() -> bool: """Check whether ``latex`` is in ``PATH`` and can be executed. Returns ------- :class:`bool` Whether ``latex`` is in ``PATH`` and can be executed or not. """ path_to_latex = shutil.which("latex") return path_to_latex is not None and os.access(path_to_latex, os.X_OK) @healthcheck( description="Checking whether dvisvgm is available", recommendation=( "Manim could find , but not on your system's " "PATH. Make sure your installed LaTeX distribution comes with " "dvisvgm and consider installing a larger distribution if it " "does not." ), skip_on_failed=[is_latex_available], ) def is_dvisvgm_available() -> bool: """Check whether ``dvisvgm`` is in ``PATH`` and can be executed. Returns ------- :class:`bool` Whether ``dvisvgm`` is in ``PATH`` and can be executed or not. """ path_to_dvisvgm = shutil.which("dvisvgm") return path_to_dvisvgm is not None and os.access(path_to_dvisvgm, os.X_OK) ================================================ FILE: manim/cli/checkhealth/commands.py ================================================ """A CLI utility helping to diagnose problems with your Manim installation. """ from __future__ import annotations import sys import timeit import click import cloup from manim.cli.checkhealth.checks import HEALTH_CHECKS, HealthCheckFunction __all__ = ["checkhealth"] @cloup.command( context_settings=None, ) def checkhealth() -> None: """This subcommand checks whether Manim is installed correctly and has access to its required (and optional) system dependencies. """ click.echo(f"Python executable: {sys.executable}\n") click.echo("Checking whether your installation of Manim Community is healthy...") failed_checks: list[HealthCheckFunction] = [] for check in HEALTH_CHECKS: click.echo(f"- {check.description} ... ", nl=False) if any( failed_check.__name__ in check.skip_on_failed for failed_check in failed_checks ): click.secho("SKIPPED", fg="blue") continue check_result = check() if check_result: click.secho("PASSED", fg="green") else: click.secho("FAILED", fg="red") failed_checks.append(check) click.echo() if failed_checks: click.echo( "There are problems with your installation, " "here are some recommendations to fix them:" ) for ind, failed_check in enumerate(failed_checks): click.echo(failed_check.recommendation) if ind + 1 < len(failed_checks): click.confirm("Continue with next recommendation?") else: # no problems detected! click.echo("No problems detected, your installation seems healthy!") render_test_scene = click.confirm( "Would you like to render and preview a test scene?" ) if render_test_scene: import manim as mn class CheckHealthDemo(mn.Scene): def _inner_construct(self) -> None: banner = mn.ManimBanner().shift(mn.UP * 0.5) self.play(banner.create()) self.wait(0.5) self.play(banner.expand()) self.wait(0.5) text_left = mn.Text("All systems operational!") formula_right = mn.MathTex(r"\oint_{\gamma} f(z)~dz = 0") text_tex_group = mn.VGroup(text_left, formula_right) text_tex_group.arrange(mn.RIGHT, buff=1).next_to(banner, mn.DOWN) self.play(mn.Write(text_tex_group)) self.wait(0.5) self.play( mn.FadeOut(banner, shift=mn.UP), mn.FadeOut(text_tex_group, shift=mn.DOWN), ) def construct(self) -> None: self.execution_time = timeit.timeit(self._inner_construct, number=1) with mn.tempconfig({"preview": True, "disable_caching": True}): scene = CheckHealthDemo() scene.render() click.echo(f"Scene rendered in {scene.execution_time:.2f} seconds.") ================================================ FILE: manim/cli/init/__init__.py ================================================ [Empty file] ================================================ FILE: manim/cli/init/commands.py ================================================ """Manim's init subcommand. Manim's init subcommand is accessed in the command-line interface via ``manim init``. Here you can specify options, subcommands, and subgroups for the init group. """ from __future__ import annotations import configparser from pathlib import Path from typing import Any import click import cloup from manim._config import console from manim.constants import CONTEXT_SETTINGS, EPILOG, QUALITIES from manim.utils.file_ops import ( add_import_statement, copy_template_files, get_template_names, get_template_path, ) CFG_DEFAULTS = { "frame_rate": 30, "background_color": "BLACK", "background_opacity": 1, "scene_names": "Default", "resolution": (854, 480), } __all__ = ["select_resolution", "update_cfg", "project", "scene"] def select_resolution() -> tuple[int, int]: """Prompts input of type click.Choice from user. Presents options from QUALITIES constant. Returns ------- tuple[int, int] Tuple containing height and width. """ resolution_options: list[tuple[int, int]] = [] for quality in QUALITIES.items(): resolution_options.append( (quality[1]["pixel_height"], quality[1]["pixel_width"]), ) resolution_options.pop() choice = click.prompt( "\nSelect resolution:\n", type=cloup.Choice([f"{i[0]}p" for i in resolution_options]), show_default=False, default="480p", ) matches = [res for res in resolution_options if f"{res[0]}p" == choice] return matches[0] def update_cfg(cfg_dict: dict[str, Any], project_cfg_path: Path) -> None: """Update the ``manim.cfg`` file after reading it from the specified ``project_cfg_path``. Parameters ---------- cfg_dict Values used to update ``manim.cfg`` which is found in ``project_cfg_path``. project_cfg_path Path of the ``manim.cfg`` file. """ config = configparser.ConfigParser() config.read(project_cfg_path) cli_config = config["CLI"] for key, value in cfg_dict.items(): if key == "resolution": cli_config["pixel_width"] = str(value[0]) cli_config["pixel_height"] = str(value[1]) else: cli_config[key] = str(value) with project_cfg_path.open("w") as conf: config.write(conf) @cloup.command( context_settings=CONTEXT_SETTINGS, epilog=EPILOG, ) @cloup.argument("project_name", type=cloup.Path(path_type=Path), required=False) @cloup.option( "-d", "--default", "default_settings", is_flag=True, help="Default settings for project creation.", nargs=1, ) def project(default_settings: bool, **kwargs: Any) -> None: """Creates a new project. PROJECT_NAME is the name of the folder in which the new project will be initialized. """ project_name: Path if kwargs["project_name"]: project_name = kwargs["project_name"] else: project_name = click.prompt("Project Name", type=Path) # in the future when implementing a full template system. Choices are going to be saved in some sort of config file for templates template_name = click.prompt( "Template", type=click.Choice(get_template_names(), False), default="Default", ) if project_name.is_dir(): console.print( f"\nFolder [red]{project_name}[/red] exists. Please type another name\n", ) else: project_name.mkdir() new_cfg: dict[str, Any] = {} new_cfg_path = Path.resolve(project_name / "manim.cfg") if not default_settings: for key, value in CFG_DEFAULTS.items(): if key == "scene_names": new_cfg[key] = template_name + "Template" elif key == "resolution": new_cfg[key] = select_resolution() else: new_cfg[key] = click.prompt(f"\n{key}", default=value) console.print("\n", new_cfg) if click.confirm("Do you want to continue?", default=True, abort=True): copy_template_files(project_name, template_name) update_cfg(new_cfg, new_cfg_path) else: copy_template_files(project_name, template_name) update_cfg(CFG_DEFAULTS, new_cfg_path) @cloup.command( context_settings=CONTEXT_SETTINGS, no_args_is_help=True, epilog=EPILOG, ) @cloup.argument("scene_name", type=str, required=True) @cloup.argument("file_name", type=str, required=False) def scene(**kwargs: Any) -> None: """Inserts a SCENE to an existing FILE or creates a new FILE. SCENE is the name of the scene that will be inserted. FILE is the name of file in which the SCENE will be inserted. """ template_name: str = click.prompt( "template", type=click.Choice(get_template_names(), False), default="Default", ) scene = (get_template_path() / f"{template_name}.mtp").resolve().read_text() scene = scene.replace(template_name + "Template", kwargs["scene_name"], 1) if kwargs["file_name"]: file_name = Path(kwargs["file_name"]) if file_name.suffix != ".py": file_name = file_name.with_suffix(file_name.suffix + ".py") if file_name.is_file(): # file exists so we are going to append new scene to that file with file_name.open("a") as f: f.write("\n\n\n" + scene) else: # file does not exist so we create a new file, append the scene and prepend the import statement file_name.write_text("\n\n\n" + scene) add_import_statement(file_name) else: # file name is not provided so we assume it is main.py # if main.py does not exist we do not continue with Path("main.py").open("a") as f: f.write("\n\n\n" + scene) @cloup.group( context_settings=CONTEXT_SETTINGS, invoke_without_command=True, no_args_is_help=True, epilog=EPILOG, help="Create a new project or insert a new scene.", ) @cloup.pass_context def init(ctx: cloup.Context) -> None: pass init.add_command(project) init.add_command(scene) ================================================ FILE: manim/cli/plugins/__init__.py ================================================ [Empty file] ================================================ FILE: manim/cli/plugins/commands.py ================================================ """Manim's plugin subcommand. Manim's plugin subcommand is accessed in the command-line interface via ``manim plugin``. Here you can specify options, subcommands, and subgroups for the plugin group. """ from __future__ import annotations import cloup from manim.constants import CONTEXT_SETTINGS, EPILOG from manim.plugins.plugins_flags import list_plugins __all__ = ["plugins"] @cloup.command( context_settings=CONTEXT_SETTINGS, no_args_is_help=True, epilog=EPILOG, help="Manages Manim plugins.", ) @cloup.option( "-l", "--list", "list_available", is_flag=True, help="List available plugins.", ) def plugins(list_available: bool) -> None: """Print a list of all available plugins when calling ``manim plugins -l`` or ``manim plugins --list``. Parameters ---------- list_available If the ``-l`` or ``-list`` option is passed to ``manim plugins``, this parameter will be set to ``True``, which will print a list of all available plugins. """ if list_available: list_plugins() ================================================ FILE: manim/cli/render/__init__.py ================================================ [Empty file] ================================================ FILE: manim/cli/render/commands.py ================================================ """Manim's default subcommand, render. Manim's render subcommand is accessed in the command-line interface via ``manim``, but can be more explicitly accessed with ``manim render``. Here you can specify options, and arguments for the render command. """ from __future__ import annotations import http.client import json import sys import urllib.error import urllib.request from argparse import Namespace from pathlib import Path from typing import Any, cast import cloup from manim import __version__ from manim._config import ( config, console, error_console, logger, tempconfig, ) from manim.cli.render.ease_of_access_options import ease_of_access_options from manim.cli.render.global_options import global_options from manim.cli.render.output_options import output_options from manim.cli.render.render_options import render_options from manim.constants import EPILOG, RendererType from manim.utils.module_ops import scene_classes_from_file __all__ = ["render"] class ClickArgs(Namespace): def __init__(self, args: dict[str, Any]) -> None: for name in args: setattr(self, name, args[name]) def _get_kwargs(self) -> list[tuple[str, Any]]: return list(self.__dict__.items()) def __eq__(self, other: object) -> bool: if not isinstance(other, ClickArgs): return NotImplemented return vars(self) == vars(other) def __contains__(self, key: str) -> bool: return key in self.__dict__ def __repr__(self) -> str: return str(self.__dict__) @cloup.command( context_settings=None, no_args_is_help=True, epilog=EPILOG, ) @cloup.argument("file", type=cloup.Path(path_type=Path), required=True) @cloup.argument("scene_names", required=False, nargs=-1) @global_options @output_options @render_options @ease_of_access_options def render(**kwargs: Any) -> ClickArgs | dict[str, Any]: """Render SCENE(S) from the input FILE. FILE is the file path of the script or a config file. SCENES is an optional list of scenes in the file. """ if kwargs["save_as_gif"]: logger.warning("--save_as_gif is deprecated, please use --format=gif instead!") kwargs["format"] = "gif" if kwargs["save_pngs"]: logger.warning("--save_pngs is deprecated, please use --format=png instead!") kwargs["format"] = "png" if kwargs["show_in_file_browser"]: logger.warning( "The short form of show_in_file_browser is deprecated and will be moved to support --format.", ) click_args = ClickArgs(kwargs) if kwargs["jupyter"]: return click_args config.digest_args(click_args) file = Path(config.input_file) if config.renderer == RendererType.OPENGL: from manim.renderer.opengl_renderer import OpenGLRenderer try: renderer = OpenGLRenderer() keep_running = True while keep_running: for SceneClass in scene_classes_from_file(file): with tempconfig({}): scene = SceneClass(renderer) rerun = scene.render() if rerun or config["write_all"]: renderer.num_plays = 0 continue else: keep_running = False break if config["write_all"]: keep_running = False except Exception: error_console.print_exception() sys.exit(1) else: for SceneClass in scene_classes_from_file(file): try: with tempconfig({}): scene = SceneClass() scene.render() except Exception: error_console.print_exception() sys.exit(1) if config.notify_outdated_version: manim_info_url = "https://pypi.org/pypi/manim/json" warn_prompt = "Cannot check if latest release of manim is installed" try: with urllib.request.urlopen( urllib.request.Request(manim_info_url), timeout=10, ) as response: response = cast(http.client.HTTPResponse, response) json_data = json.loads(response.read()) except urllib.error.HTTPError: logger.debug("HTTP Error: %s", warn_prompt) except urllib.error.URLError: logger.debug("URL Error: %s", warn_prompt) except json.JSONDecodeError: logger.debug( "Error while decoding JSON from %r: %s", manim_info_url, warn_prompt ) except Exception: logger.debug("Something went wrong: %s", warn_prompt) else: stable = json_data["info"]["version"] if stable != __version__: console.print( f"You are using manim version [red]v{__version__}[/red], but version [green]v{stable}[/green] is available.", ) console.print( "You should consider upgrading via [yellow]pip install -U manim[/yellow]", ) return kwargs ================================================ FILE: manim/cli/render/ease_of_access_options.py ================================================ from __future__ import annotations from cloup import Choice, option, option_group __all__ = ["ease_of_access_options"] ease_of_access_options = option_group( "Ease of access options", option( "--progress_bar", default=None, show_default=False, type=Choice( ["display", "leave", "none"], case_sensitive=False, ), help="Display progress bars and/or keep them displayed.", ), option( "-p", "--preview", is_flag=True, help="Preview the Scene's animation. OpenGL does a live preview in a " "popup window. Cairo opens the rendered video file in the system " "default media player.", default=None, ), option( "-f", "--show_in_file_browser", is_flag=True, help="Show the output file in the file browser.", default=None, ), option( "--jupyter", is_flag=True, help="Using jupyter notebook magic.", default=None, ), ) ================================================ FILE: manim/cli/render/global_options.py ================================================ from __future__ import annotations import logging import re import sys from typing import TYPE_CHECKING from cloup import Choice, option, option_group if TYPE_CHECKING: from click import Context, Option __all__ = ["global_options"] logger = logging.getLogger("manim") def validate_gui_location( ctx: Context, param: Option, value: str | None ) -> tuple[int, int] | None: """If the ``value`` string is given, extract from it the GUI location, which should be in any of these formats: 'x;y', 'x,y' or 'x-y'. Parameters ---------- ctx The Click context. param A Click option. value The optional string which will be parsed. Returns ------- tuple[int, int] | None If ``value`` is ``None``, the return value is ``None``. Otherwise, it's the ``(x, y)`` location for the GUI. Raises ------ ValueError If ``value`` has an invalid format. """ if value is None: return None try: x_offset, y_offset = map(int, re.split(r"[;,\-]", value)) except Exception: logger.error("GUI location option is invalid.") sys.exit() return (x_offset, y_offset) global_options = option_group( "Global options", option( "-c", "--config_file", help="Specify the configuration file to use for render settings.", default=None, ), option( "--custom_folders", is_flag=True, default=None, help="Use the folders defined in the [custom_folders] section of the " "config file to define the output folder structure.", ), option( "--disable_caching", is_flag=True, default=None, help="Disable the use of the cache (still generates cache files).", ), option( "--flush_cache", is_flag=True, help="Remove cached partial movie files.", default=None, ), option("--tex_template", help="Specify a custom TeX template file.", default=None), option( "-v", "--verbosity", type=Choice( ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"], case_sensitive=False, ), help="Verbosity of CLI output. Changes ffmpeg log level unless 5+.", default=None, ), option( "--notify_outdated_version/--silent", is_flag=True, default=None, help="Display warnings for outdated installation.", ), option( "--enable_gui", is_flag=True, help="Enable GUI interaction.", default=None, ), option( "--gui_location", default=None, callback=validate_gui_location, help="Starting location for the GUI.", ), option( "--fullscreen", is_flag=True, help="Expand the window to its maximum possible size.", default=None, ), option( "--enable_wireframe", is_flag=True, help="Enable wireframe debugging mode in opengl.", default=None, ), option( "--force_window", is_flag=True, help="Force window to open when using the opengl renderer, intended for debugging as it may impact performance", default=None, ), option( "--dry_run", is_flag=True, help="Renders animations without outputting image or video files and disables the window", default=None, ), option( "--no_latex_cleanup", is_flag=True, help="Prevents deletion of .aux, .dvi, and .log files produced by Tex and MathTex.", default=None, ), option( "--preview_command", help="The command used to preview the output file (for example vlc for video files)", default=None, ), ) ================================================ FILE: manim/cli/render/output_options.py ================================================ from __future__ import annotations from cloup import IntRange, Path, option, option_group __all__ = ["output_options"] output_options = option_group( "Output options", option( "-o", "--output_file", type=str, default=None, help="Specify the filename(s) of the rendered scene(s).", ), option( "-0", "--zero_pad", type=IntRange(0, 9), default=None, help="Zero padding for PNG file names.", ), option( "--write_to_movie", is_flag=True, default=None, help="Write the video rendered with opengl to a file.", ), option( "--media_dir", type=Path(), default=None, help="Path to store rendered videos and latex.", ), option( "--log_dir", type=Path(), help="Path to store render logs.", default=None, ), option( "--log_to_file", is_flag=True, default=None, help="Log terminal output to file.", ), ) ================================================ FILE: manim/cli/render/render_options.py ================================================ from __future__ import annotations import logging import re import sys from typing import TYPE_CHECKING from cloup import Choice, option, option_group from manim.constants import QUALITIES, RendererType if TYPE_CHECKING: from click import Context, Option __all__ = ["render_options"] logger = logging.getLogger("manim") def validate_scene_range( ctx: Context, param: Option, value: str | None ) -> tuple[int] | tuple[int, int] | None: """If the ``value`` string is given, extract from it the scene range, which should be in any of these formats: 'start', 'start;end', 'start,end' or 'start-end'. Otherwise, return ``None``. Parameters ---------- ctx The Click context. param A Click option. value The optional string which will be parsed. Returns ------- tuple[int] | tuple[int, int] | None If ``value`` is ``None``, the return value is ``None``. Otherwise, it's the scene range, given by a tuple which may contain a single value ``start`` or two values ``start`` and ``end``. Raises ------ ValueError If ``value`` has an invalid format. """ if value is None: return None try: start = int(value) return (start,) except Exception: pass try: start, end = map(int, re.split(r"[;,\-]", value)) except Exception: logger.error("Couldn't determine a range for -n option.") sys.exit() return start, end def validate_resolution( ctx: Context, param: Option, value: str | None ) -> tuple[int, int] | None: """If the ``value`` string is given, extract from it the resolution, which should be in any of these formats: 'W;H', 'W,H' or 'W-H'. Otherwise, return ``None``. Parameters ---------- ctx The Click context. param A Click option. value The optional string which will be parsed. Returns ------- tuple[int, int] | None If ``value`` is ``None``, the return value is ``None``. Otherwise, it's the resolution as a ``(W, H)`` tuple. Raises ------ ValueError If ``value`` has an invalid format. """ if value is None: return None try: width, height = map(int, re.split(r"[;,\-]", value)) except Exception: logger.error("Resolution option is invalid.") sys.exit() return width, height render_options = option_group( "Render Options", option( "-n", "--from_animation_number", callback=validate_scene_range, help="Start rendering from n_0 until n_1. If n_1 is left unspecified, " "renders all scenes after n_0.", default=None, ), option( "-a", "--write_all", is_flag=True, help="Render all scenes in the input file.", default=None, ), option( "--format", type=Choice(["png", "gif", "mp4", "webm", "mov"], case_sensitive=False), default=None, ), option( "-s", "--save_last_frame", default=None, is_flag=True, help="Render and save only the last frame of a scene as a PNG image.", ), option( "-q", "--quality", default=None, type=Choice( list(reversed([q["flag"] for q in QUALITIES.values() if q["flag"]])), case_sensitive=False, ), help="Render quality at the follow resolution framerates, respectively: " + ", ".join( reversed( [ f"{q['pixel_width']}x{q['pixel_height']} {q['frame_rate']}FPS" for q in QUALITIES.values() if q["flag"] ] ) ), ), option( "-r", "--resolution", callback=validate_resolution, default=None, help='Resolution in "W,H" for when 16:9 aspect ratio isn\'t possible.', ), option( "--fps", "--frame_rate", "frame_rate", type=float, default=None, help="Render at this frame rate.", ), option( "--renderer", type=Choice( [renderer_type.value for renderer_type in RendererType], case_sensitive=False, ), help="Select a renderer for your Scene.", default="cairo", ), option( "-g", "--save_pngs", is_flag=True, default=None, help="Save each frame as png (Deprecated).", ), option( "-i", "--save_as_gif", default=None, is_flag=True, help="Save as a gif (Deprecated).", ), option( "--save_sections", default=None, is_flag=True, help="Save section videos in addition to movie file.", ), option( "-t", "--transparent", is_flag=True, help="Render scenes with alpha channel.", ), option( "--use_projection_fill_shaders", is_flag=True, help="Use shaders for OpenGLVMobject fill which are compatible with transformation matrices.", default=None, ), option( "--use_projection_stroke_shaders", is_flag=True, help="Use shaders for OpenGLVMobject stroke which are compatible with transformation matrices.", default=None, ), ) ================================================ FILE: manim/mobject/__init__.py ================================================ [Empty file] ================================================ FILE: manim/mobject/frame.py ================================================ """Special rectangles.""" from __future__ import annotations __all__ = [ "ScreenRectangle", "FullScreenRectangle", ] from typing import Any from manim.mobject.geometry.polygram import Rectangle from .. import config class ScreenRectangle(Rectangle): def __init__( self, aspect_ratio: float = 16.0 / 9.0, height: float = 4, **kwargs: Any ) -> None: super().__init__(width=aspect_ratio * height, height=height, **kwargs) @property def aspect_ratio(self) -> float: """The aspect ratio. When set, the width is stretched to accommodate the new aspect ratio. """ return self.width / self.height @aspect_ratio.setter def aspect_ratio(self, value: float) -> None: self.stretch_to_fit_width(value * self.height) class FullScreenRectangle(ScreenRectangle): def __init__(self, **kwargs: Any) -> None: super().__init__(**kwargs) self.height = config["frame_height"] ================================================ FILE: manim/mobject/logo.py ================================================ """Utilities for Manim's logo and banner.""" from __future__ import annotations __all__ = ["ManimBanner"] from typing import Any import svgelements as se from manim.animation.updaters.update import UpdateFromAlphaFunc from manim.mobject.geometry.arc import Circle from manim.mobject.geometry.polygram import Square, Triangle from manim.mobject.mobject import Mobject from manim.typing import Vector3D from .. import constants as cst from ..animation.animation import override_animation from ..animation.composition import AnimationGroup, Succession from ..animation.creation import Create, SpiralIn from ..animation.fading import FadeIn from ..mobject.svg.svg_mobject import VMobjectFromSVGPath from ..mobject.types.vectorized_mobject import VGroup from ..utils.rate_functions import ease_in_out_cubic, smooth MANIM_SVG_PATHS: list[se.Path] = [ se.Path( # double stroke letter M "M4.64259-2.092154L2.739726-6.625156C2.660025-6.824408 2.650062-6.824408 " "2.381071-6.824408H.52802C.348692-6.824408 .199253-6.824408 .199253-6.645" "081C.199253-6.475716 .37858-6.475716 .428394-6.475716C.547945-6.475716 ." "816936-6.455791 1.036115-6.37609V-1.05604C1.036115-.846824 1.036115-.408" "468 .358655-.348692C.169365-.328767 .169365-.18929 .169365-.179328C.1693" "65 0 .328767 0 .508095 0H2.052304C2.231631 0 2.381071 0 2.381071-.179328" "C2.381071-.268991 2.30137-.33873 2.221669-.348692C1.454545-.408468 1.454" "545-.826899 1.454545-1.05604V-6.017435L1.464508-6.027397L3.895392-.20921" "5C3.975093-.029888 4.044832 0 4.104608 0C4.224159 0 4.254047-.079701 4.3" "03861-.199253L6.744707-6.027397L6.75467-6.017435V-1.05604C6.75467-.84682" "4 6.75467-.408468 6.07721-.348692C5.88792-.328767 5.88792-.18929 5.88792" "-.179328C5.88792 0 6.047323 0 6.22665 0H8.886675C9.066002 0 9.215442 0 9" ".215442-.179328C9.215442-.268991 9.135741-.33873 9.05604-.348692C8.28891" "7-.408468 8.288917-.826899 8.288917-1.05604V-5.768369C8.288917-5.977584 " "8.288917-6.41594 8.966376-6.475716C9.066002-6.485679 9.155666-6.535492 9" ".155666-6.645081C9.155666-6.824408 9.006227-6.824408 8.826899-6.824408H6" ".90411C6.645081-6.824408 6.625156-6.824408 6.535492-6.615193L4.64259-2.0" "92154ZM4.343711-1.912827C4.423412-1.743462 4.433375-1.733499 4.552927-1." "693649L4.11457-.637609H4.094645L1.823163-6.057285C1.77335-6.1868 1.69364" "9-6.356164 1.554172-6.475716H2.420922L4.343711-1.912827ZM1.334994-.34869" "2H1.165629C1.185554-.37858 1.205479-.408468 1.225405-.428394C1.235367-.4" "38356 1.235367-.448319 1.24533-.458281L1.334994-.348692ZM7.103362-6.4757" "16H8.159402C7.940224-6.22665 7.940224-5.967621 7.940224-5.788294V-1.0361" "15C7.940224-.856787 7.940224-.597758 8.169365-.348692H6.884184C7.103362-" ".597758 7.103362-.856787 7.103362-1.036115V-6.475716Z" ), se.Path( # letter a "M1.464508-4.024907C1.464508-4.234122 1.743462-4.393524 2.092154-4.393524" "C2.669988-4.393524 2.929016-4.124533 2.929016-3.516812V-2.789539C1.77335" "-2.440847 .249066-2.042341 .249066-.916563C.249066-.308842 .71731 .13947" "7 1.354919 .139477C1.92279 .139477 2.381071-.059776 2.929016-.557908C3.0" "38605-.049813 3.257783 .139477 3.745953 .139477C4.174346 .139477 4.48318" "8-.019925 4.861768-.428394L4.712329-.637609L4.612702-.537983C4.582814-.5" "08095 4.552927-.498132 4.503113-.498132C4.363636-.498132 4.293898-.58779" "6 4.293898-.747198V-3.347447C4.293898-4.184309 3.536737-4.712329 2.32129" "5-4.712329C1.195517-4.712329 .438356-4.204234 .438356-3.457036C.438356-3" ".048568 .67746-2.799502 1.085928-2.799502C1.484433-2.799502 1.763387-3.0" "38605 1.763387-3.377335C1.763387-3.676214 1.464508-3.88543 1.464508-4.02" "4907ZM2.919054-.996264C2.650062-.687422 2.450809-.56787 2.211706-.56787C" "1.912827-.56787 1.703611-.836862 1.703611-1.235367C1.703611-1.8132 2.122" "042-2.231631 2.919054-2.440847V-.996264Z" ), se.Path( # letter n "M2.948941-4.044832C3.297634-4.044832 3.466999-3.775841 3.466999-3.217933" "V-.806974C3.466999-.438356 3.337484-.278954 2.998755-.239103V0H5.339975V" "-.239103C4.951432-.268991 4.851806-.388543 4.851806-.806974V-3.307597C4." "851806-4.164384 4.323786-4.712329 3.506849-4.712329C2.909091-4.712329 2." "450809-4.433375 2.082192-3.845579V-4.592777H.179328V-4.353674C.617684-4." "283935 .707347-4.184309 .707347-3.765878V-.836862C.707347-.418431 .62764" "6-.328767 .179328-.239103V0H2.580324V-.239103C2.211706-.288917 2.092154-" ".438356 2.092154-.806974V-3.466999C2.092154-3.576588 2.530511-4.044832 2" ".948941-4.044832Z" ), se.Path( # letter i "M2.15193-4.592777H.239103V-4.353674C.67746-4.26401 .767123-4.174346 .767" "123-3.765878V-.836862C.767123-.428394 .697385-.348692 .239103-.239103V0H" "2.6401V-.239103C2.291407-.288917 2.15193-.428394 2.15193-.806974V-4.5927" "77ZM1.454545-6.884184C1.026152-6.884184 .67746-6.535492 .67746-6.117061C" ".67746-5.668742 1.006227-5.339975 1.444583-5.339975S2.221669-5.668742 2." "221669-6.107098C2.221669-6.535492 1.882939-6.884184 1.454545-6.884184Z" ), se.Path( # letter m "M2.929016-4.044832C3.317559-4.044832 3.466999-3.815691 3.466999-3.217933" "V-.806974C3.466999-.398506 3.35741-.268991 2.988792-.239103V0H5.32005V-." "239103C4.971357-.278954 4.851806-.428394 4.851806-.806974V-3.466999C4.85" "1806-3.576588 5.310087-4.044832 5.69863-4.044832C6.07721-4.044832 6.2266" "5-3.805729 6.22665-3.217933V-.806974C6.22665-.388543 6.117061-.268991 5." "738481-.239103V0H8.109589V-.239103C7.721046-.259029 7.611457-.37858 7.61" "1457-.806974V-3.307597C7.611457-4.164384 7.083437-4.712329 6.266501-4.71" "2329C5.69863-4.712329 5.32005-4.483188 4.801993-3.845579C4.503113-4.4732" "25 4.154421-4.712329 3.526775-4.712329S2.440847-4.443337 2.062267-3.8455" "79V-4.592777H.179328V-4.353674C.617684-4.293898 .707347-4.174346 .707347" "-3.765878V-.836862C.707347-.428394 .617684-.318804 .179328-.239103V0H2.5" "50436V-.239103C2.201743-.288917 2.092154-.428394 2.092154-.806974V-3.466" "999C2.092154-3.58655 2.530511-4.044832 2.929016-4.044832Z" ), ] class ManimBanner(VGroup): r"""Convenience class representing Manim's banner. Can be animated using custom methods. Parameters ---------- dark_theme If ``True`` (the default), the dark theme version of the logo (with light text font) will be rendered. Otherwise, if ``False``, the light theme version (with dark text font) is used. Examples -------- .. manim:: DarkThemeBanner class DarkThemeBanner(Scene): def construct(self): banner = ManimBanner() self.play(banner.create()) self.play(banner.expand()) self.wait() self.play(Unwrite(banner)) .. manim:: LightThemeBanner class LightThemeBanner(Scene): def construct(self): self.camera.background_color = "#ece6e2" banner = ManimBanner(dark_theme=False) self.play(banner.create()) self.play(banner.expand()) self.wait() self.play(Unwrite(banner)) """ def __init__(self, dark_theme: bool = True): super().__init__() logo_green = "#81b29a" logo_blue = "#454866" logo_red = "#e07a5f" m_height_over_anim_height = 0.75748 self.font_color = "#ece6e2" if dark_theme else "#343434" self.scale_factor = 1.0 self.M = VMobjectFromSVGPath(MANIM_SVG_PATHS[0]).flip(cst.RIGHT).center() self.M.set(stroke_width=0).scale( 7 * cst.DEFAULT_FONT_SIZE * cst.SCALE_FACTOR_PER_FONT_POINT ) self.M.set_fill(color=self.font_color, opacity=1).shift( 2.25 * cst.LEFT + 1.5 * cst.UP ) self.circle = Circle(color=logo_green, fill_opacity=1).shift(cst.LEFT) self.square = Square(color=logo_blue, fill_opacity=1).shift(cst.UP) self.triangle = Triangle(color=logo_red, fill_opacity=1).shift(cst.RIGHT) self.shapes = VGroup(self.triangle, self.square, self.circle) self.add(self.shapes, self.M) self.move_to(cst.ORIGIN) anim = VGroup() for ind, path in enumerate(MANIM_SVG_PATHS[1:]): tex = VMobjectFromSVGPath(path).flip(cst.RIGHT).center() tex.set(stroke_width=0).scale( cst.DEFAULT_FONT_SIZE * cst.SCALE_FACTOR_PER_FONT_POINT ) if ind > 0: tex.next_to(anim, buff=0.01) tex.align_to(self.M, cst.DOWN) anim.add(tex) anim.set_fill(color=self.font_color, opacity=1) anim.height = m_height_over_anim_height * self.M.height # Note: "anim" is only shown in the expanded state # and thus not yet added to the submobjects of self. self.anim = anim def scale(self, scale_factor: float, **kwargs: Any) -> ManimBanner: """Scale the banner by the specified scale factor. Parameters ---------- scale_factor The factor used for scaling the banner. Returns ------- :class:`~.ManimBanner` The scaled banner. """ self.scale_factor *= scale_factor # Note: self.anim is only added to self after expand() if self.anim not in self.submobjects: self.anim.scale(scale_factor, **kwargs) return super().scale(scale_factor, **kwargs) @override_animation(Create) def create(self, run_time: float = 2) -> AnimationGroup: """The creation animation for Manim's logo. Parameters ---------- run_time The run time of the animation. Returns ------- :class:`~.AnimationGroup` An animation to be used in a :meth:`.Scene.play` call. """ return AnimationGroup( SpiralIn(self.shapes, run_time=run_time), FadeIn(self.M, run_time=run_time / 2), lag_ratio=0.1, ) def expand(self, run_time: float = 1.5, direction: str = "center") -> Succession: """An animation that expands Manim's logo into its banner. The returned animation transforms the banner from its initial state (representing Manim's logo with just the icons) to its expanded state (showing the full name together with the icons). See the class documentation for how to use this. .. note:: Before calling this method, the text "anim" is not a submobject of the banner object. After the expansion, it is added as a submobject so subsequent animations to the banner object apply to the text "anim" as well. Parameters ---------- run_time The run time of the animation. direction The direction in which the logo is expanded. Returns ------- :class:`~.Succession` An animation to be used in a :meth:`.Scene.play` call. Examples -------- .. manim:: ExpandDirections class ExpandDirections(Scene): def construct(self): banners = [ManimBanner().scale(0.5).shift(UP*x) for x in [-2, 0, 2]] self.play( banners[0].expand(direction="right"), banners[1].expand(direction="center"), banners[2].expand(direction="left"), ) """ if direction not in ["left", "right", "center"]: raise ValueError("direction must be 'left', 'right' or 'center'.") m_shape_offset = 6.25 * self.scale_factor shape_sliding_overshoot = self.scale_factor * 0.8 m_anim_buff = 0.06 self.anim.next_to(self.M, buff=m_anim_buff).align_to(self.M, cst.DOWN) self.anim.set_opacity(0) self.shapes.save_state() m_clone = self.anim[-1].copy() self.add(m_clone) m_clone.move_to(self.shapes) self.M.save_state() left_group = VGroup(self.M, self.anim, m_clone) def shift(vector: Vector3D) -> None: self.shapes.restore() left_group.align_to(self.M.saved_state, cst.LEFT) if direction == "right": self.shapes.shift(vector) elif direction == "center": self.shapes.shift(vector / 2) left_group.shift(-vector / 2) elif direction == "left": left_group.shift(-vector) def slide_and_uncover(mob: Mobject, alpha: float) -> None: shift(alpha * (m_shape_offset + shape_sliding_overshoot) * cst.RIGHT) # Add letters when they are covered for letter in mob.anim: if mob.square.get_center()[0] > letter.get_center()[0]: letter.set_opacity(1) self.add_to_back(letter) # Finish animation if alpha == 1: self.remove(*[self.anim]) self.add_to_back(self.anim) mob.shapes.set_z_index(0) mob.shapes.save_state() mob.M.save_state() def slide_back(mob: Mobject, alpha: float) -> None: if alpha == 0: m_clone.set_opacity(1) m_clone.move_to(mob.anim[-1]) mob.anim.set_opacity(1) shift(alpha * shape_sliding_overshoot * cst.LEFT) if alpha == 1: mob.remove(m_clone) mob.add_to_back(mob.shapes) return Succession( UpdateFromAlphaFunc( self, slide_and_uncover, run_time=run_time * 2 / 3, rate_func=ease_in_out_cubic, ), UpdateFromAlphaFunc( self, slide_back, run_time=run_time * 1 / 3, rate_func=smooth, ), ) ================================================ FILE: manim/mobject/matrix.py ================================================ r"""Mobjects representing matrices. Examples -------- .. manim:: MatrixExamples :save_last_frame: class MatrixExamples(Scene): def construct(self): m0 = Matrix([["\\pi", 0], [-1, 1]]) m1 = IntegerMatrix([[1.5, 0.], [12, -1.3]], left_bracket="(", right_bracket=")") m2 = DecimalMatrix( [[3.456, 2.122], [33.2244, 12.33]], element_to_mobject_config={"num_decimal_places": 2}, left_bracket=r"\{", right_bracket=r"\}") m3 = MobjectMatrix( [[Circle().scale(0.3), Square().scale(0.3)], [MathTex("\\pi").scale(2), Star().scale(0.3)]], left_bracket="\\langle", right_bracket="\\rangle") g = Group(m0, m1, m2, m3).arrange_in_grid(buff=2) self.add(g) """ from __future__ import annotations __all__ = [ "Matrix", "DecimalMatrix", "IntegerMatrix", "MobjectMatrix", "matrix_to_tex_string", "matrix_to_mobject", "get_det_text", ] import itertools as it from collections.abc import Callable, Iterable, Sequence from typing import Any import numpy as np from typing_extensions import Self from manim.mobject.mobject import Mobject from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.text.numbers import DecimalNumber, Integer from manim.mobject.text.tex_mobject import MathTex, Tex from ..constants import * from ..mobject.types.vectorized_mobject import VGroup, VMobject # TO DO : The following two functions are not used in this file. # Not sure if we should keep it or not. def matrix_to_tex_string(matrix: np.ndarray) -> str: matrix = np.array(matrix).astype("str") if matrix.ndim == 1: matrix = matrix.reshape((matrix.size, 1)) n_rows, n_cols = matrix.shape prefix = "\\left[ \\begin{array}{%s}" % ("c" * n_cols) suffix = "\\end{array} \\right]" rows = [" & ".join(row) for row in matrix] return prefix + " \\\\ ".join(rows) + suffix def matrix_to_mobject(matrix: np.ndarray) -> MathTex: return MathTex(matrix_to_tex_string(matrix)) class Matrix(VMobject, metaclass=ConvertToOpenGL): r"""A mobject that displays a matrix on the screen. Parameters ---------- matrix A numpy 2d array or list of lists. v_buff Vertical distance between elements, by default 0.8. h_buff Horizontal distance between elements, by default 1.3. bracket_h_buff Distance of the brackets from the matrix, by default ``MED_SMALL_BUFF``. bracket_v_buff Height of the brackets, by default ``MED_SMALL_BUFF``. add_background_rectangles_to_entries ``True`` if should add backgraound rectangles to entries, by default ``False``. include_background_rectangle ``True`` if should include background rectangle, by default ``False``. element_to_mobject The mobject class used to construct the elements, by default :class:`~.MathTex`. element_to_mobject_config Additional arguments to be passed to the constructor in ``element_to_mobject``, by default ``{}``. element_alignment_corner The corner to which elements are aligned, by default ``DR``. left_bracket The left bracket type, by default ``"["``. right_bracket The right bracket type, by default ``"]"``. stretch_brackets ``True`` if should stretch the brackets to fit the height of matrix contents, by default ``True``. bracket_config Additional arguments to be passed to :class:`~.MathTex` when constructing the brackets. Examples -------- The first example shows a variety of uses of this module while the second example exlpains the use of the options `add_background_rectangles_to_entries` and `include_background_rectangle`. .. manim:: MatrixExamples :save_last_frame: class MatrixExamples(Scene): def construct(self): m0 = Matrix([[2, r"\pi"], [-1, 1]]) m1 = Matrix([[2, 0, 4], [-1, 1, 5]], v_buff=1.3, h_buff=0.8, bracket_h_buff=SMALL_BUFF, bracket_v_buff=SMALL_BUFF, left_bracket=r"\{", right_bracket=r"\}") m1.add(SurroundingRectangle(m1.get_columns()[1])) m2 = Matrix([[2, 1], [-1, 3]], element_alignment_corner=UL, left_bracket="(", right_bracket=")") m3 = Matrix([[2, 1], [-1, 3]], left_bracket=r"\langle", right_bracket=r"\rangle") m4 = Matrix([[2, 1], [-1, 3]], ).set_column_colors(RED, GREEN) m5 = Matrix([[2, 1], [-1, 3]], ).set_row_colors(RED, GREEN) g = Group( m0,m1,m2,m3,m4,m5 ).arrange_in_grid(buff=2) self.add(g) .. manim:: BackgroundRectanglesExample :save_last_frame: class BackgroundRectanglesExample(Scene): def construct(self): background= Rectangle().scale(3.2) background.set_fill(opacity=.5) background.set_color([TEAL, RED, YELLOW]) self.add(background) m0 = Matrix([[12, -30], [-1, 15]], add_background_rectangles_to_entries=True) m1 = Matrix([[2, 0], [-1, 1]], include_background_rectangle=True) m2 = Matrix([[12, -30], [-1, 15]]) g = Group(m0, m1, m2).arrange(buff=2) self.add(g) """ def __init__( self, matrix: Iterable, v_buff: float = 0.8, h_buff: float = 1.3, bracket_h_buff: float = MED_SMALL_BUFF, bracket_v_buff: float = MED_SMALL_BUFF, add_background_rectangles_to_entries: bool = False, include_background_rectangle: bool = False, element_to_mobject: type[Mobject] | Callable[..., Mobject] = MathTex, element_to_mobject_config: dict = {}, element_alignment_corner: Sequence[float] = DR, left_bracket: str = "[", right_bracket: str = "]", stretch_brackets: bool = True, bracket_config: dict = {}, **kwargs: Any, ): self.v_buff = v_buff self.h_buff = h_buff self.bracket_h_buff = bracket_h_buff self.bracket_v_buff = bracket_v_buff self.add_background_rectangles_to_entries = add_background_rectangles_to_entries self.include_background_rectangle = include_background_rectangle self.element_to_mobject = element_to_mobject self.element_to_mobject_config = element_to_mobject_config self.element_alignment_corner = element_alignment_corner self.left_bracket = left_bracket self.right_bracket = right_bracket self.stretch_brackets = stretch_brackets super().__init__(**kwargs) mob_matrix = self._matrix_to_mob_matrix(matrix) self._organize_mob_matrix(mob_matrix) self.elements = VGroup(*it.chain(*mob_matrix)) self.add(self.elements) self._add_brackets(self.left_bracket, self.right_bracket, **bracket_config) self.center() self.mob_matrix = mob_matrix if self.add_background_rectangles_to_entries: for mob in self.elements: mob.add_background_rectangle() if self.include_background_rectangle: self.add_background_rectangle() def _matrix_to_mob_matrix(self, matrix: np.ndarray) -> list[list[Mobject]]: return [ [ self.element_to_mobject(item, **self.element_to_mobject_config) for item in row ] for row in matrix ] def _organize_mob_matrix(self, matrix: list[list[Mobject]]) -> Self: for i, row in enumerate(matrix): for j, _ in enumerate(row): mob = matrix[i][j] mob.move_to( i * self.v_buff * DOWN + j * self.h_buff * RIGHT, self.element_alignment_corner, ) return self def _add_brackets(self, left: str = "[", right: str = "]", **kwargs: Any) -> Self: """Adds the brackets to the Matrix mobject. See Latex document for various bracket types. Parameters ---------- left the left bracket, by default "[" right the right bracket, by default "]" Returns ------- :class:`Matrix` The current matrix object (self). """ # Height per row of LaTeX array with default settings BRACKET_HEIGHT = 0.5977 n = int((self.height) / BRACKET_HEIGHT) + 1 empty_tex_array = "".join( [ r"\begin{array}{c}", *n * [r"\quad \\"], r"\end{array}", ] ) tex_left = "".join( [ r"\left" + left, empty_tex_array, r"\right.", ] ) tex_right = "".join( [ r"\left.", empty_tex_array, r"\right" + right, ] ) l_bracket = MathTex(tex_left, **kwargs) r_bracket = MathTex(tex_right, **kwargs) bracket_pair = VGroup(l_bracket, r_bracket) if self.stretch_brackets: bracket_pair.stretch_to_fit_height(self.height + 2 * self.bracket_v_buff) l_bracket.next_to(self, LEFT, self.bracket_h_buff) r_bracket.next_to(self, RIGHT, self.bracket_h_buff) self.brackets = bracket_pair self.add(l_bracket, r_bracket) return self def get_columns(self) -> VGroup: r"""Return columns of the matrix as VGroups. Returns -------- :class:`~.VGroup` The VGroup contains a nested VGroup for each column of the matrix. Examples -------- .. manim:: GetColumnsExample :save_last_frame: class GetColumnsExample(Scene): def construct(self): m0 = Matrix([[r"\pi", 3], [1, 5]]) m0.add(SurroundingRectangle(m0.get_columns()[1])) self.add(m0) """ return VGroup( *( VGroup(*(row[i] for row in self.mob_matrix)) for i in range(len(self.mob_matrix[0])) ) ) def set_column_colors(self, *colors: str) -> Self: r"""Set individual colors for each columns of the matrix. Parameters ---------- colors The list of colors; each color specified corresponds to a column. Returns ------- :class:`Matrix` The current matrix object (self). Examples -------- .. manim:: SetColumnColorsExample :save_last_frame: class SetColumnColorsExample(Scene): def construct(self): m0 = Matrix([["\\pi", 1], [-1, 3]], ).set_column_colors([RED,BLUE], GREEN) self.add(m0) """ columns = self.get_columns() for color, column in zip(colors, columns): column.set_color(color) return self def get_rows(self) -> VGroup: r"""Return rows of the matrix as VGroups. Returns -------- :class:`~.VGroup` The VGroup contains a nested VGroup for each row of the matrix. Examples -------- .. manim:: GetRowsExample :save_last_frame: class GetRowsExample(Scene): def construct(self): m0 = Matrix([["\\pi", 3], [1, 5]]) m0.add(SurroundingRectangle(m0.get_rows()[1])) self.add(m0) """ return VGroup(*(VGroup(*row) for row in self.mob_matrix)) def set_row_colors(self, *colors: str) -> Self: r"""Set individual colors for each row of the matrix. Parameters ---------- colors The list of colors; each color specified corresponds to a row. Returns ------- :class:`Matrix` The current matrix object (self). Examples -------- .. manim:: SetRowColorsExample :save_last_frame: class SetRowColorsExample(Scene): def construct(self): m0 = Matrix([["\\pi", 1], [-1, 3]], ).set_row_colors([RED,BLUE], GREEN) self.add(m0) """ rows = self.get_rows() for color, row in zip(colors, rows): row.set_color(color) return self def add_background_to_entries(self) -> Self: """Add a black background rectangle to the matrix, see above for an example. Returns ------- :class:`Matrix` The current matrix object (self). """ for mob in self.get_entries(): mob.add_background_rectangle() return self def get_mob_matrix(self) -> list[list[Mobject]]: """Return the underlying mob matrix mobjects. Returns -------- List[:class:`~.VGroup`] Each VGroup contains a row of the matrix. """ return self.mob_matrix def get_entries(self) -> VGroup: """Return the individual entries of the matrix. Returns -------- :class:`~.VGroup` VGroup containing entries of the matrix. Examples -------- .. manim:: GetEntriesExample :save_last_frame: class GetEntriesExample(Scene): def construct(self): m0 = Matrix([[2, 3], [1, 5]]) ent = m0.get_entries() colors = [BLUE, GREEN, YELLOW, RED] for k in range(len(colors)): ent[k].set_color(colors[k]) self.add(m0) """ return self.elements def get_brackets(self) -> VGroup: r"""Return the bracket mobjects. Returns -------- :class:`~.VGroup` A VGroup containing the left and right bracket. Examples -------- .. manim:: GetBracketsExample :save_last_frame: class GetBracketsExample(Scene): def construct(self): m0 = Matrix([["\\pi", 3], [1, 5]]) bra = m0.get_brackets() colors = [BLUE, GREEN] for k in range(len(colors)): bra[k].set_color(colors[k]) self.add(m0) """ return self.brackets class DecimalMatrix(Matrix): r"""A mobject that displays a matrix with decimal entries on the screen. Examples -------- .. manim:: DecimalMatrixExample :save_last_frame: class DecimalMatrixExample(Scene): def construct(self): m0 = DecimalMatrix( [[3.456, 2.122], [33.2244, 12]], element_to_mobject_config={"num_decimal_places": 2}, left_bracket="\\{", right_bracket="\\}") self.add(m0) """ def __init__( self, matrix: Iterable, element_to_mobject: type[Mobject] = DecimalNumber, element_to_mobject_config: dict[str, Any] = {"num_decimal_places": 1}, **kwargs: Any, ): """ Will round/truncate the decimal places as per the provided config. Parameters ---------- matrix A numpy 2d array or list of lists element_to_mobject Mobject to use, by default DecimalNumber element_to_mobject_config Config for the desired mobject, by default {"num_decimal_places": 1} """ super().__init__( matrix, element_to_mobject=element_to_mobject, element_to_mobject_config=element_to_mobject_config, **kwargs, ) class IntegerMatrix(Matrix): """A mobject that displays a matrix with integer entries on the screen. Examples -------- .. manim:: IntegerMatrixExample :save_last_frame: class IntegerMatrixExample(Scene): def construct(self): m0 = IntegerMatrix( [[3.7, 2], [42.2, 12]], left_bracket="(", right_bracket=")") self.add(m0) """ def __init__( self, matrix: Iterable, element_to_mobject: type[Mobject] = Integer, **kwargs: Any, ): """ Will round if there are decimal entries in the matrix. Parameters ---------- matrix A numpy 2d array or list of lists element_to_mobject Mobject to use, by default Integer """ super().__init__(matrix, element_to_mobject=element_to_mobject, **kwargs) class MobjectMatrix(Matrix): r"""A mobject that displays a matrix of mobject entries on the screen. Examples -------- .. manim:: MobjectMatrixExample :save_last_frame: class MobjectMatrixExample(Scene): def construct(self): a = Circle().scale(0.3) b = Square().scale(0.3) c = MathTex("\\pi").scale(2) d = Star().scale(0.3) m0 = MobjectMatrix([[a, b], [c, d]]) self.add(m0) """ def __init__( self, matrix: Iterable, element_to_mobject: type[Mobject] | Callable[..., Mobject] = lambda m: m, **kwargs: Any, ): super().__init__(matrix, element_to_mobject=element_to_mobject, **kwargs) def get_det_text( matrix: Matrix, determinant: int | str | None = None, background_rect: bool = False, initial_scale_factor: float = 2, ) -> VGroup: r"""Helper function to create determinant. Parameters ---------- matrix The matrix whose determinant is to be created determinant The value of the determinant of the matrix background_rect The background rectangle initial_scale_factor The scale of the text `det` w.r.t the matrix Returns -------- :class:`~.VGroup` A VGroup containing the determinant Examples -------- .. manim:: DeterminantOfAMatrix :save_last_frame: class DeterminantOfAMatrix(Scene): def construct(self): matrix = Matrix([ [2, 0], [-1, 1] ]) # scaling down the `det` string det = get_det_text(matrix, determinant=3, initial_scale_factor=1) # must add the matrix self.add(matrix) self.add(det) """ parens = MathTex("(", ")") parens.scale(initial_scale_factor) parens.stretch_to_fit_height(matrix.height) l_paren, r_paren = parens.split() l_paren.next_to(matrix, LEFT, buff=0.1) r_paren.next_to(matrix, RIGHT, buff=0.1) det = Tex("det") det.scale(initial_scale_factor) det.next_to(l_paren, LEFT, buff=0.1) if background_rect: det.add_background_rectangle() det_text = VGroup(det, l_paren, r_paren) if determinant is not None: eq = MathTex("=") eq.next_to(r_paren, RIGHT, buff=0.1) result = MathTex(str(determinant)) result.next_to(eq, RIGHT, buff=0.2) det_text.add(eq, result) return det_text ================================================ FILE: manim/mobject/table.py ================================================ r"""Mobjects representing tables. Examples -------- .. manim:: TableExamples :save_last_frame: class TableExamples(Scene): def construct(self): t0 = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")], top_left_entry=Text("TOP")) t0.add_highlighted_cell((2,2), color=GREEN) x_vals = np.linspace(-2,2,5) y_vals = np.exp(x_vals) t1 = DecimalTable( [x_vals, y_vals], row_labels=[MathTex("x"), MathTex("f(x)")], include_outer_lines=True) t1.add(t1.get_cell((2,2), color=RED)) t2 = MathTable( [["+", 0, 5, 10], [0, 0, 5, 10], [2, 2, 7, 12], [4, 4, 9, 14]], include_outer_lines=True) t2.get_horizontal_lines()[:3].set_color(BLUE) t2.get_vertical_lines()[:3].set_color(BLUE) t2.get_horizontal_lines()[:3].set_z_index(1) cross = VGroup( Line(UP + LEFT, DOWN + RIGHT), Line(UP + RIGHT, DOWN + LEFT)) a = Circle().set_color(RED).scale(0.5) b = cross.set_color(BLUE).scale(0.5) t3 = MobjectTable( [[a.copy(),b.copy(),a.copy()], [b.copy(),a.copy(),a.copy()], [a.copy(),b.copy(),b.copy()]]) t3.add(Line( t3.get_corner(DL), t3.get_corner(UR) ).set_color(RED)) vals = np.arange(1,21).reshape(5,4) t4 = IntegerTable( vals, include_outer_lines=True ) g1 = Group(t0, t1).scale(0.5).arrange(buff=1).to_edge(UP, buff=1) g2 = Group(t2, t3, t4).scale(0.5).arrange(buff=1).to_edge(DOWN, buff=1) self.add(g1, g2) """ from __future__ import annotations __all__ = [ "Table", "MathTable", "MobjectTable", "IntegerTable", "DecimalTable", ] import itertools as it from collections.abc import Callable, Iterable, Sequence from manim.mobject.geometry.line import Line from manim.mobject.geometry.polygram import Polygon from manim.mobject.geometry.shape_matchers import BackgroundRectangle from manim.mobject.text.numbers import DecimalNumber, Integer from manim.mobject.text.tex_mobject import MathTex from manim.mobject.text.text_mobject import Paragraph from ..animation.animation import Animation from ..animation.composition import AnimationGroup from ..animation.creation import Create, Write from ..animation.fading import FadeIn from ..mobject.types.vectorized_mobject import VGroup, VMobject from ..utils.color import BLACK, YELLOW, ManimColor, ParsableManimColor from .utils import get_vectorized_mobject_class class Table(VGroup): r"""A mobject that displays a table on the screen. Parameters ---------- table A 2D array or list of lists. Content of the table has to be a valid input for the callable set in ``element_to_mobject``. row_labels List of :class:`~.VMobject` representing the labels of each row. col_labels List of :class:`~.VMobject` representing the labels of each column. top_left_entry The top-left entry of the table, can only be specified if row and column labels are given. v_buff Vertical buffer passed to :meth:`~.Mobject.arrange_in_grid`, by default 0.8. h_buff Horizontal buffer passed to :meth:`~.Mobject.arrange_in_grid`, by default 1.3. include_outer_lines ``True`` if the table should include outer lines, by default False. add_background_rectangles_to_entries ``True`` if background rectangles should be added to entries, by default ``False``. entries_background_color Background color of entries if ``add_background_rectangles_to_entries`` is ``True``. include_background_rectangle ``True`` if the table should have a background rectangle, by default ``False``. background_rectangle_color Background color of table if ``include_background_rectangle`` is ``True``. element_to_mobject The :class:`~.Mobject` class applied to the table entries. by default :class:`~.Paragraph`. For common choices, see :mod:`~.text_mobject`/:mod:`~.tex_mobject`. element_to_mobject_config Custom configuration passed to :attr:`element_to_mobject`, by default {}. arrange_in_grid_config Dict passed to :meth:`~.Mobject.arrange_in_grid`, customizes the arrangement of the table. line_config Dict passed to :class:`~.Line`, customizes the lines of the table. kwargs Additional arguments to be passed to :class:`~.VGroup`. Examples -------- .. manim:: TableExamples :save_last_frame: class TableExamples(Scene): def construct(self): t0 = Table( [["This", "is a"], ["simple", "Table in \\n Manim."]]) t1 = Table( [["This", "is a"], ["simple", "Table."]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) t1.add_highlighted_cell((2,2), color=YELLOW) t2 = Table( [["This", "is a"], ["simple", "Table."]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")], top_left_entry=Star().scale(0.3), include_outer_lines=True, arrange_in_grid_config={"cell_alignment": RIGHT}) t2.add(t2.get_cell((2,2), color=RED)) t3 = Table( [["This", "is a"], ["simple", "Table."]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")], top_left_entry=Star().scale(0.3), include_outer_lines=True, line_config={"stroke_width": 1, "color": YELLOW}) t3.remove(*t3.get_vertical_lines()) g = Group( t0,t1,t2,t3 ).scale(0.7).arrange_in_grid(buff=1) self.add(g) .. manim:: BackgroundRectanglesExample :save_last_frame: class BackgroundRectanglesExample(Scene): def construct(self): background = Rectangle(height=6.5, width=13) background.set_fill(opacity=.5) background.set_color([TEAL, RED, YELLOW]) self.add(background) t0 = Table( [["This", "is a"], ["simple", "Table."]], add_background_rectangles_to_entries=True) t1 = Table( [["This", "is a"], ["simple", "Table."]], include_background_rectangle=True) g = Group(t0, t1).scale(0.7).arrange(buff=0.5) self.add(g) """ def __init__( self, table: Iterable[Iterable[float | str | VMobject]], row_labels: Iterable[VMobject] | None = None, col_labels: Iterable[VMobject] | None = None, top_left_entry: VMobject | None = None, v_buff: float = 0.8, h_buff: float = 1.3, include_outer_lines: bool = False, add_background_rectangles_to_entries: bool = False, entries_background_color: ParsableManimColor = BLACK, include_background_rectangle: bool = False, background_rectangle_color: ParsableManimColor = BLACK, element_to_mobject: Callable[ [float | str | VMobject], VMobject, ] = Paragraph, element_to_mobject_config: dict = {}, arrange_in_grid_config: dict = {}, line_config: dict = {}, **kwargs, ): self.row_labels = row_labels self.col_labels = col_labels self.top_left_entry = top_left_entry self.row_dim = len(table) self.col_dim = len(table[0]) self.v_buff = v_buff self.h_buff = h_buff self.include_outer_lines = include_outer_lines self.add_background_rectangles_to_entries = add_background_rectangles_to_entries self.entries_background_color = ManimColor(entries_background_color) self.include_background_rectangle = include_background_rectangle self.background_rectangle_color = ManimColor(background_rectangle_color) self.element_to_mobject = element_to_mobject self.element_to_mobject_config = element_to_mobject_config self.arrange_in_grid_config = arrange_in_grid_config self.line_config = line_config for row in table: if len(row) == len(table[0]): pass else: raise ValueError("Not all rows in table have the same length.") super().__init__(**kwargs) mob_table = self._table_to_mob_table(table) self.elements_without_labels = VGroup(*it.chain(*mob_table)) mob_table = self._add_labels(mob_table) self._organize_mob_table(mob_table) self.elements = VGroup(*it.chain(*mob_table)) if len(self.elements[0].get_all_points()) == 0: self.elements.remove(self.elements[0]) self.add(self.elements) self.center() self.mob_table = mob_table self._add_horizontal_lines() self._add_vertical_lines() if self.add_background_rectangles_to_entries: self.add_background_to_entries(color=self.entries_background_color) if self.include_background_rectangle: self.add_background_rectangle(color=self.background_rectangle_color) def _table_to_mob_table( self, table: Iterable[Iterable[float | str | VMobject]], ) -> list: """Initializes the entries of ``table`` as :class:`~.VMobject`. Parameters ---------- table A 2D array or list of lists. Content of the table has to be a valid input for the callable set in ``element_to_mobject``. Returns -------- List List of :class:`~.VMobject` from the entries of ``table``. """ return [ [ self.element_to_mobject(item, **self.element_to_mobject_config) for item in row ] for row in table ] def _organize_mob_table(self, table: Iterable[Iterable[VMobject]]) -> VGroup: """Arranges the :class:`~.VMobject` of ``table`` in a grid. Parameters ---------- table A 2D iterable object with :class:`~.VMobject` entries. Returns -------- :class:`~.VGroup` The :class:`~.VMobject` of the ``table`` in a :class:`~.VGroup` already arranged in a table-like grid. """ help_table = VGroup() for i, row in enumerate(table): for j, _ in enumerate(row): help_table.add(table[i][j]) help_table.arrange_in_grid( rows=len(table), cols=len(table[0]), buff=(self.h_buff, self.v_buff), **self.arrange_in_grid_config, ) return help_table def _add_labels(self, mob_table: VGroup) -> VGroup: """Adds labels to an in a grid arranged :class:`~.VGroup`. Parameters ---------- mob_table An in a grid organized class:`~.VGroup`. Returns -------- :class:`~.VGroup` Returns the ``mob_table`` with added labels. """ if self.row_labels is not None: for k in range(len(self.row_labels)): mob_table[k] = [self.row_labels[k]] + mob_table[k] if self.col_labels is not None: if self.row_labels is not None: if self.top_left_entry is not None: col_labels = [self.top_left_entry] + self.col_labels mob_table.insert(0, col_labels) else: # Placeholder to use arrange_in_grid if top_left_entry is not set. # Import OpenGLVMobject to work with --renderer=opengl dummy_mobject = get_vectorized_mobject_class()() col_labels = [dummy_mobject] + self.col_labels mob_table.insert(0, col_labels) else: mob_table.insert(0, self.col_labels) return mob_table def _add_horizontal_lines(self) -> Table: """Adds the horizontal lines to the table.""" anchor_left = self.get_left()[0] - 0.5 * self.h_buff anchor_right = self.get_right()[0] + 0.5 * self.h_buff line_group = VGroup() if self.include_outer_lines: anchor = self.get_rows()[0].get_top()[1] + 0.5 * self.v_buff line = Line( [anchor_left, anchor, 0], [anchor_right, anchor, 0], **self.line_config ) line_group.add(line) self.add(line) anchor = self.get_rows()[-1].get_bottom()[1] - 0.5 * self.v_buff line = Line( [anchor_left, anchor, 0], [anchor_right, anchor, 0], **self.line_config ) line_group.add(line) self.add(line) for k in range(len(self.mob_table) - 1): anchor = self.get_rows()[k + 1].get_top()[1] + 0.5 * ( self.get_rows()[k].get_bottom()[1] - self.get_rows()[k + 1].get_top()[1] ) line = Line( [anchor_left, anchor, 0], [anchor_right, anchor, 0], **self.line_config ) line_group.add(line) self.add(line) self.horizontal_lines = line_group return self def _add_vertical_lines(self) -> Table: """Adds the vertical lines to the table""" anchor_top = self.get_rows().get_top()[1] + 0.5 * self.v_buff anchor_bottom = self.get_rows().get_bottom()[1] - 0.5 * self.v_buff line_group = VGroup() if self.include_outer_lines: anchor = self.get_columns()[0].get_left()[0] - 0.5 * self.h_buff line = Line( [anchor, anchor_top, 0], [anchor, anchor_bottom, 0], **self.line_config ) line_group.add(line) self.add(line) anchor = self.get_columns()[-1].get_right()[0] + 0.5 * self.h_buff line = Line( [anchor, anchor_top, 0], [anchor, anchor_bottom, 0], **self.line_config ) line_group.add(line) self.add(line) for k in range(len(self.mob_table[0]) - 1): anchor = self.get_columns()[k + 1].get_left()[0] + 0.5 * ( self.get_columns()[k].get_right()[0] - self.get_columns()[k + 1].get_left()[0] ) line = Line( [anchor, anchor_bottom, 0], [anchor, anchor_top, 0], **self.line_config ) line_group.add(line) self.add(line) self.vertical_lines = line_group return self def get_horizontal_lines(self) -> VGroup: """Return the horizontal lines of the table. Returns -------- :class:`~.VGroup` :class:`~.VGroup` containing all the horizontal lines of the table. Examples -------- .. manim:: GetHorizontalLinesExample :save_last_frame: class GetHorizontalLinesExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) table.get_horizontal_lines().set_color(RED) self.add(table) """ return self.horizontal_lines def get_vertical_lines(self) -> VGroup: """Return the vertical lines of the table. Returns -------- :class:`~.VGroup` :class:`~.VGroup` containing all the vertical lines of the table. Examples -------- .. manim:: GetVerticalLinesExample :save_last_frame: class GetVerticalLinesExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) table.get_vertical_lines()[0].set_color(RED) self.add(table) """ return self.vertical_lines def get_columns(self) -> VGroup: """Return columns of the table as a :class:`~.VGroup` of :class:`~.VGroup`. Returns -------- :class:`~.VGroup` :class:`~.VGroup` containing each column in a :class:`~.VGroup`. Examples -------- .. manim:: GetColumnsExample :save_last_frame: class GetColumnsExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) table.add(SurroundingRectangle(table.get_columns()[1])) self.add(table) """ return VGroup( *( VGroup(*(row[i] for row in self.mob_table)) for i in range(len(self.mob_table[0])) ) ) def get_rows(self) -> VGroup: """Return the rows of the table as a :class:`~.VGroup` of :class:`~.VGroup`. Returns -------- :class:`~.VGroup` :class:`~.VGroup` containing each row in a :class:`~.VGroup`. Examples -------- .. manim:: GetRowsExample :save_last_frame: class GetRowsExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) table.add(SurroundingRectangle(table.get_rows()[1])) self.add(table) """ return VGroup(*(VGroup(*row) for row in self.mob_table)) def set_column_colors(self, *colors: Iterable[ParsableManimColor]) -> Table: """Set individual colors for each column of the table. Parameters ---------- colors An iterable of colors; each color corresponds to a column. Examples -------- .. manim:: SetColumnColorsExample :save_last_frame: class SetColumnColorsExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")] ).set_column_colors([RED,BLUE], GREEN) self.add(table) """ columns = self.get_columns() for color, column in zip(colors, columns): column.set_color(color) return self def set_row_colors(self, *colors: Iterable[ParsableManimColor]) -> Table: """Set individual colors for each row of the table. Parameters ---------- colors An iterable of colors; each color corresponds to a row. Examples -------- .. manim:: SetRowColorsExample :save_last_frame: class SetRowColorsExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")] ).set_row_colors([RED,BLUE], GREEN) self.add(table) """ rows = self.get_rows() for color, row in zip(colors, rows): row.set_color(color) return self def get_entries( self, pos: Sequence[int] | None = None, ) -> VMobject | VGroup: """Return the individual entries of the table (including labels) or one specific entry if the parameter, ``pos``, is set. Parameters ---------- pos The position of a specific entry on the table. ``(1,1)`` being the top left entry of the table. Returns ------- Union[:class:`~.VMobject`, :class:`~.VGroup`] :class:`~.VGroup` containing all entries of the table (including labels) or the :class:`~.VMobject` at the given position if ``pos`` is set. Examples -------- .. manim:: GetEntriesExample :save_last_frame: class GetEntriesExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) ent = table.get_entries() for item in ent: item.set_color(random_bright_color()) table.get_entries((2,2)).rotate(PI) self.add(table) """ if pos is not None: if ( self.row_labels is not None and self.col_labels is not None and self.top_left_entry is None ): index = len(self.mob_table[0]) * (pos[0] - 1) + pos[1] - 2 return self.elements[index] else: index = len(self.mob_table[0]) * (pos[0] - 1) + pos[1] - 1 return self.elements[index] else: return self.elements def get_entries_without_labels( self, pos: Sequence[int] | None = None, ) -> VMobject | VGroup: """Return the individual entries of the table (without labels) or one specific entry if the parameter, ``pos``, is set. Parameters ---------- pos The position of a specific entry on the table. ``(1,1)`` being the top left entry of the table (without labels). Returns ------- Union[:class:`~.VMobject`, :class:`~.VGroup`] :class:`~.VGroup` containing all entries of the table (without labels) or the :class:`~.VMobject` at the given position if ``pos`` is set. Examples -------- .. manim:: GetEntriesWithoutLabelsExample :save_last_frame: class GetEntriesWithoutLabelsExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) ent = table.get_entries_without_labels() colors = [BLUE, GREEN, YELLOW, RED] for k in range(len(colors)): ent[k].set_color(colors[k]) table.get_entries_without_labels((2,2)).rotate(PI) self.add(table) """ if pos is not None: index = self.col_dim * (pos[0] - 1) + pos[1] - 1 return self.elements_without_labels[index] else: return self.elements_without_labels def get_row_labels(self) -> VGroup: """Return the row labels of the table. Returns ------- :class:`~.VGroup` :class:`~.VGroup` containing the row labels of the table. Examples -------- .. manim:: GetRowLabelsExample :save_last_frame: class GetRowLabelsExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) lab = table.get_row_labels() for item in lab: item.set_color(random_bright_color()) self.add(table) """ return VGroup(*self.row_labels) def get_col_labels(self) -> VGroup: """Return the column labels of the table. Returns -------- :class:`~.VGroup` VGroup containing the column labels of the table. Examples -------- .. manim:: GetColLabelsExample :save_last_frame: class GetColLabelsExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) lab = table.get_col_labels() for item in lab: item.set_color(random_bright_color()) self.add(table) """ return VGroup(*self.col_labels) def get_labels(self) -> VGroup: """Returns the labels of the table. Returns -------- :class:`~.VGroup` :class:`~.VGroup` containing all the labels of the table. Examples -------- .. manim:: GetLabelsExample :save_last_frame: class GetLabelsExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) lab = table.get_labels() colors = [BLUE, GREEN, YELLOW, RED] for k in range(len(colors)): lab[k].set_color(colors[k]) self.add(table) """ label_group = VGroup() if self.top_left_entry is not None: label_group.add(self.top_left_entry) for label in (self.col_labels, self.row_labels): if label is not None: label_group.add(*label) return label_group def add_background_to_entries(self, color: ParsableManimColor = BLACK) -> Table: """Adds a black :class:`~.BackgroundRectangle` to each entry of the table.""" for mob in self.get_entries(): mob.add_background_rectangle(color=ManimColor(color)) return self def get_cell(self, pos: Sequence[int] = (1, 1), **kwargs) -> Polygon: """Returns one specific cell as a rectangular :class:`~.Polygon` without the entry. Parameters ---------- pos The position of a specific entry on the table. ``(1,1)`` being the top left entry of the table. kwargs Additional arguments to be passed to :class:`~.Polygon`. Returns ------- :class:`~.Polygon` Polygon mimicking one specific cell of the Table. Examples -------- .. manim:: GetCellExample :save_last_frame: class GetCellExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) cell = table.get_cell((2,2), color=RED) self.add(table, cell) """ row = self.get_rows()[pos[0] - 1] col = self.get_columns()[pos[1] - 1] edge_UL = [ col.get_left()[0] - self.h_buff / 2, row.get_top()[1] + self.v_buff / 2, 0, ] edge_UR = [ col.get_right()[0] + self.h_buff / 2, row.get_top()[1] + self.v_buff / 2, 0, ] edge_DL = [ col.get_left()[0] - self.h_buff / 2, row.get_bottom()[1] - self.v_buff / 2, 0, ] edge_DR = [ col.get_right()[0] + self.h_buff / 2, row.get_bottom()[1] - self.v_buff / 2, 0, ] rec = Polygon(edge_UL, edge_UR, edge_DR, edge_DL, **kwargs) return rec def get_highlighted_cell( self, pos: Sequence[int] = (1, 1), color: ParsableManimColor = YELLOW, **kwargs ) -> BackgroundRectangle: """Returns a :class:`~.BackgroundRectangle` of the cell at the given position. Parameters ---------- pos The position of a specific entry on the table. ``(1,1)`` being the top left entry of the table. color The color used to highlight the cell. kwargs Additional arguments to be passed to :class:`~.BackgroundRectangle`. Examples -------- .. manim:: GetHighlightedCellExample :save_last_frame: class GetHighlightedCellExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) highlight = table.get_highlighted_cell((2,2), color=GREEN) table.add_to_back(highlight) self.add(table) """ cell = self.get_cell(pos) bg_cell = BackgroundRectangle(cell, color=ManimColor(color), **kwargs) return bg_cell def add_highlighted_cell( self, pos: Sequence[int] = (1, 1), color: ParsableManimColor = YELLOW, **kwargs ) -> Table: """Highlights one cell at a specific position on the table by adding a :class:`~.BackgroundRectangle`. Parameters ---------- pos The position of a specific entry on the table. ``(1,1)`` being the top left entry of the table. color The color used to highlight the cell. kwargs Additional arguments to be passed to :class:`~.BackgroundRectangle`. Examples -------- .. manim:: AddHighlightedCellExample :save_last_frame: class AddHighlightedCellExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")]) table.add_highlighted_cell((2,2), color=GREEN) self.add(table) """ bg_cell = self.get_highlighted_cell(pos, color=ManimColor(color), **kwargs) self.add_to_back(bg_cell) entry = self.get_entries(pos) entry.background_rectangle = bg_cell return self def create( self, lag_ratio: float = 1, line_animation: Callable[[VMobject | VGroup], Animation] = Create, label_animation: Callable[[VMobject | VGroup], Animation] = Write, element_animation: Callable[[VMobject | VGroup], Animation] = Create, entry_animation: Callable[[VMobject | VGroup], Animation] = FadeIn, **kwargs, ) -> AnimationGroup: """Customized create-type function for tables. Parameters ---------- lag_ratio The lag ratio of the animation. line_animation The animation style of the table lines, see :mod:`~.creation` for examples. label_animation The animation style of the table labels, see :mod:`~.creation` for examples. element_animation The animation style of the table elements, see :mod:`~.creation` for examples. entry_animation The entry animation of the table background, see :mod:`~.creation` for examples. kwargs Further arguments passed to the creation animations. Returns ------- :class:`~.AnimationGroup` AnimationGroup containing creation of the lines and of the elements. Examples -------- .. manim:: CreateTableExample class CreateTableExample(Scene): def construct(self): table = Table( [["First", "Second"], ["Third","Fourth"]], row_labels=[Text("R1"), Text("R2")], col_labels=[Text("C1"), Text("C2")], include_outer_lines=True) self.play(table.create()) self.wait() """ animations: Sequence[Animation] = [ line_animation( VGroup(self.vertical_lines, self.horizontal_lines), **kwargs, ), element_animation(self.elements_without_labels.set_z_index(2), **kwargs), ] if self.get_labels(): animations += [ label_animation(self.get_labels(), **kwargs), ] if self.get_entries(): for entry in self.elements_without_labels: try: animations += [ entry_animation( entry.background_rectangle, **kwargs, ) ] except AttributeError: continue return AnimationGroup(*animations, lag_ratio=lag_ratio) def scale(self, scale_factor: float, **kwargs): # h_buff and v_buff must be adjusted so that Table.get_cell # can construct an accurate polygon for a cell. self.h_buff *= scale_factor self.v_buff *= scale_factor super().scale(scale_factor, **kwargs) return self class MathTable(Table): """A specialized :class:`~.Table` mobject for use with LaTeX. Examples -------- .. manim:: MathTableExample :save_last_frame: class MathTableExample(Scene): def construct(self): t0 = MathTable( [["+", 0, 5, 10], [0, 0, 5, 10], [2, 2, 7, 12], [4, 4, 9, 14]], include_outer_lines=True) self.add(t0) """ def __init__( self, table: Iterable[Iterable[float | str]], element_to_mobject: Callable[[float | str], VMobject] = MathTex, **kwargs, ): """ Special case of :class:`~.Table` with `element_to_mobject` set to :class:`~.MathTex`. Every entry in `table` is set in a Latex `align` environment. Parameters ---------- table A 2d array or list of lists. Content of the table have to be valid input for :class:`~.MathTex`. element_to_mobject The :class:`~.Mobject` class applied to the table entries. Set as :class:`~.MathTex`. kwargs Additional arguments to be passed to :class:`~.Table`. """ super().__init__( table, element_to_mobject=element_to_mobject, **kwargs, ) class MobjectTable(Table): """A specialized :class:`~.Table` mobject for use with :class:`~.Mobject`. Examples -------- .. manim:: MobjectTableExample :save_last_frame: class MobjectTableExample(Scene): def construct(self): cross = VGroup( Line(UP + LEFT, DOWN + RIGHT), Line(UP + RIGHT, DOWN + LEFT), ) a = Circle().set_color(RED).scale(0.5) b = cross.set_color(BLUE).scale(0.5) t0 = MobjectTable( [[a.copy(),b.copy(),a.copy()], [b.copy(),a.copy(),a.copy()], [a.copy(),b.copy(),b.copy()]] ) line = Line( t0.get_corner(DL), t0.get_corner(UR) ).set_color(RED) self.add(t0, line) """ def __init__( self, table: Iterable[Iterable[VMobject]], element_to_mobject: Callable[[VMobject], VMobject] = lambda m: m, **kwargs, ): """ Special case of :class:`~.Table` with ``element_to_mobject`` set to an identity function. Here, every item in ``table`` must already be of type :class:`~.Mobject`. Parameters ---------- table A 2D array or list of lists. Content of the table must be of type :class:`~.Mobject`. element_to_mobject The :class:`~.Mobject` class applied to the table entries. Set as ``lambda m : m`` to return itself. kwargs Additional arguments to be passed to :class:`~.Table`. """ super().__init__(table, element_to_mobject=element_to_mobject, **kwargs) class IntegerTable(Table): r"""A specialized :class:`~.Table` mobject for use with :class:`~.Integer`. Examples -------- .. manim:: IntegerTableExample :save_last_frame: class IntegerTableExample(Scene): def construct(self): t0 = IntegerTable( [[0,30,45,60,90], [90,60,45,30,0]], col_labels=[ MathTex(r"\frac{\sqrt{0}}{2}"), MathTex(r"\frac{\sqrt{1}}{2}"), MathTex(r"\frac{\sqrt{2}}{2}"), MathTex(r"\frac{\sqrt{3}}{2}"), MathTex(r"\frac{\sqrt{4}}{2}")], row_labels=[MathTex(r"\sin"), MathTex(r"\cos")], h_buff=1, element_to_mobject_config={"unit": r"^{\circ}"}) self.add(t0) """ def __init__( self, table: Iterable[Iterable[float | str]], element_to_mobject: Callable[[float | str], VMobject] = Integer, **kwargs, ): """ Special case of :class:`~.Table` with `element_to_mobject` set to :class:`~.Integer`. Will round if there are decimal entries in the table. Parameters ---------- table A 2d array or list of lists. Content of the table has to be valid input for :class:`~.Integer`. element_to_mobject The :class:`~.Mobject` class applied to the table entries. Set as :class:`~.Integer`. kwargs Additional arguments to be passed to :class:`~.Table`. """ super().__init__(table, element_to_mobject=element_to_mobject, **kwargs) class DecimalTable(Table): """A specialized :class:`~.Table` mobject for use with :class:`~.DecimalNumber` to display decimal entries. Examples -------- .. manim:: DecimalTableExample :save_last_frame: class DecimalTableExample(Scene): def construct(self): x_vals = [-2,-1,0,1,2] y_vals = np.exp(x_vals) t0 = DecimalTable( [x_vals, y_vals], row_labels=[MathTex("x"), MathTex("f(x)=e^{x}")], h_buff=1, element_to_mobject_config={"num_decimal_places": 2}) self.add(t0) """ def __init__( self, table: Iterable[Iterable[float | str]], element_to_mobject: Callable[[float | str], VMobject] = DecimalNumber, element_to_mobject_config: dict = {"num_decimal_places": 1}, **kwargs, ): """ Special case of :class:`~.Table` with ``element_to_mobject`` set to :class:`~.DecimalNumber`. By default, ``num_decimal_places`` is set to 1. Will round/truncate the decimal places based on the provided ``element_to_mobject_config``. Parameters ---------- table A 2D array, or a list of lists. Content of the table must be valid input for :class:`~.DecimalNumber`. element_to_mobject The :class:`~.Mobject` class applied to the table entries. Set as :class:`~.DecimalNumber`. element_to_mobject_config Element to mobject config, here set as {"num_decimal_places": 1}. kwargs Additional arguments to be passed to :class:`~.Table`. """ super().__init__( table, element_to_mobject=element_to_mobject, element_to_mobject_config=element_to_mobject_config, **kwargs, ) ================================================ FILE: manim/mobject/utils.py ================================================ """Utilities for working with mobjects.""" from __future__ import annotations __all__ = [ "get_mobject_class", "get_point_mobject_class", "get_vectorized_mobject_class", ] from .._config import config from ..constants import RendererType from .mobject import Mobject from .opengl.opengl_mobject import OpenGLMobject from .opengl.opengl_point_cloud_mobject import OpenGLPMobject from .opengl.opengl_vectorized_mobject import OpenGLVMobject from .types.point_cloud_mobject import PMobject from .types.vectorized_mobject import VMobject def get_mobject_class() -> type: """Gets the base mobject class, depending on the currently active renderer. .. NOTE:: This method is intended to be used in the code base of Manim itself or in plugins where code should work independent of the selected renderer. Examples -------- The function has to be explicitly imported. We test that the name of the returned class is one of the known mobject base classes:: >>> from manim.mobject.utils import get_mobject_class >>> get_mobject_class().__name__ in ['Mobject', 'OpenGLMobject'] True """ if config.renderer == RendererType.CAIRO: return Mobject if config.renderer == RendererType.OPENGL: return OpenGLMobject raise NotImplementedError( "Base mobjects are not implemented for the active renderer." ) def get_vectorized_mobject_class() -> type: """Gets the vectorized mobject class, depending on the currently active renderer. .. NOTE:: This method is intended to be used in the code base of Manim itself or in plugins where code should work independent of the selected renderer. Examples -------- The function has to be explicitly imported. We test that the name of the returned class is one of the known mobject base classes:: >>> from manim.mobject.utils import get_vectorized_mobject_class >>> get_vectorized_mobject_class().__name__ in ['VMobject', 'OpenGLVMobject'] True """ if config.renderer == RendererType.CAIRO: return VMobject if config.renderer == RendererType.OPENGL: return OpenGLVMobject raise NotImplementedError( "Vectorized mobjects are not implemented for the active renderer." ) def get_point_mobject_class() -> type: """Gets the point cloud mobject class, depending on the currently active renderer. .. NOTE:: This method is intended to be used in the code base of Manim itself or in plugins where code should work independent of the selected renderer. Examples -------- The function has to be explicitly imported. We test that the name of the returned class is one of the known mobject base classes:: >>> from manim.mobject.utils import get_point_mobject_class >>> get_point_mobject_class().__name__ in ['PMobject', 'OpenGLPMobject'] True """ if config.renderer == RendererType.CAIRO: return PMobject if config.renderer == RendererType.OPENGL: return OpenGLPMobject raise NotImplementedError( "Point cloud mobjects are not implemented for the active renderer." ) ================================================ FILE: manim/mobject/value_tracker.py ================================================ """Simple mobjects that can be used for storing (and updating) a value.""" from __future__ import annotations __all__ = ["ValueTracker", "ComplexValueTracker"] from typing import TYPE_CHECKING, Any import numpy as np from manim.mobject.mobject import Mobject from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.utils.paths import straight_path if TYPE_CHECKING: from typing_extensions import Self from manim.typing import PathFuncType class ValueTracker(Mobject, metaclass=ConvertToOpenGL): """A mobject that can be used for tracking (real-valued) parameters. Useful for animating parameter changes. Not meant to be displayed. Instead the position encodes some number, often one which another animation or continual_animation uses for its update function, and by treating it as a mobject it can still be animated and manipulated just like anything else. This value changes continuously when animated using the :attr:`animate` syntax. Examples -------- .. manim:: ValueTrackerExample class ValueTrackerExample(Scene): def construct(self): number_line = NumberLine() pointer = Vector(DOWN) label = MathTex("x").add_updater(lambda m: m.next_to(pointer, UP)) tracker = ValueTracker(0) pointer.add_updater( lambda m: m.next_to( number_line.n2p(tracker.get_value()), UP ) ) self.add(number_line, pointer,label) tracker += 1.5 self.wait(1) tracker -= 4 self.wait(0.5) self.play(tracker.animate.set_value(5)) self.wait(0.5) self.play(tracker.animate.set_value(3)) self.play(tracker.animate.increment_value(-2)) self.wait(0.5) .. note:: You can also link ValueTrackers to updaters. In this case, you have to make sure that the ValueTracker is added to the scene by ``add`` .. manim:: ValueTrackerExample class ValueTrackerExample(Scene): def construct(self): tracker = ValueTracker(0) label = Dot(radius=3).add_updater(lambda x : x.set_x(tracker.get_value())) self.add(label) self.add(tracker) tracker.add_updater(lambda mobject, dt: mobject.increment_value(dt)) self.wait(2) """ def __init__(self, value: float = 0, **kwargs: Any) -> None: super().__init__(**kwargs) self.set(points=np.zeros((1, 3))) self.set_value(value) def get_value(self) -> float: """Get the current value of this ValueTracker.""" value: float = self.points[0, 0] return value def set_value(self, value: float) -> Self: """Sets a new scalar value to the ValueTracker.""" self.points[0, 0] = value return self def increment_value(self, d_value: float) -> Self: """Increments (adds) a scalar value to the ValueTracker.""" self.set_value(self.get_value() + d_value) return self def __bool__(self) -> bool: """Return whether the value of this ValueTracker evaluates as true.""" return bool(self.get_value()) def __add__(self, d_value: float | Mobject) -> ValueTracker: """Return a new :class:`ValueTracker` whose value is the current tracker's value plus ``d_value``. """ if isinstance(d_value, Mobject): raise ValueError( "Cannot increment ValueTracker by a Mobject. Please provide a scalar value." ) return ValueTracker(self.get_value() + d_value) def __iadd__(self, d_value: float | Mobject) -> Self: """adds ``+=`` syntax to increment the value of the ValueTracker.""" if isinstance(d_value, Mobject): raise ValueError( "Cannot increment ValueTracker by a Mobject. Please provide a scalar value." ) self.increment_value(d_value) return self def __floordiv__(self, d_value: float) -> ValueTracker: """Return a new :class:`ValueTracker` whose value is the floor division of the current tracker's value by ``d_value``. """ return ValueTracker(self.get_value() // d_value) def __ifloordiv__(self, d_value: float) -> Self: """Set the value of this ValueTracker to the floor division of the current value by ``d_value``.""" self.set_value(self.get_value() // d_value) return self def __mod__(self, d_value: float) -> ValueTracker: """Return a new :class:`ValueTracker` whose value is the current tracker's value modulo ``d_value``. """ return ValueTracker(self.get_value() % d_value) def __imod__(self, d_value: float) -> Self: """Set the value of this ValueTracker to the current value modulo ``d_value``.""" self.set_value(self.get_value() % d_value) return self def __mul__(self, d_value: float) -> ValueTracker: """Return a new :class:`ValueTracker` whose value is the current tracker's value multiplied by ``d_value``. """ return ValueTracker(self.get_value() * d_value) def __imul__(self, d_value: float) -> Self: """Set the value of this ValueTracker to the product of the current value and ``d_value``.""" self.set_value(self.get_value() * d_value) return self def __pow__(self, d_value: float) -> ValueTracker: """Return a new :class:`ValueTracker` whose value is the current tracker's value raised to the power of ``d_value``. """ return ValueTracker(self.get_value() ** d_value) def __ipow__(self, d_value: float) -> Self: """Set the value of this ValueTracker to the current value raised to the power of ``d_value``.""" self.set_value(self.get_value() ** d_value) return self def __sub__(self, d_value: float | Mobject) -> ValueTracker: """Return a new :class:`ValueTracker` whose value is the current tracker's value minus ``d_value``. """ if isinstance(d_value, Mobject): raise ValueError( "Cannot decrement ValueTracker by a Mobject. Please provide a scalar value." ) return ValueTracker(self.get_value() - d_value) def __isub__(self, d_value: float | Mobject) -> Self: """Adds ``-=`` syntax to decrement the value of the ValueTracker.""" if isinstance(d_value, Mobject): raise ValueError( "Cannot decrement ValueTracker by a Mobject. Please provide a scalar value." ) self.increment_value(-d_value) return self def __truediv__(self, d_value: float) -> ValueTracker: """Return a new :class:`ValueTracker` whose value is the current tracker's value divided by ``d_value``. """ return ValueTracker(self.get_value() / d_value) def __itruediv__(self, d_value: float) -> Self: """Sets the value of this ValueTracker to the current value divided by ``d_value``.""" self.set_value(self.get_value() / d_value) return self def interpolate( self, mobject1: Mobject, mobject2: Mobject, alpha: float, path_func: PathFuncType = straight_path(), ) -> Self: """Turns ``self`` into an interpolation between ``mobject1`` and ``mobject2``.""" self.set(points=path_func(mobject1.points, mobject2.points, alpha)) return self class ComplexValueTracker(ValueTracker): """Tracks a complex-valued parameter. The value is internally stored as a points array [a, b, 0]. This can be accessed directly to represent the value geometrically, see the usage example. When the value is set through :attr:`animate`, the value will take a straight path from the source point to the destination point. Examples -------- .. manim:: ComplexValueTrackerExample class ComplexValueTrackerExample(Scene): def construct(self): tracker = ComplexValueTracker(-2+1j) dot = Dot().add_updater( lambda x: x.move_to(tracker.points) ) self.add(NumberPlane(), dot) self.play(tracker.animate.set_value(3+2j)) self.play(tracker.animate.set_value(tracker.get_value() * 1j)) self.play(tracker.animate.set_value(tracker.get_value() - 2j)) self.play(tracker.animate.set_value(tracker.get_value() / (-2 + 3j))) """ def get_value(self) -> complex: # type: ignore [override] """Get the current value of this ComplexValueTracker as a complex number.""" return complex(*self.points[0, :2]) def set_value(self, value: complex | float) -> Self: """Sets a new complex value to the ComplexValueTracker.""" z = complex(value) self.points[0, :2] = (z.real, z.imag) return self ================================================ FILE: manim/mobject/vector_field.py ================================================ """Mobjects representing vector fields.""" from __future__ import annotations __all__ = [ "VectorField", "ArrowVectorField", "StreamLines", ] import itertools as it import random from collections.abc import Callable, Iterable, Sequence from math import ceil, floor from typing import TYPE_CHECKING import numpy as np from PIL import Image from manim.animation.updaters.update import UpdateFromAlphaFunc from manim.mobject.geometry.line import Vector from manim.mobject.graphing.coordinate_systems import CoordinateSystem from .. import config from ..animation.composition import AnimationGroup, Succession from ..animation.creation import Create from ..animation.indication import ShowPassingFlash from ..constants import OUT, RIGHT, UP, RendererType from ..mobject.mobject import Mobject from ..mobject.types.vectorized_mobject import VGroup from ..mobject.utils import get_vectorized_mobject_class from ..utils.bezier import interpolate, inverse_interpolate from ..utils.color import ( BLUE_E, GREEN, RED, YELLOW, ManimColor, ParsableManimColor, color_to_rgb, rgb_to_color, ) from ..utils.rate_functions import ease_out_sine, linear from ..utils.simple_functions import sigmoid if TYPE_CHECKING: from manim.typing import ( FloatRGB, FloatRGB_Array, FloatRGBA_Array, Point3D, Vector3D, ) DEFAULT_SCALAR_FIELD_COLORS: list = [BLUE_E, GREEN, YELLOW, RED] class VectorField(VGroup): """A vector field. Vector fields are based on a function defining a vector at every position. This class does by default not include any visible elements but provides methods to move other :class:`~.Mobject` s along the vector field. Parameters ---------- func The function defining the rate of change at every position of the `VectorField`. color The color of the vector field. If set, position-specific coloring is disabled. color_scheme A function mapping a vector to a single value. This value gives the position in the color gradient defined using `min_color_scheme_value`, `max_color_scheme_value` and `colors`. min_color_scheme_value The value of the color_scheme function to be mapped to the first color in `colors`. Lower values also result in the first color of the gradient. max_color_scheme_value The value of the color_scheme function to be mapped to the last color in `colors`. Higher values also result in the last color of the gradient. colors The colors defining the color gradient of the vector field. kwargs Additional arguments to be passed to the :class:`~.VGroup` constructor """ def __init__( self, func: Callable[[Point3D], Vector3D], color: ParsableManimColor | None = None, color_scheme: Callable[[Vector3D], float] | None = None, min_color_scheme_value: float = 0, max_color_scheme_value: float = 2, colors: Sequence[ParsableManimColor] = DEFAULT_SCALAR_FIELD_COLORS, **kwargs, ): super().__init__(**kwargs) self.func = func if color is None: self.single_color = False if color_scheme is None: def color_scheme(vec: Vector3D) -> float: return np.linalg.norm(vec) self.color_scheme = color_scheme # TODO maybe other default for direction? self.rgbs: FloatRGB_Array = np.array(list(map(color_to_rgb, colors))) def pos_to_rgb(pos: Point3D) -> FloatRGB: vec = self.func(pos) color_value = np.clip( self.color_scheme(vec), min_color_scheme_value, max_color_scheme_value, ) alpha = inverse_interpolate( min_color_scheme_value, max_color_scheme_value, color_value, ) alpha *= len(self.rgbs) - 1 c1: FloatRGB = self.rgbs[int(alpha)] c2: FloatRGB = self.rgbs[min(int(alpha + 1), len(self.rgbs) - 1)] alpha %= 1 return interpolate(c1, c2, alpha) self.pos_to_rgb = pos_to_rgb self.pos_to_color = lambda pos: rgb_to_color(self.pos_to_rgb(pos)) else: self.single_color = True self.color = ManimColor.parse(color) self.submob_movement_updater = None @staticmethod def shift_func( func: Callable[[np.ndarray], np.ndarray], shift_vector: np.ndarray, ) -> Callable[[np.ndarray], np.ndarray]: """Shift a vector field function. Parameters ---------- func The function defining a vector field. shift_vector The shift to be applied to the vector field. Returns ------- `Callable[[np.ndarray], np.ndarray]` The shifted vector field function. """ return lambda p: func(p - shift_vector) @staticmethod def scale_func( func: Callable[[np.ndarray], np.ndarray], scalar: float, ) -> Callable[[np.ndarray], np.ndarray]: """Scale a vector field function. Parameters ---------- func The function defining a vector field. scalar The scalar to be applied to the vector field. Examples -------- .. manim:: ScaleVectorFieldFunction class ScaleVectorFieldFunction(Scene): def construct(self): func = lambda pos: np.sin(pos[1]) * RIGHT + np.cos(pos[0]) * UP vector_field = ArrowVectorField(func) self.add(vector_field) self.wait() func = VectorField.scale_func(func, 0.5) self.play(vector_field.animate.become(ArrowVectorField(func))) self.wait() Returns ------- `Callable[[np.ndarray], np.ndarray]` The scaled vector field function. """ return lambda p: func(p * scalar) def fit_to_coordinate_system(self, coordinate_system: CoordinateSystem): """Scale the vector field to fit a coordinate system. This method is useful when the vector field is defined in a coordinate system different from the one used to display the vector field. This method can only be used once because it transforms the origin of each vector. Parameters ---------- coordinate_system The coordinate system to fit the vector field to. """ self.apply_function(lambda pos: coordinate_system.coords_to_point(*pos)) def nudge( self, mob: Mobject, dt: float = 1, substeps: int = 1, pointwise: bool = False, ) -> VectorField: """Nudge a :class:`~.Mobject` along the vector field. Parameters ---------- mob The mobject to move along the vector field dt A scalar to the amount the mobject is moved along the vector field. The actual distance is based on the magnitude of the vector field. substeps The amount of steps the whole nudge is divided into. Higher values give more accurate approximations. pointwise Whether to move the mobject along the vector field. If `False` the vector field takes effect on the center of the given :class:`~.Mobject`. If `True` the vector field takes effect on the points of the individual points of the :class:`~.Mobject`, potentially distorting it. Returns ------- VectorField This vector field. Examples -------- .. manim:: Nudging class Nudging(Scene): def construct(self): func = lambda pos: np.sin(pos[1] / 2) * RIGHT + np.cos(pos[0] / 2) * UP vector_field = ArrowVectorField( func, x_range=[-7, 7, 1], y_range=[-4, 4, 1], length_func=lambda x: x / 2 ) self.add(vector_field) circle = Circle(radius=2).shift(LEFT) self.add(circle.copy().set_color(GRAY)) dot = Dot().move_to(circle) vector_field.nudge(circle, -2, 60, True) vector_field.nudge(dot, -2, 60) circle.add_updater(vector_field.get_nudge_updater(pointwise=True)) dot.add_updater(vector_field.get_nudge_updater()) self.add(circle, dot) self.wait(6) """ def runge_kutta(self, p: Sequence[float], step_size: float) -> float: """Returns the change in position of a point along a vector field. Parameters ---------- p The position of each point being moved along the vector field. step_size A scalar that is used to determine how much a point is shifted in a single step. Returns ------- float How much the point is shifted. """ k_1 = self.func(p) k_2 = self.func(p + step_size * (k_1 * 0.5)) k_3 = self.func(p + step_size * (k_2 * 0.5)) k_4 = self.func(p + step_size * k_3) return step_size / 6.0 * (k_1 + 2.0 * k_2 + 2.0 * k_3 + k_4) step_size = dt / substeps for _ in range(substeps): if pointwise: mob.apply_function(lambda p: p + runge_kutta(self, p, step_size)) else: mob.shift(runge_kutta(self, mob.get_center(), step_size)) return self def nudge_submobjects( self, dt: float = 1, substeps: int = 1, pointwise: bool = False, ) -> VectorField: """Apply a nudge along the vector field to all submobjects. Parameters ---------- dt A scalar to the amount the mobject is moved along the vector field. The actual distance is based on the magnitude of the vector field. substeps The amount of steps the whole nudge is divided into. Higher values give more accurate approximations. pointwise Whether to move the mobject along the vector field. See :meth:`nudge` for details. Returns ------- VectorField This vector field. """ for mob in self.submobjects: self.nudge(mob, dt, substeps, pointwise) return self def get_nudge_updater( self, speed: float = 1, pointwise: bool = False, ) -> Callable[[Mobject, float], Mobject]: """Get an update function to move a :class:`~.Mobject` along the vector field. When used with :meth:`~.Mobject.add_updater`, the mobject will move along the vector field, where its speed is determined by the magnitude of the vector field. Parameters ---------- speed At `speed=1` the distance a mobject moves per second is equal to the magnitude of the vector field along its path. The speed value scales the speed of such a mobject. pointwise Whether to move the mobject along the vector field. See :meth:`nudge` for details. Returns ------- Callable[[Mobject, float], Mobject] The update function. """ return lambda mob, dt: self.nudge(mob, dt * speed, pointwise=pointwise) def start_submobject_movement( self, speed: float = 1, pointwise: bool = False, ) -> VectorField: """Start continuously moving all submobjects along the vector field. Calling this method multiple times will result in removing the previous updater created by this method. Parameters ---------- speed The speed at which to move the submobjects. See :meth:`get_nudge_updater` for details. pointwise Whether to move the mobject along the vector field. See :meth:`nudge` for details. Returns ------- VectorField This vector field. """ self.stop_submobject_movement() self.submob_movement_updater = lambda mob, dt: mob.nudge_submobjects( dt * speed, pointwise=pointwise, ) self.add_updater(self.submob_movement_updater) return self def stop_submobject_movement(self) -> VectorField: """Stops the continuous movement started using :meth:`start_submobject_movement`. Returns ------- VectorField This vector field. """ self.remove_updater(self.submob_movement_updater) self.submob_movement_updater = None return self def get_colored_background_image(self, sampling_rate: int = 5) -> Image.Image: """Generate an image that displays the vector field. The color at each position is calculated by passing the positing through a series of steps: Calculate the vector field function at that position, map that vector to a single value using `self.color_scheme` and finally generate a color from that value using the color gradient. Parameters ---------- sampling_rate The stepsize at which pixels get included in the image. Lower values give more accurate results, but may take a long time to compute. Returns ------- Image.Imgae The vector field image. """ if self.single_color: raise ValueError( "There is no point in generating an image if the vector field uses a single color.", ) ph = int(config["pixel_height"] / sampling_rate) pw = int(config["pixel_width"] / sampling_rate) fw = config["frame_width"] fh = config["frame_height"] points_array = np.zeros((ph, pw, 3)) x_array = np.linspace(-fw / 2, fw / 2, pw) y_array = np.linspace(fh / 2, -fh / 2, ph) x_array = x_array.reshape((1, len(x_array))) y_array = y_array.reshape((len(y_array), 1)) x_array = x_array.repeat(ph, axis=0) y_array.repeat(pw, axis=1) # TODO why not y_array = y_array.repeat(...)? points_array[:, :, 0] = x_array points_array[:, :, 1] = y_array rgbs = np.apply_along_axis(self.pos_to_rgb, 2, points_array) return Image.fromarray((rgbs * 255).astype("uint8")) def get_vectorized_rgba_gradient_function( self, start: float, end: float, colors: Iterable[ParsableManimColor], ) -> Callable[[Sequence[float], float], FloatRGBA_Array]: """ Generates a gradient of rgbas as a numpy array Parameters ---------- start start value used for inverse interpolation at :func:`~.inverse_interpolate` end end value used for inverse interpolation at :func:`~.inverse_interpolate` colors list of colors to generate the gradient Returns ------- function to generate the gradients as numpy arrays representing rgba values """ rgbs: FloatRGB_Array = np.array([color_to_rgb(c) for c in colors]) def func(values: Sequence[float], opacity: float = 1.0) -> FloatRGBA_Array: alphas = inverse_interpolate(start, end, np.array(values)) alphas = np.clip(alphas, 0, 1) scaled_alphas = alphas * (len(rgbs) - 1) indices = scaled_alphas.astype(int) next_indices = np.clip(indices + 1, 0, len(rgbs) - 1) inter_alphas = scaled_alphas % 1 inter_alphas = inter_alphas.repeat(3).reshape((len(indices), 3)) new_rgbs: FloatRGB_Array = interpolate( rgbs[indices], rgbs[next_indices], inter_alphas ) new_rgbas: FloatRGBA_Array = np.concatenate( (new_rgbs, np.full([len(new_rgbs), 1], opacity)), axis=1, ) return new_rgbas return func class ArrowVectorField(VectorField): """A :class:`VectorField` represented by a set of change vectors. Vector fields are always based on a function defining the :class:`~.Vector` at every position. The values of this functions is displayed as a grid of vectors. By default the color of each vector is determined by it's magnitude. Other color schemes can be used however. Parameters ---------- func The function defining the rate of change at every position of the vector field. color The color of the vector field. If set, position-specific coloring is disabled. color_scheme A function mapping a vector to a single value. This value gives the position in the color gradient defined using `min_color_scheme_value`, `max_color_scheme_value` and `colors`. min_color_scheme_value The value of the color_scheme function to be mapped to the first color in `colors`. Lower values also result in the first color of the gradient. max_color_scheme_value The value of the color_scheme function to be mapped to the last color in `colors`. Higher values also result in the last color of the gradient. colors The colors defining the color gradient of the vector field. x_range A sequence of x_min, x_max, delta_x y_range A sequence of y_min, y_max, delta_y z_range A sequence of z_min, z_max, delta_z three_dimensions Enables three_dimensions. Default set to False, automatically turns True if z_range is not None. length_func The function determining the displayed size of the vectors. The actual size of the vector is passed, the returned value will be used as display size for the vector. By default this is used to cap the displayed size of vectors to reduce the clutter. opacity The opacity of the arrows. vector_config Additional arguments to be passed to the :class:`~.Vector` constructor kwargs Additional arguments to be passed to the :class:`~.VGroup` constructor Examples -------- .. manim:: BasicUsage :save_last_frame: class BasicUsage(Scene): def construct(self): func = lambda pos: ((pos[0] * UR + pos[1] * LEFT) - pos) / 3 self.add(ArrowVectorField(func)) .. manim:: SizingAndSpacing class SizingAndSpacing(Scene): def construct(self): func = lambda pos: np.sin(pos[0] / 2) * UR + np.cos(pos[1] / 2) * LEFT vf = ArrowVectorField(func, x_range=[-7, 7, 1]) self.add(vf) self.wait() length_func = lambda x: x / 3 vf2 = ArrowVectorField(func, x_range=[-7, 7, 1], length_func=length_func) self.play(vf.animate.become(vf2)) self.wait() .. manim:: Coloring :save_last_frame: class Coloring(Scene): def construct(self): func = lambda pos: pos - LEFT * 5 colors = [RED, YELLOW, BLUE, DARK_GRAY] min_radius = Circle(radius=2, color=colors[0]).shift(LEFT * 5) max_radius = Circle(radius=10, color=colors[-1]).shift(LEFT * 5) vf = ArrowVectorField( func, min_color_scheme_value=2, max_color_scheme_value=10, colors=colors ) self.add(vf, min_radius, max_radius) """ def __init__( self, func: Callable[[np.ndarray], np.ndarray], color: ParsableManimColor | None = None, color_scheme: Callable[[np.ndarray], float] | None = None, min_color_scheme_value: float = 0, max_color_scheme_value: float = 2, colors: Sequence[ParsableManimColor] = DEFAULT_SCALAR_FIELD_COLORS, # Determining Vector positions: x_range: Sequence[float] = None, y_range: Sequence[float] = None, z_range: Sequence[float] = None, three_dimensions: bool = False, # Automatically True if z_range is set # Takes in actual norm, spits out displayed norm length_func: Callable[[float], float] = lambda norm: 0.45 * sigmoid(norm), opacity: float = 1.0, vector_config: dict | None = None, **kwargs, ): self.x_range = x_range or [ floor(-config["frame_width"] / 2), ceil(config["frame_width"] / 2), ] self.y_range = y_range or [ floor(-config["frame_height"] / 2), ceil(config["frame_height"] / 2), ] self.ranges = [self.x_range, self.y_range] if three_dimensions or z_range: self.z_range = z_range or self.y_range.copy() self.ranges += [self.z_range] else: self.ranges += [[0, 0]] for i in range(len(self.ranges)): if len(self.ranges[i]) == 2: self.ranges[i] += [0.5] self.ranges[i][1] += self.ranges[i][2] self.x_range, self.y_range, self.z_range = self.ranges super().__init__( func, color, color_scheme, min_color_scheme_value, max_color_scheme_value, colors, **kwargs, ) self.length_func = length_func self.opacity = opacity if vector_config is None: vector_config = {} self.vector_config = vector_config self.func = func x_range = np.arange(*self.x_range) y_range = np.arange(*self.y_range) z_range = np.arange(*self.z_range) self.add( *[ self.get_vector(x * RIGHT + y * UP + z * OUT) for x, y, z in it.product(x_range, y_range, z_range) ] ) self.set_opacity(self.opacity) def get_vector(self, point: np.ndarray): """Creates a vector in the vector field. The created vector is based on the function of the vector field and is rooted in the given point. Color and length fit the specifications of this vector field. Parameters ---------- point The root point of the vector. """ output = np.array(self.func(point)) norm = np.linalg.norm(output) if norm != 0: output *= self.length_func(norm) / norm vect = Vector(output, **self.vector_config) vect.shift(point) if self.single_color: vect.set_color(self.color) else: vect.set_color(self.pos_to_color(point)) return vect class StreamLines(VectorField): """StreamLines represent the flow of a :class:`VectorField` using the trace of moving agents. Vector fields are always based on a function defining the vector at every position. The values of this functions is displayed by moving many agents along the vector field and showing their trace. Parameters ---------- func The function defining the rate of change at every position of the vector field. color The color of the vector field. If set, position-specific coloring is disabled. color_scheme A function mapping a vector to a single value. This value gives the position in the color gradient defined using `min_color_scheme_value`, `max_color_scheme_value` and `colors`. min_color_scheme_value The value of the color_scheme function to be mapped to the first color in `colors`. Lower values also result in the first color of the gradient. max_color_scheme_value The value of the color_scheme function to be mapped to the last color in `colors`. Higher values also result in the last color of the gradient. colors The colors defining the color gradient of the vector field. x_range A sequence of x_min, x_max, delta_x y_range A sequence of y_min, y_max, delta_y z_range A sequence of z_min, z_max, delta_z three_dimensions Enables three_dimensions. Default set to False, automatically turns True if z_range is not None. noise_factor The amount by which the starting position of each agent is altered along each axis. Defaults to :code:`delta_y / 2` if not defined. n_repeats The number of agents generated at each starting point. dt The factor by which the distance an agent moves per step is stretched. Lower values result in a better approximation of the trajectories in the vector field. virtual_time The time the agents get to move in the vector field. Higher values therefore result in longer stream lines. However, this whole time gets simulated upon creation. max_anchors_per_line The maximum number of anchors per line. Lines with more anchors get reduced in complexity, not in length. padding The distance agents can move out of the generation area before being terminated. stroke_width The stroke with of the stream lines. opacity The opacity of the stream lines. Examples -------- .. manim:: BasicUsage :save_last_frame: class BasicUsage(Scene): def construct(self): func = lambda pos: ((pos[0] * UR + pos[1] * LEFT) - pos) / 3 self.add(StreamLines(func)) .. manim:: SpawningAndFlowingArea :save_last_frame: class SpawningAndFlowingArea(Scene): def construct(self): func = lambda pos: np.sin(pos[0]) * UR + np.cos(pos[1]) * LEFT + pos / 5 stream_lines = StreamLines( func, x_range=[-3, 3, 0.2], y_range=[-2, 2, 0.2], padding=1 ) spawning_area = Rectangle(width=6, height=4) flowing_area = Rectangle(width=8, height=6) labels = [Tex("Spawning Area"), Tex("Flowing Area").shift(DOWN * 2.5)] for lbl in labels: lbl.add_background_rectangle(opacity=0.6, buff=0.05) self.add(stream_lines, spawning_area, flowing_area, *labels) """ def __init__( self, func: Callable[[np.ndarray], np.ndarray], color: ParsableManimColor | None = None, color_scheme: Callable[[np.ndarray], float] | None = None, min_color_scheme_value: float = 0, max_color_scheme_value: float = 2, colors: Sequence[ParsableManimColor] = DEFAULT_SCALAR_FIELD_COLORS, # Determining stream line starting positions: x_range: Sequence[float] = None, y_range: Sequence[float] = None, z_range: Sequence[float] = None, three_dimensions: bool = False, noise_factor: float | None = None, n_repeats=1, # Determining how lines are drawn dt=0.05, virtual_time=3, max_anchors_per_line=100, padding=3, # Determining stream line appearance: stroke_width=1, opacity=1, **kwargs, ): self.x_range = x_range or [ floor(-config["frame_width"] / 2), ceil(config["frame_width"] / 2), ] self.y_range = y_range or [ floor(-config["frame_height"] / 2), ceil(config["frame_height"] / 2), ] self.ranges = [self.x_range, self.y_range] if three_dimensions or z_range: self.z_range = z_range or self.y_range.copy() self.ranges += [self.z_range] else: self.ranges += [[0, 0]] for i in range(len(self.ranges)): if len(self.ranges[i]) == 2: self.ranges[i] += [0.5] self.ranges[i][1] += self.ranges[i][2] self.x_range, self.y_range, self.z_range = self.ranges super().__init__( func, color, color_scheme, min_color_scheme_value, max_color_scheme_value, colors, **kwargs, ) self.noise_factor = ( noise_factor if noise_factor is not None else self.y_range[2] / 2 ) self.n_repeats = n_repeats self.virtual_time = virtual_time self.max_anchors_per_line = max_anchors_per_line self.padding = padding self.stroke_width = stroke_width half_noise = self.noise_factor / 2 np.random.seed(0) start_points = np.array( [ (x - half_noise) * RIGHT + (y - half_noise) * UP + (z - half_noise) * OUT + self.noise_factor * np.random.random(3) for n in range(self.n_repeats) for x in np.arange(*self.x_range) for y in np.arange(*self.y_range) for z in np.arange(*self.z_range) ], ) def outside_box(p): return ( p[0] < self.x_range[0] - self.padding or p[0] > self.x_range[1] + self.padding - self.x_range[2] or p[1] < self.y_range[0] - self.padding or p[1] > self.y_range[1] + self.padding - self.y_range[2] or p[2] < self.z_range[0] - self.padding or p[2] > self.z_range[1] + self.padding - self.z_range[2] ) max_steps = ceil(virtual_time / dt) + 1 if not self.single_color: self.background_img = self.get_colored_background_image() if config["renderer"] == RendererType.OPENGL: self.values_to_rgbas = self.get_vectorized_rgba_gradient_function( min_color_scheme_value, max_color_scheme_value, colors, ) for point in start_points: points = [point] for _ in range(max_steps): last_point = points[-1] new_point = last_point + dt * func(last_point) if outside_box(new_point): break points.append(new_point) step = max_steps if not step: continue line = get_vectorized_mobject_class()() line.duration = step * dt step = max(1, int(len(points) / self.max_anchors_per_line)) line.set_points_smoothly(points[::step]) if self.single_color: line.set_stroke( color=self.color, width=self.stroke_width, opacity=opacity ) else: if config.renderer == RendererType.OPENGL: # scaled for compatibility with cairo line.set_stroke(width=self.stroke_width / 4.0) norms = np.array( [np.linalg.norm(self.func(point)) for point in line.points], ) line.set_rgba_array_direct( self.values_to_rgbas(norms, opacity), name="stroke_rgba", ) else: if np.any(self.z_range != np.array([0, 0.5, 0.5])): line.set_stroke( [self.pos_to_color(p) for p in line.get_anchors()], ) else: line.color_using_background_image(self.background_img) line.set_stroke(width=self.stroke_width, opacity=opacity) self.add(line) self.stream_lines = [*self.submobjects] def create( self, lag_ratio: float | None = None, run_time: Callable[[float], float] | None = None, **kwargs, ) -> AnimationGroup: """The creation animation of the stream lines. The stream lines appear in random order. Parameters ---------- lag_ratio The lag ratio of the animation. If undefined, it will be selected so that the total animation length is 1.5 times the run time of each stream line creation. run_time The run time of every single stream line creation. The runtime of the whole animation might be longer due to the `lag_ratio`. If undefined, the virtual time of the stream lines is used as run time. Returns ------- :class:`~.AnimationGroup` The creation animation of the stream lines. Examples -------- .. manim:: StreamLineCreation class StreamLineCreation(Scene): def construct(self): func = lambda pos: (pos[0] * UR + pos[1] * LEFT) - pos stream_lines = StreamLines( func, color=YELLOW, x_range=[-7, 7, 1], y_range=[-4, 4, 1], stroke_width=3, virtual_time=1, # use shorter lines max_anchors_per_line=5, # better performance with fewer anchors ) self.play(stream_lines.create()) # uses virtual_time as run_time self.wait() """ if run_time is None: run_time = self.virtual_time if lag_ratio is None: lag_ratio = run_time / 2 / len(self.submobjects) animations = [ Create(line, run_time=run_time, **kwargs) for line in self.stream_lines ] random.shuffle(animations) return AnimationGroup(*animations, lag_ratio=lag_ratio) def start_animation( self, warm_up: bool = True, flow_speed: float = 1, time_width: float = 0.3, rate_func: Callable[[float], float] = linear, line_animation_class: type[ShowPassingFlash] = ShowPassingFlash, **kwargs, ) -> None: """Animates the stream lines using an updater. The stream lines will continuously flow Parameters ---------- warm_up If `True` the animation is initialized line by line. Otherwise it starts with all lines shown. flow_speed At `flow_speed=1` the distance the flow moves per second is equal to the magnitude of the vector field along its path. The speed value scales the speed of this flow. time_width The proportion of the stream line shown while being animated rate_func The rate function of each stream line flashing line_animation_class The animation class being used Examples -------- .. manim:: ContinuousMotion class ContinuousMotion(Scene): def construct(self): func = lambda pos: np.sin(pos[0] / 2) * UR + np.cos(pos[1] / 2) * LEFT stream_lines = StreamLines(func, stroke_width=3, max_anchors_per_line=30) self.add(stream_lines) stream_lines.start_animation(warm_up=False, flow_speed=1.5) self.wait(stream_lines.virtual_time / stream_lines.flow_speed) """ for line in self.stream_lines: run_time = line.duration / flow_speed line.anim = line_animation_class( line, run_time=run_time, rate_func=rate_func, time_width=time_width, **kwargs, ) line.anim.begin() line.time = random.random() * self.virtual_time if warm_up: line.time *= -1 self.add(line.anim.mobject) def updater(mob, dt): for line in mob.stream_lines: line.time += dt * flow_speed if line.time >= self.virtual_time: line.time -= self.virtual_time line.anim.interpolate(np.clip(line.time / line.anim.run_time, 0, 1)) self.add_updater(updater) self.flow_animation = updater self.flow_speed = flow_speed self.time_width = time_width def end_animation(self) -> AnimationGroup: """End the stream line animation smoothly. Returns an animation resulting in fully displayed stream lines without a noticeable cut. Returns ------- :class:`~.AnimationGroup` The animation fading out the running stream animation. Raises ------ ValueError if no stream line animation is running Examples -------- .. manim:: EndAnimation class EndAnimation(Scene): def construct(self): func = lambda pos: np.sin(pos[0] / 2) * UR + np.cos(pos[1] / 2) * LEFT stream_lines = StreamLines( func, stroke_width=3, max_anchors_per_line=5, virtual_time=1, color=BLUE ) self.add(stream_lines) stream_lines.start_animation(warm_up=False, flow_speed=1.5, time_width=0.5) self.wait(1) self.play(stream_lines.end_animation()) """ if self.flow_animation is None: raise ValueError("You have to start the animation before fading it out.") def hide_and_wait(mob, alpha): if alpha == 0: mob.set_stroke(opacity=0) elif alpha == 1: mob.set_stroke(opacity=1) def finish_updater_cycle(line, alpha): line.time += dt * self.flow_speed line.anim.interpolate(min(line.time / line.anim.run_time, 1)) if alpha == 1: self.remove(line.anim.mobject) line.anim.finish() max_run_time = self.virtual_time / self.flow_speed creation_rate_func = ease_out_sine creation_staring_speed = creation_rate_func(0.001) * 1000 creation_run_time = ( max_run_time / (1 + self.time_width) * creation_staring_speed ) # creation_run_time is calculated so that the creation animation starts at the same speed # as the regular line flash animation but eases out. dt = 1 / config["frame_rate"] animations = [] self.remove_updater(self.flow_animation) self.flow_animation = None for line in self.stream_lines: create = Create( line, run_time=creation_run_time, rate_func=creation_rate_func, ) if line.time <= 0: animations.append( Succession( UpdateFromAlphaFunc( line, hide_and_wait, run_time=-line.time / self.flow_speed, ), create, ), ) self.remove(line.anim.mobject) line.anim.finish() else: remaining_time = max_run_time - line.time / self.flow_speed animations.append( Succession( UpdateFromAlphaFunc( line, finish_updater_cycle, run_time=remaining_time, ), create, ), ) return AnimationGroup(*animations) # TODO: Variant of StreamLines that is able to respond to changes in the vector field function ================================================ FILE: manim/mobject/geometry/__init__.py ================================================ """Various geometric Mobjects. Modules ======= .. autosummary:: :toctree: ../reference ~arc ~boolean_ops ~labeled ~line ~polygram ~shape_matchers ~tips """ ================================================ FILE: manim/mobject/geometry/arc.py ================================================ r"""Mobjects that are curved. Examples -------- .. manim:: UsefulAnnotations :save_last_frame: class UsefulAnnotations(Scene): def construct(self): m0 = Dot() m1 = AnnotationDot() m2 = LabeledDot("ii") m3 = LabeledDot(MathTex(r"\alpha").set_color(ORANGE)) m4 = CurvedArrow(2*LEFT, 2*RIGHT, radius= -5) m5 = CurvedArrow(2*LEFT, 2*RIGHT, radius= 8) m6 = CurvedDoubleArrow(ORIGIN, 2*RIGHT) self.add(m0, m1, m2, m3, m4, m5, m6) for i, mobj in enumerate(self.mobjects): mobj.shift(DOWN * (i-3)) """ from __future__ import annotations __all__ = [ "TipableVMobject", "Arc", "ArcBetweenPoints", "CurvedArrow", "CurvedDoubleArrow", "Circle", "Dot", "AnnotationDot", "LabeledDot", "Ellipse", "AnnularSector", "Sector", "Annulus", "CubicBezier", "ArcPolygon", "ArcPolygonFromArcs", ] import itertools import warnings from typing import TYPE_CHECKING, Any, cast import numpy as np from typing_extensions import Self from manim.constants import * from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.types.vectorized_mobject import VGroup, VMobject from manim.utils.color import BLACK, BLUE, RED, WHITE, ParsableManimColor from manim.utils.iterables import adjacent_pairs from manim.utils.space_ops import ( angle_of_vector, cartesian_to_spherical, line_intersection, perpendicular_bisector, rotate_vector, ) if TYPE_CHECKING: from collections.abc import Iterable import manim.mobject.geometry.tips as tips from manim.mobject.mobject import Mobject from manim.mobject.text.tex_mobject import SingleStringMathTex, Tex from manim.mobject.text.text_mobject import Text from manim.typing import ( Point3D, Point3DLike, QuadraticSpline, Vector3DLike, ) class TipableVMobject(VMobject, metaclass=ConvertToOpenGL): """Meant for shared functionality between Arc and Line. Functionality can be classified broadly into these groups: * Adding, Creating, Modifying tips - add_tip calls create_tip, before pushing the new tip into the TipableVMobject's list of submobjects - stylistic and positional configuration * Checking for tips - Boolean checks for whether the TipableVMobject has a tip and a starting tip * Getters - Straightforward accessors, returning information pertaining to the TipableVMobject instance's tip(s), its length etc """ def __init__( self, tip_length: float = DEFAULT_ARROW_TIP_LENGTH, normal_vector: Vector3DLike = OUT, tip_style: dict = {}, **kwargs: Any, ) -> None: self.tip_length: float = tip_length self.normal_vector = normal_vector self.tip_style: dict = tip_style super().__init__(**kwargs) # Adding, Creating, Modifying tips def add_tip( self, tip: tips.ArrowTip | None = None, tip_shape: type[tips.ArrowTip] | None = None, tip_length: float | None = None, tip_width: float | None = None, at_start: bool = False, ) -> Self: """Adds a tip to the TipableVMobject instance, recognising that the endpoints might need to be switched if it's a 'starting tip' or not. """ if tip is None: tip = self.create_tip(tip_shape, tip_length, tip_width, at_start) else: self.position_tip(tip, at_start) self.reset_endpoints_based_on_tip(tip, at_start) self.asign_tip_attr(tip, at_start) self.add(tip) return self def create_tip( self, tip_shape: type[tips.ArrowTip] | None = None, tip_length: float | None = None, tip_width: float | None = None, at_start: bool = False, ) -> tips.ArrowTip: """Stylises the tip, positions it spatially, and returns the newly instantiated tip to the caller. """ tip = self.get_unpositioned_tip(tip_shape, tip_length, tip_width) self.position_tip(tip, at_start) return tip def get_unpositioned_tip( self, tip_shape: type[tips.ArrowTip] | None = None, tip_length: float | None = None, tip_width: float | None = None, ) -> tips.ArrowTip | tips.ArrowTriangleFilledTip: """Returns a tip that has been stylistically configured, but has not yet been given a position in space. """ from manim.mobject.geometry.tips import ArrowTriangleFilledTip style: dict[str, Any] = {} if tip_shape is None: tip_shape = ArrowTriangleFilledTip if tip_shape is ArrowTriangleFilledTip: if tip_width is None: tip_width = self.get_default_tip_length() style.update({"width": tip_width}) if tip_length is None: tip_length = self.get_default_tip_length() color = self.get_color() style.update({"fill_color": color, "stroke_color": color}) style.update(self.tip_style) tip = tip_shape(length=tip_length, **style) return tip def position_tip(self, tip: tips.ArrowTip, at_start: bool = False) -> tips.ArrowTip: # Last two control points, defining both # the end, and the tangency direction if at_start: anchor = self.get_start() handle = self.get_first_handle() else: handle = self.get_last_handle() anchor = self.get_end() angles = cartesian_to_spherical((handle - anchor).tolist()) tip.rotate( angles[1] - PI - tip.tip_angle, ) # Rotates the tip along the azimuthal if not hasattr(self, "_init_positioning_axis"): axis = np.array( [ np.sin(angles[1]), -np.cos(angles[1]), 0, ] ) # Obtains the perpendicular of the tip tip.rotate( -angles[2] + PI / 2, axis=axis, ) # Rotates the tip along the vertical wrt the axis self._init_positioning_axis = axis tip.shift(anchor - tip.tip_point) return tip def reset_endpoints_based_on_tip(self, tip: tips.ArrowTip, at_start: bool) -> Self: if self.get_length() == 0: # Zero length, put_start_and_end_on wouldn't work return self if at_start: self.put_start_and_end_on(tip.base, self.get_end()) else: self.put_start_and_end_on(self.get_start(), tip.base) return self def asign_tip_attr(self, tip: tips.ArrowTip, at_start: bool) -> Self: if at_start: self.start_tip = tip else: self.tip = tip return self # Checking for tips def has_tip(self) -> bool: return hasattr(self, "tip") and self.tip in self def has_start_tip(self) -> bool: return hasattr(self, "start_tip") and self.start_tip in self # Getters def pop_tips(self) -> VGroup: start, end = self.get_start_and_end() result = self.get_group_class()() if self.has_tip(): result.add(self.tip) self.remove(self.tip) if self.has_start_tip(): result.add(self.start_tip) self.remove(self.start_tip) self.put_start_and_end_on(start, end) return result def get_tips(self) -> VGroup: """Returns a VGroup (collection of VMobjects) containing the TipableVMObject instance's tips. """ result = self.get_group_class()() if hasattr(self, "tip"): result.add(self.tip) if hasattr(self, "start_tip"): result.add(self.start_tip) return result def get_tip(self) -> VMobject: """Returns the TipableVMobject instance's (first) tip, otherwise throws an exception. """ tips = self.get_tips() if len(tips) == 0: raise Exception("tip not found") else: tip: VMobject = tips[0] return tip def get_default_tip_length(self) -> float: return self.tip_length def get_first_handle(self) -> Point3D: # Type inference of extracting an element from a list, is not # supported by numpy, see this numpy issue # https://github.com/numpy/numpy/issues/16544 first_handle: Point3D = self.points[1] return first_handle def get_last_handle(self) -> Point3D: # Type inference of extracting an element from a list, is not # supported by numpy, see this numpy issue # https://github.com/numpy/numpy/issues/16544 last_handle: Point3D = self.points[-2] return last_handle def get_end(self) -> Point3D: if self.has_tip(): return self.tip.get_start() else: return super().get_end() def get_start(self) -> Point3D: if self.has_start_tip(): return self.start_tip.get_start() else: return super().get_start() def get_length(self) -> float: start, end = self.get_start_and_end() return float(np.linalg.norm(start - end)) class Arc(TipableVMobject): """A circular arc. Examples -------- A simple arc of angle Pi. .. manim:: ArcExample :save_last_frame: class ArcExample(Scene): def construct(self): self.add(Arc(angle=PI)) """ def __init__( self, radius: float | None = 1.0, start_angle: float = 0, angle: float = TAU / 4, num_components: int = 9, arc_center: Point3DLike = ORIGIN, **kwargs: Any, ): if radius is None: # apparently None is passed by ArcBetweenPoints radius = 1.0 self.radius = radius self.num_components = num_components self.arc_center: Point3D = np.asarray(arc_center) self.start_angle = start_angle self.angle = angle self._failed_to_get_center: bool = False super().__init__(**kwargs) def generate_points(self) -> None: self._set_pre_positioned_points() self.scale(self.radius, about_point=ORIGIN) self.shift(self.arc_center) # Points are set a bit differently when rendering via OpenGL. # TODO: refactor Arc so that only one strategy for setting points # has to be used. def init_points(self) -> None: self.set_points( Arc._create_quadratic_bezier_points( angle=self.angle, start_angle=self.start_angle, n_components=self.num_components, ), ) self.scale(self.radius, about_point=ORIGIN) self.shift(self.arc_center) @staticmethod def _create_quadratic_bezier_points( angle: float, start_angle: float = 0, n_components: int = 8 ) -> QuadraticSpline: samples = np.array( [ [np.cos(a), np.sin(a), 0] for a in np.linspace( start_angle, start_angle + angle, 2 * n_components + 1, ) ], ) theta = angle / n_components samples[1::2] /= np.cos(theta / 2) points = np.zeros((3 * n_components, 3)) points[0::3] = samples[0:-1:2] points[1::3] = samples[1::2] points[2::3] = samples[2::2] return points def _set_pre_positioned_points(self) -> None: anchors = np.array( [ np.cos(a) * RIGHT + np.sin(a) * UP for a in np.linspace( self.start_angle, self.start_angle + self.angle, self.num_components, ) ], ) # Figure out which control points will give the # Appropriate tangent lines to the circle d_theta = self.angle / (self.num_components - 1.0) tangent_vectors = np.zeros(anchors.shape) # Rotate all 90 degrees, via (x, y) -> (-y, x) tangent_vectors[:, 1] = anchors[:, 0] tangent_vectors[:, 0] = -anchors[:, 1] # Use tangent vectors to deduce anchors factor = 4 / 3 * np.tan(d_theta / 4) handles1 = anchors[:-1] + factor * tangent_vectors[:-1] handles2 = anchors[1:] - factor * tangent_vectors[1:] self.set_anchors_and_handles(anchors[:-1], handles1, handles2, anchors[1:]) def get_arc_center(self, warning: bool = True) -> Point3D: """Looks at the normals to the first two anchors, and finds their intersection points """ # First two anchors and handles a1, h1, h2, a2 = self.points[:4] if np.all(a1 == a2): # For a1 and a2 to lie at the same point arc radius # must be zero. Thus arc_center will also lie at # that point. return np.copy(a1) # Tangent vectors t1 = h1 - a1 t2 = h2 - a2 # Normals n1 = rotate_vector(t1, TAU / 4) n2 = rotate_vector(t2, TAU / 4) try: return line_intersection(line1=(a1, a1 + n1), line2=(a2, a2 + n2)) except Exception: if warning: warnings.warn( "Can't find Arc center, using ORIGIN instead", stacklevel=1 ) self._failed_to_get_center = True return np.array(ORIGIN) def move_arc_center_to(self, point: Point3DLike) -> Self: self.shift(point - self.get_arc_center()) return self def stop_angle(self) -> float: return cast( float, angle_of_vector(self.points[-1] - self.get_arc_center()) % TAU, ) class ArcBetweenPoints(Arc): """Inherits from Arc and additionally takes 2 points between which the arc is spanned. Example ------- .. manim:: ArcBetweenPointsExample class ArcBetweenPointsExample(Scene): def construct(self): circle = Circle(radius=2, stroke_color=GREY) dot_1 = Dot(color=GREEN).move_to([2, 0, 0]).scale(0.5) dot_1_text = Tex("(2,0)").scale(0.5).next_to(dot_1, RIGHT).set_color(BLUE) dot_2 = Dot(color=GREEN).move_to([0, 2, 0]).scale(0.5) dot_2_text = Tex("(0,2)").scale(0.5).next_to(dot_2, UP).set_color(BLUE) arc= ArcBetweenPoints(start=2 * RIGHT, end=2 * UP, stroke_color=YELLOW) self.add(circle, dot_1, dot_2, dot_1_text, dot_2_text) self.play(Create(arc)) """ def __init__( self, start: Point3DLike, end: Point3DLike, angle: float = TAU / 4, radius: float | None = None, **kwargs: Any, ) -> None: if radius is not None: self.radius = radius if radius < 0: sign = -2 radius *= -1 else: sign = 2 halfdist = np.linalg.norm(np.array(start) - np.array(end)) / 2 if radius < halfdist: raise ValueError( """ArcBetweenPoints called with a radius that is smaller than half the distance between the points.""", ) arc_height = radius - np.sqrt(radius**2 - halfdist**2) angle = np.arccos((radius - arc_height) / radius) * sign super().__init__(radius=radius, angle=angle, **kwargs) if angle == 0: self.set_points_as_corners(np.array([LEFT, RIGHT])) self.put_start_and_end_on(start, end) if radius is None: center = self.get_arc_center(warning=False) if not self._failed_to_get_center: # np.linalg.norm returns floating[Any] which is not compatible with float self.radius = cast( float, np.linalg.norm(np.array(start) - np.array(center)) ) else: self.radius = np.inf class CurvedArrow(ArcBetweenPoints): def __init__( self, start_point: Point3DLike, end_point: Point3DLike, **kwargs: Any ) -> None: from manim.mobject.geometry.tips import ArrowTriangleFilledTip tip_shape = kwargs.pop("tip_shape", ArrowTriangleFilledTip) super().__init__(start_point, end_point, **kwargs) self.add_tip(tip_shape=tip_shape) class CurvedDoubleArrow(CurvedArrow): def __init__( self, start_point: Point3DLike, end_point: Point3DLike, **kwargs: Any ) -> None: if "tip_shape_end" in kwargs: kwargs["tip_shape"] = kwargs.pop("tip_shape_end") from manim.mobject.geometry.tips import ArrowTriangleFilledTip tip_shape_start = kwargs.pop("tip_shape_start", ArrowTriangleFilledTip) super().__init__(start_point, end_point, **kwargs) self.add_tip(at_start=True, tip_shape=tip_shape_start) class Circle(Arc): """A circle. Parameters ---------- color The color of the shape. kwargs Additional arguments to be passed to :class:`Arc` Examples -------- .. manim:: CircleExample :save_last_frame: class CircleExample(Scene): def construct(self): circle_1 = Circle(radius=1.0) circle_2 = Circle(radius=1.5, color=GREEN) circle_3 = Circle(radius=1.0, color=BLUE_B, fill_opacity=1) circle_group = Group(circle_1, circle_2, circle_3).arrange(buff=1) self.add(circle_group) """ def __init__( self, radius: float | None = None, color: ParsableManimColor = RED, **kwargs: Any, ) -> None: super().__init__( radius=radius, start_angle=0, angle=TAU, color=color, **kwargs, ) def surround( self, mobject: Mobject, dim_to_match: int = 0, stretch: bool = False, buffer_factor: float = 1.2, ) -> Self: """Modifies a circle so that it surrounds a given mobject. Parameters ---------- mobject The mobject that the circle will be surrounding. dim_to_match buffer_factor Scales the circle with respect to the mobject. A `buffer_factor` < 1 makes the circle smaller than the mobject. stretch Stretches the circle to fit more tightly around the mobject. Note: Does not work with :class:`Line` Examples -------- .. manim:: CircleSurround :save_last_frame: class CircleSurround(Scene): def construct(self): triangle1 = Triangle() circle1 = Circle().surround(triangle1) group1 = Group(triangle1,circle1) # treat the two mobjects as one line2 = Line() circle2 = Circle().surround(line2, buffer_factor=2.0) group2 = Group(line2,circle2) # buffer_factor < 1, so the circle is smaller than the square square3 = Square() circle3 = Circle().surround(square3, buffer_factor=0.5) group3 = Group(square3, circle3) group = Group(group1, group2, group3).arrange(buff=1) self.add(group) """ # Ignores dim_to_match and stretch; result will always be a circle # TODO: Perhaps create an ellipse class to handle single-dimension stretching # Something goes wrong here when surrounding lines? # TODO: Figure out and fix self.replace(mobject, dim_to_match, stretch) self.width = np.sqrt(mobject.width**2 + mobject.height**2) return self.scale(buffer_factor) def point_at_angle(self, angle: float) -> Point3D: """Returns the position of a point on the circle. Parameters ---------- angle The angle of the point along the circle in radians. Returns ------- :class:`numpy.ndarray` The location of the point along the circle's circumference. Examples -------- .. manim:: PointAtAngleExample :save_last_frame: class PointAtAngleExample(Scene): def construct(self): circle = Circle(radius=2.0) p1 = circle.point_at_angle(PI/2) p2 = circle.point_at_angle(270*DEGREES) s1 = Square(side_length=0.25).move_to(p1) s2 = Square(side_length=0.25).move_to(p2) self.add(circle, s1, s2) """ start_angle = angle_of_vector(self.points[0] - self.get_center()) proportion = (angle - start_angle) / TAU proportion -= np.floor(proportion) return self.point_from_proportion(proportion) @staticmethod def from_three_points( p1: Point3DLike, p2: Point3DLike, p3: Point3DLike, **kwargs: Any ) -> Circle: """Returns a circle passing through the specified three points. Example ------- .. manim:: CircleFromPointsExample :save_last_frame: class CircleFromPointsExample(Scene): def construct(self): circle = Circle.from_three_points(LEFT, LEFT + UP, UP * 2, color=RED) dots = VGroup( Dot(LEFT), Dot(LEFT + UP), Dot(UP * 2), ) self.add(NumberPlane(), circle, dots) """ center = line_intersection( perpendicular_bisector([np.asarray(p1), np.asarray(p2)]), perpendicular_bisector([np.asarray(p2), np.asarray(p3)]), ) # np.linalg.norm returns floating[Any] which is not compatible with float radius = cast(float, np.linalg.norm(p1 - center)) return Circle(radius=radius, **kwargs).shift(center) class Dot(Circle): """A circle with a very small radius. Parameters ---------- point The location of the dot. radius The radius of the dot. stroke_width The thickness of the outline of the dot. fill_opacity The opacity of the dot's fill_colour color The color of the dot. kwargs Additional arguments to be passed to :class:`Circle` Examples -------- .. manim:: DotExample :save_last_frame: class DotExample(Scene): def construct(self): dot1 = Dot(point=LEFT, radius=0.08) dot2 = Dot(point=ORIGIN) dot3 = Dot(point=RIGHT) self.add(dot1,dot2,dot3) """ def __init__( self, point: Point3DLike = ORIGIN, radius: float = DEFAULT_DOT_RADIUS, stroke_width: float = 0, fill_opacity: float = 1.0, color: ParsableManimColor = WHITE, **kwargs: Any, ) -> None: super().__init__( arc_center=point, radius=radius, stroke_width=stroke_width, fill_opacity=fill_opacity, color=color, **kwargs, ) class AnnotationDot(Dot): """A dot with bigger radius and bold stroke to annotate scenes.""" def __init__( self, radius: float = DEFAULT_DOT_RADIUS * 1.3, stroke_width: float = 5, stroke_color: ParsableManimColor = WHITE, fill_color: ParsableManimColor = BLUE, **kwargs: Any, ) -> None: super().__init__( radius=radius, stroke_width=stroke_width, stroke_color=stroke_color, fill_color=fill_color, **kwargs, ) class LabeledDot(Dot): """A :class:`Dot` containing a label in its center. Parameters ---------- label The label of the :class:`Dot`. This is rendered as :class:`~.MathTex` by default (i.e., when passing a :class:`str`), but other classes representing rendered strings like :class:`~.Text` or :class:`~.Tex` can be passed as well. radius The radius of the :class:`Dot`. If ``None`` (the default), the radius is calculated based on the size of the ``label``. Examples -------- .. manim:: SeveralLabeledDots :save_last_frame: class SeveralLabeledDots(Scene): def construct(self): sq = Square(fill_color=RED, fill_opacity=1) self.add(sq) dot1 = LabeledDot(Tex("42", color=RED)) dot2 = LabeledDot(MathTex("a", color=GREEN)) dot3 = LabeledDot(Text("ii", color=BLUE)) dot4 = LabeledDot("3") dot1.next_to(sq, UL) dot2.next_to(sq, UR) dot3.next_to(sq, DL) dot4.next_to(sq, DR) self.add(dot1, dot2, dot3, dot4) """ def __init__( self, label: str | SingleStringMathTex | Text | Tex, radius: float | None = None, **kwargs: Any, ) -> None: if isinstance(label, str): from manim import MathTex rendered_label: VMobject = MathTex(label, color=BLACK) else: rendered_label = label if radius is None: radius = 0.1 + max(rendered_label.width, rendered_label.height) / 2 super().__init__(radius=radius, **kwargs) rendered_label.move_to(self.get_center()) self.add(rendered_label) class Ellipse(Circle): """A circular shape; oval, circle. Parameters ---------- width The horizontal width of the ellipse. height The vertical height of the ellipse. kwargs Additional arguments to be passed to :class:`Circle`. Examples -------- .. manim:: EllipseExample :save_last_frame: class EllipseExample(Scene): def construct(self): ellipse_1 = Ellipse(width=2.0, height=4.0, color=BLUE_B) ellipse_2 = Ellipse(width=4.0, height=1.0, color=BLUE_D) ellipse_group = Group(ellipse_1,ellipse_2).arrange(buff=1) self.add(ellipse_group) """ def __init__(self, width: float = 2, height: float = 1, **kwargs: Any) -> None: super().__init__(**kwargs) self.stretch_to_fit_width(width) self.stretch_to_fit_height(height) class AnnularSector(Arc): """A sector of an annulus. Parameters ---------- inner_radius The inside radius of the Annular Sector. outer_radius The outside radius of the Annular Sector. angle The clockwise angle of the Annular Sector. start_angle The starting clockwise angle of the Annular Sector. fill_opacity The opacity of the color filled in the Annular Sector. stroke_width The stroke width of the Annular Sector. color The color filled into the Annular Sector. Examples -------- .. manim:: AnnularSectorExample :save_last_frame: class AnnularSectorExample(Scene): def construct(self): # Changes background color to clearly visualize changes in fill_opacity. self.camera.background_color = WHITE # The default parameter start_angle is 0, so the AnnularSector starts from the +x-axis. s1 = AnnularSector(color=YELLOW).move_to(2 * UL) # Different inner_radius and outer_radius than the default. s2 = AnnularSector(inner_radius=1.5, outer_radius=2, angle=45 * DEGREES, color=RED).move_to(2 * UR) # fill_opacity is typically a number > 0 and <= 1. If fill_opacity=0, the AnnularSector is transparent. s3 = AnnularSector(inner_radius=1, outer_radius=1.5, angle=PI, fill_opacity=0.25, color=BLUE).move_to(2 * DL) # With a negative value for the angle, the AnnularSector is drawn clockwise from the start value. s4 = AnnularSector(inner_radius=1, outer_radius=1.5, angle=-3 * PI / 2, color=GREEN).move_to(2 * DR) self.add(s1, s2, s3, s4) """ def __init__( self, inner_radius: float = 1, outer_radius: float = 2, angle: float = TAU / 4, start_angle: float = 0, fill_opacity: float = 1, stroke_width: float = 0, color: ParsableManimColor = WHITE, **kwargs: Any, ) -> None: self.inner_radius = inner_radius self.outer_radius = outer_radius super().__init__( start_angle=start_angle, angle=angle, fill_opacity=fill_opacity, stroke_width=stroke_width, color=color, **kwargs, ) def generate_points(self) -> None: inner_arc, outer_arc = ( Arc( start_angle=self.start_angle, angle=self.angle, radius=radius, arc_center=self.arc_center, ) for radius in (self.inner_radius, self.outer_radius) ) outer_arc.reverse_points() self.append_points(inner_arc.points) self.add_line_to(outer_arc.points[0]) self.append_points(outer_arc.points) self.add_line_to(inner_arc.points[0]) def init_points(self) -> None: self.generate_points() class Sector(AnnularSector): """A sector of a circle. Examples -------- .. manim:: ExampleSector :save_last_frame: class ExampleSector(Scene): def construct(self): sector = Sector(radius=2) sector2 = Sector(radius=2.5, angle=60*DEGREES).move_to([-3, 0, 0]) sector.set_color(RED) sector2.set_color(PINK) self.add(sector, sector2) """ def __init__(self, radius: float = 1, **kwargs: Any) -> None: super().__init__(inner_radius=0, outer_radius=radius, **kwargs) class Annulus(Circle): """Region between two concentric :class:`Circles <.Circle>`. Parameters ---------- inner_radius The radius of the inner :class:`Circle`. outer_radius The radius of the outer :class:`Circle`. kwargs Additional arguments to be passed to :class:`Annulus` Examples -------- .. manim:: AnnulusExample :save_last_frame: class AnnulusExample(Scene): def construct(self): annulus_1 = Annulus(inner_radius=0.5, outer_radius=1).shift(UP) annulus_2 = Annulus(inner_radius=0.3, outer_radius=0.6, color=RED).next_to(annulus_1, DOWN) self.add(annulus_1, annulus_2) """ def __init__( self, inner_radius: float = 1, outer_radius: float = 2, fill_opacity: float = 1, stroke_width: float = 0, color: ParsableManimColor = WHITE, mark_paths_closed: bool = False, **kwargs: Any, ) -> None: self.mark_paths_closed = mark_paths_closed # is this even used? self.inner_radius = inner_radius self.outer_radius = outer_radius super().__init__( fill_opacity=fill_opacity, stroke_width=stroke_width, color=color, **kwargs ) def generate_points(self) -> None: self.radius = self.outer_radius outer_circle = Circle(radius=self.outer_radius) inner_circle = Circle(radius=self.inner_radius) inner_circle.reverse_points() self.append_points(outer_circle.points) self.append_points(inner_circle.points) self.shift(self.arc_center) def init_points(self) -> None: self.generate_points() class CubicBezier(VMobject, metaclass=ConvertToOpenGL): """A cubic Bézier curve. Example ------- .. manim:: BezierSplineExample :save_last_frame: class BezierSplineExample(Scene): def construct(self): p1 = np.array([-3, 1, 0]) p1b = p1 + [1, 0, 0] d1 = Dot(point=p1).set_color(BLUE) l1 = Line(p1, p1b) p2 = np.array([3, -1, 0]) p2b = p2 - [1, 0, 0] d2 = Dot(point=p2).set_color(RED) l2 = Line(p2, p2b) bezier = CubicBezier(p1b, p1b + 3 * RIGHT, p2b - 3 * RIGHT, p2b) self.add(l1, d1, l2, d2, bezier) """ def __init__( self, start_anchor: Point3DLike, start_handle: Point3DLike, end_handle: Point3DLike, end_anchor: Point3DLike, **kwargs: Any, ) -> None: super().__init__(**kwargs) self.add_cubic_bezier_curve(start_anchor, start_handle, end_handle, end_anchor) class ArcPolygon(VMobject, metaclass=ConvertToOpenGL): """A generalized polygon allowing for points to be connected with arcs. This version tries to stick close to the way :class:`Polygon` is used. Points can be passed to it directly which are used to generate the according arcs (using :class:`ArcBetweenPoints`). An angle or radius can be passed to it to use across all arcs, but to configure arcs individually an ``arc_config`` list has to be passed with the syntax explained below. Parameters ---------- vertices A list of vertices, start and end points for the arc segments. angle The angle used for constructing the arcs. If no other parameters are set, this angle is used to construct all arcs. radius The circle radius used to construct the arcs. If specified, overrides the specified ``angle``. arc_config When passing a ``dict``, its content will be passed as keyword arguments to :class:`~.ArcBetweenPoints`. Otherwise, a list of dictionaries containing values that are passed as keyword arguments for every individual arc can be passed. kwargs Further keyword arguments that are passed to the constructor of :class:`~.VMobject`. Attributes ---------- arcs : :class:`list` The arcs created from the input parameters:: >>> from manim import ArcPolygon >>> ap = ArcPolygon([0, 0, 0], [2, 0, 0], [0, 2, 0]) >>> ap.arcs [ArcBetweenPoints, ArcBetweenPoints, ArcBetweenPoints] .. tip:: Two instances of :class:`ArcPolygon` can be transformed properly into one another as well. Be advised that any arc initialized with ``angle=0`` will actually be a straight line, so if a straight section should seamlessly transform into an arced section or vice versa, initialize the straight section with a negligible angle instead (such as ``angle=0.0001``). .. note:: There is an alternative version (:class:`ArcPolygonFromArcs`) that is instantiated with pre-defined arcs. See Also -------- :class:`ArcPolygonFromArcs` Examples -------- .. manim:: SeveralArcPolygons class SeveralArcPolygons(Scene): def construct(self): a = [0, 0, 0] b = [2, 0, 0] c = [0, 2, 0] ap1 = ArcPolygon(a, b, c, radius=2) ap2 = ArcPolygon(a, b, c, angle=45*DEGREES) ap3 = ArcPolygon(a, b, c, arc_config={'radius': 1.7, 'color': RED}) ap4 = ArcPolygon(a, b, c, color=RED, fill_opacity=1, arc_config=[{'radius': 1.7, 'color': RED}, {'angle': 20*DEGREES, 'color': BLUE}, {'radius': 1}]) ap_group = VGroup(ap1, ap2, ap3, ap4).arrange() self.play(*[Create(ap) for ap in [ap1, ap2, ap3, ap4]]) self.wait() For further examples see :class:`ArcPolygonFromArcs`. """ def __init__( self, *vertices: Point3DLike, angle: float = PI / 4, radius: float | None = None, arc_config: list[dict] | None = None, **kwargs: Any, ) -> None: n = len(vertices) point_pairs = [(vertices[k], vertices[(k + 1) % n]) for k in range(n)] if not arc_config: if radius: all_arc_configs: Iterable[dict] = itertools.repeat( {"radius": radius}, len(point_pairs) ) else: all_arc_configs = itertools.repeat({"angle": angle}, len(point_pairs)) elif isinstance(arc_config, dict): all_arc_configs = itertools.repeat(arc_config, len(point_pairs)) else: assert len(arc_config) == n all_arc_configs = arc_config arcs = [ ArcBetweenPoints(*pair, **conf) for (pair, conf) in zip(point_pairs, all_arc_configs) ] super().__init__(**kwargs) # Adding the arcs like this makes ArcPolygon double as a VGroup. # Also makes changes to the ArcPolygon, such as scaling, affect # the arcs, so that their new values are usable. self.add(*arcs) for arc in arcs: self.append_points(arc.points) # This enables the use of ArcPolygon.arcs as a convenience # because ArcPolygon[0] returns itself, not the first Arc. self.arcs = arcs class ArcPolygonFromArcs(VMobject, metaclass=ConvertToOpenGL): """A generalized polygon allowing for points to be connected with arcs. This version takes in pre-defined arcs to generate the arcpolygon and introduces little new syntax. However unlike :class:`Polygon` it can't be created with points directly. For proper appearance the passed arcs should connect seamlessly: ``[a,b][b,c][c,a]`` If there are any gaps between the arcs, those will be filled in with straight lines, which can be used deliberately for any straight sections. Arcs can also be passed as straight lines such as an arc initialized with ``angle=0``. Parameters ---------- arcs These are the arcs from which the arcpolygon is assembled. kwargs Keyword arguments that are passed to the constructor of :class:`~.VMobject`. Affects how the ArcPolygon itself is drawn, but doesn't affect passed arcs. Attributes ---------- arcs The arcs used to initialize the ArcPolygonFromArcs:: >>> from manim import ArcPolygonFromArcs, Arc, ArcBetweenPoints >>> ap = ArcPolygonFromArcs(Arc(), ArcBetweenPoints([1,0,0], [0,1,0]), Arc()) >>> ap.arcs [Arc, ArcBetweenPoints, Arc] .. tip:: Two instances of :class:`ArcPolygon` can be transformed properly into one another as well. Be advised that any arc initialized with ``angle=0`` will actually be a straight line, so if a straight section should seamlessly transform into an arced section or vice versa, initialize the straight section with a negligible angle instead (such as ``angle=0.0001``). .. note:: There is an alternative version (:class:`ArcPolygon`) that can be instantiated with points. .. seealso:: :class:`ArcPolygon` Examples -------- One example of an arcpolygon is the Reuleaux triangle. Instead of 3 straight lines connecting the outer points, a Reuleaux triangle has 3 arcs connecting those points, making a shape with constant width. Passed arcs are stored as submobjects in the arcpolygon. This means that the arcs are changed along with the arcpolygon, for example when it's shifted, and these arcs can be manipulated after the arcpolygon has been initialized. Also both the arcs contained in an :class:`~.ArcPolygonFromArcs`, as well as the arcpolygon itself are drawn, which affects draw time in :class:`~.Create` for example. In most cases the arcs themselves don't need to be drawn, in which case they can be passed as invisible. .. manim:: ArcPolygonExample class ArcPolygonExample(Scene): def construct(self): arc_conf = {"stroke_width": 0} poly_conf = {"stroke_width": 10, "stroke_color": BLUE, "fill_opacity": 1, "color": PURPLE} a = [-1, 0, 0] b = [1, 0, 0] c = [0, np.sqrt(3), 0] arc0 = ArcBetweenPoints(a, b, radius=2, **arc_conf) arc1 = ArcBetweenPoints(b, c, radius=2, **arc_conf) arc2 = ArcBetweenPoints(c, a, radius=2, **arc_conf) reuleaux_tri = ArcPolygonFromArcs(arc0, arc1, arc2, **poly_conf) self.play(FadeIn(reuleaux_tri)) self.wait(2) The arcpolygon itself can also be hidden so that instead only the contained arcs are drawn. This can be used to easily debug arcs or to highlight them. .. manim:: ArcPolygonExample2 class ArcPolygonExample2(Scene): def construct(self): arc_conf = {"stroke_width": 3, "stroke_color": BLUE, "fill_opacity": 0.5, "color": GREEN} poly_conf = {"color": None} a = [-1, 0, 0] b = [1, 0, 0] c = [0, np.sqrt(3), 0] arc0 = ArcBetweenPoints(a, b, radius=2, **arc_conf) arc1 = ArcBetweenPoints(b, c, radius=2, **arc_conf) arc2 = ArcBetweenPoints(c, a, radius=2, stroke_color=RED) reuleaux_tri = ArcPolygonFromArcs(arc0, arc1, arc2, **poly_conf) self.play(FadeIn(reuleaux_tri)) self.wait(2) """ def __init__(self, *arcs: Arc | ArcBetweenPoints, **kwargs: Any) -> None: if not all(isinstance(m, (Arc, ArcBetweenPoints)) for m in arcs): raise ValueError( "All ArcPolygon submobjects must be of type Arc/ArcBetweenPoints", ) super().__init__(**kwargs) # Adding the arcs like this makes ArcPolygonFromArcs double as a VGroup. # Also makes changes to the ArcPolygonFromArcs, such as scaling, affect # the arcs, so that their new values are usable. self.add(*arcs) # This enables the use of ArcPolygonFromArcs.arcs as a convenience # because ArcPolygonFromArcs[0] returns itself, not the first Arc. self.arcs = [*arcs] from .line import Line for arc1, arc2 in adjacent_pairs(arcs): self.append_points(arc1.points) line = Line(arc1.get_end(), arc2.get_start()) len_ratio = line.get_length() / arc1.get_arc_length() if np.isnan(len_ratio) or np.isinf(len_ratio): continue line.insert_n_curves(int(arc1.get_num_curves() * len_ratio)) self.append_points(line.points) ================================================ FILE: manim/mobject/geometry/boolean_ops.py ================================================ """Boolean operations for two-dimensional mobjects.""" from __future__ import annotations from typing import TYPE_CHECKING, Any import numpy as np from pathops import Path as SkiaPath from pathops import PathVerb, difference, intersection, union, xor from manim import config from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.types.vectorized_mobject import VMobject if TYPE_CHECKING: from manim.typing import Point2DLike_Array, Point3D_Array, Point3DLike_Array from ...constants import RendererType __all__ = ["Union", "Intersection", "Difference", "Exclusion"] class _BooleanOps(VMobject, metaclass=ConvertToOpenGL): """This class contains some helper functions which helps to convert to and from skia objects and manim objects (:class:`~.VMobject`). """ def _convert_2d_to_3d_array( self, points: Point2DLike_Array | Point3DLike_Array, z_dim: float = 0.0, ) -> Point3D_Array: """Converts an iterable with coordinates in 2D to 3D by adding :attr:`z_dim` as the Z coordinate. Parameters ---------- points An iterable of points. z_dim Default value for the Z coordinate. Returns ------- Point3D_Array A list of the points converted to 3D. Example ------- >>> a = _BooleanOps() >>> p = [(1, 2), (3, 4)] >>> a._convert_2d_to_3d_array(p) array([[1., 2., 0.], [3., 4., 0.]]) """ list_of_points = list(points) for i, point in enumerate(list_of_points): if len(point) == 2: list_of_points[i] = np.array(list(point) + [z_dim]) return np.asarray(list_of_points) def _convert_vmobject_to_skia_path(self, vmobject: VMobject) -> SkiaPath: """Converts a :class:`~.VMobject` to SkiaPath. This method only works for cairo renderer because it treats the points as Cubic beizer curves. Parameters ---------- vmobject: The :class:`~.VMobject` to convert from. Returns ------- SkiaPath The converted path. """ path = SkiaPath() if not np.all(np.isfinite(vmobject.points)): points = np.zeros((1, 3)) # point invalid? else: points = vmobject.points if len(points) == 0: # what? No points so return empty path return path # In OpenGL it's quadratic beizer curves while on Cairo it's cubic... if config.renderer == RendererType.OPENGL: subpaths = vmobject.get_subpaths_from_points(points) for subpath in subpaths: quads = vmobject.get_bezier_tuples_from_points(subpath) start = subpath[0] path.moveTo(*start[:2]) for _p0, p1, p2 in quads: path.quadTo(*p1[:2], *p2[:2]) if vmobject.consider_points_equals(subpath[0], subpath[-1]): path.close() elif config.renderer == RendererType.CAIRO: subpaths = vmobject.gen_subpaths_from_points_2d(points) # type: ignore[assignment] for subpath in subpaths: quads = vmobject.gen_cubic_bezier_tuples_from_points(subpath) start = subpath[0] path.moveTo(*start[:2]) for _p0, p1, p2, p3 in quads: path.cubicTo(*p1[:2], *p2[:2], *p3[:2]) if vmobject.consider_points_equals_2d(subpath[0], subpath[-1]): path.close() return path def _convert_skia_path_to_vmobject(self, path: SkiaPath) -> VMobject: """Converts SkiaPath back to VMobject. Parameters ---------- path: The SkiaPath to convert. Returns ------- VMobject: The converted VMobject. """ vmobject = self current_path_start = np.array([0, 0, 0]) for path_verb, points in path: if path_verb == PathVerb.MOVE: parts = self._convert_2d_to_3d_array(points) for part in parts: current_path_start = part vmobject.start_new_path(part) # vmobject.move_to(*part) elif path_verb == PathVerb.CUBIC: n1, n2, n3 = self._convert_2d_to_3d_array(points) vmobject.add_cubic_bezier_curve_to(n1, n2, n3) elif path_verb == PathVerb.LINE: parts = self._convert_2d_to_3d_array(points) vmobject.add_line_to(parts[0]) elif path_verb == PathVerb.CLOSE: vmobject.add_line_to(current_path_start) elif path_verb == PathVerb.QUAD: n1, n2 = self._convert_2d_to_3d_array(points) vmobject.add_quadratic_bezier_curve_to(n1, n2) else: raise Exception(f"Unsupported: {path_verb}") return vmobject class Union(_BooleanOps): """Union of two or more :class:`~.VMobject` s. This returns the common region of the :class:`~VMobject` s. Parameters ---------- vmobjects The :class:`~.VMobject` s to find the union of. Raises ------ ValueError If less than 2 :class:`~.VMobject` s are passed. Example ------- .. manim:: UnionExample :save_last_frame: class UnionExample(Scene): def construct(self): sq = Square(color=RED, fill_opacity=1) sq.move_to([-2, 0, 0]) cr = Circle(color=BLUE, fill_opacity=1) cr.move_to([-1.3, 0.7, 0]) un = Union(sq, cr, color=GREEN, fill_opacity=1) un.move_to([1.5, 0.3, 0]) self.add(sq, cr, un) """ def __init__(self, *vmobjects: VMobject, **kwargs: Any) -> None: if len(vmobjects) < 2: raise ValueError("At least 2 mobjects needed for Union.") super().__init__(**kwargs) paths = [] for vmobject in vmobjects: paths.append(self._convert_vmobject_to_skia_path(vmobject)) outpen = SkiaPath() union(paths, outpen.getPen()) self._convert_skia_path_to_vmobject(outpen) class Difference(_BooleanOps): """Subtracts one :class:`~.VMobject` from another one. Parameters ---------- subject The 1st :class:`~.VMobject`. clip The 2nd :class:`~.VMobject` Example ------- .. manim:: DifferenceExample :save_last_frame: class DifferenceExample(Scene): def construct(self): sq = Square(color=RED, fill_opacity=1) sq.move_to([-2, 0, 0]) cr = Circle(color=BLUE, fill_opacity=1) cr.move_to([-1.3, 0.7, 0]) un = Difference(sq, cr, color=GREEN, fill_opacity=1) un.move_to([1.5, 0, 0]) self.add(sq, cr, un) """ def __init__(self, subject: VMobject, clip: VMobject, **kwargs: Any) -> None: super().__init__(**kwargs) outpen = SkiaPath() difference( [self._convert_vmobject_to_skia_path(subject)], [self._convert_vmobject_to_skia_path(clip)], outpen.getPen(), ) self._convert_skia_path_to_vmobject(outpen) class Intersection(_BooleanOps): """Find the intersection of two :class:`~.VMobject` s. This keeps the parts covered by both :class:`~.VMobject` s. Parameters ---------- vmobjects The :class:`~.VMobject` to find the intersection. Raises ------ ValueError If less the 2 :class:`~.VMobject` are passed. Example ------- .. manim:: IntersectionExample :save_last_frame: class IntersectionExample(Scene): def construct(self): sq = Square(color=RED, fill_opacity=1) sq.move_to([-2, 0, 0]) cr = Circle(color=BLUE, fill_opacity=1) cr.move_to([-1.3, 0.7, 0]) un = Intersection(sq, cr, color=GREEN, fill_opacity=1) un.move_to([1.5, 0, 0]) self.add(sq, cr, un) """ def __init__(self, *vmobjects: VMobject, **kwargs: Any) -> None: if len(vmobjects) < 2: raise ValueError("At least 2 mobjects needed for Intersection.") super().__init__(**kwargs) outpen = SkiaPath() intersection( [self._convert_vmobject_to_skia_path(vmobjects[0])], [self._convert_vmobject_to_skia_path(vmobjects[1])], outpen.getPen(), ) new_outpen = outpen for _i in range(2, len(vmobjects)): new_outpen = SkiaPath() intersection( [outpen], [self._convert_vmobject_to_skia_path(vmobjects[_i])], new_outpen.getPen(), ) outpen = new_outpen self._convert_skia_path_to_vmobject(outpen) class Exclusion(_BooleanOps): """Find the XOR between two :class:`~.VMobject`. This creates a new :class:`~.VMobject` consisting of the region covered by exactly one of them. Parameters ---------- subject The 1st :class:`~.VMobject`. clip The 2nd :class:`~.VMobject` Example ------- .. manim:: IntersectionExample :save_last_frame: class IntersectionExample(Scene): def construct(self): sq = Square(color=RED, fill_opacity=1) sq.move_to([-2, 0, 0]) cr = Circle(color=BLUE, fill_opacity=1) cr.move_to([-1.3, 0.7, 0]) un = Exclusion(sq, cr, color=GREEN, fill_opacity=1) un.move_to([1.5, 0.4, 0]) self.add(sq, cr, un) """ def __init__(self, subject: VMobject, clip: VMobject, **kwargs: Any) -> None: super().__init__(**kwargs) outpen = SkiaPath() xor( [self._convert_vmobject_to_skia_path(subject)], [self._convert_vmobject_to_skia_path(clip)], outpen.getPen(), ) self._convert_skia_path_to_vmobject(outpen) ================================================ FILE: manim/mobject/geometry/labeled.py ================================================ r"""Mobjects that inherit from lines and contain a label along the length.""" from __future__ import annotations __all__ = ["Label", "LabeledLine", "LabeledArrow", "LabeledPolygram"] from typing import TYPE_CHECKING, Any import numpy as np from manim.constants import * from manim.mobject.geometry.line import Arrow, Line from manim.mobject.geometry.polygram import Polygram from manim.mobject.geometry.shape_matchers import ( BackgroundRectangle, SurroundingRectangle, ) from manim.mobject.text.tex_mobject import MathTex, Tex from manim.mobject.text.text_mobject import Text from manim.mobject.types.vectorized_mobject import VGroup from manim.utils.color import WHITE from manim.utils.polylabel import polylabel if TYPE_CHECKING: from manim.typing import Point3DLike_Array class Label(VGroup): """A Label consisting of text surrounded by a frame. Parameters ---------- label Label that will be displayed. label_config A dictionary containing the configuration for the label. This is only applied if ``label`` is of type ``str``. box_config A dictionary containing the configuration for the background box. frame_config A dictionary containing the configuration for the frame. Examples -------- .. manim:: LabelExample :save_last_frame: :quality: high class LabelExample(Scene): def construct(self): label = Label( label=Text('Label Text', font='sans-serif'), box_config = { "color" : BLUE, "fill_opacity" : 0.75 } ) label.scale(3) self.add(label) """ def __init__( self, label: str | Tex | MathTex | Text, label_config: dict[str, Any] | None = None, box_config: dict[str, Any] | None = None, frame_config: dict[str, Any] | None = None, **kwargs: Any, ) -> None: super().__init__(**kwargs) # Setup Defaults default_label_config: dict[str, Any] = { "color": WHITE, "font_size": DEFAULT_FONT_SIZE, } default_box_config: dict[str, Any] = { "color": None, "buff": 0.05, "fill_opacity": 1, "stroke_width": 0.5, } default_frame_config: dict[str, Any] = { "color": WHITE, "buff": 0.05, "stroke_width": 0.5, } # Merge Defaults label_config = default_label_config | (label_config or {}) box_config = default_box_config | (box_config or {}) frame_config = default_frame_config | (frame_config or {}) # Determine the type of label and instantiate the appropriate object self.rendered_label: MathTex | Tex | Text if isinstance(label, str): self.rendered_label = MathTex(label, **label_config) elif isinstance(label, (MathTex, Tex, Text)): self.rendered_label = label else: raise TypeError("Unsupported label type. Must be MathTex, Tex, or Text.") # Add a background box self.background_rect = BackgroundRectangle(self.rendered_label, **box_config) # Add a frame around the label self.frame = SurroundingRectangle(self.rendered_label, **frame_config) # Add components to the VGroup self.add(self.background_rect, self.rendered_label, self.frame) class LabeledLine(Line): """Constructs a line containing a label box somewhere along its length. Parameters ---------- label Label that will be displayed on the line. label_position A ratio in the range [0-1] to indicate the position of the label with respect to the length of the line. Default value is 0.5. label_config A dictionary containing the configuration for the label. This is only applied if ``label`` is of type ``str``. box_config A dictionary containing the configuration for the background box. frame_config A dictionary containing the configuration for the frame. .. seealso:: :class:`LabeledArrow` Examples -------- .. manim:: LabeledLineExample :save_last_frame: :quality: high class LabeledLineExample(Scene): def construct(self): line = LabeledLine( label = '0.5', label_position = 0.8, label_config = { "font_size" : 20 }, start=LEFT+DOWN, end=RIGHT+UP) line.set_length(line.get_length() * 2) self.add(line) """ def __init__( self, label: str | Tex | MathTex | Text, label_position: float = 0.5, label_config: dict[str, Any] | None = None, box_config: dict[str, Any] | None = None, frame_config: dict[str, Any] | None = None, *args: Any, **kwargs: Any, ) -> None: super().__init__(*args, **kwargs) # Create Label self.label = Label( label=label, label_config=label_config, box_config=box_config, frame_config=frame_config, ) # Compute Label Position line_start, line_end = self.get_start_and_end() new_vec = (line_end - line_start) * label_position label_coords = line_start + new_vec self.label.move_to(label_coords) self.add(self.label) class LabeledArrow(LabeledLine, Arrow): """Constructs an arrow containing a label box somewhere along its length. This class inherits its label properties from `LabeledLine`, so the main parameters controlling it are the same. Parameters ---------- label Label that will be displayed on the Arrow. label_position A ratio in the range [0-1] to indicate the position of the label with respect to the length of the line. Default value is 0.5. label_config A dictionary containing the configuration for the label. This is only applied if ``label`` is of type ``str``. box_config A dictionary containing the configuration for the background box. frame_config A dictionary containing the configuration for the frame. .. seealso:: :class:`LabeledLine` Examples -------- .. manim:: LabeledArrowExample :save_last_frame: :quality: high class LabeledArrowExample(Scene): def construct(self): l_arrow = LabeledArrow("0.5", start=LEFT*3, end=RIGHT*3 + UP*2, label_position=0.5) self.add(l_arrow) """ def __init__( self, *args: Any, **kwargs: Any, ) -> None: super().__init__(*args, **kwargs) class LabeledPolygram(Polygram): """Constructs a polygram containing a label box at its pole of inaccessibility. Parameters ---------- vertex_groups Vertices passed to the :class:`~.Polygram` constructor. label Label that will be displayed on the Polygram. precision The precision used by the PolyLabel algorithm. label_config A dictionary containing the configuration for the label. This is only applied if ``label`` is of type ``str``. box_config A dictionary containing the configuration for the background box. frame_config A dictionary containing the configuration for the frame. .. note:: The PolyLabel Algorithm expects each vertex group to form a closed ring. If the input is open, :class:`LabeledPolygram` will attempt to close it. This may cause the polygon to intersect itself leading to unexpected results. .. tip:: Make sure the precision corresponds to the scale of your inputs! For instance, if the bounding box of your polygon stretches from 0 to 10,000, a precision of 1.0 or 10.0 should be sufficient. Examples -------- .. manim:: LabeledPolygramExample :save_last_frame: :quality: high class LabeledPolygramExample(Scene): def construct(self): # Define Rings ring1 = [ [-3.8, -2.4, 0], [-2.4, -2.5, 0], [-1.3, -1.6, 0], [-0.2, -1.7, 0], [1.7, -2.5, 0], [2.9, -2.6, 0], [3.5, -1.5, 0], [4.9, -1.4, 0], [4.5, 0.2, 0], [4.7, 1.6, 0], [3.5, 2.4, 0], [1.1, 2.5, 0], [-0.1, 0.9, 0], [-1.2, 0.5, 0], [-1.6, 0.7, 0], [-1.4, 1.9, 0], [-2.6, 2.6, 0], [-4.4, 1.2, 0], [-4.9, -0.8, 0], [-3.8, -2.4, 0] ] ring2 = [ [0.2, -1.2, 0], [0.9, -1.2, 0], [1.4, -2.0, 0], [2.1, -1.6, 0], [2.2, -0.5, 0], [1.4, 0.0, 0], [0.4, -0.2, 0], [0.2, -1.2, 0] ] ring3 = [[-2.7, 1.4, 0], [-2.3, 1.7, 0], [-2.8, 1.9, 0], [-2.7, 1.4, 0]] # Create Polygons (for reference) p1 = Polygon(*ring1, fill_opacity=0.75) p2 = Polygon(*ring2, fill_color=BLACK, fill_opacity=1) p3 = Polygon(*ring3, fill_color=BLACK, fill_opacity=1) # Create Labeled Polygram polygram = LabeledPolygram( *[ring1, ring2, ring3], label=Text('Pole', font='sans-serif'), precision=0.01, ) # Display Circle (for reference) circle = Circle(radius=polygram.radius, color=WHITE).move_to(polygram.pole) self.add(p1, p2, p3) self.add(polygram) self.add(circle) .. manim:: LabeledCountryExample :save_last_frame: :quality: high import requests import json class LabeledCountryExample(Scene): def construct(self): # Fetch JSON data and process arcs data = requests.get('https://cdn.jsdelivr.net/npm/us-atlas@3/nation-10m.json').json() arcs, transform = data['arcs'], data['transform'] sarcs = [np.cumsum(arc, axis=0) * transform['scale'] + transform['translate'] for arc in arcs] ssarcs = sorted(sarcs, key=len, reverse=True)[:1] # Compute Bounding Box points = np.concatenate(ssarcs) mins, maxs = np.min(points, axis=0), np.max(points, axis=0) # Build Axes ax = Axes( x_range=[mins[0], maxs[0], maxs[0] - mins[0]], x_length=10, y_range=[mins[1], maxs[1], maxs[1] - mins[1]], y_length=7, tips=False ) # Adjust Coordinates array = [[ax.c2p(*point) for point in sarc] for sarc in ssarcs] # Add Polygram polygram = LabeledPolygram( *array, label=Text('USA', font='sans-serif'), precision=0.01, fill_color=BLUE, stroke_width=0, fill_opacity=0.75 ) # Display Circle (for reference) circle = Circle(radius=polygram.radius, color=WHITE).move_to(polygram.pole) self.add(ax) self.add(polygram) self.add(circle) """ def __init__( self, *vertex_groups: Point3DLike_Array, label: str | Tex | MathTex | Text, precision: float = 0.01, label_config: dict[str, Any] | None = None, box_config: dict[str, Any] | None = None, frame_config: dict[str, Any] | None = None, **kwargs: Any, ) -> None: # Initialize the Polygram with the vertex groups super().__init__(*vertex_groups, **kwargs) # Create Label self.label = Label( label=label, label_config=label_config, box_config=box_config, frame_config=frame_config, ) # Close Vertex Groups rings = [ group if np.array_equal(group[0], group[-1]) else list(group) + [group[0]] for group in vertex_groups ] # Compute the Pole of Inaccessibility cell = polylabel(rings, precision=precision) self.pole, self.radius = np.pad(cell.c, (0, 1), "constant"), cell.d # Position the label at the pole self.label.move_to(self.pole) self.add(self.label) ================================================ FILE: manim/mobject/geometry/line.py ================================================ r"""Mobjects that are lines or variations of them.""" from __future__ import annotations __all__ = [ "Line", "DashedLine", "TangentLine", "Elbow", "Arrow", "Vector", "DoubleArrow", "Angle", "RightAngle", ] from typing import TYPE_CHECKING, Any, Literal import numpy as np from manim import config from manim.constants import * from manim.mobject.geometry.arc import Arc, ArcBetweenPoints, Dot, TipableVMobject from manim.mobject.geometry.tips import ArrowTriangleFilledTip from manim.mobject.mobject import Mobject from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.opengl.opengl_mobject import OpenGLMobject from manim.mobject.types.vectorized_mobject import DashedVMobject, VGroup, VMobject from manim.utils.color import WHITE from manim.utils.space_ops import angle_of_vector, line_intersection, normalize if TYPE_CHECKING: from typing_extensions import Self, TypeAlias from manim.typing import Point3D, Point3DLike, Vector2DLike, Vector3D, Vector3DLike from manim.utils.color import ParsableManimColor from ..matrix import Matrix # Avoid circular import AngleQuadrant: TypeAlias = tuple[Literal[-1, 1], Literal[-1, 1]] r"""A tuple of 2 integers which can be either +1 or -1, allowing to select one of the 4 quadrants of the Cartesian plane. Let :math:`L_1,\ L_2` be two lines defined by start points :math:`S_1,\ S_2` and end points :math:`E_1,\ E_2`. We define the "positive direction" of :math:`L_1` as the direction from :math:`S_1` to :math:`E_1`, and its "negative direction" as the opposite one. We do the same with :math:`L_2`. If :math:`L_1` and :math:`L_2` intersect, they divide the plane into 4 quadrants. To pick one quadrant, choose the integers in this tuple in the following way: - If the 1st integer is +1, select one of the 2 quadrants towards the positive direction of :math:`L_1`, i.e. closest to `E_1`. Otherwise, if the 1st integer is -1, select one of the 2 quadrants towards the negative direction of :math:`L_1`, i.e. closest to `S_1`. - Similarly, the sign of the 2nd integer picks the positive or negative direction of :math:`L_2` and, thus, selects one of the 2 quadrants which are closest to :math:`E_2` or :math:`S_2` respectively. """ class Line(TipableVMobject): """A straight or curved line segment between two points or mobjects. Parameters ---------- start The starting point or Mobject of the line. end The ending point or Mobject of the line. buff The distance to shorten the line from both ends. path_arc If nonzero, the line will be curved into an arc with this angle (in radians). kwargs Additional arguments to be passed to :class:`TipableVMobject` Examples -------- .. manim:: LineExample :save_last_frame: class LineExample(Scene): def construct(self): line1 = Line(LEFT*2, RIGHT*2) line2 = Line(LEFT*2, RIGHT*2, buff=0.5) line3 = Line(LEFT*2, RIGHT*2, path_arc=PI/2) grp = VGroup(line1,line2,line3).arrange(DOWN, buff=2) self.add(grp) """ def __init__( self, start: Point3DLike | Mobject = LEFT, end: Point3DLike | Mobject = RIGHT, buff: float = 0, path_arc: float = 0, **kwargs: Any, ) -> None: self.dim = 3 self.buff = buff self.path_arc = path_arc self._set_start_and_end_attrs(start, end) super().__init__(**kwargs) def generate_points(self) -> None: self.set_points_by_ends( start=self.start, end=self.end, buff=self.buff, path_arc=self.path_arc, ) def set_points_by_ends( self, start: Point3DLike | Mobject, end: Point3DLike | Mobject, buff: float = 0, path_arc: float = 0, ) -> None: """Sets the points of the line based on its start and end points. Unlike :meth:`put_start_and_end_on`, this method respects `self.buff` and Mobject bounding boxes. Parameters ---------- start The start point or Mobject of the line. end The end point or Mobject of the line. buff The empty space between the start and end of the line, by default 0. path_arc The angle of a circle spanned by this arc, by default 0 which is a straight line. """ self._set_start_and_end_attrs(start, end) if path_arc: arc = ArcBetweenPoints(self.start, self.end, angle=self.path_arc) self.set_points(arc.points) else: self.set_points_as_corners(np.asarray([self.start, self.end])) self._account_for_buff(buff) def init_points(self) -> None: self.generate_points() def _account_for_buff(self, buff: float) -> None: if buff <= 0: return length = self.get_length() if self.path_arc == 0 else self.get_arc_length() if length < 2 * buff: return buff_proportion = buff / length self.pointwise_become_partial(self, buff_proportion, 1 - buff_proportion) def _set_start_and_end_attrs( self, start: Point3DLike | Mobject, end: Point3DLike | Mobject ) -> None: # If either start or end are Mobjects, this # gives their centers rough_start = self._pointify(start) rough_end = self._pointify(end) vect = normalize(rough_end - rough_start) # Now that we know the direction between them, # we can find the appropriate boundary point from # start and end, if they're mobjects self.start = self._pointify(start, vect) self.end = self._pointify(end, -vect) def _pointify( self, mob_or_point: Mobject | Point3DLike, direction: Vector3DLike | None = None, ) -> Point3D: """Transforms a mobject into its corresponding point. Does nothing if a point is passed. ``direction`` determines the location of the point along its bounding box in that direction. Parameters ---------- mob_or_point The mobject or point. direction The direction. """ if isinstance(mob_or_point, (Mobject, OpenGLMobject)): mob = mob_or_point if direction is None: return mob.get_center() else: return mob.get_boundary_point(direction) return np.array(mob_or_point) def set_path_arc(self, new_value: float) -> None: self.path_arc = new_value self.init_points() def put_start_and_end_on( self, start: Point3DLike, end: Point3DLike, ) -> Self: """Sets starts and end coordinates of a line. Examples -------- .. manim:: LineExample class LineExample(Scene): def construct(self): d = VGroup() for i in range(0,10): d.add(Dot()) d.arrange_in_grid(buff=1) self.add(d) l= Line(d[0], d[1]) self.add(l) self.wait() l.put_start_and_end_on(d[1].get_center(), d[2].get_center()) self.wait() l.put_start_and_end_on(d[4].get_center(), d[7].get_center()) self.wait() """ curr_start, curr_end = self.get_start_and_end() if np.all(curr_start == curr_end): # TODO, any problems with resetting # these attrs? self.start = np.asarray(start) self.end = np.asarray(end) self.generate_points() return super().put_start_and_end_on(start, end) def get_vector(self) -> Vector3D: return self.get_end() - self.get_start() def get_unit_vector(self) -> Vector3D: return normalize(self.get_vector()) def get_angle(self) -> float: return angle_of_vector(self.get_vector()) def get_projection(self, point: Point3DLike) -> Point3D: """Returns the projection of a point onto a line. Parameters ---------- point The point to which the line is projected. """ start = self.get_start() end = self.get_end() unit_vect = normalize(end - start) return start + float(np.dot(point - start, unit_vect)) * unit_vect def get_slope(self) -> float: return float(np.tan(self.get_angle())) def set_angle(self, angle: float, about_point: Point3DLike | None = None) -> Self: if about_point is None: about_point = self.get_start() self.rotate( angle - self.get_angle(), about_point=about_point, ) return self def set_length(self, length: float) -> Self: scale_factor: float = length / self.get_length() return self.scale(scale_factor) class DashedLine(Line): """A dashed :class:`Line`. Parameters ---------- args Arguments to be passed to :class:`Line` dash_length The length of each individual dash of the line. dashed_ratio The ratio of dash space to empty space. Range of 0-1. kwargs Additional arguments to be passed to :class:`Line` .. seealso:: :class:`~.DashedVMobject` Examples -------- .. manim:: DashedLineExample :save_last_frame: class DashedLineExample(Scene): def construct(self): # dash_length increased dashed_1 = DashedLine(config.left_side, config.right_side, dash_length=2.0).shift(UP*2) # normal dashed_2 = DashedLine(config.left_side, config.right_side) # dashed_ratio decreased dashed_3 = DashedLine(config.left_side, config.right_side, dashed_ratio=0.1).shift(DOWN*2) self.add(dashed_1, dashed_2, dashed_3) """ def __init__( self, *args: Any, dash_length: float = DEFAULT_DASH_LENGTH, dashed_ratio: float = 0.5, **kwargs: Any, ) -> None: self.dash_length = dash_length self.dashed_ratio = dashed_ratio super().__init__(*args, **kwargs) dashes = DashedVMobject( self, num_dashes=self._calculate_num_dashes(), dashed_ratio=dashed_ratio, ) self.clear_points() self.add(*dashes) def _calculate_num_dashes(self) -> int: """Returns the number of dashes in the dashed line. Examples -------- :: >>> DashedLine()._calculate_num_dashes() 20 """ # Minimum number of dashes has to be 2 return max( 2, int(np.ceil((self.get_length() / self.dash_length) * self.dashed_ratio)), ) def get_start(self) -> Point3D: """Returns the start point of the line. Examples -------- :: >>> DashedLine().get_start() array([-1., 0., 0.]) """ if len(self.submobjects) > 0: return self.submobjects[0].get_start() else: return super().get_start() def get_end(self) -> Point3D: """Returns the end point of the line. Examples -------- :: >>> DashedLine().get_end() array([1., 0., 0.]) """ if len(self.submobjects) > 0: return self.submobjects[-1].get_end() else: return super().get_end() def get_first_handle(self) -> Point3D: """Returns the point of the first handle. Examples -------- :: >>> DashedLine().get_first_handle() array([-0.98333333, 0. , 0. ]) """ # Type inference of extracting an element from a list, is not # supported by numpy, see this numpy issue # https://github.com/numpy/numpy/issues/16544 first_handle: Point3D = self.submobjects[0].points[1] return first_handle def get_last_handle(self) -> Point3D: """Returns the point of the last handle. Examples -------- :: >>> DashedLine().get_last_handle() array([0.98333333, 0. , 0. ]) """ # Type inference of extracting an element from a list, is not # supported by numpy, see this numpy issue # https://github.com/numpy/numpy/issues/16544 last_handle: Point3D = self.submobjects[-1].points[2] return last_handle class TangentLine(Line): """Constructs a line tangent to a :class:`~.VMobject` at a specific point. Parameters ---------- vmob The VMobject on which the tangent line is drawn. alpha How far along the shape that the line will be constructed. range: 0-1. length Length of the tangent line. d_alpha The ``dx`` value kwargs Additional arguments to be passed to :class:`Line` .. seealso:: :meth:`~.VMobject.point_from_proportion` Examples -------- .. manim:: TangentLineExample :save_last_frame: class TangentLineExample(Scene): def construct(self): circle = Circle(radius=2) line_1 = TangentLine(circle, alpha=0.0, length=4, color=BLUE_D) # right line_2 = TangentLine(circle, alpha=0.4, length=4, color=GREEN) # top left self.add(circle, line_1, line_2) """ def __init__( self, vmob: VMobject, alpha: float, length: float = 1, d_alpha: float = 1e-6, **kwargs: Any, ) -> None: self.length = length self.d_alpha = d_alpha da = self.d_alpha a1 = np.clip(alpha - da, 0, 1) a2 = np.clip(alpha + da, 0, 1) super().__init__( vmob.point_from_proportion(a1), vmob.point_from_proportion(a2), **kwargs ) self.scale(self.length / self.get_length()) class Elbow(VMobject, metaclass=ConvertToOpenGL): """Two lines that create a right angle about each other: L-shape. Parameters ---------- width The length of the elbow's sides. angle The rotation of the elbow. kwargs Additional arguments to be passed to :class:`~.VMobject` .. seealso:: :class:`RightAngle` Examples -------- .. manim:: ElbowExample :save_last_frame: class ElbowExample(Scene): def construct(self): elbow_1 = Elbow() elbow_2 = Elbow(width=2.0) elbow_3 = Elbow(width=2.0, angle=5*PI/4) elbow_group = Group(elbow_1, elbow_2, elbow_3).arrange(buff=1) self.add(elbow_group) """ def __init__(self, width: float = 0.2, angle: float = 0, **kwargs: Any) -> None: self.angle = angle super().__init__(**kwargs) self.set_points_as_corners(np.array([UP, UP + RIGHT, RIGHT])) self.scale_to_fit_width(width, about_point=ORIGIN) self.rotate(self.angle, about_point=ORIGIN) class Arrow(Line): """An arrow. Parameters ---------- args Arguments to be passed to :class:`Line`. stroke_width The thickness of the arrow. Influenced by :attr:`max_stroke_width_to_length_ratio`. buff The distance of the arrow from its start and end points. max_tip_length_to_length_ratio :attr:`tip_length` scales with the length of the arrow. Increasing this ratio raises the max value of :attr:`tip_length`. max_stroke_width_to_length_ratio :attr:`stroke_width` scales with the length of the arrow. Increasing this ratio ratios the max value of :attr:`stroke_width`. kwargs Additional arguments to be passed to :class:`Line`. .. seealso:: :class:`ArrowTip` :class:`CurvedArrow` Examples -------- .. manim:: ArrowExample :save_last_frame: from manim.mobject.geometry.tips import ArrowSquareTip class ArrowExample(Scene): def construct(self): arrow_1 = Arrow(start=RIGHT, end=LEFT, color=GOLD) arrow_2 = Arrow(start=RIGHT, end=LEFT, color=GOLD, tip_shape=ArrowSquareTip).shift(DOWN) g1 = Group(arrow_1, arrow_2) # the effect of buff square = Square(color=MAROON_A) arrow_3 = Arrow(start=LEFT, end=RIGHT) arrow_4 = Arrow(start=LEFT, end=RIGHT, buff=0).next_to(arrow_1, UP) g2 = Group(arrow_3, arrow_4, square) # a shorter arrow has a shorter tip and smaller stroke width arrow_5 = Arrow(start=ORIGIN, end=config.top).shift(LEFT * 4) arrow_6 = Arrow(start=config.top + DOWN, end=config.top).shift(LEFT * 3) g3 = Group(arrow_5, arrow_6) self.add(Group(g1, g2, g3).arrange(buff=2)) .. manim:: ArrowExample :save_last_frame: class ArrowExample(Scene): def construct(self): left_group = VGroup() # As buff increases, the size of the arrow decreases. for buff in np.arange(0, 2.2, 0.45): left_group += Arrow(buff=buff, start=2 * LEFT, end=2 * RIGHT) # Required to arrange arrows. left_group.arrange(DOWN) left_group.move_to(4 * LEFT) middle_group = VGroup() # As max_stroke_width_to_length_ratio gets bigger, # the width of stroke increases. for i in np.arange(0, 5, 0.5): middle_group += Arrow(max_stroke_width_to_length_ratio=i) middle_group.arrange(DOWN) UR_group = VGroup() # As max_tip_length_to_length_ratio increases, # the length of the tip increases. for i in np.arange(0, 0.3, 0.1): UR_group += Arrow(max_tip_length_to_length_ratio=i) UR_group.arrange(DOWN) UR_group.move_to(4 * RIGHT + 2 * UP) DR_group = VGroup() DR_group += Arrow(start=LEFT, end=RIGHT, color=BLUE, tip_shape=ArrowSquareTip) DR_group += Arrow(start=LEFT, end=RIGHT, color=BLUE, tip_shape=ArrowSquareFilledTip) DR_group += Arrow(start=LEFT, end=RIGHT, color=YELLOW, tip_shape=ArrowCircleTip) DR_group += Arrow(start=LEFT, end=RIGHT, color=YELLOW, tip_shape=ArrowCircleFilledTip) DR_group.arrange(DOWN) DR_group.move_to(4 * RIGHT + 2 * DOWN) self.add(left_group, middle_group, UR_group, DR_group) """ def __init__( self, *args: Any, stroke_width: float = 6, buff: float = MED_SMALL_BUFF, max_tip_length_to_length_ratio: float = 0.25, max_stroke_width_to_length_ratio: float = 5, **kwargs: Any, ) -> None: self.max_tip_length_to_length_ratio = max_tip_length_to_length_ratio self.max_stroke_width_to_length_ratio = max_stroke_width_to_length_ratio tip_shape = kwargs.pop("tip_shape", ArrowTriangleFilledTip) super().__init__(*args, buff=buff, stroke_width=stroke_width, **kwargs) # type: ignore[misc] # TODO, should this be affected when # Arrow.set_stroke is called? self.initial_stroke_width = self.stroke_width self.add_tip(tip_shape=tip_shape) self._set_stroke_width_from_length() def scale(self, factor: float, scale_tips: bool = False, **kwargs: Any) -> Self: # type: ignore[override] r"""Scale an arrow, but keep stroke width and arrow tip size fixed. .. seealso:: :meth:`~.Mobject.scale` Examples -------- :: >>> arrow = Arrow(np.array([-1, -1, 0]), np.array([1, 1, 0]), buff=0) >>> scaled_arrow = arrow.scale(2) >>> np.round(scaled_arrow.get_start_and_end(), 8) + 0 array([[-2., -2., 0.], [ 2., 2., 0.]]) >>> arrow.tip.length == scaled_arrow.tip.length True Manually scaling the object using the default method :meth:`~.Mobject.scale` does not have the same properties:: >>> new_arrow = Arrow(np.array([-1, -1, 0]), np.array([1, 1, 0]), buff=0) >>> another_scaled_arrow = VMobject.scale(new_arrow, 2) >>> another_scaled_arrow.tip.length == arrow.tip.length False """ if self.get_length() == 0: return self if scale_tips: super().scale(factor, **kwargs) self._set_stroke_width_from_length() return self has_tip = self.has_tip() has_start_tip = self.has_start_tip() if has_tip or has_start_tip: old_tips = self.pop_tips() super().scale(factor, **kwargs) self._set_stroke_width_from_length() if has_tip: self.add_tip(tip=old_tips[0]) if has_start_tip: self.add_tip(tip=old_tips[1], at_start=True) return self def get_normal_vector(self) -> Vector3D: """Returns the normal of a vector. Examples -------- :: >>> np.round(Arrow().get_normal_vector()) + 0. # add 0. to avoid negative 0 in output array([ 0., 0., -1.]) """ p0, p1, p2 = self.tip.get_start_anchors()[:3] return normalize(np.cross(p2 - p1, p1 - p0)) def reset_normal_vector(self) -> Self: """Resets the normal of a vector""" self.normal_vector = self.get_normal_vector() return self def get_default_tip_length(self) -> float: """Returns the default tip_length of the arrow. Examples -------- :: >>> Arrow().get_default_tip_length() 0.35 """ max_ratio = self.max_tip_length_to_length_ratio return min(self.tip_length, max_ratio * self.get_length()) def _set_stroke_width_from_length(self) -> Self: """Sets stroke width based on length.""" max_ratio = self.max_stroke_width_to_length_ratio if config.renderer == RendererType.OPENGL: # Mypy does not recognize that the self object in this case # is a OpenGLVMobject and that the set_stroke method is # defined here: # mobject/opengl/opengl_vectorized_mobject.py#L248 self.set_stroke( # type: ignore[call-arg] width=min(self.initial_stroke_width, max_ratio * self.get_length()), recurse=False, ) else: self.set_stroke( width=min(self.initial_stroke_width, max_ratio * self.get_length()), family=False, ) return self class Vector(Arrow): """A vector specialized for use in graphs. .. caution:: Do not confuse with the :class:`~.Vector2D`, :class:`~.Vector3D` or :class:`~.VectorND` type aliases, which are not Mobjects! Parameters ---------- direction The direction of the arrow. buff The distance of the vector from its endpoints. kwargs Additional arguments to be passed to :class:`Arrow` Examples -------- .. manim:: VectorExample :save_last_frame: class VectorExample(Scene): def construct(self): plane = NumberPlane() vector_1 = Vector([1,2]) vector_2 = Vector([-5,-2]) self.add(plane, vector_1, vector_2) """ def __init__( self, direction: Vector2DLike | Vector3DLike = RIGHT, buff: float = 0, **kwargs: Any, ) -> None: self.buff = buff if len(direction) == 2: direction = np.hstack([direction, 0]) super().__init__(ORIGIN, direction, buff=buff, **kwargs) def coordinate_label( self, integer_labels: bool = True, n_dim: int = 2, color: ParsableManimColor | None = None, **kwargs: Any, ) -> Matrix: """Creates a label based on the coordinates of the vector. Parameters ---------- integer_labels Whether or not to round the coordinates to integers. n_dim The number of dimensions of the vector. color Sets the color of label, optional. kwargs Additional arguments to be passed to :class:`~.Matrix`. Returns ------- :class:`~.Matrix` The label. Examples -------- .. manim:: VectorCoordinateLabel :save_last_frame: class VectorCoordinateLabel(Scene): def construct(self): plane = NumberPlane() vec_1 = Vector([1, 2]) vec_2 = Vector([-3, -2]) label_1 = vec_1.coordinate_label() label_2 = vec_2.coordinate_label(color=YELLOW) self.add(plane, vec_1, vec_2, label_1, label_2) """ # avoiding circular imports from ..matrix import Matrix vect = np.array(self.get_end()) if integer_labels: vect = np.round(vect).astype(int) vect = vect[:n_dim] vect = vect.reshape((n_dim, 1)) label = Matrix(vect, **kwargs) label.scale(LARGE_BUFF - 0.2) shift_dir = np.array(self.get_end()) if shift_dir[0] >= 0: # Pointing right shift_dir -= label.get_left() + DEFAULT_MOBJECT_TO_MOBJECT_BUFFER * LEFT else: # Pointing left shift_dir -= label.get_right() + DEFAULT_MOBJECT_TO_MOBJECT_BUFFER * RIGHT label.shift(shift_dir) if color is not None: label.set_color(color) return label class DoubleArrow(Arrow): """An arrow with tips on both ends. Parameters ---------- args Arguments to be passed to :class:`Arrow` kwargs Additional arguments to be passed to :class:`Arrow` .. seealso:: :class:`.~ArrowTip` :class:`.~CurvedDoubleArrow` Examples -------- .. manim:: DoubleArrowExample :save_last_frame: from manim.mobject.geometry.tips import ArrowCircleFilledTip class DoubleArrowExample(Scene): def construct(self): circle = Circle(radius=2.0) d_arrow = DoubleArrow(start=circle.get_left(), end=circle.get_right()) d_arrow_2 = DoubleArrow(tip_shape_end=ArrowCircleFilledTip, tip_shape_start=ArrowCircleFilledTip) group = Group(Group(circle, d_arrow), d_arrow_2).arrange(UP, buff=1) self.add(group) .. manim:: DoubleArrowExample2 :save_last_frame: class DoubleArrowExample2(Scene): def construct(self): box = Square() p1 = box.get_left() p2 = box.get_right() d1 = DoubleArrow(p1, p2, buff=0) d2 = DoubleArrow(p1, p2, buff=0, tip_length=0.2, color=YELLOW) d3 = DoubleArrow(p1, p2, buff=0, tip_length=0.4, color=BLUE) Group(d1, d2, d3).arrange(DOWN) self.add(box, d1, d2, d3) """ def __init__(self, *args: Any, **kwargs: Any) -> None: if "tip_shape_end" in kwargs: kwargs["tip_shape"] = kwargs.pop("tip_shape_end") tip_shape_start = kwargs.pop("tip_shape_start", ArrowTriangleFilledTip) super().__init__(*args, **kwargs) self.add_tip(at_start=True, tip_shape=tip_shape_start) class Angle(VMobject, metaclass=ConvertToOpenGL): """A circular arc or elbow-type mobject representing an angle of two lines. Parameters ---------- line1 : The first line. line2 : The second line. radius : The radius of the :class:`Arc`. quadrant A sequence of two :class:`int` numbers determining which of the 4 quadrants should be used. The first value indicates whether to anchor the arc on the first line closer to the end point (1) or start point (-1), and the second value functions similarly for the end (1) or start (-1) of the second line. Possibilities: (1,1), (-1,1), (1,-1), (-1,-1). other_angle : Toggles between the two possible angles defined by two points and an arc center. If set to False (default), the arc will always go counterclockwise from the point on line1 until the point on line2 is reached. If set to True, the angle will go clockwise from line1 to line2. dot Allows for a :class:`Dot` in the arc. Mainly used as an convention to indicate a right angle. The dot can be customized in the next three parameters. dot_radius The radius of the :class:`Dot`. If not specified otherwise, this radius will be 1/10 of the arc radius. dot_distance Relative distance from the center to the arc: 0 puts the dot in the center and 1 on the arc itself. dot_color The color of the :class:`Dot`. elbow Produces an elbow-type mobject indicating a right angle, see :class:`RightAngle` for more information and a shorthand. **kwargs Further keyword arguments that are passed to the constructor of :class:`Arc` or :class:`Elbow`. Examples -------- The first example shows some right angles with a dot in the middle while the second example shows all 8 possible angles defined by two lines. .. manim:: RightArcAngleExample :save_last_frame: class RightArcAngleExample(Scene): def construct(self): line1 = Line( LEFT, RIGHT ) line2 = Line( DOWN, UP ) rightarcangles = [ Angle(line1, line2, dot=True), Angle(line1, line2, radius=0.4, quadrant=(1,-1), dot=True, other_angle=True), Angle(line1, line2, radius=0.5, quadrant=(-1,1), stroke_width=8, dot=True, dot_color=YELLOW, dot_radius=0.04, other_angle=True), Angle(line1, line2, radius=0.7, quadrant=(-1,-1), color=RED, dot=True, dot_color=GREEN, dot_radius=0.08), ] plots = VGroup() for angle in rightarcangles: plot=VGroup(line1.copy(),line2.copy(), angle) plots.add(plot) plots.arrange(buff=1.5) self.add(plots) .. manim:: AngleExample :save_last_frame: class AngleExample(Scene): def construct(self): line1 = Line( LEFT + (1/3) * UP, RIGHT + (1/3) * DOWN ) line2 = Line( DOWN + (1/3) * RIGHT, UP + (1/3) * LEFT ) angles = [ Angle(line1, line2), Angle(line1, line2, radius=0.4, quadrant=(1,-1), other_angle=True), Angle(line1, line2, radius=0.5, quadrant=(-1,1), stroke_width=8, other_angle=True), Angle(line1, line2, radius=0.7, quadrant=(-1,-1), color=RED), Angle(line1, line2, other_angle=True), Angle(line1, line2, radius=0.4, quadrant=(1,-1)), Angle(line1, line2, radius=0.5, quadrant=(-1,1), stroke_width=8), Angle(line1, line2, radius=0.7, quadrant=(-1,-1), color=RED, other_angle=True), ] plots = VGroup() for angle in angles: plot=VGroup(line1.copy(),line2.copy(), angle) plots.add(VGroup(plot,SurroundingRectangle(plot, buff=0.3))) plots.arrange_in_grid(rows=2,buff=1) self.add(plots) .. manim:: FilledAngle :save_last_frame: class FilledAngle(Scene): def construct(self): l1 = Line(ORIGIN, 2 * UP + RIGHT).set_color(GREEN) l2 = ( Line(ORIGIN, 2 * UP + RIGHT) .set_color(GREEN) .rotate(-20 * DEGREES, about_point=ORIGIN) ) norm = l1.get_length() a1 = Angle(l1, l2, other_angle=True, radius=norm - 0.5).set_color(GREEN) a2 = Angle(l1, l2, other_angle=True, radius=norm).set_color(GREEN) q1 = a1.points # save all coordinates of points of angle a1 q2 = a2.reverse_direction().points # save all coordinates of points of angle a1 (in reversed direction) pnts = np.concatenate([q1, q2, q1[0].reshape(1, 3)]) # adds points and ensures that path starts and ends at same point mfill = VMobject().set_color(ORANGE) mfill.set_points_as_corners(pnts).set_fill(GREEN, opacity=1) self.add(l1, l2) self.add(mfill) """ def __init__( self, line1: Line, line2: Line, radius: float | None = None, quadrant: AngleQuadrant = (1, 1), other_angle: bool = False, dot: bool = False, dot_radius: float | None = None, dot_distance: float = 0.55, dot_color: ParsableManimColor = WHITE, elbow: bool = False, **kwargs: Any, ) -> None: super().__init__(**kwargs) self.lines = (line1, line2) self.quadrant = quadrant self.dot_distance = dot_distance self.elbow = elbow inter = line_intersection( [line1.get_start(), line1.get_end()], [line2.get_start(), line2.get_end()], ) if radius is None: if quadrant[0] == 1: dist_1 = np.linalg.norm(line1.get_end() - inter) else: dist_1 = np.linalg.norm(line1.get_start() - inter) if quadrant[1] == 1: dist_2 = np.linalg.norm(line2.get_end() - inter) else: dist_2 = np.linalg.norm(line2.get_start() - inter) if np.minimum(dist_1, dist_2) < 0.6: radius = (2 / 3) * np.minimum(dist_1, dist_2) else: radius = 0.4 else: self.radius = radius anchor_angle_1 = inter + quadrant[0] * radius * line1.get_unit_vector() anchor_angle_2 = inter + quadrant[1] * radius * line2.get_unit_vector() if elbow: anchor_middle = ( inter + quadrant[0] * radius * line1.get_unit_vector() + quadrant[1] * radius * line2.get_unit_vector() ) angle_mobject: VMobject = Elbow(**kwargs) angle_mobject.set_points_as_corners( np.array([anchor_angle_1, anchor_middle, anchor_angle_2]), ) else: angle_1 = angle_of_vector(anchor_angle_1 - inter) angle_2 = angle_of_vector(anchor_angle_2 - inter) if not other_angle: start_angle = angle_1 if angle_2 > angle_1: angle_fin = angle_2 - angle_1 else: angle_fin = 2 * np.pi - (angle_1 - angle_2) else: start_angle = angle_1 if angle_2 < angle_1: angle_fin = -angle_1 + angle_2 else: angle_fin = -2 * np.pi + (angle_2 - angle_1) self.angle_value = angle_fin angle_mobject = Arc( radius=radius, angle=self.angle_value, start_angle=start_angle, arc_center=inter, **kwargs, ) if dot: if dot_radius is None: dot_radius = radius / 10 else: self.dot_radius = dot_radius right_dot = Dot(ORIGIN, radius=dot_radius, color=dot_color) dot_anchor = ( inter + (angle_mobject.get_center() - inter) / np.linalg.norm(angle_mobject.get_center() - inter) * radius * dot_distance ) right_dot.move_to(dot_anchor) self.add(right_dot) self.set_points(angle_mobject.points) def get_lines(self) -> VGroup: """Get the lines forming an angle of the :class:`Angle` class. Returns ------- :class:`~.VGroup` A :class:`~.VGroup` containing the lines that form the angle of the :class:`Angle` class. Examples -------- :: >>> line_1, line_2 = Line(ORIGIN, RIGHT), Line(ORIGIN, UR) >>> angle = Angle(line_1, line_2) >>> angle.get_lines() VGroup(Line, Line) """ return VGroup(*self.lines) def get_value(self, degrees: bool = False) -> float: r"""Get the value of an angle of the :class:`Angle` class. Parameters ---------- degrees A boolean to decide the unit (deg/rad) in which the value of the angle is returned. Returns ------- :class:`float` The value in degrees/radians of an angle of the :class:`Angle` class. Examples -------- .. manim:: GetValueExample :save_last_frame: class GetValueExample(Scene): def construct(self): line1 = Line(LEFT+(1/3)*UP, RIGHT+(1/3)*DOWN) line2 = Line(DOWN+(1/3)*RIGHT, UP+(1/3)*LEFT) angle = Angle(line1, line2, radius=0.4) value = DecimalNumber(angle.get_value(degrees=True), unit=r"^{\circ}") value.next_to(angle, UR) self.add(line1, line2, angle, value) """ return self.angle_value / DEGREES if degrees else self.angle_value @staticmethod def from_three_points( A: Point3DLike, B: Point3DLike, C: Point3DLike, **kwargs: Any ) -> Angle: r"""The angle between the lines AB and BC. This constructs the angle :math:`\\angle ABC`. Parameters ---------- A The endpoint of the first angle leg B The vertex of the angle C The endpoint of the second angle leg **kwargs Further keyword arguments are passed to :class:`.Angle` Returns ------- The Angle calculated from the three points Angle(line1, line2, radius=0.5, quadrant=(-1,1), stroke_width=8), Angle(line1, line2, radius=0.7, quadrant=(-1,-1), color=RED, other_angle=True), Examples -------- .. manim:: AngleFromThreePointsExample :save_last_frame: class AngleFromThreePointsExample(Scene): def construct(self): sample_angle = Angle.from_three_points(UP, ORIGIN, LEFT) red_angle = Angle.from_three_points(LEFT + UP, ORIGIN, RIGHT, radius=.8, quadrant=(-1,-1), color=RED, stroke_width=8, other_angle=True) self.add(red_angle, sample_angle) """ return Angle(Line(B, A), Line(B, C), **kwargs) class RightAngle(Angle): """An elbow-type mobject representing a right angle between two lines. Parameters ---------- line1 The first line. line2 The second line. length The length of the arms. **kwargs Further keyword arguments that are passed to the constructor of :class:`Angle`. Examples -------- .. manim:: RightAngleExample :save_last_frame: class RightAngleExample(Scene): def construct(self): line1 = Line( LEFT, RIGHT ) line2 = Line( DOWN, UP ) rightangles = [ RightAngle(line1, line2), RightAngle(line1, line2, length=0.4, quadrant=(1,-1)), RightAngle(line1, line2, length=0.5, quadrant=(-1,1), stroke_width=8), RightAngle(line1, line2, length=0.7, quadrant=(-1,-1), color=RED), ] plots = VGroup() for rightangle in rightangles: plot=VGroup(line1.copy(),line2.copy(), rightangle) plots.add(plot) plots.arrange(buff=1.5) self.add(plots) """ def __init__( self, line1: Line, line2: Line, length: float | None = None, **kwargs: Any, ) -> None: super().__init__(line1, line2, radius=length, elbow=True, **kwargs) ================================================ FILE: manim/mobject/geometry/polygram.py ================================================ r"""Mobjects that are simple geometric shapes.""" from __future__ import annotations __all__ = [ "Polygram", "Polygon", "RegularPolygram", "RegularPolygon", "Star", "Triangle", "Rectangle", "Square", "RoundedRectangle", "Cutout", "ConvexHull", ] from math import ceil from typing import TYPE_CHECKING, Any, Literal import numpy as np from manim.constants import * from manim.mobject.geometry.arc import ArcBetweenPoints from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.types.vectorized_mobject import VGroup, VMobject from manim.utils.color import BLUE, WHITE, ParsableManimColor from manim.utils.iterables import adjacent_n_tuples, adjacent_pairs from manim.utils.qhull import QuickHull from manim.utils.space_ops import angle_between_vectors, normalize, regular_vertices if TYPE_CHECKING: import numpy.typing as npt from typing_extensions import Self from manim.typing import ( Point3D, Point3D_Array, Point3DLike, Point3DLike_Array, ) from manim.utils.color import ParsableManimColor class Polygram(VMobject, metaclass=ConvertToOpenGL): """A generalized :class:`Polygon`, allowing for disconnected sets of edges. Parameters ---------- vertex_groups The groups of vertices making up the :class:`Polygram`. The first vertex in each group is repeated to close the shape. Each point must be 3-dimensional: ``[x,y,z]`` color The color of the :class:`Polygram`. kwargs Forwarded to the parent constructor. Examples -------- .. manim:: PolygramExample import numpy as np class PolygramExample(Scene): def construct(self): hexagram = Polygram( [[0, 2, 0], [-np.sqrt(3), -1, 0], [np.sqrt(3), -1, 0]], [[-np.sqrt(3), 1, 0], [0, -2, 0], [np.sqrt(3), 1, 0]], ) self.add(hexagram) dot = Dot() self.play(MoveAlongPath(dot, hexagram), run_time=5, rate_func=linear) self.remove(dot) self.wait() """ def __init__( self, *vertex_groups: Point3DLike_Array, color: ParsableManimColor = BLUE, **kwargs: Any, ): super().__init__(color=color, **kwargs) for vertices in vertex_groups: # The inferred type for *vertices is Any, but it should be # Point3D_Array first_vertex, *vertices = vertices first_vertex = np.array(first_vertex) self.start_new_path(first_vertex) self.add_points_as_corners( [*(np.array(vertex) for vertex in vertices), first_vertex], ) def get_vertices(self) -> Point3D_Array: """Gets the vertices of the :class:`Polygram`. Returns ------- :class:`numpy.ndarray` The vertices of the :class:`Polygram`. Examples -------- :: >>> sq = Square() >>> sq.get_vertices() array([[ 1., 1., 0.], [-1., 1., 0.], [-1., -1., 0.], [ 1., -1., 0.]]) """ return self.get_start_anchors() def get_vertex_groups(self) -> list[Point3D_Array]: """Gets the vertex groups of the :class:`Polygram`. Returns ------- list[Point3D_Array] The list of vertex groups of the :class:`Polygram`. Examples -------- :: >>> poly = Polygram([ORIGIN, RIGHT, UP, LEFT + UP], [LEFT, LEFT + UP, 2 * LEFT]) >>> groups = poly.get_vertex_groups() >>> len(groups) 2 >>> groups[0] array([[ 0., 0., 0.], [ 1., 0., 0.], [ 0., 1., 0.], [-1., 1., 0.]]) >>> groups[1] array([[-1., 0., 0.], [-1., 1., 0.], [-2., 0., 0.]]) """ vertex_groups = [] # TODO: If any of the original vertex groups contained the starting vertex N # times, then .get_vertex_groups() splits it into N vertex groups. group = [] for start, end in zip(self.get_start_anchors(), self.get_end_anchors()): group.append(start) if self.consider_points_equals(end, group[0]): vertex_groups.append(np.array(group)) group = [] return vertex_groups def round_corners( self, radius: float | list[float] = 0.5, evenly_distribute_anchors: bool = False, components_per_rounded_corner: int = 2, ) -> Self: """Rounds off the corners of the :class:`Polygram`. Parameters ---------- radius The curvature of the corners of the :class:`Polygram`. evenly_distribute_anchors Break long line segments into proportionally-sized segments. components_per_rounded_corner The number of points used to represent the rounded corner curve. .. seealso:: :class:`.~RoundedRectangle` .. note:: If `radius` is supplied as a single value, then the same radius will be applied to all corners. If `radius` is a list, then the individual values will be applied sequentially, with the first corner receiving `radius[0]`, the second corner receiving `radius[1]`, etc. The radius list will be repeated as necessary. The `components_per_rounded_corner` value is provided so that the fidelity of the rounded corner may be fine-tuned as needed. 2 is an appropriate value for most shapes, however a larger value may be need if the rounded corner is particularly large. 2 is the minimum number allowed, representing the start and end of the curve. 3 will result in a start, middle, and end point, meaning 2 curves will be generated. The option to `evenly_distribute_anchors` is provided so that the line segments (the part part of each line remaining after rounding off the corners) can be subdivided to a density similar to that of the average density of the rounded corners. This may be desirable in situations in which an even distribution of curves is desired for use in later transformation animations. Be aware, though, that enabling this option can result in an an object containing significantly more points than the original, especially when the rounded corner curves are small. Examples -------- .. manim:: PolygramRoundCorners :save_last_frame: class PolygramRoundCorners(Scene): def construct(self): star = Star(outer_radius=2) shapes = VGroup(star) shapes.add(star.copy().round_corners(radius=0.1)) shapes.add(star.copy().round_corners(radius=0.25)) shapes.arrange(RIGHT) self.add(shapes) """ if radius == 0: return self new_points: list[Point3D] = [] for vertex_group in self.get_vertex_groups(): arcs = [] # Repeat the radius list as necessary in order to provide a radius # for each vertex. if isinstance(radius, (int, float)): radius_list = [radius] * len(vertex_group) else: radius_list = radius * ceil(len(vertex_group) / len(radius)) for current_radius, (v1, v2, v3) in zip( radius_list, adjacent_n_tuples(vertex_group, 3) ): vect1 = v2 - v1 vect2 = v3 - v2 unit_vect1 = normalize(vect1) unit_vect2 = normalize(vect2) angle = angle_between_vectors(vect1, vect2) # Negative radius gives concave curves angle *= np.sign(current_radius) # Distance between vertex and start of the arc cut_off_length = current_radius * np.tan(angle / 2) # Determines counterclockwise vs. clockwise sign = np.sign(np.cross(vect1, vect2)[2]) arc = ArcBetweenPoints( v2 - unit_vect1 * cut_off_length, v2 + unit_vect2 * cut_off_length, angle=sign * angle, num_components=components_per_rounded_corner, ) arcs.append(arc) if evenly_distribute_anchors: # Determine the average length of each curve nonzero_length_arcs = [arc for arc in arcs if len(arc.points) > 4] if len(nonzero_length_arcs) > 0: total_arc_length = sum( [arc.get_arc_length() for arc in nonzero_length_arcs] ) num_curves = ( sum([len(arc.points) for arc in nonzero_length_arcs]) / 4 ) average_arc_length = total_arc_length / num_curves else: average_arc_length = 1.0 # To ensure that we loop through starting with last arcs = [arcs[-1], *arcs[:-1]] from manim.mobject.geometry.line import Line for arc1, arc2 in adjacent_pairs(arcs): new_points.extend(arc1.points) line = Line(arc1.get_end(), arc2.get_start()) # Make sure anchors are evenly distributed, if necessary if evenly_distribute_anchors: line.insert_n_curves(ceil(line.get_length() / average_arc_length)) new_points.extend(line.points) self.set_points(np.array(new_points)) return self class Polygon(Polygram): """A shape consisting of one closed loop of vertices. Parameters ---------- vertices The vertices of the :class:`Polygon`. kwargs Forwarded to the parent constructor. Examples -------- .. manim:: PolygonExample :save_last_frame: class PolygonExample(Scene): def construct(self): isosceles = Polygon([-5, 1.5, 0], [-2, 1.5, 0], [-3.5, -2, 0]) position_list = [ [4, 1, 0], # middle right [4, -2.5, 0], # bottom right [0, -2.5, 0], # bottom left [0, 3, 0], # top left [2, 1, 0], # middle [4, 3, 0], # top right ] square_and_triangles = Polygon(*position_list, color=PURPLE_B) self.add(isosceles, square_and_triangles) """ def __init__(self, *vertices: Point3DLike, **kwargs: Any) -> None: super().__init__(vertices, **kwargs) class RegularPolygram(Polygram): """A :class:`Polygram` with regularly spaced vertices. Parameters ---------- num_vertices The number of vertices. density The density of the :class:`RegularPolygram`. Can be thought of as how many vertices to hop to draw a line between them. Every ``density``-th vertex is connected. radius The radius of the circle that the vertices are placed on. start_angle The angle the vertices start at; the rotation of the :class:`RegularPolygram`. kwargs Forwarded to the parent constructor. Examples -------- .. manim:: RegularPolygramExample :save_last_frame: class RegularPolygramExample(Scene): def construct(self): pentagram = RegularPolygram(5, radius=2) self.add(pentagram) """ def __init__( self, num_vertices: int, *, density: int = 2, radius: float = 1, start_angle: float | None = None, **kwargs: Any, ) -> None: # Regular polygrams can be expressed by the number of their vertices # and their density. This relation can be expressed as its Schläfli # symbol: {num_vertices/density}. # # For instance, a pentagon can be expressed as {5/1} or just {5}. # A pentagram, however, can be expressed as {5/2}. # A hexagram *would* be expressed as {6/2}, except that 6 and 2 # are not coprime, and it can be simplified to 2{3}, which corresponds # to the fact that a hexagram is actually made up of 2 triangles. # # See https://en.wikipedia.org/wiki/Polygram_(geometry)#Generalized_regular_polygons # for more information. num_gons = np.gcd(num_vertices, density) num_vertices //= num_gons density //= num_gons # Utility function for generating the individual # polygon vertices. def gen_polygon_vertices(start_angle: float | None) -> tuple[list[Any], float]: reg_vertices, start_angle = regular_vertices( num_vertices, radius=radius, start_angle=start_angle, ) vertices = [] i = 0 while True: vertices.append(reg_vertices[i]) i += density i %= num_vertices if i == 0: break return vertices, start_angle first_group, self.start_angle = gen_polygon_vertices(start_angle) vertex_groups = [first_group] for i in range(1, num_gons): start_angle = self.start_angle + (i / num_gons) * TAU / num_vertices group, _ = gen_polygon_vertices(start_angle) vertex_groups.append(group) super().__init__(*vertex_groups, **kwargs) class RegularPolygon(RegularPolygram): """An n-sided regular :class:`Polygon`. Parameters ---------- n The number of sides of the :class:`RegularPolygon`. kwargs Forwarded to the parent constructor. Examples -------- .. manim:: RegularPolygonExample :save_last_frame: class RegularPolygonExample(Scene): def construct(self): poly_1 = RegularPolygon(n=6) poly_2 = RegularPolygon(n=6, start_angle=30*DEGREES, color=GREEN) poly_3 = RegularPolygon(n=10, color=RED) poly_group = Group(poly_1, poly_2, poly_3).scale(1.5).arrange(buff=1) self.add(poly_group) """ def __init__(self, n: int = 6, **kwargs: Any) -> None: super().__init__(n, density=1, **kwargs) class Star(Polygon): """A regular polygram without the intersecting lines. Parameters ---------- n How many points on the :class:`Star`. outer_radius The radius of the circle that the outer vertices are placed on. inner_radius The radius of the circle that the inner vertices are placed on. If unspecified, the inner radius will be calculated such that the edges of the :class:`Star` perfectly follow the edges of its :class:`RegularPolygram` counterpart. density The density of the :class:`Star`. Only used if ``inner_radius`` is unspecified. See :class:`RegularPolygram` for more information. start_angle The angle the vertices start at; the rotation of the :class:`Star`. kwargs Forwardeds to the parent constructor. Raises ------ :exc:`ValueError` If ``inner_radius`` is unspecified and ``density`` is not in the range ``[1, n/2)``. Examples -------- .. manim:: StarExample class StarExample(Scene): def construct(self): pentagram = RegularPolygram(5, radius=2) star = Star(outer_radius=2, color=RED) self.add(pentagram) self.play(Create(star), run_time=3) self.play(FadeOut(star), run_time=2) .. manim:: DifferentDensitiesExample :save_last_frame: class DifferentDensitiesExample(Scene): def construct(self): density_2 = Star(7, outer_radius=2, density=2, color=RED) density_3 = Star(7, outer_radius=2, density=3, color=PURPLE) self.add(VGroup(density_2, density_3).arrange(RIGHT)) """ def __init__( self, n: int = 5, *, outer_radius: float = 1, inner_radius: float | None = None, density: int = 2, start_angle: float | None = TAU / 4, **kwargs: Any, ) -> None: inner_angle = TAU / (2 * n) if inner_radius is None: # See https://math.stackexchange.com/a/2136292 for an # overview of how to calculate the inner radius of a # perfect star. if density <= 0 or density >= n / 2: raise ValueError( f"Incompatible density {density} for number of points {n}", ) outer_angle = TAU * density / n inverse_x = 1 - np.tan(inner_angle) * ( (np.cos(outer_angle) - 1) / np.sin(outer_angle) ) inner_radius = outer_radius / (np.cos(inner_angle) * inverse_x) outer_vertices, self.start_angle = regular_vertices( n, radius=outer_radius, start_angle=start_angle, ) inner_vertices, _ = regular_vertices( n, radius=inner_radius, start_angle=self.start_angle + inner_angle, ) vertices: list[npt.NDArray] = [] for pair in zip(outer_vertices, inner_vertices): vertices.extend(pair) super().__init__(*vertices, **kwargs) class Triangle(RegularPolygon): """An equilateral triangle. Parameters ---------- kwargs Additional arguments to be passed to :class:`RegularPolygon` Examples -------- .. manim:: TriangleExample :save_last_frame: class TriangleExample(Scene): def construct(self): triangle_1 = Triangle() triangle_2 = Triangle().scale(2).rotate(60*DEGREES) tri_group = Group(triangle_1, triangle_2).arrange(buff=1) self.add(tri_group) """ def __init__(self, **kwargs: Any) -> None: super().__init__(n=3, **kwargs) class Rectangle(Polygon): """A quadrilateral with two sets of parallel sides. Parameters ---------- color The color of the rectangle. height The vertical height of the rectangle. width The horizontal width of the rectangle. grid_xstep Space between vertical grid lines. grid_ystep Space between horizontal grid lines. mark_paths_closed No purpose. close_new_points No purpose. kwargs Additional arguments to be passed to :class:`Polygon` Examples ---------- .. manim:: RectangleExample :save_last_frame: class RectangleExample(Scene): def construct(self): rect1 = Rectangle(width=4.0, height=2.0, grid_xstep=1.0, grid_ystep=0.5) rect2 = Rectangle(width=1.0, height=4.0) rect3 = Rectangle(width=2.0, height=2.0, grid_xstep=1.0, grid_ystep=1.0) rect3.grid_lines.set_stroke(width=1) rects = Group(rect1, rect2, rect3).arrange(buff=1) self.add(rects) """ def __init__( self, color: ParsableManimColor = WHITE, height: float = 2.0, width: float = 4.0, grid_xstep: float | None = None, grid_ystep: float | None = None, mark_paths_closed: bool = True, close_new_points: bool = True, **kwargs: Any, ): super().__init__(UR, UL, DL, DR, color=color, **kwargs) self.stretch_to_fit_width(width) self.stretch_to_fit_height(height) v = self.get_vertices() self.grid_lines = VGroup() if grid_xstep or grid_ystep: from manim.mobject.geometry.line import Line v = self.get_vertices() if grid_xstep: grid_xstep = abs(grid_xstep) count = int(width / grid_xstep) grid = VGroup( *( Line( v[1] + i * grid_xstep * RIGHT, v[1] + i * grid_xstep * RIGHT + height * DOWN, color=color, ) for i in range(1, count) ) ) self.grid_lines.add(grid) if grid_ystep: grid_ystep = abs(grid_ystep) count = int(height / grid_ystep) grid = VGroup( *( Line( v[1] + i * grid_ystep * DOWN, v[1] + i * grid_ystep * DOWN + width * RIGHT, color=color, ) for i in range(1, count) ) ) self.grid_lines.add(grid) if self.grid_lines: self.add(self.grid_lines) class Square(Rectangle): """A rectangle with equal side lengths. Parameters ---------- side_length The length of the sides of the square. kwargs Additional arguments to be passed to :class:`Rectangle`. Examples -------- .. manim:: SquareExample :save_last_frame: class SquareExample(Scene): def construct(self): square_1 = Square(side_length=2.0).shift(DOWN) square_2 = Square(side_length=1.0).next_to(square_1, direction=UP) square_3 = Square(side_length=0.5).next_to(square_2, direction=UP) self.add(square_1, square_2, square_3) """ def __init__(self, side_length: float = 2.0, **kwargs: Any) -> None: super().__init__(height=side_length, width=side_length, **kwargs) @property def side_length(self) -> float: return float(np.linalg.norm(self.get_vertices()[0] - self.get_vertices()[1])) @side_length.setter def side_length(self, value: float) -> None: self.scale(value / self.side_length) class RoundedRectangle(Rectangle): """A rectangle with rounded corners. Parameters ---------- corner_radius The curvature of the corners of the rectangle. kwargs Additional arguments to be passed to :class:`Rectangle` Examples -------- .. manim:: RoundedRectangleExample :save_last_frame: class RoundedRectangleExample(Scene): def construct(self): rect_1 = RoundedRectangle(corner_radius=0.5) rect_2 = RoundedRectangle(corner_radius=1.5, height=4.0, width=4.0) rect_group = Group(rect_1, rect_2).arrange(buff=1) self.add(rect_group) """ def __init__(self, corner_radius: float | list[float] = 0.5, **kwargs: Any): super().__init__(**kwargs) self.corner_radius = corner_radius self.round_corners(self.corner_radius) class Cutout(VMobject, metaclass=ConvertToOpenGL): """A shape with smaller cutouts. Parameters ---------- main_shape The primary shape from which cutouts are made. mobjects The smaller shapes which are to be cut out of the ``main_shape``. kwargs Further keyword arguments that are passed to the constructor of :class:`~.VMobject`. .. warning:: Technically, this class behaves similar to a symmetric difference: if parts of the ``mobjects`` are not located within the ``main_shape``, these parts will be added to the resulting :class:`~.VMobject`. Examples -------- .. manim:: CutoutExample class CutoutExample(Scene): def construct(self): s1 = Square().scale(2.5) s2 = Triangle().shift(DOWN + RIGHT).scale(0.5) s3 = Square().shift(UP + RIGHT).scale(0.5) s4 = RegularPolygon(5).shift(DOWN + LEFT).scale(0.5) s5 = RegularPolygon(6).shift(UP + LEFT).scale(0.5) c = Cutout(s1, s2, s3, s4, s5, fill_opacity=1, color=BLUE, stroke_color=RED) self.play(Write(c), run_time=4) self.wait() """ def __init__( self, main_shape: VMobject, *mobjects: VMobject, **kwargs: Any ) -> None: super().__init__(**kwargs) self.append_points(main_shape.points) sub_direction: Literal["CCW", "CW"] = ( "CCW" if main_shape.get_direction() == "CW" else "CW" ) for mobject in mobjects: self.append_points(mobject.force_direction(sub_direction).points) class ConvexHull(Polygram): """Constructs a convex hull for a set of points in no particular order. Parameters ---------- points The points to consider. tolerance The tolerance used by quickhull. kwargs Forwarded to the parent constructor. Examples -------- .. manim:: ConvexHullExample :save_last_frame: :quality: high class ConvexHullExample(Scene): def construct(self): points = [ [-2.35, -2.25, 0], [1.65, -2.25, 0], [2.65, -0.25, 0], [1.65, 1.75, 0], [-0.35, 2.75, 0], [-2.35, 0.75, 0], [-0.35, -1.25, 0], [0.65, -0.25, 0], [-1.35, 0.25, 0], [0.15, 0.75, 0] ] hull = ConvexHull(*points, color=BLUE) dots = VGroup(*[Dot(point) for point in points]) self.add(hull) self.add(dots) """ def __init__( self, *points: Point3DLike, tolerance: float = 1e-5, **kwargs: Any ) -> None: # Build Convex Hull array = np.array(points)[:, :2] hull = QuickHull(tolerance) hull.build(array) # Extract Vertices facets = set(hull.facets) - hull.removed facet = facets.pop() subfacets = list(facet.subfacets) while len(subfacets) <= len(facets): sf = subfacets[-1] (facet,) = hull.neighbors[sf] - {facet} (sf,) = facet.subfacets - {sf} subfacets.append(sf) # Setup Vertices as Point3D coordinates = np.vstack([sf.coordinates for sf in subfacets]) vertices = np.hstack((coordinates, np.zeros((len(coordinates), 1)))) # Call Polygram super().__init__(vertices, **kwargs) ================================================ FILE: manim/mobject/geometry/shape_matchers.py ================================================ """Mobjects used to mark and annotate other mobjects.""" from __future__ import annotations __all__ = ["SurroundingRectangle", "BackgroundRectangle", "Cross", "Underline"] from typing import Any from typing_extensions import Self from manim import logger from manim._config import config from manim.constants import ( DOWN, LEFT, RIGHT, SMALL_BUFF, UP, ) from manim.mobject.geometry.line import Line from manim.mobject.geometry.polygram import RoundedRectangle from manim.mobject.mobject import Mobject from manim.mobject.opengl.opengl_mobject import OpenGLMobject from manim.mobject.types.vectorized_mobject import VGroup from manim.utils.color import BLACK, RED, YELLOW, ManimColor, ParsableManimColor class SurroundingRectangle(RoundedRectangle): r"""A rectangle surrounding a :class:`~.Mobject` Examples -------- .. manim:: SurroundingRectExample :save_last_frame: class SurroundingRectExample(Scene): def construct(self): title = Title("A Quote from Newton") quote = Text( "If I have seen further than others, \n" "it is by standing upon the shoulders of giants.", color=BLUE, ).scale(0.75) box = SurroundingRectangle(quote, color=YELLOW, buff=MED_LARGE_BUFF) t2 = Tex(r"Hello World").scale(1.5) box2 = SurroundingRectangle(t2, corner_radius=0.2) mobjects = VGroup(VGroup(box, quote), VGroup(t2, box2)).arrange(DOWN) self.add(title, mobjects) """ def __init__( self, *mobjects: Mobject, color: ParsableManimColor = YELLOW, buff: float | tuple[float, float] = SMALL_BUFF, corner_radius: float = 0.0, **kwargs: Any, ) -> None: from manim.mobject.mobject import Group if not all(isinstance(mob, (Mobject, OpenGLMobject)) for mob in mobjects): raise TypeError( "Expected all inputs for parameter mobjects to be a Mobjects" ) if isinstance(buff, tuple): buff_x = buff[0] buff_y = buff[1] else: buff_x = buff_y = buff group = Group(*mobjects) super().__init__( color=color, width=group.width + 2 * buff_x, height=group.height + 2 * buff_y, corner_radius=corner_radius, **kwargs, ) self.buff = buff self.move_to(group) class BackgroundRectangle(SurroundingRectangle): """A background rectangle. Its default color is the background color of the scene. Examples -------- .. manim:: ExampleBackgroundRectangle :save_last_frame: class ExampleBackgroundRectangle(Scene): def construct(self): circle = Circle().shift(LEFT) circle.set_stroke(color=GREEN, width=20) triangle = Triangle().shift(2 * RIGHT) triangle.set_fill(PINK, opacity=0.5) backgroundRectangle1 = BackgroundRectangle(circle, color=WHITE, fill_opacity=0.15) backgroundRectangle2 = BackgroundRectangle(triangle, color=WHITE, fill_opacity=0.15) self.add(backgroundRectangle1) self.add(backgroundRectangle2) self.add(circle) self.add(triangle) self.play(Rotate(backgroundRectangle1, PI / 4)) self.play(Rotate(backgroundRectangle2, PI / 2)) """ def __init__( self, *mobjects: Mobject, color: ParsableManimColor | None = None, stroke_width: float = 0, stroke_opacity: float = 0, fill_opacity: float = 0.75, buff: float | tuple[float, float] = 0, **kwargs: Any, ) -> None: if color is None: color = config.background_color super().__init__( *mobjects, color=color, stroke_width=stroke_width, stroke_opacity=stroke_opacity, fill_opacity=fill_opacity, buff=buff, **kwargs, ) self.original_fill_opacity: float = self.fill_opacity def pointwise_become_partial(self, mobject: Mobject, a: Any, b: float) -> Self: self.set_fill(opacity=b * self.original_fill_opacity) return self def set_style(self, fill_opacity: float, **kwargs: Any) -> Self: # type: ignore[override] # Unchangeable style, except for fill_opacity # All other style arguments are ignored super().set_style( stroke_color=BLACK, stroke_width=0, fill_color=BLACK, fill_opacity=fill_opacity, ) if len(kwargs) > 0: logger.info( "Argument %s is ignored in BackgroundRectangle.set_style.", kwargs, ) return self def get_fill_color(self) -> ManimColor: # The type of the color property is set to Any using the property decorator # vectorized_mobject.py#L571 temp_color: ManimColor = self.color return temp_color class Cross(VGroup): """Creates a cross. Parameters ---------- mobject The mobject linked to this instance. It fits the mobject when specified. Defaults to None. stroke_color Specifies the color of the cross lines. Defaults to RED. stroke_width Specifies the width of the cross lines. Defaults to 6. scale_factor Scales the cross to the provided units. Defaults to 1. Examples -------- .. manim:: ExampleCross :save_last_frame: class ExampleCross(Scene): def construct(self): cross = Cross() self.add(cross) """ def __init__( self, mobject: Mobject | None = None, stroke_color: ParsableManimColor = RED, stroke_width: float = 6.0, scale_factor: float = 1.0, **kwargs: Any, ) -> None: super().__init__( Line(UP + LEFT, DOWN + RIGHT), Line(UP + RIGHT, DOWN + LEFT), **kwargs ) if mobject is not None: self.replace(mobject, stretch=True) self.scale(scale_factor) self.set_stroke(color=stroke_color, width=stroke_width) class Underline(Line): """Creates an underline. Examples -------- .. manim:: UnderLine :save_last_frame: class UnderLine(Scene): def construct(self): man = Tex("Manim") # Full Word ul = Underline(man) # Underlining the word self.add(man, ul) """ def __init__( self, mobject: Mobject, buff: float = SMALL_BUFF, **kwargs: Any ) -> None: super().__init__(LEFT, RIGHT, buff=buff, **kwargs) self.match_width(mobject) self.next_to(mobject, DOWN, buff=self.buff) ================================================ FILE: manim/mobject/geometry/tips.py ================================================ r"""A collection of tip mobjects for use with :class:`~.TipableVMobject`.""" from __future__ import annotations __all__ = [ "ArrowTip", "ArrowCircleFilledTip", "ArrowCircleTip", "ArrowSquareTip", "ArrowSquareFilledTip", "ArrowTriangleTip", "ArrowTriangleFilledTip", "StealthTip", ] from typing import TYPE_CHECKING, Any import numpy as np from manim.constants import * from manim.mobject.geometry.arc import Circle from manim.mobject.geometry.polygram import Square, Triangle from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.types.vectorized_mobject import VMobject from manim.utils.space_ops import angle_of_vector if TYPE_CHECKING: from manim.typing import Point3D, Vector3D class ArrowTip(VMobject, metaclass=ConvertToOpenGL): r"""Base class for arrow tips. .. seealso:: :class:`ArrowTriangleTip` :class:`ArrowTriangleFilledTip` :class:`ArrowCircleTip` :class:`ArrowCircleFilledTip` :class:`ArrowSquareTip` :class:`ArrowSquareFilledTip` :class:`StealthTip` Examples -------- Cannot be used directly, only intended for inheritance:: >>> tip = ArrowTip() Traceback (most recent call last): ... NotImplementedError: Has to be implemented in inheriting subclasses. Instead, use one of the pre-defined ones, or make a custom one like this: .. manim:: CustomTipExample >>> from manim import RegularPolygon, Arrow >>> class MyCustomArrowTip(ArrowTip, RegularPolygon): ... def __init__(self, length=0.35, **kwargs): ... RegularPolygon.__init__(self, n=5, **kwargs) ... self.width = length ... self.stretch_to_fit_height(length) >>> arr = Arrow( ... np.array([-2, -2, 0]), np.array([2, 2, 0]), tip_shape=MyCustomArrowTip ... ) >>> isinstance(arr.tip, RegularPolygon) True >>> from manim import Scene, Create >>> class CustomTipExample(Scene): ... def construct(self): ... self.play(Create(arr)) Using a class inherited from :class:`ArrowTip` to get a non-filled tip is a shorthand to manually specifying the arrow tip style as follows:: >>> arrow = Arrow(np.array([0, 0, 0]), np.array([1, 1, 0]), ... tip_style={'fill_opacity': 0, 'stroke_width': 3}) The following example illustrates the usage of all of the predefined arrow tips. .. manim:: ArrowTipsShowcase :save_last_frame: class ArrowTipsShowcase(Scene): def construct(self): tip_names = [ 'Default (YELLOW)', 'ArrowTriangleTip', 'Default', 'ArrowSquareTip', 'ArrowSquareFilledTip', 'ArrowCircleTip', 'ArrowCircleFilledTip', 'StealthTip' ] big_arrows = [ Arrow(start=[-4, 3.5, 0], end=[2, 3.5, 0], color=YELLOW), Arrow(start=[-4, 2.5, 0], end=[2, 2.5, 0], tip_shape=ArrowTriangleTip), Arrow(start=[-4, 1.5, 0], end=[2, 1.5, 0]), Arrow(start=[-4, 0.5, 0], end=[2, 0.5, 0], tip_shape=ArrowSquareTip), Arrow([-4, -0.5, 0], [2, -0.5, 0], tip_shape=ArrowSquareFilledTip), Arrow([-4, -1.5, 0], [2, -1.5, 0], tip_shape=ArrowCircleTip), Arrow([-4, -2.5, 0], [2, -2.5, 0], tip_shape=ArrowCircleFilledTip), Arrow([-4, -3.5, 0], [2, -3.5, 0], tip_shape=StealthTip) ] small_arrows = ( arrow.copy().scale(0.5, scale_tips=True).next_to(arrow, RIGHT) for arrow in big_arrows ) labels = ( Text(tip_names[i], font='monospace', font_size=20, color=BLUE).next_to(big_arrows[i], LEFT) for i in range(len(big_arrows)) ) self.add(*big_arrows, *small_arrows, *labels) """ def __init__(self, *args: Any, **kwargs: Any) -> None: raise NotImplementedError("Has to be implemented in inheriting subclasses.") @property def base(self) -> Point3D: r"""The base point of the arrow tip. This is the point connecting to the arrow line. Examples -------- :: >>> from manim import Arrow >>> arrow = Arrow(np.array([0, 0, 0]), np.array([2, 0, 0]), buff=0) >>> arrow.tip.base.round(2) + 0. # add 0. to avoid negative 0 in output array([1.65, 0. , 0. ]) """ return self.point_from_proportion(0.5) @property def tip_point(self) -> Point3D: r"""The tip point of the arrow tip. Examples -------- :: >>> from manim import Arrow >>> arrow = Arrow(np.array([0, 0, 0]), np.array([2, 0, 0]), buff=0) >>> arrow.tip.tip_point.round(2) + 0. array([2., 0., 0.]) """ # Type inference of extracting an element from a list, is not # supported by numpy, see this numpy issue # https://github.com/numpy/numpy/issues/16544 tip_point: Point3D = self.points[0] return tip_point @property def vector(self) -> Vector3D: r"""The vector pointing from the base point to the tip point. Examples -------- :: >>> from manim import Arrow >>> arrow = Arrow(np.array([0, 0, 0]), np.array([2, 2, 0]), buff=0) >>> arrow.tip.vector.round(2) + 0. array([0.25, 0.25, 0. ]) """ return self.tip_point - self.base @property def tip_angle(self) -> float: r"""The angle of the arrow tip. Examples -------- :: >>> from manim import Arrow >>> arrow = Arrow(np.array([0, 0, 0]), np.array([1, 1, 0]), buff=0) >>> bool(round(arrow.tip.tip_angle, 5) == round(PI/4, 5)) True """ return angle_of_vector(self.vector) @property def length(self) -> float: r"""The length of the arrow tip. Examples -------- :: >>> from manim import Arrow >>> arrow = Arrow(np.array([0, 0, 0]), np.array([1, 2, 0])) >>> round(arrow.tip.length, 3) 0.35 """ return float(np.linalg.norm(self.vector)) class StealthTip(ArrowTip): r"""'Stealth' fighter / kite arrow shape. Naming is inspired by the corresponding `TikZ arrow shape `__. """ def __init__( self, fill_opacity: float = 1, stroke_width: float = 3, length: float = DEFAULT_ARROW_TIP_LENGTH / 2, start_angle: float = PI, **kwargs: Any, ): self.start_angle = start_angle VMobject.__init__( self, fill_opacity=fill_opacity, stroke_width=stroke_width, **kwargs ) self.set_points_as_corners( np.array( [ [2, 0, 0], # tip [-1.2, 1.6, 0], [0, 0, 0], # base [-1.2, -1.6, 0], [2, 0, 0], # close path, back to tip ] ) ) self.scale(length / self.length) @property def length(self) -> float: """The length of the arrow tip. In this case, the length is computed as the height of the triangle encompassing the stealth tip (otherwise, the tip is scaled too large). """ return float(np.linalg.norm(self.vector) * 1.6) class ArrowTriangleTip(ArrowTip, Triangle): r"""Triangular arrow tip.""" def __init__( self, fill_opacity: float = 0, stroke_width: float = 3, length: float = DEFAULT_ARROW_TIP_LENGTH, width: float = DEFAULT_ARROW_TIP_LENGTH, start_angle: float = PI, **kwargs: Any, ) -> None: Triangle.__init__( self, fill_opacity=fill_opacity, stroke_width=stroke_width, start_angle=start_angle, **kwargs, ) self.width = width self.stretch_to_fit_width(length) self.stretch_to_fit_height(width) class ArrowTriangleFilledTip(ArrowTriangleTip): r"""Triangular arrow tip with filled tip. This is the default arrow tip shape. """ def __init__( self, fill_opacity: float = 1, stroke_width: float = 0, **kwargs: Any ) -> None: super().__init__(fill_opacity=fill_opacity, stroke_width=stroke_width, **kwargs) class ArrowCircleTip(ArrowTip, Circle): r"""Circular arrow tip.""" def __init__( self, fill_opacity: float = 0, stroke_width: float = 3, length: float = DEFAULT_ARROW_TIP_LENGTH, start_angle: float = PI, **kwargs: Any, ) -> None: self.start_angle = start_angle Circle.__init__( self, fill_opacity=fill_opacity, stroke_width=stroke_width, **kwargs ) self.width = length self.stretch_to_fit_height(length) class ArrowCircleFilledTip(ArrowCircleTip): r"""Circular arrow tip with filled tip.""" def __init__( self, fill_opacity: float = 1, stroke_width: float = 0, **kwargs: Any ) -> None: super().__init__(fill_opacity=fill_opacity, stroke_width=stroke_width, **kwargs) class ArrowSquareTip(ArrowTip, Square): r"""Square arrow tip.""" def __init__( self, fill_opacity: float = 0, stroke_width: float = 3, length: float = DEFAULT_ARROW_TIP_LENGTH, start_angle: float = PI, **kwargs: Any, ) -> None: self.start_angle = start_angle Square.__init__( self, fill_opacity=fill_opacity, stroke_width=stroke_width, side_length=length, **kwargs, ) self.width = length self.stretch_to_fit_height(length) class ArrowSquareFilledTip(ArrowSquareTip): r"""Square arrow tip with filled tip.""" def __init__( self, fill_opacity: float = 1, stroke_width: float = 0, **kwargs: Any ) -> None: super().__init__(fill_opacity=fill_opacity, stroke_width=stroke_width, **kwargs) ================================================ FILE: manim/mobject/graphing/__init__.py ================================================ """Coordinate systems and function graphing related mobjects. Modules ======= .. autosummary:: :toctree: ../reference ~coordinate_systems ~functions ~number_line ~probability ~scale """ ================================================ FILE: manim/mobject/graphing/functions.py ================================================ """Mobjects representing function graphs.""" from __future__ import annotations __all__ = ["ParametricFunction", "FunctionGraph", "ImplicitFunction"] from collections.abc import Callable, Iterable, Sequence from typing import TYPE_CHECKING import numpy as np from isosurfaces import plot_isoline from manim import config from manim.mobject.graphing.scale import LinearBase, _ScaleBase from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.types.vectorized_mobject import VMobject if TYPE_CHECKING: from typing import Any from typing_extensions import Self from manim.typing import Point3D, Point3DLike from manim.utils.color import ParsableManimColor from manim.utils.color import YELLOW class ParametricFunction(VMobject, metaclass=ConvertToOpenGL): """A parametric curve. Parameters ---------- function The function to be plotted in the form of ``(lambda t: (x(t), y(t), z(t)))`` t_range Determines the length that the function spans in the form of (t_min, t_max, step=0.01). By default ``[0, 1]`` scaling Scaling class applied to the points of the function. Default of :class:`~.LinearBase`. use_smoothing Whether to interpolate between the points of the function after they have been created. (Will have odd behaviour with a low number of points) use_vectorized Whether to pass in the generated t value array to the function as ``[t_0, t_1, ...]``. Only use this if your function supports it. Output should be a numpy array of shape ``[[x_0, x_1, ...], [y_0, y_1, ...], [z_0, z_1, ...]]`` but ``z`` can also be 0 if the Axes is 2D discontinuities Values of t at which the function experiences discontinuity. dt The left and right tolerance for the discontinuities. Examples -------- .. manim:: PlotParametricFunction :save_last_frame: class PlotParametricFunction(Scene): def func(self, t): return (np.sin(2 * t), np.sin(3 * t), 0) def construct(self): func = ParametricFunction(self.func, t_range = (0, TAU), fill_opacity=0).set_color(RED) self.add(func.scale(3)) .. manim:: ThreeDParametricSpring :save_last_frame: class ThreeDParametricSpring(ThreeDScene): def construct(self): curve1 = ParametricFunction( lambda u: ( 1.2 * np.cos(u), 1.2 * np.sin(u), u * 0.05 ), color=RED, t_range = (-3*TAU, 5*TAU, 0.01) ).set_shade_in_3d(True) axes = ThreeDAxes() self.add(axes, curve1) self.set_camera_orientation(phi=80 * DEGREES, theta=-60 * DEGREES) self.wait() .. attention:: If your function has discontinuities, you'll have to specify the location of the discontinuities manually. See the following example for guidance. .. manim:: DiscontinuousExample :save_last_frame: class DiscontinuousExample(Scene): def construct(self): ax1 = NumberPlane((-3, 3), (-4, 4)) ax2 = NumberPlane((-3, 3), (-4, 4)) VGroup(ax1, ax2).arrange() discontinuous_function = lambda x: (x ** 2 - 2) / (x ** 2 - 4) incorrect = ax1.plot(discontinuous_function, color=RED) correct = ax2.plot( discontinuous_function, discontinuities=[-2, 2], # discontinuous points dt=0.1, # left and right tolerance of discontinuity color=GREEN, ) self.add(ax1, ax2, incorrect, correct) """ def __init__( self, function: Callable[[float], Point3DLike], t_range: tuple[float, float] | tuple[float, float, float] = (0, 1), scaling: _ScaleBase = LinearBase(), dt: float = 1e-8, discontinuities: Iterable[float] | None = None, use_smoothing: bool = True, use_vectorized: bool = False, **kwargs: Any, ): def internal_parametric_function(t: float) -> Point3D: """Wrap ``function``'s output inside a NumPy array.""" return np.asarray(function(t)) self.function = internal_parametric_function if len(t_range) == 2: t_range = (*t_range, 0.01) self.scaling = scaling self.dt = dt self.discontinuities = discontinuities self.use_smoothing = use_smoothing self.use_vectorized = use_vectorized self.t_min, self.t_max, self.t_step = t_range super().__init__(**kwargs) def get_function(self) -> Callable[[float], Point3D]: return self.function def get_point_from_function(self, t: float) -> Point3D: return self.function(t) def generate_points(self) -> Self: if self.discontinuities is not None: discontinuities = filter( lambda t: self.t_min <= t <= self.t_max, self.discontinuities, ) discontinuities_array = np.array(list(discontinuities)) boundary_times = np.array( [ self.t_min, self.t_max, *(discontinuities_array - self.dt), *(discontinuities_array + self.dt), ], ) boundary_times.sort() else: boundary_times = [self.t_min, self.t_max] for t1, t2 in zip(boundary_times[0::2], boundary_times[1::2]): t_range = np.array( [ *self.scaling.function(np.arange(t1, t2, self.t_step)), self.scaling.function(t2), ], ) if self.use_vectorized: x, y, z = self.function(t_range) if not isinstance(z, np.ndarray): z = np.zeros_like(x) points = np.stack([x, y, z], axis=1) else: points = np.array([self.function(t) for t in t_range]) self.start_new_path(points[0]) self.add_points_as_corners(points[1:]) if self.use_smoothing: # TODO: not in line with upstream, approx_smooth does not exist self.make_smooth() return self def init_points(self) -> None: self.generate_points() class FunctionGraph(ParametricFunction): """A :class:`ParametricFunction` that spans the length of the scene by default. Examples -------- .. manim:: ExampleFunctionGraph :save_last_frame: class ExampleFunctionGraph(Scene): def construct(self): cos_func = FunctionGraph( lambda t: np.cos(t) + 0.5 * np.cos(7 * t) + (1 / 7) * np.cos(14 * t), color=RED, ) sin_func_1 = FunctionGraph( lambda t: np.sin(t) + 0.5 * np.sin(7 * t) + (1 / 7) * np.sin(14 * t), color=BLUE, ) sin_func_2 = FunctionGraph( lambda t: np.sin(t) + 0.5 * np.sin(7 * t) + (1 / 7) * np.sin(14 * t), x_range=[-4, 4], color=GREEN, ).move_to([0, 1, 0]) self.add(cos_func, sin_func_1, sin_func_2) """ def __init__( self, function: Callable[[float], Any], x_range: tuple[float, float] | tuple[float, float, float] | None = None, color: ParsableManimColor = YELLOW, **kwargs: Any, ) -> None: if x_range is None: x_range = (-config["frame_x_radius"], config["frame_x_radius"]) self.x_range = x_range self.parametric_function: Callable[[float], Point3D] = lambda t: np.array( [t, function(t), 0] ) self.function = function # type: ignore[assignment] super().__init__(self.parametric_function, self.x_range, color=color, **kwargs) def get_function(self) -> Callable[[float], Any]: return self.function def get_point_from_function(self, x: float) -> Point3D: return self.parametric_function(x) class ImplicitFunction(VMobject, metaclass=ConvertToOpenGL): def __init__( self, func: Callable[[float, float], float], x_range: Sequence[float] | None = None, y_range: Sequence[float] | None = None, min_depth: int = 5, max_quads: int = 1500, use_smoothing: bool = True, **kwargs: Any, ): """An implicit function. Parameters ---------- func The implicit function in the form ``f(x, y) = 0``. x_range The x min and max of the function. y_range The y min and max of the function. min_depth The minimum depth of the function to calculate. max_quads The maximum number of quads to use. use_smoothing Whether or not to smoothen the curves. kwargs Additional parameters to pass into :class:`VMobject` .. note:: A small ``min_depth`` :math:`d` means that some small details might be ignored if they don't cross an edge of one of the :math:`4^d` uniform quads. The value of ``max_quads`` strongly corresponds to the quality of the curve, but a higher number of quads may take longer to render. Examples -------- .. manim:: ImplicitFunctionExample :save_last_frame: class ImplicitFunctionExample(Scene): def construct(self): graph = ImplicitFunction( lambda x, y: x * y ** 2 - x ** 2 * y - 2, color=YELLOW ) self.add(NumberPlane(), graph) """ self.function = func self.min_depth = min_depth self.max_quads = max_quads self.use_smoothing = use_smoothing self.x_range = x_range or [ -config.frame_width / 2, config.frame_width / 2, ] self.y_range = y_range or [ -config.frame_height / 2, config.frame_height / 2, ] super().__init__(**kwargs) def generate_points(self) -> Self: p_min, p_max = ( np.array([self.x_range[0], self.y_range[0]]), np.array([self.x_range[1], self.y_range[1]]), ) curves = plot_isoline( fn=lambda u: self.function(u[0], u[1]), pmin=p_min, pmax=p_max, min_depth=self.min_depth, max_quads=self.max_quads, ) # returns a list of lists of 2D points curves = [ np.pad(curve, [(0, 0), (0, 1)]) for curve in curves if curve != [] ] # add z coord as 0 for curve in curves: self.start_new_path(curve[0]) self.add_points_as_corners(curve[1:]) if self.use_smoothing: self.make_smooth() return self def init_points(self) -> None: self.generate_points() ================================================ FILE: manim/mobject/graphing/number_line.py ================================================ """Mobject representing a number line.""" from __future__ import annotations from manim.mobject.mobject import Mobject from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVMobject __all__ = ["NumberLine", "UnitInterval"] from collections.abc import Callable, Iterable, Sequence from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Any from typing_extensions import Self from manim.mobject.geometry.tips import ArrowTip from manim.typing import Point3D, Point3DLike, Vector3D import numpy as np from manim import config from manim.constants import * from manim.mobject.geometry.line import Line from manim.mobject.graphing.scale import LinearBase, _ScaleBase from manim.mobject.text.numbers import DecimalNumber, Integer from manim.mobject.text.tex_mobject import MathTex, Tex from manim.mobject.text.text_mobject import Text from manim.mobject.types.vectorized_mobject import VGroup, VMobject from manim.utils.bezier import interpolate from manim.utils.config_ops import merge_dicts_recursively from manim.utils.space_ops import normalize class NumberLine(Line): """Creates a number line with tick marks. Parameters ---------- x_range The ``[x_min, x_max, x_step]`` values to create the line. length The length of the number line. unit_size The distance between each tick of the line. Overwritten by :attr:`length`, if specified. include_ticks Whether to include ticks on the number line. tick_size The length of each tick mark. numbers_with_elongated_ticks An iterable of specific values with elongated ticks. longer_tick_multiple Influences how many times larger elongated ticks are than regular ticks (2 = 2x). rotation The angle (in radians) at which the line is rotated. stroke_width The thickness of the line. include_tip Whether to add a tip to the end of the line. tip_width The width of the tip. tip_height The height of the tip. tip_shape The mobject class used to construct the tip, or ``None`` (the default) for the default arrow tip. Passed classes have to inherit from :class:`.ArrowTip`. include_numbers Whether to add numbers to the tick marks. The number of decimal places is determined by the step size, this default can be overridden by ``decimal_number_config``. scaling The way the ``x_range`` is value is scaled, i.e. :class:`~.LogBase` for a logarithmic numberline. Defaults to :class:`~.LinearBase`. font_size The size of the label mobjects. Defaults to 36. label_direction The specific position to which label mobjects are added on the line. label_constructor Determines the mobject class that will be used to construct the labels of the number line. line_to_number_buff The distance between the line and the label mobject. decimal_number_config Arguments that can be passed to :class:`~.numbers.DecimalNumber` to influence number mobjects. numbers_to_exclude An explicit iterable of numbers to not be added to the number line. numbers_to_include An explicit iterable of numbers to add to the number line kwargs Additional arguments to be passed to :class:`~.Line`. .. note:: Number ranges that include both negative and positive values will be generated from the 0 point, and may not include a tick at the min / max values as the tick locations are dependent on the step size. Examples -------- .. manim:: NumberLineExample :save_last_frame: class NumberLineExample(Scene): def construct(self): l0 = NumberLine( x_range=[-10, 10, 2], length=10, color=BLUE, include_numbers=True, label_direction=UP, ) l1 = NumberLine( x_range=[-10, 10, 2], unit_size=0.5, numbers_with_elongated_ticks=[-2, 4], include_numbers=True, font_size=24, ) num6 = l1.numbers[8] num6.set_color(RED) l2 = NumberLine( x_range=[-2.5, 2.5 + 0.5, 0.5], length=12, decimal_number_config={"num_decimal_places": 2}, include_numbers=True, ) l3 = NumberLine( x_range=[-5, 5 + 1, 1], length=6, include_tip=True, include_numbers=True, rotation=10 * DEGREES, ) line_group = VGroup(l0, l1, l2, l3).arrange(DOWN, buff=1) self.add(line_group) """ def __init__( self, x_range: Sequence[float] | None = None, # must be first length: float | None = None, unit_size: float = 1, # ticks include_ticks: bool = True, tick_size: float = 0.1, numbers_with_elongated_ticks: Iterable[float] | None = None, longer_tick_multiple: int = 2, exclude_origin_tick: bool = False, # visuals rotation: float = 0, stroke_width: float = 2.0, # tip include_tip: bool = False, tip_width: float = DEFAULT_ARROW_TIP_LENGTH, tip_height: float = DEFAULT_ARROW_TIP_LENGTH, tip_shape: type[ArrowTip] | None = None, # numbers/labels include_numbers: bool = False, font_size: float = 36, label_direction: Point3DLike = DOWN, label_constructor: type[MathTex] = MathTex, scaling: _ScaleBase = LinearBase(), line_to_number_buff: float = MED_SMALL_BUFF, decimal_number_config: dict | None = None, numbers_to_exclude: Iterable[float] | None = None, numbers_to_include: Iterable[float] | None = None, **kwargs: Any, ): # avoid mutable arguments in defaults if numbers_to_exclude is None: numbers_to_exclude = [] if numbers_with_elongated_ticks is None: numbers_with_elongated_ticks = [] if x_range is None: x_range = [ round(-config["frame_x_radius"]), round(config["frame_x_radius"]), 1, ] elif len(x_range) == 2: # adds x_step if not specified. not sure how to feel about this. a user can't know default without peeking at source code x_range = [*x_range, 1] if decimal_number_config is None: decimal_number_config = { "num_decimal_places": self._decimal_places_from_step(x_range[2]), } # turn into a NumPy array to scale by just applying the function self.x_range = np.array(x_range, dtype=float) self.x_min: float self.x_max: float self.x_step: float self.x_min, self.x_max, self.x_step = scaling.function(self.x_range) self.length = length self.unit_size = unit_size # ticks self.include_ticks = include_ticks self.tick_size = tick_size self.numbers_with_elongated_ticks = numbers_with_elongated_ticks self.longer_tick_multiple = longer_tick_multiple self.exclude_origin_tick = exclude_origin_tick # visuals self.rotation = rotation # tip self.include_tip = include_tip self.tip_width = tip_width self.tip_height = tip_height # numbers self.font_size = font_size self.include_numbers = include_numbers self.label_direction = label_direction self.label_constructor = label_constructor self.line_to_number_buff = line_to_number_buff self.decimal_number_config = decimal_number_config self.numbers_to_exclude = numbers_to_exclude self.numbers_to_include = numbers_to_include self.scaling = scaling super().__init__( self.x_range[0] * RIGHT, self.x_range[1] * RIGHT, stroke_width=stroke_width, **kwargs, ) if self.length: self.set_length(self.length) self.unit_size = self.get_unit_size() else: self.scale(self.unit_size) self.center() if self.include_tip: self.add_tip( tip_length=self.tip_height, tip_width=self.tip_width, tip_shape=tip_shape, ) self.tip.set_stroke(self.stroke_color, self.stroke_width) if self.include_ticks: self.add_ticks() self.rotate(self.rotation) if self.include_numbers or self.numbers_to_include is not None: if self.scaling.custom_labels: tick_range = self.get_tick_range() custom_labels = self.scaling.get_custom_labels( tick_range, unit_decimal_places=decimal_number_config["num_decimal_places"], ) self.add_labels( dict( zip( tick_range, custom_labels, ) ), ) else: self.add_numbers( x_values=self.numbers_to_include, excluding=self.numbers_to_exclude, font_size=self.font_size, ) def rotate_about_zero( self, angle: float, axis: Vector3D = OUT, **kwargs: Any ) -> Self: return self.rotate_about_number(0, angle, axis, **kwargs) def rotate_about_number( self, number: float, angle: float, axis: Vector3D = OUT, **kwargs: Any ) -> Self: return self.rotate(angle, axis, about_point=self.n2p(number), **kwargs) def add_ticks(self) -> None: """Adds ticks to the number line. Ticks can be accessed after creation via ``self.ticks``. """ ticks = VGroup() elongated_tick_size = self.tick_size * self.longer_tick_multiple elongated_tick_offsets = ( np.array(self.numbers_with_elongated_ticks) - self.x_min ) for x in self.get_tick_range(): size = self.tick_size if np.any(np.isclose(x - self.x_min, elongated_tick_offsets)): size = elongated_tick_size ticks.add(self.get_tick(x, size)) self.add(ticks) self.ticks = ticks def get_tick(self, x: float, size: float | None = None) -> Line: """Generates a tick and positions it along the number line. Parameters ---------- x The position of the tick. size The factor by which the tick is scaled. Returns ------- :class:`~.Line` A positioned tick. """ if size is None: size = self.tick_size result = Line(size * DOWN, size * UP) result.rotate(self.get_angle()) result.move_to(self.number_to_point(x)) result.match_style(self) return result def get_tick_marks(self) -> VGroup: return self.ticks def get_tick_range(self) -> np.ndarray: """Generates the range of values on which labels are plotted based on the ``x_range`` attribute of the number line. Returns ------- np.ndarray A numpy array of floats represnting values along the number line. """ x_min, x_max, x_step = self.x_range if not self.include_tip: x_max += 1e-6 # Handle cases where min and max are both positive or both negative if x_min < x_max < 0 or x_max > x_min > 0: tick_range = np.arange(x_min, x_max, x_step) else: start_point = 0 if self.exclude_origin_tick: start_point += x_step x_min_segment = np.arange(start_point, np.abs(x_min) + 1e-6, x_step) * -1 x_max_segment = np.arange(start_point, x_max, x_step) tick_range = np.unique(np.concatenate((x_min_segment, x_max_segment))) return self.scaling.function(tick_range) def number_to_point(self, number: float | np.ndarray) -> np.ndarray: """Accepts a value along the number line and returns a point with respect to the scene. Equivalent to `NumberLine @ number` Parameters ---------- number The value to be transformed into a coordinate. Or a list of values. Returns ------- np.ndarray A point with respect to the scene's coordinate system. Or a list of points. Examples -------- >>> from manim import NumberLine >>> number_line = NumberLine() >>> number_line.number_to_point(0) array([0., 0., 0.]) >>> number_line.number_to_point(1) array([1., 0., 0.]) >>> number_line @ 1 array([1., 0., 0.]) >>> number_line.number_to_point([1, 2, 3]) array([[1., 0., 0.], [2., 0., 0.], [3., 0., 0.]]) """ number = np.asarray(number) scalar = number.ndim == 0 number = self.scaling.inverse_function(number) alphas = (number - self.x_range[0]) / (self.x_range[1] - self.x_range[0]) alphas = float(alphas) if scalar else np.vstack(alphas) val = interpolate(self.get_start(), self.get_end(), alphas) return val def point_to_number(self, point: Sequence[float]) -> float: """Accepts a point with respect to the scene and returns a float along the number line. Parameters ---------- point A sequence of values consisting of ``(x_coord, y_coord, z_coord)``. Returns ------- float A float representing a value along the number line. Examples -------- >>> from manim import NumberLine >>> number_line = NumberLine() >>> number_line.point_to_number((0, 0, 0)) np.float64(0.0) >>> number_line.point_to_number((1, 0, 0)) np.float64(1.0) >>> number_line.point_to_number([[0.5, 0, 0], [1, 0, 0], [1.5, 0, 0]]) array([0.5, 1. , 1.5]) """ point = np.asarray(point) start, end = self.get_start_and_end() unit_vect = normalize(end - start) proportion: float = np.dot(point - start, unit_vect) / np.dot( end - start, unit_vect ) return interpolate(self.x_min, self.x_max, proportion) def n2p(self, number: float | np.ndarray) -> Point3D: """Abbreviation for :meth:`~.NumberLine.number_to_point`.""" return self.number_to_point(number) def p2n(self, point: Point3DLike) -> float: """Abbreviation for :meth:`~.NumberLine.point_to_number`.""" return self.point_to_number(point) def get_unit_size(self) -> float: val: float = self.get_length() / (self.x_range[1] - self.x_range[0]) return val def get_unit_vector(self) -> Vector3D: return super().get_unit_vector() * self.unit_size def get_number_mobject( self, x: float, direction: Vector3D | None = None, buff: float | None = None, font_size: float | None = None, label_constructor: type[MathTex] | None = None, **number_config: dict[str, Any], ) -> VMobject: """Generates a positioned :class:`~.DecimalNumber` mobject generated according to ``label_constructor``. Parameters ---------- x The x-value at which the mobject should be positioned. direction Determines the direction at which the label is positioned next to the line. buff The distance of the label from the line. font_size The font size of the label mobject. label_constructor The :class:`~.VMobject` class that will be used to construct the label. Defaults to the ``label_constructor`` attribute of the number line if not specified. Returns ------- :class:`~.DecimalNumber` The positioned mobject. """ number_config_merged = merge_dicts_recursively( self.decimal_number_config, number_config, ) if direction is None: direction = self.label_direction if buff is None: buff = self.line_to_number_buff if font_size is None: font_size = self.font_size if label_constructor is None: label_constructor = self.label_constructor num_mob = DecimalNumber( x, font_size=font_size, mob_class=label_constructor, **number_config_merged, ) num_mob.next_to(self.number_to_point(x), direction=direction, buff=buff) if x < 0 and self.label_direction[0] == 0: # Align without the minus sign num_mob.shift(num_mob[0].width * LEFT / 2) return num_mob def get_number_mobjects(self, *numbers: float, **kwargs: Any) -> VGroup: if len(numbers) == 0: numbers = self.default_numbers_to_display() return VGroup([self.get_number_mobject(number, **kwargs) for number in numbers]) def get_labels(self) -> VGroup: return self.get_number_mobjects() def add_numbers( self, x_values: Iterable[float] | None = None, excluding: Iterable[float] | None = None, font_size: float | None = None, label_constructor: type[MathTex] | None = None, **kwargs: Any, ) -> Self: """Adds :class:`~.DecimalNumber` mobjects representing their position at each tick of the number line. The numbers can be accessed after creation via ``self.numbers``. Parameters ---------- x_values An iterable of the values used to position and create the labels. Defaults to the output produced by :meth:`~.NumberLine.get_tick_range` excluding A list of values to exclude from :attr:`x_values`. font_size The font size of the labels. Defaults to the ``font_size`` attribute of the number line. label_constructor The :class:`~.VMobject` class that will be used to construct the label. Defaults to the ``label_constructor`` attribute of the number line if not specified. """ if x_values is None: x_values = self.get_tick_range() if excluding is None: excluding = self.numbers_to_exclude if font_size is None: font_size = self.font_size if label_constructor is None: label_constructor = self.label_constructor numbers = VGroup() for x in x_values: if x in excluding: continue numbers.add( self.get_number_mobject( x, font_size=font_size, label_constructor=label_constructor, **kwargs, ) ) self.add(numbers) self.numbers = numbers return self def add_labels( self, dict_values: dict[float, str | float | VMobject], direction: Point3DLike | None = None, buff: float | None = None, font_size: float | None = None, label_constructor: type[MathTex] | None = None, ) -> Self: """Adds specifically positioned labels to the :class:`~.NumberLine` using a ``dict``. The labels can be accessed after creation via ``self.labels``. Parameters ---------- dict_values A dictionary consisting of the position along the number line and the mobject to be added: ``{1: Tex("Monday"), 3: Tex("Tuesday")}``. :attr:`label_constructor` will be used to construct the labels if the value is not a mobject (``str`` or ``float``). direction Determines the direction at which the label is positioned next to the line. buff The distance of the label from the line. font_size The font size of the mobject to be positioned. label_constructor The :class:`~.VMobject` class that will be used to construct the label. Defaults to the ``label_constructor`` attribute of the number line if not specified. Raises ------ AttributeError If the label does not have a ``font_size`` attribute, an ``AttributeError`` is raised. """ direction = self.label_direction if direction is None else direction buff = self.line_to_number_buff if buff is None else buff font_size = self.font_size if font_size is None else font_size if label_constructor is None: label_constructor = self.label_constructor labels = VGroup() for x, label in dict_values.items(): # TODO: remove this check and ability to call # this method via CoordinateSystem.add_coordinates() # must be explicitly called if isinstance(label, str) and label_constructor is MathTex: label = Tex(label) else: label = self._create_label_tex(label, label_constructor) if hasattr(label, "font_size"): assert isinstance(label, (MathTex, Tex, Text, Integer)), label label.font_size = font_size else: raise AttributeError(f"{label} is not compatible with add_labels.") label.next_to(self.number_to_point(x), direction=direction, buff=buff) labels.add(label) self.labels = labels self.add(labels) return self def _create_label_tex( self, label_tex: str | float | VMobject, label_constructor: Callable | None = None, **kwargs: Any, ) -> VMobject: """Checks if the label is a :class:`~.VMobject`, otherwise, creates a label by passing ``label_tex`` to ``label_constructor``. Parameters ---------- label_tex The label for which a mobject should be created. If the label already is a mobject, no new mobject is created. label_constructor Optional. A class or function returning a mobject when passing ``label_tex`` as an argument. If ``None`` is passed (the default), the label constructor from the :attr:`.label_constructor` attribute is used. Returns ------- :class:`~.VMobject` The label. """ if isinstance(label_tex, (VMobject, OpenGLVMobject)): return label_tex if label_constructor is None: label_constructor = self.label_constructor if isinstance(label_tex, str): return label_constructor(label_tex, **kwargs) return label_constructor(str(label_tex), **kwargs) @staticmethod def _decimal_places_from_step(step: float) -> int: step_str = str(step) if "." not in step_str: return 0 return len(step_str.split(".")[-1]) def __matmul__(self, other: float) -> Point3D: return self.n2p(other) def __rmatmul__(self, other: Point3DLike | Mobject) -> float: if isinstance(other, Mobject): other = other.get_center() return self.p2n(other) class UnitInterval(NumberLine): def __init__( self, unit_size: float = 10, numbers_with_elongated_ticks: list[float] | None = None, decimal_number_config: dict[str, Any] | None = None, **kwargs: Any, ): numbers_with_elongated_ticks = ( [0, 1] if numbers_with_elongated_ticks is None else numbers_with_elongated_ticks ) decimal_number_config = ( { "num_decimal_places": 1, } if decimal_number_config is None else decimal_number_config ) super().__init__( x_range=(0, 1, 0.1), unit_size=unit_size, numbers_with_elongated_ticks=numbers_with_elongated_ticks, decimal_number_config=decimal_number_config, **kwargs, ) ================================================ FILE: manim/mobject/graphing/probability.py ================================================ """Mobjects representing objects from probability theory and statistics.""" from __future__ import annotations __all__ = ["SampleSpace", "BarChart"] from collections.abc import Iterable, MutableSequence, Sequence from typing import Any import numpy as np from manim import config, logger from manim.constants import * from manim.mobject.geometry.polygram import Rectangle from manim.mobject.graphing.coordinate_systems import Axes from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVMobject from manim.mobject.svg.brace import Brace from manim.mobject.text.tex_mobject import MathTex, Tex from manim.mobject.types.vectorized_mobject import VGroup, VMobject from manim.typing import Vector3D from manim.utils.color import ( BLUE_E, DARK_GREY, GREEN_E, LIGHT_GREY, MAROON_B, YELLOW, ParsableManimColor, color_gradient, ) from manim.utils.iterables import tuplify EPSILON = 0.0001 class SampleSpace(Rectangle): """A mobject representing a twodimensional rectangular sampling space. Examples -------- .. manim:: ExampleSampleSpace :save_last_frame: class ExampleSampleSpace(Scene): def construct(self): poly1 = SampleSpace(stroke_width=15, fill_opacity=1) poly2 = SampleSpace(width=5, height=3, stroke_width=5, fill_opacity=0.5) poly3 = SampleSpace(width=2, height=2, stroke_width=5, fill_opacity=0.1) poly3.divide_vertically(p_list=np.array([0.37, 0.13, 0.5]), colors=[BLACK, WHITE, GRAY], vect=RIGHT) poly_group = VGroup(poly1, poly2, poly3).arrange() self.add(poly_group) """ def __init__( self, height: float = 3, width: float = 3, fill_color: ParsableManimColor = DARK_GREY, fill_opacity: float = 1, stroke_width: float = 0.5, stroke_color: ParsableManimColor = LIGHT_GREY, default_label_scale_val: float = 1, ): super().__init__( height=height, width=width, fill_color=fill_color, fill_opacity=fill_opacity, stroke_width=stroke_width, stroke_color=stroke_color, ) self.default_label_scale_val = default_label_scale_val def add_title( self, title: str = "Sample space", buff: float = MED_SMALL_BUFF ) -> None: # TODO, should this really exist in SampleSpaceScene title_mob = Tex(title) if title_mob.width > self.width: title_mob.width = self.width title_mob.next_to(self, UP, buff=buff) self.title = title_mob self.add(title_mob) def add_label(self, label: str) -> None: self.label = label def complete_p_list(self, p_list: float | Iterable[float]) -> list[float]: p_list_tuplified: tuple[float] = tuplify(p_list) new_p_list = list(p_list_tuplified) remainder = 1.0 - sum(new_p_list) if abs(remainder) > EPSILON: new_p_list.append(remainder) return new_p_list def get_division_along_dimension( self, p_list: float | Iterable[float], dim: int, colors: Sequence[ParsableManimColor], vect: Vector3D, ) -> VGroup: p_list_complete = self.complete_p_list(p_list) colors_in_gradient = color_gradient(colors, len(p_list_complete)) last_point = self.get_edge_center(-vect) parts = VGroup() for factor, color in zip(p_list_complete, colors_in_gradient): part = SampleSpace() part.set_fill(color, 1) part.replace(self, stretch=True) part.stretch(factor, dim) part.move_to(last_point, -vect) last_point = part.get_edge_center(vect) parts.add(part) return parts def get_horizontal_division( self, p_list: float | Iterable[float], colors: Sequence[ParsableManimColor] = [GREEN_E, BLUE_E], vect: Vector3D = DOWN, ) -> VGroup: return self.get_division_along_dimension(p_list, 1, colors, vect) def get_vertical_division( self, p_list: float | Iterable[float], colors: Sequence[ParsableManimColor] = [MAROON_B, YELLOW], vect: Vector3D = RIGHT, ) -> VGroup: return self.get_division_along_dimension(p_list, 0, colors, vect) def divide_horizontally(self, *args: Any, **kwargs: Any) -> None: self.horizontal_parts = self.get_horizontal_division(*args, **kwargs) self.add(self.horizontal_parts) def divide_vertically(self, *args: Any, **kwargs: Any) -> None: self.vertical_parts = self.get_vertical_division(*args, **kwargs) self.add(self.vertical_parts) def get_subdivision_braces_and_labels( self, parts: VGroup, labels: list[str | VMobject | OpenGLVMobject], direction: Vector3D, buff: float = SMALL_BUFF, min_num_quads: int = 1, ) -> VGroup: label_mobs = VGroup() braces = VGroup() for label, part in zip(labels, parts): brace = Brace(part, direction, min_num_quads=min_num_quads, buff=buff) if isinstance(label, (VMobject, OpenGLVMobject)): label_mob = label else: label_mob = MathTex(label) label_mob.scale(self.default_label_scale_val) label_mob.next_to(brace, direction, buff) braces.add(brace) assert isinstance(label_mob, VMobject) label_mobs.add(label_mob) parts.braces = braces # type: ignore[attr-defined] parts.labels = label_mobs # type: ignore[attr-defined] parts.label_kwargs = { # type: ignore[attr-defined] "labels": label_mobs.copy(), "direction": direction, "buff": buff, } return VGroup(parts.braces, parts.labels) # type: ignore[arg-type] def get_side_braces_and_labels( self, labels: list[str | VMobject | OpenGLVMobject], direction: Vector3D = LEFT, **kwargs: Any, ) -> VGroup: assert hasattr(self, "horizontal_parts") parts = self.horizontal_parts return self.get_subdivision_braces_and_labels( parts, labels, direction, **kwargs ) def get_top_braces_and_labels( self, labels: list[str | VMobject | OpenGLVMobject], **kwargs: Any ) -> VGroup: assert hasattr(self, "vertical_parts") parts = self.vertical_parts return self.get_subdivision_braces_and_labels(parts, labels, UP, **kwargs) def get_bottom_braces_and_labels( self, labels: list[str | VMobject | OpenGLVMobject], **kwargs: Any ) -> VGroup: assert hasattr(self, "vertical_parts") parts = self.vertical_parts return self.get_subdivision_braces_and_labels(parts, labels, DOWN, **kwargs) def add_braces_and_labels(self) -> None: for attr in "horizontal_parts", "vertical_parts": if not hasattr(self, attr): continue parts = getattr(self, attr) for subattr in "braces", "labels": if hasattr(parts, subattr): self.add(getattr(parts, subattr)) def __getitem__(self, index: int) -> SampleSpace: if hasattr(self, "horizontal_parts"): val: SampleSpace = self.horizontal_parts[index] return val elif hasattr(self, "vertical_parts"): val = self.vertical_parts[index] return val return self.split()[index] class BarChart(Axes): """Creates a bar chart. Inherits from :class:`~.Axes`, so it shares its methods and attributes. Each axis inherits from :class:`~.NumberLine`, so pass in ``x_axis_config``/``y_axis_config`` to control their attributes. Parameters ---------- values A sequence of values that determines the height of each bar. Accepts negative values. bar_names A sequence of names for each bar. Does not have to match the length of ``values``. y_range The y_axis range of values. If ``None``, the range will be calculated based on the min/max of ``values`` and the step will be calculated based on ``y_length``. x_length The length of the x-axis. If ``None``, it is automatically calculated based on the number of values and the width of the screen. y_length The length of the y-axis. bar_colors The color for the bars. Accepts a sequence of colors (can contain just one item). If the length of``bar_colors`` does not match that of ``values``, intermediate colors will be automatically determined. bar_width The length of a bar. Must be between 0 and 1. bar_fill_opacity The fill opacity of the bars. bar_stroke_width The stroke width of the bars. Examples -------- .. manim:: BarChartExample :save_last_frame: class BarChartExample(Scene): def construct(self): chart = BarChart( values=[-5, 40, -10, 20, -3], bar_names=["one", "two", "three", "four", "five"], y_range=[-20, 50, 10], y_length=6, x_length=10, x_axis_config={"font_size": 36}, ) c_bar_lbls = chart.get_bar_labels(font_size=48) self.add(chart, c_bar_lbls) """ def __init__( self, values: MutableSequence[float], bar_names: Sequence[str] | None = None, y_range: Sequence[float] | None = None, x_length: float | None = None, y_length: float | None = None, bar_colors: Iterable[str] = [ "#003f5c", "#58508d", "#bc5090", "#ff6361", "#ffa600", ], bar_width: float = 0.6, bar_fill_opacity: float = 0.7, bar_stroke_width: float = 3, **kwargs: Any, ): if isinstance(bar_colors, str): logger.warning( "Passing a string to `bar_colors` has been deprecated since v0.15.2 and will be removed after v0.17.0, the parameter must be a list. " ) bar_colors = list(bar_colors) y_length = y_length if y_length is not None else config.frame_height - 4 self.values = values self.bar_names = bar_names self.bar_colors = bar_colors self.bar_width = bar_width self.bar_fill_opacity = bar_fill_opacity self.bar_stroke_width = bar_stroke_width x_range = [0, len(self.values), 1] if y_range is None: y_range = [ min(0, min(self.values)), max(0, max(self.values)), round(max(self.values) / y_length, 2), ] elif len(y_range) == 2: y_range = [*y_range, round(max(self.values) / y_length, 2)] if x_length is None: x_length = min(len(self.values), config.frame_width - 2) x_axis_config = {"font_size": 24, "label_constructor": Tex} self._update_default_configs( (x_axis_config,), (kwargs.pop("x_axis_config", None),) ) self.bars: VGroup = VGroup() self.x_labels: VGroup | None = None self.bar_labels: VGroup | None = None super().__init__( x_range=x_range, y_range=y_range, x_length=x_length, y_length=y_length, x_axis_config=x_axis_config, tips=kwargs.pop("tips", False), **kwargs, ) self._add_bars() if self.bar_names is not None: self._add_x_axis_labels() self.y_axis.add_numbers() def _update_colors(self) -> None: """Initialize the colors of the bars of the chart. Sets the color of ``self.bars`` via ``self.bar_colors``. Primarily used when the bars are initialized with ``self._add_bars`` or updated via ``self.change_bar_values``. """ self.bars.set_color_by_gradient(*self.bar_colors) def _add_x_axis_labels(self) -> None: """Essentially :meth`:~.NumberLine.add_labels`, but differs in that the direction of the label with respect to the x_axis changes to UP or DOWN depending on the value. UP for negative values and DOWN for positive values. """ assert isinstance(self.bar_names, list) val_range = np.arange( 0.5, len(self.bar_names), 1 ) # 0.5 shifted so that labels are centered, not on ticks labels = VGroup() for i, (value, bar_name) in enumerate(zip(val_range, self.bar_names)): # to accommodate negative bars, the label may need to be # below or above the x_axis depending on the value of the bar direction = UP if self.values[i] < 0 else DOWN bar_name_label: MathTex = self.x_axis.label_constructor(bar_name) bar_name_label.font_size = self.x_axis.font_size bar_name_label.next_to( self.x_axis.number_to_point(value), direction=direction, buff=self.x_axis.line_to_number_buff, ) labels.add(bar_name_label) self.x_axis.labels = labels self.x_axis.add(labels) def _create_bar(self, bar_number: int, value: float) -> Rectangle: """Creates a positioned bar on the chart. Parameters ---------- bar_number Determines the x-position of the bar. value The value that determines the height of the bar. Returns ------- Rectangle A positioned rectangle representing a bar on the chart. """ # bar measurements relative to the axis # distance from between the y-axis and the top of the bar bar_h = abs(self.c2p(0, value)[1] - self.c2p(0, 0)[1]) # width of the bar bar_w = self.c2p(self.bar_width, 0)[0] - self.c2p(0, 0)[0] bar = Rectangle( height=bar_h, width=bar_w, stroke_width=self.bar_stroke_width, fill_opacity=self.bar_fill_opacity, ) pos = UP if (value >= 0) else DOWN bar.next_to(self.c2p(bar_number + 0.5, 0), pos, buff=0) return bar def _add_bars(self) -> None: for i, value in enumerate(self.values): tmp_bar = self._create_bar(bar_number=i, value=value) self.bars.add(tmp_bar) self._update_colors() self.add_to_back(self.bars) def get_bar_labels( self, color: ParsableManimColor | None = None, font_size: float = 24, buff: float = MED_SMALL_BUFF, label_constructor: type[MathTex] = Tex, ) -> VGroup: """Annotates each bar with its corresponding value. Use ``self.bar_labels`` to access the labels after creation. Parameters ---------- color The color of each label. By default ``None`` and is based on the parent's bar color. font_size The font size of each label. buff The distance from each label to its bar. By default 0.4. label_constructor The Mobject class to construct the labels, by default :class:`~.Tex`. Examples -------- .. manim:: GetBarLabelsExample :save_last_frame: class GetBarLabelsExample(Scene): def construct(self): chart = BarChart(values=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1], y_range=[0, 10, 1]) c_bar_lbls = chart.get_bar_labels( color=WHITE, label_constructor=MathTex, font_size=36 ) self.add(chart, c_bar_lbls) """ bar_labels = VGroup() for bar, value in zip(self.bars, self.values): bar_lbl: MathTex = label_constructor(str(value)) if color is None: bar_lbl.set_color(bar.get_fill_color()) else: bar_lbl.set_color(color) bar_lbl.font_size = font_size pos = UP if (value >= 0) else DOWN bar_lbl.next_to(bar, pos, buff=buff) bar_labels.add(bar_lbl) return bar_labels def change_bar_values( self, values: Iterable[float], update_colors: bool = True ) -> None: """Updates the height of the bars of the chart. Parameters ---------- values The values that will be used to update the height of the bars. Does not have to match the number of bars. update_colors Whether to re-initalize the colors of the bars based on ``self.bar_colors``. Examples -------- .. manim:: ChangeBarValuesExample :save_last_frame: class ChangeBarValuesExample(Scene): def construct(self): values=[-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10] chart = BarChart( values, y_range=[-10, 10, 2], y_axis_config={"font_size": 24}, ) self.add(chart) chart.change_bar_values(list(reversed(values))) self.add(chart.get_bar_labels(font_size=24)) """ for i, (bar, value) in enumerate(zip(self.bars, values)): chart_val = self.values[i] if chart_val > 0: bar_lim = bar.get_bottom() aligned_edge = DOWN else: bar_lim = bar.get_top() aligned_edge = UP # check if the bar has height if chart_val != 0: quotient = value / chart_val if quotient < 0: aligned_edge = UP if chart_val > 0 else DOWN # if the bar is already positive, then we now want to move it # so that it is negative. So, we move the top edge of the bar # to the location of the previous bottom # if already negative, then we move the bottom edge of the bar # to the location of the previous top bar.stretch_to_fit_height(abs(quotient) * bar.height) else: # create a new bar since the current one has a height of zero (doesn't exist) temp_bar = self._create_bar(i, value) self.bars.remove(bar) self.bars.insert(i, temp_bar) bar.move_to(bar_lim, aligned_edge) if update_colors: self._update_colors() self.values[: len(list(values))] = values ================================================ FILE: manim/mobject/graphing/scale.py ================================================ from __future__ import annotations import math from collections.abc import Iterable from typing import TYPE_CHECKING, Any, overload import numpy as np __all__ = ["LogBase", "LinearBase"] from manim.mobject.text.numbers import Integer if TYPE_CHECKING: from typing import Callable from manim.mobject.types.vectorized_mobject import VMobject class _ScaleBase: """Scale baseclass for graphing/functions. Parameters ---------- custom_labels Whether to create custom labels when plotted on a :class:`~.NumberLine`. """ def __init__(self, custom_labels: bool = False): self.custom_labels = custom_labels @overload def function(self, value: float) -> float: ... @overload def function(self, value: np.ndarray) -> np.ndarray: ... def function(self, value: float) -> float: """The function that will be used to scale the values. Parameters ---------- value The number/``np.ndarray`` to be scaled. Returns ------- float The value after it has undergone the scaling. Raises ------ NotImplementedError Must be subclassed. """ raise NotImplementedError def inverse_function(self, value: float) -> float: """The inverse of ``function``. Used for plotting on a particular axis. Raises ------ NotImplementedError Must be subclassed. """ raise NotImplementedError def get_custom_labels( self, val_range: Iterable[float], **kw_args: Any, ) -> Iterable[VMobject]: """Custom instructions for generating labels along an axis. Parameters ---------- val_range The position of labels. Also used for defining the content of the labels. Returns ------- Dict A list consisting of the labels. Can be passed to :meth:`~.NumberLine.add_labels() along with ``val_range``. Raises ------ NotImplementedError Can be subclassed, optional. """ raise NotImplementedError class LinearBase(_ScaleBase): def __init__(self, scale_factor: float = 1.0): """The default scaling class. Parameters ---------- scale_factor The slope of the linear function, by default 1.0 """ super().__init__() self.scale_factor = scale_factor def function(self, value: float) -> float: """Multiplies the value by the scale factor. Parameters ---------- value Value to be multiplied by the scale factor. """ return self.scale_factor * value def inverse_function(self, value: float) -> float: """Inverse of function. Divides the value by the scale factor. Parameters ---------- value value to be divided by the scale factor. """ return value / self.scale_factor class LogBase(_ScaleBase): def __init__(self, base: float = 10, custom_labels: bool = True): """Scale for logarithmic graphs/functions. Parameters ---------- base The base of the log, by default 10. custom_labels For use with :class:`~.Axes`: Whether or not to include ``LaTeX`` axis labels, by default True. Examples -------- .. code-block:: python func = ParametricFunction(lambda x: x, scaling=LogBase(base=2)) """ super().__init__() self.base = base self.custom_labels = custom_labels def function(self, value: float) -> float: """Scales the value to fit it to a logarithmic scale.``self.function(5)==10**5``""" return_value: float = self.base**value return return_value def inverse_function(self, value: float) -> float: """Inverse of ``function``. The value must be greater than 0""" if isinstance(value, np.ndarray): condition = value.any() <= 0 func: Callable[[float, float], float] def func(value: float, base: float) -> float: return_value: float = np.log(value) / np.log(base) return return_value else: condition = value <= 0 func = math.log if condition: raise ValueError( "log(0) is undefined. Make sure the value is in the domain of the function" ) value = func(value, self.base) return value def get_custom_labels( self, val_range: Iterable[float], unit_decimal_places: int = 0, **base_config: Any, ) -> list[Integer]: """Produces custom :class:`~.Integer` labels in the form of ``10^2``. Parameters ---------- val_range The iterable of values used to create the labels. Determines the exponent. unit_decimal_places The number of decimal places to include in the exponent base_config Additional arguments to be passed to :class:`~.Integer`. """ # uses `format` syntax to control the number of decimal places. tex_labels: list[Integer] = [ Integer( self.base, unit="^{%s}" % (f"{self.inverse_function(i):.{unit_decimal_places}f}"), # noqa: UP031 **base_config, ) for i in val_range ] return tex_labels ================================================ FILE: manim/mobject/opengl/__init__.py ================================================ [Empty file] ================================================ FILE: manim/mobject/opengl/dot_cloud.py ================================================ from __future__ import annotations __all__ = ["TrueDot", "DotCloud"] from typing import Any import numpy as np from typing_extensions import Self from manim.constants import ORIGIN, RIGHT, UP from manim.mobject.opengl.opengl_point_cloud_mobject import OpenGLPMobject from manim.typing import Point3DLike from manim.utils.color import YELLOW, ParsableManimColor class DotCloud(OpenGLPMobject): def __init__( self, color: ParsableManimColor = YELLOW, stroke_width: float = 2.0, radius: float = 2.0, density: float = 10, **kwargs: Any, ): self.radius = radius self.epsilon = 1.0 / density super().__init__( stroke_width=stroke_width, density=density, color=color, **kwargs ) def init_points(self) -> None: self.points = np.array( [ r * (np.cos(theta) * RIGHT + np.sin(theta) * UP) for r in np.arange(self.epsilon, self.radius, self.epsilon) # Num is equal to int(stop - start)/ (step + 1) reformulated. for theta in np.linspace( 0, 2 * np.pi, num=int(2 * np.pi * (r + self.epsilon) / self.epsilon), ) ], dtype=np.float32, ) def make_3d(self, gloss: float = 0.5, shadow: float = 0.2) -> Self: self.set_gloss(gloss) self.set_shadow(shadow) self.apply_depth_test() return self class TrueDot(DotCloud): def __init__( self, center: Point3DLike = ORIGIN, stroke_width: float = 2.0, **kwargs: Any ): self.radius = stroke_width super().__init__(points=[center], stroke_width=stroke_width, **kwargs) ================================================ FILE: manim/mobject/opengl/opengl_compatibility.py ================================================ from __future__ import annotations from abc import ABCMeta from manim import config from manim.mobject.opengl.opengl_mobject import OpenGLMobject from manim.mobject.opengl.opengl_point_cloud_mobject import OpenGLPMobject from manim.mobject.opengl.opengl_three_dimensions import OpenGLSurface from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVMobject from ...constants import RendererType __all__ = ["ConvertToOpenGL"] class ConvertToOpenGL(ABCMeta): """Metaclass for swapping (V)Mobject with its OpenGL counterpart at runtime depending on config.renderer. This metaclass should only need to be inherited on the lowest order inheritance classes such as Mobject and VMobject. """ _converted_classes = [] def __new__(mcls, name, bases, namespace): if config.renderer == RendererType.OPENGL: # Must check class names to prevent # cyclic importing. base_names_to_opengl = { "Mobject": OpenGLMobject, "VMobject": OpenGLVMobject, "PMobject": OpenGLPMobject, "Mobject1D": OpenGLPMobject, "Mobject2D": OpenGLPMobject, "Surface": OpenGLSurface, } bases = tuple( base_names_to_opengl.get(base.__name__, base) for base in bases ) return super().__new__(mcls, name, bases, namespace) def __init__(cls, name, bases, namespace): super().__init__(name, bases, namespace) cls._converted_classes.append(cls) ================================================ FILE: manim/mobject/opengl/opengl_geometry.py ================================================ from __future__ import annotations from typing import Any, cast import numpy as np from typing_extensions import Self from manim.constants import * from manim.mobject.mobject import Mobject from manim.mobject.opengl.opengl_vectorized_mobject import ( OpenGLDashedVMobject, OpenGLMobject, OpenGLVGroup, OpenGLVMobject, ) from manim.typing import ( Point3D, Point3D_Array, Point3DLike, QuadraticSpline, Vector2DLike, Vector3D, Vector3DLike, ) from manim.utils.color import * from manim.utils.iterables import adjacent_n_tuples, adjacent_pairs from manim.utils.simple_functions import clip from manim.utils.space_ops import ( angle_between_vectors, angle_of_vector, compass_directions, find_intersection, normalize, rotate_vector, rotation_matrix_transpose, ) DEFAULT_DOT_RADIUS = 0.08 DEFAULT_DASH_LENGTH = 0.05 DEFAULT_ARROW_TIP_LENGTH = 0.35 DEFAULT_ARROW_TIP_WIDTH = 0.35 __all__ = [ "OpenGLTipableVMobject", "OpenGLArc", "OpenGLArcBetweenPoints", "OpenGLCurvedArrow", "OpenGLCurvedDoubleArrow", "OpenGLCircle", "OpenGLDot", "OpenGLEllipse", "OpenGLAnnularSector", "OpenGLSector", "OpenGLAnnulus", "OpenGLLine", "OpenGLDashedLine", "OpenGLTangentLine", "OpenGLElbow", "OpenGLArrow", "OpenGLVector", "OpenGLDoubleArrow", "OpenGLCubicBezier", "OpenGLPolygon", "OpenGLRegularPolygon", "OpenGLTriangle", "OpenGLArrowTip", ] class OpenGLTipableVMobject(OpenGLVMobject): """ Meant for shared functionality between Arc and Line. Functionality can be classified broadly into these groups: * Adding, Creating, Modifying tips - add_tip calls create_tip, before pushing the new tip into the TipableVMobject's list of submobjects - stylistic and positional configuration * Checking for tips - Boolean checks for whether the TipableVMobject has a tip and a starting tip * Getters - Straightforward accessors, returning information pertaining to the TipableVMobject instance's tip(s), its length etc """ # Adding, Creating, Modifying tips def __init__( self, tip_length: float = DEFAULT_ARROW_TIP_LENGTH, normal_vector: Vector3DLike = OUT, tip_config: dict[str, Any] = {}, **kwargs: Any, ): self.tip_length = tip_length self.normal_vector = normal_vector self.tip_config = tip_config super().__init__(**kwargs) def add_tip(self, at_start: bool = False, **kwargs: Any) -> Self: """ Adds a tip to the TipableVMobject instance, recognising that the endpoints might need to be switched if it's a 'starting tip' or not. """ tip = self.create_tip(at_start, **kwargs) self.reset_endpoints_based_on_tip(tip, at_start) self.asign_tip_attr(tip, at_start) self.add(tip) return self def create_tip(self, at_start: bool = False, **kwargs: Any) -> OpenGLArrowTip: """ Stylises the tip, positions it spacially, and returns the newly instantiated tip to the caller. """ tip = self.get_unpositioned_tip(**kwargs) self.position_tip(tip, at_start) return tip def get_unpositioned_tip(self, **kwargs: Any) -> OpenGLArrowTip: """ Returns a tip that has been stylistically configured, but has not yet been given a position in space. """ config = {} config.update(self.tip_config) config.update(kwargs) return OpenGLArrowTip(**config) def position_tip( self, tip: OpenGLArrowTip, at_start: bool = False ) -> OpenGLArrowTip: # Last two control points, defining both # the end, and the tangency direction if at_start: anchor = self.get_start() handle = self.get_first_handle() else: handle = self.get_last_handle() anchor = self.get_end() tip.rotate(angle_of_vector(handle - anchor) - PI - tip.get_angle()) tip.shift(anchor - tip.get_tip_point()) return tip def reset_endpoints_based_on_tip(self, tip: OpenGLArrowTip, at_start: bool) -> Self: if self.get_length() == 0: # Zero length, put_start_and_end_on wouldn't # work return self if at_start: start = tip.get_base() end = self.get_end() else: start = self.get_start() end = tip.get_base() self.put_start_and_end_on(start, end) return self def asign_tip_attr(self, tip: OpenGLArrowTip, at_start: bool) -> Self: if at_start: self.start_tip = tip else: self.tip = tip return self # Checking for tips def has_tip(self) -> bool: return hasattr(self, "tip") and self.tip in self def has_start_tip(self) -> bool: return hasattr(self, "start_tip") and self.start_tip in self # Getters def pop_tips(self) -> OpenGLVGroup: start, end = self.get_start_and_end() result = OpenGLVGroup() if self.has_tip(): result.add(self.tip) self.remove(self.tip) if self.has_start_tip(): result.add(self.start_tip) self.remove(self.start_tip) self.put_start_and_end_on(start, end) return result def get_tips(self) -> OpenGLVGroup: """ Returns a VGroup (collection of VMobjects) containing the TipableVMObject instance's tips. """ result = OpenGLVGroup() if hasattr(self, "tip"): result.add(self.tip) if hasattr(self, "start_tip"): result.add(self.start_tip) return result def get_tip(self) -> OpenGLArrowTip: """Returns the TipableVMobject instance's (first) tip, otherwise throws an exception. """ tips = self.get_tips() if len(tips) == 0: raise Exception("tip not found") else: rv = cast(OpenGLArrowTip, tips[0]) return rv def get_default_tip_length(self) -> float: return self.tip_length def get_first_handle(self) -> Point3D: return self.points[1] def get_last_handle(self) -> Point3D: return self.points[-2] def get_end(self) -> Point3D: if self.has_tip(): return self.tip.get_start() else: return super().get_end() def get_start(self) -> Point3D: if self.has_start_tip(): return self.start_tip.get_start() else: return super().get_start() def get_length(self) -> float: start, end = self.get_start_and_end() rv: float = np.linalg.norm(start - end) return rv class OpenGLArc(OpenGLTipableVMobject): def __init__( self, start_angle: float = 0, angle: float = TAU / 4, radius: float = 1.0, n_components: int = 8, arc_center: Point3DLike = ORIGIN, **kwargs: Any, ): self.start_angle = start_angle self.angle = angle self.radius = radius self.n_components = n_components self.arc_center = arc_center super().__init__(**kwargs) self.orientation = -1 def init_points(self) -> None: self.set_points( OpenGLArc.create_quadratic_bezier_points( angle=self.angle, start_angle=self.start_angle, n_components=self.n_components, ), ) # To maintain proper orientation for fill shaders. self.scale(self.radius, about_point=ORIGIN) self.shift(self.arc_center) @staticmethod def create_quadratic_bezier_points( angle: float, start_angle: float = 0, n_components: int = 8 ) -> QuadraticSpline: samples = np.array( [ [np.cos(a), np.sin(a), 0] for a in np.linspace( start_angle, start_angle + angle, 2 * n_components + 1, ) ], ) theta = angle / n_components samples[1::2] /= np.cos(theta / 2) points = np.zeros((3 * n_components, 3)) points[0::3] = samples[0:-1:2] points[1::3] = samples[1::2] points[2::3] = samples[2::2] return points def get_arc_center(self) -> Point3D: """ Looks at the normals to the first two anchors, and finds their intersection points """ # First two anchors and handles a1, h, a2 = self.points[:3] # Tangent vectors t1 = h - a1 t2 = h - a2 # Normals n1 = rotate_vector(t1, TAU / 4) n2 = rotate_vector(t2, TAU / 4) return find_intersection(a1, n1, a2, n2) def get_start_angle(self) -> float: angle = angle_of_vector(self.get_start() - self.get_arc_center()) rv: float = angle % TAU return rv def get_stop_angle(self) -> float: angle = angle_of_vector(self.get_end() - self.get_arc_center()) rv: float = angle % TAU return rv def move_arc_center_to(self, point: Point3DLike) -> Self: self.shift(point - self.get_arc_center()) return self class OpenGLArcBetweenPoints(OpenGLArc): def __init__( self, start: Point3DLike, end: Point3DLike, angle: float = TAU / 4, **kwargs: Any, ): super().__init__(angle=angle, **kwargs) if angle == 0: self.set_points_as_corners([LEFT, RIGHT]) self.put_start_and_end_on(start, end) class OpenGLCurvedArrow(OpenGLArcBetweenPoints): def __init__(self, start_point: Point3DLike, end_point: Point3DLike, **kwargs: Any): super().__init__(start_point, end_point, **kwargs) self.add_tip() class OpenGLCurvedDoubleArrow(OpenGLCurvedArrow): def __init__(self, start_point: Point3DLike, end_point: Point3DLike, **kwargs: Any): super().__init__(start_point, end_point, **kwargs) self.add_tip(at_start=True) class OpenGLCircle(OpenGLArc): def __init__(self, color: ParsableManimColor = RED, **kwargs: Any): super().__init__(0, TAU, color=color, **kwargs) def surround( self, mobject: OpenGLMobject, dim_to_match: int = 0, stretch: bool = False, buff: float = MED_SMALL_BUFF, ) -> Self: # Ignores dim_to_match and stretch; result will always be a circle # TODO: Perhaps create an ellipse class to handle singele-dimension stretching self.replace(mobject, dim_to_match, stretch) self.stretch((self.get_width() + 2 * buff) / self.get_width(), 0) self.stretch((self.get_height() + 2 * buff) / self.get_height(), 1) return self def point_at_angle(self, angle: float) -> Point3D: start_angle = self.get_start_angle() return self.point_from_proportion((angle - start_angle) / TAU) class OpenGLDot(OpenGLCircle): def __init__( self, point: Point3DLike = ORIGIN, radius: float = DEFAULT_DOT_RADIUS, stroke_width: float = 0, fill_opacity: float = 1.0, color: ParsableManimColor = WHITE, **kwargs: Any, ): super().__init__( arc_center=point, radius=radius, stroke_width=stroke_width, fill_opacity=fill_opacity, color=color, **kwargs, ) class OpenGLEllipse(OpenGLCircle): def __init__(self, width: float = 2, height: float = 1, **kwargs: Any): super().__init__(**kwargs) self.set_width(width, stretch=True) self.set_height(height, stretch=True) class OpenGLAnnularSector(OpenGLArc): def __init__( self, inner_radius: float = 1, outer_radius: float = 2, angle: float = TAU / 4, start_angle: float = 0, fill_opacity: float = 1, stroke_width: float = 0, color: ParsableManimColor = WHITE, **kwargs: Any, ): self.inner_radius = inner_radius self.outer_radius = outer_radius super().__init__( start_angle=start_angle, angle=angle, fill_opacity=fill_opacity, stroke_width=stroke_width, color=color, **kwargs, ) def init_points(self) -> None: inner_arc, outer_arc = ( OpenGLArc( start_angle=self.start_angle, angle=self.angle, radius=radius, arc_center=self.arc_center, ) for radius in (self.inner_radius, self.outer_radius) ) outer_arc.reverse_points() self.append_points(inner_arc.points) self.add_line_to(outer_arc.points[0]) self.append_points(outer_arc.points) self.add_line_to(inner_arc.points[0]) class OpenGLSector(OpenGLAnnularSector): def __init__(self, outer_radius: float = 1, inner_radius: float = 0, **kwargs: Any): super().__init__(inner_radius=inner_radius, outer_radius=outer_radius, **kwargs) class OpenGLAnnulus(OpenGLCircle): def __init__( self, inner_radius: float = 1, outer_radius: float = 2, fill_opacity: float = 1, stroke_width: float = 0, color: ParsableManimColor = WHITE, mark_paths_closed: bool = False, **kwargs: Any, ): self.mark_paths_closed = mark_paths_closed # is this even used? self.inner_radius = inner_radius self.outer_radius = outer_radius super().__init__( fill_opacity=fill_opacity, stroke_width=stroke_width, color=color, **kwargs ) def init_points(self) -> None: self.radius = self.outer_radius outer_circle = OpenGLCircle(radius=self.outer_radius) inner_circle = OpenGLCircle(radius=self.inner_radius) inner_circle.reverse_points() self.append_points(outer_circle.points) self.append_points(inner_circle.points) self.shift(self.arc_center) class OpenGLLine(OpenGLTipableVMobject): def __init__( self, start: Point3DLike = LEFT, end: Point3DLike = RIGHT, buff: float = 0, path_arc: float = 0, **kwargs: Any, ): self.dim = 3 self.buff = buff self.path_arc = path_arc self.set_start_and_end_attrs(start, end) super().__init__(**kwargs) def init_points(self) -> None: self.set_points_by_ends(self.start, self.end, self.buff, self.path_arc) def set_points_by_ends( self, start: Point3DLike, end: Point3DLike, buff: float = 0, path_arc: float = 0 ) -> None: if path_arc: self.set_points(OpenGLArc.create_quadratic_bezier_points(path_arc)) self.put_start_and_end_on(start, end) else: self.set_points_as_corners([start, end]) self.account_for_buff(self.buff) def set_path_arc(self, new_value: float) -> None: self.path_arc = new_value self.init_points() def account_for_buff(self, buff: float) -> Self: if buff == 0: return self # length = self.get_length() if self.path_arc == 0 else self.get_arc_length() # if length < 2 * buff: return self buff_prop = buff / length self.pointwise_become_partial(self, buff_prop, 1 - buff_prop) return self def set_start_and_end_attrs( self, start: Mobject | Point3DLike, end: Mobject | Point3DLike ) -> None: # If either start or end are Mobjects, this # gives their centers rough_start = self.pointify(start) rough_end = self.pointify(end) vect = normalize(rough_end - rough_start) # Now that we know the direction between them, # we can find the appropriate boundary point from # start and end, if they're mobjects self.start = self.pointify(start, vect) + self.buff * vect self.end = self.pointify(end, -vect) - self.buff * vect def pointify( self, mob_or_point: Mobject | Point3DLike, direction: Vector3DLike = None ) -> Point3D: """ Take an argument passed into Line (or subclass) and turn it into a 3d point. """ if isinstance(mob_or_point, Mobject): mob = mob_or_point if direction is None: return mob.get_center() else: return mob.get_continuous_bounding_box_point(direction) else: point = mob_or_point result = np.zeros(self.dim) result[: len(point)] = point return result def put_start_and_end_on(self, start: Point3DLike, end: Point3DLike) -> Self: curr_start, curr_end = self.get_start_and_end() if (curr_start == curr_end).all(): self.set_points_by_ends(start, end, self.path_arc) return super().put_start_and_end_on(start, end) def get_vector(self) -> Vector3D: return self.get_end() - self.get_start() def get_unit_vector(self) -> Vector3D: return normalize(self.get_vector()) def get_angle(self) -> float: return angle_of_vector(self.get_vector()) def get_projection(self, point: Point3DLike) -> Point3D: """Return projection of a point onto the line""" unit_vect = self.get_unit_vector() start = self.get_start() return start + np.dot(point - start, unit_vect) * unit_vect def get_slope(self) -> float: rv: float = np.tan(self.get_angle()) return rv def set_angle(self, angle: float, about_point: Point3DLike | None = None) -> Self: if about_point is None: about_point = self.get_start() self.rotate( angle - self.get_angle(), about_point=about_point, ) return self def set_length(self, length: float) -> None: self.scale(length / self.get_length()) class OpenGLDashedLine(OpenGLLine): def __init__( self, *args: Any, dash_length: float = DEFAULT_DASH_LENGTH, dashed_ratio: float = 0.5, **kwargs: Any, ): self.dashed_ratio = dashed_ratio self.dash_length = dash_length super().__init__(*args, **kwargs) dashed_ratio = self.dashed_ratio num_dashes = self.calculate_num_dashes(dashed_ratio) dashes = OpenGLDashedVMobject( self, num_dashes=num_dashes, dashed_ratio=dashed_ratio, ) self.clear_points() self.add(*dashes) def calculate_num_dashes(self, dashed_ratio: float) -> int: return max( 2, int(np.ceil((self.get_length() / self.dash_length) * dashed_ratio)), ) def get_start(self) -> Point3D: if len(self.submobjects) > 0: return self.submobjects[0].get_start() else: return super().get_start() def get_end(self) -> Point3D: if len(self.submobjects) > 0: return self.submobjects[-1].get_end() else: return super().get_end() def get_first_handle(self) -> Point3D: return self.submobjects[0].points[1] def get_last_handle(self) -> Point3D: return self.submobjects[-1].points[-2] class OpenGLTangentLine(OpenGLLine): def __init__( self, vmob: OpenGLVMobject, alpha: float, length: float = 1, d_alpha: float = 1e-6, **kwargs: Any, ): self.length = length self.d_alpha = d_alpha da = self.d_alpha a1 = clip(alpha - da, 0, 1) a2 = clip(alpha + da, 0, 1) super().__init__(vmob.pfp(a1), vmob.pfp(a2), **kwargs) self.scale(self.length / self.get_length()) class OpenGLElbow(OpenGLVMobject): def __init__(self, width: float = 0.2, angle: float = 0, **kwargs: Any): self.angle = angle super().__init__(self, **kwargs) self.set_points_as_corners([UP, UP + RIGHT, RIGHT]) self.set_width(width, about_point=ORIGIN) self.rotate(self.angle, about_point=ORIGIN) class OpenGLArrow(OpenGLLine): def __init__( self, start: Point3DLike = LEFT, end: Point3DLike = RIGHT, path_arc: float = 0, fill_color: ParsableManimColor = GREY_A, fill_opacity: float = 1, stroke_width: float = 0, buff: float = MED_SMALL_BUFF, thickness: float = 0.05, tip_width_ratio: float = 5, tip_angle: float = PI / 3, max_tip_length_to_length_ratio: float = 0.5, max_width_to_length_ratio: float = 0.1, **kwargs: Any, ): self.thickness = thickness self.tip_width_ratio = tip_width_ratio self.tip_angle = tip_angle self.max_tip_length_to_length_ratio = max_tip_length_to_length_ratio self.max_width_to_length_ratio = max_width_to_length_ratio super().__init__( start=start, end=end, buff=buff, path_arc=path_arc, fill_color=fill_color, fill_opacity=fill_opacity, stroke_width=stroke_width, **kwargs, ) def set_points_by_ends( self, start: Point3DLike, end: Point3DLike, buff: float = 0, path_arc: float = 0 ) -> None: # Find the right tip length and thickness vect = np.asarray(end) - np.asarray(start) length = max(np.linalg.norm(vect), 1e-8) thickness = self.thickness w_ratio = self.max_width_to_length_ratio / (thickness / length) if w_ratio < 1: thickness *= w_ratio tip_width = self.tip_width_ratio * thickness tip_length = tip_width / (2 * np.tan(self.tip_angle / 2)) t_ratio = self.max_tip_length_to_length_ratio / (tip_length / length) if t_ratio < 1: tip_length *= t_ratio tip_width *= t_ratio # Find points for the stem if path_arc == 0: points1 = (length - tip_length) * np.array([RIGHT, 0.5 * RIGHT, ORIGIN]) points1 += thickness * UP / 2 points2 = points1[::-1] + thickness * DOWN else: # Solve for radius so that the tip-to-tail length matches |end - start| a = 2 * (1 - np.cos(path_arc)) b = -2 * tip_length * np.sin(path_arc) c = tip_length**2 - length**2 R = (-b + np.sqrt(b**2 - 4 * a * c)) / (2 * a) # Find arc points points1 = OpenGLArc.create_quadratic_bezier_points(path_arc) points2 = np.array(points1[::-1]) points1 *= R + thickness / 2 points2 *= R - thickness / 2 if path_arc < 0: tip_length *= -1 rot_T = rotation_matrix_transpose(PI / 2 - path_arc, OUT) for points in points1, points2: points[:] = np.dot(points, rot_T) points += R * DOWN self.set_points(points1) # Tip self.add_line_to(tip_width * UP / 2) self.add_line_to(tip_length * LEFT) self.tip_index = len(self.points) - 1 self.add_line_to(tip_width * DOWN / 2) self.add_line_to(points2[0]) # Close it out self.append_points(points2) self.add_line_to(points1[0]) if length > 0: # Final correction super().scale(length / self.get_length()) self.rotate(angle_of_vector(vect) - self.get_angle()) self.rotate( PI / 2 - np.arccos(normalize(vect)[2]), axis=rotate_vector(self.get_unit_vector(), -PI / 2), ) self.shift(start - self.get_start()) self.refresh_triangulation() def reset_points_around_ends(self) -> Self: self.set_points_by_ends( self.get_start(), self.get_end(), path_arc=self.path_arc, ) return self def get_start(self) -> Point3D: nppc = self.n_points_per_curve points = self.points return (points[0] + points[-nppc]) / 2 def get_end(self) -> Point3D: return self.points[self.tip_index] def put_start_and_end_on(self, start: Point3DLike, end: Point3DLike) -> Self: self.set_points_by_ends(start, end, buff=0, path_arc=self.path_arc) return self def scale(self, *args: Any, **kwargs: Any) -> Self: super().scale(*args, **kwargs) self.reset_points_around_ends() return self def set_thickness(self, thickness: float) -> Self: self.thickness = thickness self.reset_points_around_ends() return self def set_path_arc(self, path_arc: float) -> None: self.path_arc = path_arc self.reset_points_around_ends() # return self class OpenGLVector(OpenGLArrow): def __init__( self, direction: Vector2DLike | Vector3DLike = RIGHT, buff: float = 0, **kwargs: Any, ): self.buff = buff if len(direction) == 2: direction = np.hstack([direction, 0]) super().__init__(ORIGIN, direction, buff=buff, **kwargs) class OpenGLDoubleArrow(OpenGLArrow): def __init__(self, *args: Any, **kwargs: Any): super().__init__(*args, **kwargs) self.add_tip(at_start=True) class OpenGLCubicBezier(OpenGLVMobject): def __init__( self, a0: Point3DLike, h0: Point3DLike, h1: Point3DLike, a1: Point3DLike, **kwargs: Any, ): super().__init__(**kwargs) self.add_cubic_bezier_curve(a0, h0, h1, a1) class OpenGLPolygon(OpenGLVMobject): def __init__(self, *vertices: Point3DLike, **kwargs: Any): self.vertices: Point3D_Array = np.array(vertices) super().__init__(**kwargs) def init_points(self) -> None: verts = self.vertices self.set_points_as_corners([*verts, verts[0]]) def get_vertices(self) -> Point3D_Array: return self.get_start_anchors() def round_corners(self, radius: float = 0.5) -> Self: vertices = self.get_vertices() arcs = [] for v1, v2, v3 in adjacent_n_tuples(vertices, 3): vect1 = v2 - v1 vect2 = v3 - v2 unit_vect1 = normalize(vect1) unit_vect2 = normalize(vect2) angle = angle_between_vectors(vect1, vect2) # Negative radius gives concave curves angle *= np.sign(radius) # Distance between vertex and start of the arc cut_off_length = radius * np.tan(angle / 2) # Determines counterclockwise vs. clockwise sign = np.sign(np.cross(vect1, vect2)[2]) arc = OpenGLArcBetweenPoints( v2 - unit_vect1 * cut_off_length, v2 + unit_vect2 * cut_off_length, angle=sign * angle, n_components=2, ) arcs.append(arc) self.clear_points() # To ensure that we loop through starting with last arcs = [arcs[-1], *arcs[:-1]] for arc1, arc2 in adjacent_pairs(arcs): self.append_points(arc1.points) line = OpenGLLine(arc1.get_end(), arc2.get_start()) # Make sure anchors are evenly distributed len_ratio = line.get_length() / arc1.get_arc_length() line.insert_n_curves(int(arc1.get_num_curves() * len_ratio)) self.append_points(line.points) return self class OpenGLRegularPolygon(OpenGLPolygon): def __init__(self, n: int = 6, start_angle: float | None = None, **kwargs: Any): self.start_angle = start_angle if self.start_angle is None: if n % 2 == 0: self.start_angle = 0 else: self.start_angle = 90 * DEGREES start_vect = rotate_vector(RIGHT, self.start_angle) vertices = compass_directions(n, start_vect) super().__init__(*vertices, **kwargs) class OpenGLTriangle(OpenGLRegularPolygon): def __init__(self, **kwargs: Any): super().__init__(n=3, **kwargs) class OpenGLArrowTip(OpenGLTriangle): def __init__( self, fill_opacity: float = 1, fill_color: ParsableManimColor = WHITE, stroke_width: float = 0, width: float = DEFAULT_ARROW_TIP_WIDTH, length: float = DEFAULT_ARROW_TIP_LENGTH, angle: float = 0, **kwargs: Any, ): super().__init__( start_angle=0, fill_opacity=fill_opacity, fill_color=fill_color, stroke_width=stroke_width, **kwargs, ) self.set_width(width, stretch=True) self.set_height(length, stretch=True) def get_base(self) -> Point3D: return self.point_from_proportion(0.5) def get_tip_point(self) -> Point3D: return self.points[0] def get_vector(self) -> Vector3D: return self.get_tip_point() - self.get_base() def get_angle(self) -> float: return angle_of_vector(self.get_vector()) def get_length(self) -> float: rv: float = np.linalg.norm(self.get_vector()) return rv class OpenGLRectangle(OpenGLPolygon): def __init__( self, color: ParsableManimColor = WHITE, width: float = 4.0, height: float = 2.0, **kwargs: Any, ): super().__init__(UR, UL, DL, DR, color=color, **kwargs) self.set_width(width, stretch=True) self.set_height(height, stretch=True) class OpenGLSquare(OpenGLRectangle): def __init__(self, side_length: float = 2.0, **kwargs: Any): self.side_length = side_length super().__init__(height=side_length, width=side_length, **kwargs) class OpenGLRoundedRectangle(OpenGLRectangle): def __init__(self, corner_radius: float = 0.5, **kwargs: Any): self.corner_radius = corner_radius super().__init__(**kwargs) self.round_corners(self.corner_radius) ================================================ FILE: manim/mobject/opengl/opengl_image_mobject.py ================================================ from __future__ import annotations __all__ = [ "OpenGLImageMobject", ] from pathlib import Path import numpy as np from PIL import Image from PIL.Image import Resampling from manim.mobject.opengl.opengl_surface import OpenGLSurface, OpenGLTexturedSurface from manim.utils.images import get_full_raster_image_path __all__ = ["OpenGLImageMobject"] class OpenGLImageMobject(OpenGLTexturedSurface): def __init__( self, filename_or_array: str | Path | np.ndarray, width: float = None, height: float = None, image_mode: str = "RGBA", resampling_algorithm: int = Resampling.BICUBIC, opacity: float = 1, gloss: float = 0, shadow: float = 0, **kwargs, ): self.image = filename_or_array self.resampling_algorithm = resampling_algorithm if isinstance(filename_or_array, np.ndarray): self.size = self.image.shape[1::-1] elif isinstance(filename_or_array, (str, Path)): path = get_full_raster_image_path(filename_or_array) self.size = Image.open(path).size if width is None and height is None: width = 4 * self.size[0] / self.size[1] height = 4 if height is None: height = width * self.size[1] / self.size[0] if width is None: width = height * self.size[0] / self.size[1] surface = OpenGLSurface( lambda u, v: np.array([u, v, 0]), [-width / 2, width / 2], [-height / 2, height / 2], opacity=opacity, gloss=gloss, shadow=shadow, ) super().__init__( surface, self.image, image_mode=image_mode, opacity=opacity, gloss=gloss, shadow=shadow, **kwargs, ) def get_image_from_file( self, image_file: str | Path | np.ndarray, image_mode: str, ): if isinstance(image_file, (str, Path)): return super().get_image_from_file(image_file, image_mode) else: return ( Image.fromarray(image_file.astype("uint8")) .convert(image_mode) .resize( np.array(image_file.shape[:2]) * 200, # assumption of 200 ppmu (pixels per manim unit) would suffice resample=self.resampling_algorithm, ) ) ================================================ FILE: manim/mobject/opengl/opengl_point_cloud_mobject.py ================================================ from __future__ import annotations __all__ = ["OpenGLPMobject", "OpenGLPGroup", "OpenGLPMPoint"] from typing import TYPE_CHECKING import moderngl import numpy as np from manim.constants import * from manim.mobject.opengl.opengl_mobject import OpenGLMobject from manim.utils.bezier import interpolate from manim.utils.color import ( BLACK, WHITE, YELLOW, ParsableManimColor, color_gradient, color_to_rgba, ) from manim.utils.config_ops import _Uniforms from manim.utils.iterables import resize_with_interpolation if TYPE_CHECKING: from typing_extensions import Self from manim.typing import ( FloatRGBA_Array, FloatRGBALike_Array, Point3D_Array, Point3DLike_Array, ) __all__ = ["OpenGLPMobject", "OpenGLPGroup", "OpenGLPMPoint"] class OpenGLPMobject(OpenGLMobject): shader_folder = "true_dot" # Scale for consistency with cairo units OPENGL_POINT_RADIUS_SCALE_FACTOR = 0.01 shader_dtype = [ ("point", np.float32, (3,)), ("color", np.float32, (4,)), ] point_radius = _Uniforms() def __init__( self, stroke_width: float = 2.0, color: ParsableManimColor = YELLOW, render_primitive: int = moderngl.POINTS, **kwargs, ): self.stroke_width = stroke_width super().__init__(color=color, render_primitive=render_primitive, **kwargs) self.point_radius = ( self.stroke_width * OpenGLPMobject.OPENGL_POINT_RADIUS_SCALE_FACTOR ) def reset_points(self) -> Self: self.rgbas: FloatRGBA_Array = np.zeros((1, 4)) self.points: Point3D_Array = np.zeros((0, 3)) return self def get_array_attrs(self): return ["points", "rgbas"] def add_points( self, points: Point3DLike_Array, rgbas: FloatRGBALike_Array | None = None, color: ParsableManimColor | None = None, opacity: float | None = None, ) -> Self: """Add points. Points must be a Nx3 numpy array. Rgbas must be a Nx4 numpy array if it is not None. """ if rgbas is None and color is None: color = YELLOW self.append_points(points) # rgbas array will have been resized with points if color is not None: if opacity is None: opacity = self.rgbas[-1, 3] new_rgbas = np.repeat([color_to_rgba(color, opacity)], len(points), axis=0) elif rgbas is not None: new_rgbas = rgbas elif len(rgbas) != len(points): raise ValueError("points and rgbas must have same length") self.rgbas = np.append(self.rgbas, new_rgbas, axis=0) return self def thin_out(self, factor=5): """Removes all but every nth point for n = factor""" for mob in self.family_members_with_points(): num_points = mob.get_num_points() def thin_func(num_points=num_points): return np.arange(0, num_points, factor) if len(mob.points) == len(mob.rgbas): mob.set_rgba_array_direct(mob.rgbas[thin_func()]) mob.set_points(mob.points[thin_func()]) return self def set_color_by_gradient(self, *colors): self.rgbas = np.array( list(map(color_to_rgba, color_gradient(*colors, self.get_num_points()))), ) return self def set_colors_by_radial_gradient( self, center=None, radius=1, inner_color=WHITE, outer_color=BLACK, ): start_rgba, end_rgba = list(map(color_to_rgba, [inner_color, outer_color])) if center is None: center = self.get_center() for mob in self.family_members_with_points(): distances = np.abs(self.points - center) alphas = np.linalg.norm(distances, axis=1) / radius mob.rgbas = np.array( np.array( [interpolate(start_rgba, end_rgba, alpha) for alpha in alphas], ), ) return self def match_colors(self, pmobject): self.rgbas[:] = resize_with_interpolation(pmobject.rgbas, self.get_num_points()) return self def fade_to(self, color, alpha, family=True): rgbas = interpolate(self.rgbas, color_to_rgba(color), alpha) for mob in self.submobjects: mob.fade_to(color, alpha, family) self.set_rgba_array_direct(rgbas) return self def filter_out(self, condition): for mob in self.family_members_with_points(): to_keep = ~np.apply_along_axis(condition, 1, mob.points) for key in mob.data: mob.data[key] = mob.data[key][to_keep] return self def sort_points(self, function=lambda p: p[0]): """function is any map from R^3 to R""" for mob in self.family_members_with_points(): indices = np.argsort(np.apply_along_axis(function, 1, mob.points)) for key in mob.data: mob.data[key] = mob.data[key][indices] return self def ingest_submobjects(self): for key in self.data: self.data[key] = np.vstack([sm.data[key] for sm in self.get_family()]) return self def point_from_proportion(self, alpha): index = alpha * (self.get_num_points() - 1) return self.points[int(index)] def pointwise_become_partial(self, pmobject, a, b): lower_index = int(a * pmobject.get_num_points()) upper_index = int(b * pmobject.get_num_points()) for key in self.data: self.data[key] = pmobject.data[key][lower_index:upper_index] return self def get_shader_data(self): shader_data = np.zeros(len(self.points), dtype=self.shader_dtype) self.read_data_to_shader(shader_data, "point", "points") self.read_data_to_shader(shader_data, "color", "rgbas") return shader_data @staticmethod def get_mobject_type_class(): return OpenGLPMobject class OpenGLPGroup(OpenGLPMobject): def __init__(self, *pmobs, **kwargs): if not all(isinstance(m, OpenGLPMobject) for m in pmobs): raise Exception("All submobjects must be of type OpenglPMObject") super().__init__(**kwargs) self.add(*pmobs) def fade_to(self, color, alpha, family=True): if family: for mob in self.submobjects: mob.fade_to(color, alpha, family) class OpenGLPMPoint(OpenGLPMobject): def __init__(self, location=ORIGIN, stroke_width=4.0, **kwargs): self.location = location super().__init__(stroke_width=stroke_width, **kwargs) def init_points(self): self.points = np.array([self.location], dtype=np.float32) ================================================ FILE: manim/mobject/opengl/opengl_surface.py ================================================ from __future__ import annotations from collections.abc import Iterable from pathlib import Path import moderngl import numpy as np from PIL import Image from manim.constants import * from manim.mobject.opengl.opengl_mobject import OpenGLMobject from manim.typing import Point3D_Array, Vector3D_Array from manim.utils.bezier import integer_interpolate, interpolate from manim.utils.color import * from manim.utils.config_ops import _Data, _Uniforms from manim.utils.images import change_to_rgba_array, get_full_raster_image_path from manim.utils.iterables import listify from manim.utils.space_ops import normalize_along_axis __all__ = ["OpenGLSurface", "OpenGLTexturedSurface"] class OpenGLSurface(OpenGLMobject): r"""Creates a Surface. Parameters ---------- uv_func The function that defines the surface. u_range The range of the ``u`` variable: ``(u_min, u_max)``. v_range The range of the ``v`` variable: ``(v_min, v_max)``. resolution The number of samples taken of the surface. axes Axes on which the surface is to be drawn. Optional parameter used when coloring a surface by z-value. color Color of the surface. Defaults to grey. colorscale Colors of the surface. Optional parameter used when coloring a surface by values. Passing a list of colors and an axes will color the surface by z-value. Passing a list of tuples in the form ``(color, pivot)`` allows user-defined pivots where the color transitions. colorscale_axis Defines the axis on which the colorscale is applied (0 = x, 1 = y, 2 = z), default is z-axis (2). opacity Opacity of the surface from 0 being fully transparent to 1 being fully opaque. Defaults to 1. """ shader_dtype = [ ("point", np.float32, (3,)), ("du_point", np.float32, (3,)), ("dv_point", np.float32, (3,)), ("color", np.float32, (4,)), ] shader_folder = "surface" def __init__( self, uv_func=None, u_range=None, v_range=None, # Resolution counts number of points sampled, which for # each coordinate is one more than the the number of # rows/columns of approximating squares resolution=None, axes=None, color=GREY, colorscale=None, colorscale_axis=2, opacity=1.0, gloss=0.3, shadow=0.4, prefered_creation_axis=1, # For du and dv steps. Much smaller and numerical error # can crop up in the shaders. epsilon=1e-5, render_primitive=moderngl.TRIANGLES, depth_test=True, shader_folder=None, **kwargs, ): self.passed_uv_func = uv_func self.u_range = u_range if u_range is not None else (0, 1) self.v_range = v_range if v_range is not None else (0, 1) # Resolution counts number of points sampled, which for # each coordinate is one more than the the number of # rows/columns of approximating squares self.resolution = resolution if resolution is not None else (101, 101) self.axes = axes self.colorscale = colorscale self.colorscale_axis = colorscale_axis self.prefered_creation_axis = prefered_creation_axis # For du and dv steps. Much smaller and numerical error # can crop up in the shaders. self.epsilon = epsilon self.triangle_indices = None super().__init__( color=color, opacity=opacity, gloss=gloss, shadow=shadow, shader_folder=shader_folder if shader_folder is not None else "surface", render_primitive=render_primitive, depth_test=depth_test, **kwargs, ) self.compute_triangle_indices() def uv_func(self, u, v): # To be implemented in subclasses if self.passed_uv_func: return self.passed_uv_func(u, v) return (u, v, 0.0) def init_points(self): dim = self.dim nu, nv = self.resolution u_range = np.linspace(*self.u_range, nu) v_range = np.linspace(*self.v_range, nv) # Get three lists: # - Points generated by pure uv values # - Those generated by values nudged by du # - Those generated by values nudged by dv point_lists = [] for du, dv in [(0, 0), (self.epsilon, 0), (0, self.epsilon)]: uv_grid = np.array([[[u + du, v + dv] for v in v_range] for u in u_range]) point_grid = np.apply_along_axis(lambda p: self.uv_func(*p), 2, uv_grid) point_lists.append(point_grid.reshape((nu * nv, dim))) # Rather than tracking normal vectors, the points list will hold on to the # infinitesimal nudged values alongside the original values. This way, one # can perform all the manipulations they'd like to the surface, and normals # are still easily recoverable. self.set_points(np.vstack(point_lists)) def compute_triangle_indices(self): # TODO, if there is an event which changes # the resolution of the surface, make sure # this is called. nu, nv = self.resolution if nu == 0 or nv == 0: self.triangle_indices = np.zeros(0, dtype=int) return index_grid = np.arange(nu * nv).reshape((nu, nv)) indices = np.zeros(6 * (nu - 1) * (nv - 1), dtype=int) indices[0::6] = index_grid[:-1, :-1].flatten() # Top left indices[1::6] = index_grid[+1:, :-1].flatten() # Bottom left indices[2::6] = index_grid[:-1, +1:].flatten() # Top right indices[3::6] = index_grid[:-1, +1:].flatten() # Top right indices[4::6] = index_grid[+1:, :-1].flatten() # Bottom left indices[5::6] = index_grid[+1:, +1:].flatten() # Bottom right self.triangle_indices = indices def get_triangle_indices(self): return self.triangle_indices def get_surface_points_and_nudged_points( self, ) -> tuple[Point3D_Array, Point3D_Array, Point3D_Array]: points = self.points k = len(points) // 3 return points[:k], points[k : 2 * k], points[2 * k :] def get_unit_normals(self) -> Vector3D_Array: s_points, du_points, dv_points = self.get_surface_points_and_nudged_points() normals = np.cross( (du_points - s_points) / self.epsilon, (dv_points - s_points) / self.epsilon, ) return normalize_along_axis(normals, 1) def pointwise_become_partial(self, smobject, a, b, axis=None): assert isinstance(smobject, OpenGLSurface) if axis is None: axis = self.prefered_creation_axis if a <= 0 and b >= 1: self.match_points(smobject) return self nu, nv = smobject.resolution self.set_points( np.vstack( [ self.get_partial_points_array( arr.copy(), a, b, (nu, nv, 3), axis=axis, ) for arr in smobject.get_surface_points_and_nudged_points() ], ), ) return self def get_partial_points_array(self, points, a, b, resolution, axis): if len(points) == 0: return points nu, nv = resolution[:2] points = points.reshape(resolution) max_index = resolution[axis] - 1 lower_index, lower_residue = integer_interpolate(0, max_index, a) upper_index, upper_residue = integer_interpolate(0, max_index, b) if axis == 0: points[:lower_index] = interpolate( points[lower_index], points[lower_index + 1], lower_residue, ) points[upper_index + 1 :] = interpolate( points[upper_index], points[upper_index + 1], upper_residue, ) else: shape = (nu, 1, resolution[2]) points[:, :lower_index] = interpolate( points[:, lower_index], points[:, lower_index + 1], lower_residue, ).reshape(shape) points[:, upper_index + 1 :] = interpolate( points[:, upper_index], points[:, upper_index + 1], upper_residue, ).reshape(shape) return points.reshape((nu * nv, *resolution[2:])) def sort_faces_back_to_front(self, vect=OUT): tri_is = self.triangle_indices indices = list(range(len(tri_is) // 3)) points = self.points def index_dot(index): return np.dot(points[tri_is[3 * index]], vect) indices.sort(key=index_dot) for k in range(3): tri_is[k::3] = tri_is[k::3][indices] return self # For shaders def get_shader_data(self): """Called by parent Mobject to calculate and return the shader data. Returns ------- shader_dtype An array containing the shader data (vertices and color of each vertex) """ s_points, du_points, dv_points = self.get_surface_points_and_nudged_points() shader_data = np.zeros(len(s_points), dtype=self.shader_dtype) if "points" not in self.locked_data_keys: shader_data["point"] = s_points shader_data["du_point"] = du_points shader_data["dv_point"] = dv_points if self.colorscale: if not hasattr(self, "color_by_val"): self.color_by_val = self._get_color_by_value(s_points) shader_data["color"] = self.color_by_val else: self.fill_in_shader_color_info(shader_data) return shader_data def fill_in_shader_color_info(self, shader_data): """Fills in the shader color data when the surface is all one color. Parameters ---------- shader_data The vertices of the surface. Returns ------- shader_dtype An array containing the shader data (vertices and color of each vertex) """ self.read_data_to_shader(shader_data, "color", "rgbas") return shader_data def _get_color_by_value(self, s_points): """Matches each vertex to a color associated to it's z-value. Parameters ---------- s_points The vertices of the surface. Returns ------- List A list of colors matching the vertex inputs. """ if type(self.colorscale[0]) in (list, tuple): new_colors, pivots = [ [i for i, j in self.colorscale], [j for i, j in self.colorscale], ] else: new_colors = self.colorscale pivot_min = self.axes.z_range[0] pivot_max = self.axes.z_range[1] pivot_frequency = (pivot_max - pivot_min) / (len(new_colors) - 1) pivots = np.arange( start=pivot_min, stop=pivot_max + pivot_frequency, step=pivot_frequency, ) return_colors = [] for point in s_points: axis_value = self.axes.point_to_coords(point)[self.colorscale_axis] if axis_value <= pivots[0]: return_colors.append(color_to_rgba(new_colors[0], self.opacity)) elif axis_value >= pivots[-1]: return_colors.append(color_to_rgba(new_colors[-1], self.opacity)) else: for i, pivot in enumerate(pivots): if pivot > axis_value: color_index = (axis_value - pivots[i - 1]) / ( pivots[i] - pivots[i - 1] ) color_index = max(min(color_index, 1), 0) temp_color = interpolate_color( new_colors[i - 1], new_colors[i], color_index, ) break return_colors.append(color_to_rgba(temp_color, self.opacity)) return return_colors def get_shader_vert_indices(self): return self.get_triangle_indices() class OpenGLSurfaceGroup(OpenGLSurface): def __init__(self, *parametric_surfaces, resolution=None, **kwargs): self.resolution = (0, 0) if resolution is None else resolution super().__init__(uv_func=None, **kwargs) self.add(*parametric_surfaces) def init_points(self): pass # Needed? class OpenGLTexturedSurface(OpenGLSurface): shader_dtype = [ ("point", np.float32, (3,)), ("du_point", np.float32, (3,)), ("dv_point", np.float32, (3,)), ("im_coords", np.float32, (2,)), ("opacity", np.float32, (1,)), ] shader_folder = "textured_surface" im_coords = _Data() opacity = _Data() num_textures = _Uniforms() def __init__( self, uv_surface: OpenGLSurface, image_file: str | Path, dark_image_file: str | Path = None, image_mode: str | Iterable[str] = "RGBA", shader_folder: str | Path = None, **kwargs, ): self.uniforms = {} if not isinstance(uv_surface, OpenGLSurface): raise Exception("uv_surface must be of type OpenGLSurface") if isinstance(image_file, np.ndarray): image_file = change_to_rgba_array(image_file) # Set texture information if isinstance(image_mode, (str, Path)): image_mode = [image_mode] * 2 image_mode_light, image_mode_dark = image_mode texture_paths = { "LightTexture": self.get_image_from_file( image_file, image_mode_light, ), "DarkTexture": self.get_image_from_file( dark_image_file or image_file, image_mode_dark, ), } if dark_image_file: self.num_textures = 2 self.uv_surface = uv_surface self.uv_func = uv_surface.uv_func self.u_range = uv_surface.u_range self.v_range = uv_surface.v_range self.resolution = uv_surface.resolution self.gloss = self.uv_surface.gloss super().__init__(texture_paths=texture_paths, **kwargs) def get_image_from_file( self, image_file: str | Path, image_mode: str, ): image_file = get_full_raster_image_path(image_file) return Image.open(image_file).convert(image_mode) def init_data(self): super().init_data() self.im_coords = np.zeros((0, 2)) self.opacity = np.zeros((0, 1)) def init_points(self): nu, nv = self.uv_surface.resolution self.set_points(self.uv_surface.points) self.im_coords = np.array( [ [u, v] for u in np.linspace(0, 1, nu) for v in np.linspace(1, 0, nv) # Reverse y-direction ], ) def init_colors(self): self.opacity = np.array([self.uv_surface.rgbas[:, 3]]) def set_opacity(self, opacity, recurse=True): for mob in self.get_family(recurse): mob.opacity = np.array([[o] for o in listify(opacity)]) return self def pointwise_become_partial(self, tsmobject, a, b, axis=1): super().pointwise_become_partial(tsmobject, a, b, axis) im_coords = self.im_coords im_coords[:] = tsmobject.im_coords if a <= 0 and b >= 1: return self nu, nv = tsmobject.resolution im_coords[:] = self.get_partial_points_array(im_coords, a, b, (nu, nv, 2), axis) return self def fill_in_shader_color_info(self, shader_data): self.read_data_to_shader(shader_data, "opacity", "opacity") self.read_data_to_shader(shader_data, "im_coords", "im_coords") return shader_data ================================================ FILE: manim/mobject/opengl/opengl_three_dimensions.py ================================================ from __future__ import annotations from typing import Any import numpy as np from manim.mobject.opengl.opengl_surface import OpenGLSurface from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVGroup, OpenGLVMobject __all__ = ["OpenGLSurfaceMesh"] class OpenGLSurfaceMesh(OpenGLVGroup): def __init__( self, uv_surface: OpenGLSurface, resolution: tuple[int, int] | None = None, stroke_width: float = 1, normal_nudge: float = 1e-2, depth_test: bool = True, flat_stroke: bool = False, **kwargs: Any, ): if not isinstance(uv_surface, OpenGLSurface): raise Exception("uv_surface must be of type OpenGLSurface") self.uv_surface = uv_surface self.resolution = resolution if resolution is not None else (21, 21) self.normal_nudge = normal_nudge super().__init__( stroke_width=stroke_width, depth_test=depth_test, flat_stroke=flat_stroke, **kwargs, ) def init_points(self) -> None: uv_surface = self.uv_surface full_nu, full_nv = uv_surface.resolution part_nu, part_nv = self.resolution u_indices = np.linspace(0, full_nu, part_nu).astype(int) v_indices = np.linspace(0, full_nv, part_nv).astype(int) points, du_points, dv_points = uv_surface.get_surface_points_and_nudged_points() normals = uv_surface.get_unit_normals() nudged_points = points + self.normal_nudge * normals for ui in u_indices: path = OpenGLVMobject() full_ui = full_nv * ui path.set_points_smoothly(nudged_points[full_ui : full_ui + full_nv]) self.add(path) for vi in v_indices: path = OpenGLVMobject() path.set_points_smoothly(nudged_points[vi::full_nv]) self.add(path) ================================================ FILE: manim/mobject/svg/__init__.py ================================================ """Mobjects related to SVG images. Modules ======= .. autosummary:: :toctree: ../reference ~brace ~svg_mobject """ ================================================ FILE: manim/mobject/svg/brace.py ================================================ """Mobject representing curly braces.""" from __future__ import annotations __all__ = ["Brace", "BraceLabel", "ArcBrace", "BraceText", "BraceBetweenPoints"] from typing import TYPE_CHECKING, Any import numpy as np import svgelements as se from typing_extensions import Self from manim._config import config from manim.mobject.geometry.arc import Arc from manim.mobject.geometry.line import Line from manim.mobject.mobject import Mobject from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.text.tex_mobject import MathTex, SingleStringMathTex, Tex from manim.mobject.text.text_mobject import Text from ...animation.animation import Animation from ...animation.composition import AnimationGroup from ...animation.fading import FadeIn from ...animation.growing import GrowFromCenter from ...constants import * from ...mobject.types.vectorized_mobject import VMobject from ...utils.color import BLACK from ..svg.svg_mobject import VMobjectFromSVGPath if TYPE_CHECKING: from manim.typing import Point3D, Point3DLike, Vector3D, Vector3DLike from manim.utils.color.core import ParsableManimColor class Brace(VMobjectFromSVGPath): """Takes a mobject and draws a brace adjacent to it. Passing a direction vector determines the direction from which the brace is drawn. By default it is drawn from below. Parameters ---------- mobject The mobject adjacent to which the brace is placed. direction : The direction from which the brace faces the mobject. See Also -------- :class:`BraceBetweenPoints` Examples -------- .. manim:: BraceExample :save_last_frame: class BraceExample(Scene): def construct(self): s = Square() self.add(s) for i in np.linspace(0.1,1.0,4): br = Brace(s, sharpness=i) t = Text(f"sharpness= {i}").next_to(br, RIGHT) self.add(t) self.add(br) VGroup(*self.mobjects).arrange(DOWN, buff=0.2) """ def __init__( self, mobject: Mobject, direction: Vector3DLike = DOWN, buff: float = 0.2, sharpness: float = 2, stroke_width: float = 0, fill_opacity: float = 1.0, background_stroke_width: float = 0, background_stroke_color: ParsableManimColor = BLACK, **kwargs: Any, ): path_string_template = ( "m0.01216 0c-0.01152 0-0.01216 6.103e-4 -0.01216 0.01311v0.007762c0.06776 " "0.122 0.1799 0.1455 0.2307 0.1455h{0}c0.03046 3.899e-4 0.07964 0.00449 " "0.1246 0.02636 0.0537 0.02695 0.07418 0.05816 0.08648 0.07769 0.001562 " "0.002538 0.004539 0.002563 0.01098 0.002563 0.006444-2e-8 0.009421-2.47e-" "5 0.01098-0.002563 0.0123-0.01953 0.03278-0.05074 0.08648-0.07769 0.04491" "-0.02187 0.09409-0.02597 0.1246-0.02636h{0}c0.05077 0 0.1629-0.02346 " "0.2307-0.1455v-0.007762c-1.78e-6 -0.0125-6.365e-4 -0.01311-0.01216-0.0131" "1-0.006444-3.919e-8 -0.009348 2.448e-5 -0.01091 0.002563-0.0123 0.01953-" "0.03278 0.05074-0.08648 0.07769-0.04491 0.02187-0.09416 0.02597-0.1246 " "0.02636h{1}c-0.04786 0-0.1502 0.02094-0.2185 0.1256-0.06833-0.1046-0.1706" "-0.1256-0.2185-0.1256h{1}c-0.03046-3.899e-4 -0.07972-0.004491-0.1246-0.02" "636-0.0537-0.02695-0.07418-0.05816-0.08648-0.07769-0.001562-0.002538-" "0.004467-0.002563-0.01091-0.002563z" ) default_min_width = 0.90552 self.buff = buff angle = -np.arctan2(*direction[:2]) + np.pi mobject.rotate(-angle, about_point=ORIGIN) left = mobject.get_corner(DOWN + LEFT) right = mobject.get_corner(DOWN + RIGHT) target_width = right[0] - left[0] linear_section_length = max( 0, (target_width * sharpness - default_min_width) / 2, ) path = se.Path( path_string_template.format( linear_section_length, -linear_section_length, ) ) super().__init__( path_obj=path, stroke_width=stroke_width, fill_opacity=fill_opacity, background_stroke_width=background_stroke_width, background_stroke_color=background_stroke_color, **kwargs, ) self.flip(RIGHT) self.stretch_to_fit_width(target_width) self.shift(left - self.get_corner(UP + LEFT) + self.buff * DOWN) for mob in mobject, self: mob.rotate(angle, about_point=ORIGIN) def put_at_tip(self, mob: Mobject, use_next_to: bool = True, **kwargs: Any) -> Self: """Puts the given mobject at the brace tip. Parameters ---------- mob The mobject to be placed at the tip. use_next_to If true, then :meth:`next_to` is used to place the mobject at the tip. kwargs Any additional keyword arguments are passed to :meth:`next_to` which is used to put the mobject next to the brace tip. """ if use_next_to: mob.next_to(self.get_tip(), np.round(self.get_direction()), **kwargs) else: mob.move_to(self.get_tip()) buff = kwargs.get("buff", DEFAULT_MOBJECT_TO_MOBJECT_BUFFER) shift_distance = mob.width / 2.0 + buff mob.shift(self.get_direction() * shift_distance) return self def get_text(self, *text: str, **kwargs: Any) -> Tex: """Places the text at the brace tip. Parameters ---------- text The text to be placed at the brace tip. kwargs Any additional keyword arguments are passed to :meth:`.put_at_tip` which is used to position the text at the brace tip. Returns ------- :class:`~.Tex` """ text_mob = Tex(*text) self.put_at_tip(text_mob, **kwargs) return text_mob def get_tex(self, *tex: str, **kwargs: Any) -> MathTex: """Places the tex at the brace tip. Parameters ---------- tex The tex to be placed at the brace tip. kwargs Any further keyword arguments are passed to :meth:`.put_at_tip` which is used to position the tex at the brace tip. Returns ------- :class:`~.MathTex` """ tex_mob = MathTex(*tex) self.put_at_tip(tex_mob, **kwargs) return tex_mob def get_tip(self) -> Point3D: """Returns the point at the brace tip.""" # Returns the position of the seventh point in the path, which is the tip. if config["renderer"] == "opengl": return self.points[34] return self.points[28] # = 7*4 def get_direction(self) -> Vector3D: """Returns the direction from the center to the brace tip.""" vect = self.get_tip() - self.get_center() return vect / np.linalg.norm(vect) class BraceLabel(VMobject, metaclass=ConvertToOpenGL): """Create a brace with a label attached. Parameters ---------- obj The mobject adjacent to which the brace is placed. text The label text. brace_direction The direction of the brace. By default ``DOWN``. label_constructor A class or function used to construct a mobject representing the label. By default :class:`~.MathTex`. font_size The font size of the label, passed to the ``label_constructor``. buff The buffer between the mobject and the brace. brace_config Arguments to be passed to :class:`.Brace`. kwargs Additional arguments to be passed to :class:`~.VMobject`. """ def __init__( self, obj: Mobject, text: str, brace_direction: Vector3DLike = DOWN, label_constructor: type[SingleStringMathTex | Text] = MathTex, font_size: float = DEFAULT_FONT_SIZE, buff: float = 0.2, brace_config: dict[str, Any] | None = None, **kwargs: Any, ): self.label_constructor = label_constructor super().__init__(**kwargs) self.brace_direction = brace_direction if brace_config is None: brace_config = {} self.brace = Brace(obj, brace_direction, buff, **brace_config) if isinstance(text, (tuple, list)): self.label: VMobject = self.label_constructor( *text, font_size=font_size, **kwargs ) else: self.label = self.label_constructor(str(text), font_size=font_size) self.brace.put_at_tip(self.label) self.add(self.brace, self.label) def creation_anim( self, label_anim: type[Animation] = FadeIn, brace_anim: type[Animation] = GrowFromCenter, ) -> AnimationGroup: return AnimationGroup(brace_anim(self.brace), label_anim(self.label)) def shift_brace(self, obj: Mobject, **kwargs: Any) -> Self: if isinstance(obj, list): obj = self.get_group_class()(*obj) self.brace = Brace(obj, self.brace_direction, **kwargs) self.brace.put_at_tip(self.label) return self def change_label(self, *text: str, **kwargs: Any) -> Self: self.remove(self.label) self.label = self.label_constructor(*text, **kwargs) # type: ignore[arg-type] self.brace.put_at_tip(self.label) self.add(self.label) return self def change_brace_label(self, obj: Mobject, *text: str, **kwargs: Any) -> Self: self.shift_brace(obj) self.change_label(*text, **kwargs) return self class BraceText(BraceLabel): """Create a brace with a text label attached. Parameters ---------- obj The mobject adjacent to which the brace is placed. text The label text. brace_direction The direction of the brace. By default ``DOWN``. label_constructor A class or function used to construct a mobject representing the label. By default :class:`~.Text`. font_size The font size of the label, passed to the ``label_constructor``. buff The buffer between the mobject and the brace. brace_config Arguments to be passed to :class:`.Brace`. kwargs Additional arguments to be passed to :class:`~.VMobject`. Examples -------- .. manim:: BraceTextExample :save_last_frame: class BraceTextExample(Scene): def construct(self): s1 = Square().move_to(2*LEFT) self.add(s1) br1 = BraceText(s1, "Label") self.add(br1) s2 = Square().move_to(2*RIGHT) self.add(s2) br2 = BraceText(s2, "Label") br2.change_label("new") self.add(br2) self.wait(0.1) """ def __init__( self, obj: Mobject, text: str, label_constructor: type[SingleStringMathTex | Text] = Text, **kwargs: Any, ): super().__init__(obj, text, label_constructor=label_constructor, **kwargs) class BraceBetweenPoints(Brace): """Similar to Brace, but instead of taking a mobject it uses 2 points to place the brace. A fitting direction for the brace is computed, but it still can be manually overridden. If the points go from left to right, the brace is drawn from below. Swapping the points places the brace on the opposite side. Parameters ---------- point_1 : The first point. point_2 : The second point. direction : The direction from which the brace faces towards the points. Examples -------- .. manim:: BraceBPExample class BraceBPExample(Scene): def construct(self): p1 = [0,0,0] p2 = [1,2,0] brace = BraceBetweenPoints(p1,p2) self.play(Create(NumberPlane())) self.play(Create(brace)) self.wait(2) """ def __init__( self, point_1: Point3DLike, point_2: Point3DLike, direction: Vector3DLike = ORIGIN, **kwargs: Any, ): if all(direction == ORIGIN): line_vector = np.array(point_2) - np.array(point_1) direction = np.array([line_vector[1], -line_vector[0], 0]) super().__init__(Line(point_1, point_2), direction=direction, **kwargs) class ArcBrace(Brace): """Creates a :class:`~Brace` that wraps around an :class:`~.Arc`. The direction parameter allows the brace to be applied from outside or inside the arc. .. warning:: The :class:`ArcBrace` is smaller for arcs with smaller radii. .. note:: The :class:`ArcBrace` is initially a vertical :class:`Brace` defined by the length of the :class:`~.Arc`, but is scaled down to match the start and end angles. An exponential function is then applied after it is shifted based on the radius of the arc. The scaling effect is not applied for arcs with radii smaller than 1 to prevent over-scaling. Parameters ---------- arc The :class:`~.Arc` that wraps around the :class:`Brace` mobject. direction The direction from which the brace faces the arc. ``LEFT`` for inside the arc, and ``RIGHT`` for the outside. Example ------- .. manim:: ArcBraceExample :save_last_frame: :ref_classes: Arc class ArcBraceExample(Scene): def construct(self): arc_1 = Arc(radius=1.5,start_angle=0,angle=2*PI/3).set_color(RED) brace_1 = ArcBrace(arc_1,LEFT) group_1 = VGroup(arc_1,brace_1) arc_2 = Arc(radius=3,start_angle=0,angle=5*PI/6).set_color(YELLOW) brace_2 = ArcBrace(arc_2) group_2 = VGroup(arc_2,brace_2) arc_3 = Arc(radius=0.5,start_angle=-0,angle=PI).set_color(BLUE) brace_3 = ArcBrace(arc_3) group_3 = VGroup(arc_3,brace_3) arc_4 = Arc(radius=0.2,start_angle=0,angle=3*PI/2).set_color(GREEN) brace_4 = ArcBrace(arc_4) group_4 = VGroup(arc_4,brace_4) arc_group = VGroup(group_1, group_2, group_3, group_4).arrange_in_grid(buff=1.5) self.add(arc_group.center()) """ def __init__( self, arc: Arc | None = None, direction: Vector3DLike = RIGHT, **kwargs: Any, ): if arc is None: arc = Arc(start_angle=-1, angle=2, radius=1) arc_end_angle = arc.start_angle + arc.angle line = Line(UP * arc.start_angle, UP * arc_end_angle) scale_shift = RIGHT * np.log(arc.radius) if arc.radius >= 1: line.scale(arc.radius, about_point=ORIGIN) super().__init__(line, direction=direction, **kwargs) self.scale(1 / (arc.radius), about_point=ORIGIN) else: super().__init__(line, direction=direction, **kwargs) if arc.radius >= 0.3: self.shift(scale_shift) else: self.shift(RIGHT * np.log(0.3)) self.apply_complex_function(np.exp) self.shift(arc.get_arc_center()) ================================================ FILE: manim/mobject/svg/svg_mobject.py ================================================ """Mobjects generated from an SVG file.""" from __future__ import annotations import os from pathlib import Path from typing import Any from xml.etree import ElementTree as ET import numpy as np import svgelements as se from manim import config, logger from manim.utils.color import ManimColor, ParsableManimColor from ...constants import RIGHT from ...utils.bezier import get_quadratic_approximation_of_cubic from ...utils.images import get_full_vector_image_path from ...utils.iterables import hash_obj from ..geometry.arc import Circle from ..geometry.line import Line from ..geometry.polygram import Polygon, Rectangle, RoundedRectangle from ..opengl.opengl_compatibility import ConvertToOpenGL from ..types.vectorized_mobject import VMobject __all__ = ["SVGMobject", "VMobjectFromSVGPath"] SVG_HASH_TO_MOB_MAP: dict[int, VMobject] = {} def _convert_point_to_3d(x: float, y: float) -> np.ndarray: return np.array([x, y, 0.0]) class SVGMobject(VMobject, metaclass=ConvertToOpenGL): """A vectorized mobject created from importing an SVG file. Parameters ---------- file_name The path to the SVG file. should_center Whether or not the mobject should be centered after being imported. height The target height of the mobject, set to 2 Manim units by default. If the height and width are both set to ``None``, the mobject is imported without being scaled. width The target width of the mobject, set to ``None`` by default. If the height and the width are both set to ``None``, the mobject is imported without being scaled. color The color (both fill and stroke color) of the mobject. If ``None`` (the default), the colors set in the SVG file are used. opacity The opacity (both fill and stroke opacity) of the mobject. If ``None`` (the default), the opacity set in the SVG file is used. fill_color The fill color of the mobject. If ``None`` (the default), the fill colors set in the SVG file are used. fill_opacity The fill opacity of the mobject. If ``None`` (the default), the fill opacities set in the SVG file are used. stroke_color The stroke color of the mobject. If ``None`` (the default), the stroke colors set in the SVG file are used. stroke_opacity The stroke opacity of the mobject. If ``None`` (the default), the stroke opacities set in the SVG file are used. stroke_width The stroke width of the mobject. If ``None`` (the default), the stroke width values set in the SVG file are used. svg_default A dictionary in which fallback values for unspecified properties of elements in the SVG file are defined. If ``None`` (the default), ``color``, ``opacity``, ``fill_color`` ``fill_opacity``, ``stroke_color``, and ``stroke_opacity`` are set to ``None``, and ``stroke_width`` is set to 0. path_string_config A dictionary with keyword arguments passed to :class:`.VMobjectFromSVGPath` used for importing path elements. If ``None`` (the default), no additional arguments are passed. use_svg_cache If True (default), the svg inputs (e.g. file_name, settings) will be used as a key and a copy of the created mobject will be saved using that key to be quickly retrieved if the same inputs need be processed later. For large SVGs which are used only once, this can be omitted to improve performance. kwargs Further arguments passed to the parent class. """ def __init__( self, file_name: str | os.PathLike | None = None, should_center: bool = True, height: float | None = 2, width: float | None = None, color: ParsableManimColor | None = None, opacity: float | None = None, fill_color: ParsableManimColor | None = None, fill_opacity: float | None = None, stroke_color: ParsableManimColor | None = None, stroke_opacity: float | None = None, stroke_width: float | None = None, svg_default: dict | None = None, path_string_config: dict | None = None, use_svg_cache: bool = True, **kwargs: Any, ): super().__init__(color=None, stroke_color=None, fill_color=None, **kwargs) # process keyword arguments self.file_name = Path(file_name) if file_name is not None else None self.should_center = should_center self.svg_height = height self.svg_width = width self.color = ManimColor(color) self.opacity = opacity self.fill_color = fill_color self.fill_opacity = fill_opacity # type: ignore[assignment] self.stroke_color = stroke_color self.stroke_opacity = stroke_opacity # type: ignore[assignment] self.stroke_width = stroke_width # type: ignore[assignment] if self.stroke_width is None: self.stroke_width = 0 if svg_default is None: svg_default = { "color": None, "opacity": None, "fill_color": None, "fill_opacity": None, "stroke_width": 0, "stroke_color": None, "stroke_opacity": None, } self.svg_default = svg_default if path_string_config is None: path_string_config = {} self.path_string_config = path_string_config self.init_svg_mobject(use_svg_cache=use_svg_cache) self.set_style( fill_color=fill_color, fill_opacity=fill_opacity, stroke_color=stroke_color, stroke_opacity=stroke_opacity, stroke_width=stroke_width, ) self.move_into_position() def init_svg_mobject(self, use_svg_cache: bool) -> None: """Checks whether the SVG has already been imported and generates it if not. See also -------- :meth:`.SVGMobject.generate_mobject` """ if use_svg_cache: hash_val = hash_obj(self.hash_seed) if hash_val in SVG_HASH_TO_MOB_MAP: mob = SVG_HASH_TO_MOB_MAP[hash_val].copy() self.add(*mob) return self.generate_mobject() if use_svg_cache: SVG_HASH_TO_MOB_MAP[hash_val] = self.copy() @property def hash_seed(self) -> tuple: """A unique hash representing the result of the generated mobject points. Used as keys in the ``SVG_HASH_TO_MOB_MAP`` caching dictionary. """ return ( self.__class__.__name__, self.svg_default, self.path_string_config, self.file_name, config.renderer, ) def generate_mobject(self) -> None: """Parse the SVG and translate its elements to submobjects.""" file_path = self.get_file_path() element_tree = ET.parse(file_path) new_tree = self.modify_xml_tree(element_tree) # type: ignore[arg-type] # Create a temporary svg file to dump modified svg to be parsed modified_file_path = file_path.with_name(f"{file_path.stem}_{file_path.suffix}") new_tree.write(modified_file_path) svg = se.SVG.parse(modified_file_path) modified_file_path.unlink() mobjects = self.get_mobjects_from(svg) self.add(*mobjects) self.flip(RIGHT) # Flip y def get_file_path(self) -> Path: """Search for an existing file based on the specified file name.""" if self.file_name is None: raise ValueError("Must specify file for SVGMobject") return get_full_vector_image_path(self.file_name) def modify_xml_tree(self, element_tree: ET.ElementTree) -> ET.ElementTree: """Modifies the SVG element tree to include default style information. Parameters ---------- element_tree The parsed element tree from the SVG file. """ config_style_dict = self.generate_config_style_dict() style_keys = ( "fill", "fill-opacity", "stroke", "stroke-opacity", "stroke-width", "style", ) root = element_tree.getroot() root_style_dict = {k: v for k, v in root.attrib.items() if k in style_keys} # type: ignore[union-attr] new_root = ET.Element("svg", {}) config_style_node = ET.SubElement(new_root, "g", config_style_dict) root_style_node = ET.SubElement(config_style_node, "g", root_style_dict) root_style_node.extend(root) # type: ignore[arg-type] return ET.ElementTree(new_root) def generate_config_style_dict(self) -> dict[str, str]: """Generate a dictionary holding the default style information.""" keys_converting_dict = { "fill": ("color", "fill_color"), "fill-opacity": ("opacity", "fill_opacity"), "stroke": ("color", "stroke_color"), "stroke-opacity": ("opacity", "stroke_opacity"), "stroke-width": ("stroke_width",), } svg_default_dict = self.svg_default result = {} for svg_key, style_keys in keys_converting_dict.items(): for style_key in style_keys: if svg_default_dict[style_key] is None: continue result[svg_key] = str(svg_default_dict[style_key]) return result def get_mobjects_from(self, svg: se.SVG) -> list[VMobject]: """Convert the elements of the SVG to a list of mobjects. Parameters ---------- svg The parsed SVG file. """ result: list[VMobject] = [] for shape in svg.elements(): # can we combine the two continue cases into one? if isinstance(shape, se.Group): # noqa: SIM114 continue elif isinstance(shape, se.Path): mob: VMobject = self.path_to_mobject(shape) elif isinstance(shape, se.SimpleLine): mob = self.line_to_mobject(shape) elif isinstance(shape, se.Rect): mob = self.rect_to_mobject(shape) elif isinstance(shape, (se.Circle, se.Ellipse)): mob = self.ellipse_to_mobject(shape) elif isinstance(shape, se.Polygon): mob = self.polygon_to_mobject(shape) elif isinstance(shape, se.Polyline): mob = self.polyline_to_mobject(shape) elif isinstance(shape, se.Text): mob = self.text_to_mobject(shape) elif isinstance(shape, se.Use) or type(shape) is se.SVGElement: continue else: logger.warning(f"Unsupported element type: {type(shape)}") continue if mob is None or not mob.has_points(): continue self.apply_style_to_mobject(mob, shape) if isinstance(shape, se.Transformable) and shape.apply: self.handle_transform(mob, shape.transform) result.append(mob) return result @staticmethod def handle_transform(mob: VMobject, matrix: se.Matrix) -> VMobject: """Apply SVG transformations to the converted mobject. Parameters ---------- mob The converted mobject. matrix The transformation matrix determined from the SVG transformation. """ mat = np.array([[matrix.a, matrix.c], [matrix.b, matrix.d]]) vec = np.array([matrix.e, matrix.f, 0.0]) mob.apply_matrix(mat) mob.shift(vec) return mob @staticmethod def apply_style_to_mobject(mob: VMobject, shape: se.GraphicObject) -> VMobject: """Apply SVG style information to the converted mobject. Parameters ---------- mob The converted mobject. shape The parsed SVG element. """ mob.set_style( stroke_width=shape.stroke_width, stroke_color=shape.stroke.hexrgb, stroke_opacity=shape.stroke.opacity, fill_color=shape.fill.hexrgb, fill_opacity=shape.fill.opacity, ) return mob def path_to_mobject(self, path: se.Path) -> VMobjectFromSVGPath: """Convert a path element to a vectorized mobject. Parameters ---------- path The parsed SVG path. """ return VMobjectFromSVGPath(path, **self.path_string_config) @staticmethod def line_to_mobject(line: se.Line) -> Line: """Convert a line element to a vectorized mobject. Parameters ---------- line The parsed SVG line. """ return Line( start=_convert_point_to_3d(line.x1, line.y1), end=_convert_point_to_3d(line.x2, line.y2), ) @staticmethod def rect_to_mobject(rect: se.Rect) -> Rectangle: """Convert a rectangle element to a vectorized mobject. Parameters ---------- rect The parsed SVG rectangle. """ if rect.rx == 0 or rect.ry == 0: mob = Rectangle( width=rect.width, height=rect.height, ) else: mob = RoundedRectangle( width=rect.width, height=rect.height * rect.rx / rect.ry, corner_radius=rect.rx, ) mob.stretch_to_fit_height(rect.height) mob.shift( _convert_point_to_3d(rect.x + rect.width / 2, rect.y + rect.height / 2) ) return mob @staticmethod def ellipse_to_mobject(ellipse: se.Ellipse | se.Circle) -> Circle: """Convert an ellipse or circle element to a vectorized mobject. Parameters ---------- ellipse The parsed SVG ellipse or circle. """ mob = Circle(radius=ellipse.rx) if ellipse.rx != ellipse.ry: mob.stretch_to_fit_height(2 * ellipse.ry) mob.shift(_convert_point_to_3d(ellipse.cx, ellipse.cy)) return mob @staticmethod def polygon_to_mobject(polygon: se.Polygon) -> Polygon: """Convert a polygon element to a vectorized mobject. Parameters ---------- polygon The parsed SVG polygon. """ points = [_convert_point_to_3d(*point) for point in polygon] return Polygon(*points) def polyline_to_mobject(self, polyline: se.Polyline) -> VMobject: """Convert a polyline element to a vectorized mobject. Parameters ---------- polyline The parsed SVG polyline. """ points = [_convert_point_to_3d(*point) for point in polyline] vmobject_class = self.get_mobject_type_class() return vmobject_class().set_points_as_corners(points) @staticmethod def text_to_mobject(text: se.Text) -> VMobject: """Convert a text element to a vectorized mobject. .. warning:: Not yet implemented. Parameters ---------- text The parsed SVG text. """ logger.warning(f"Unsupported element type: {type(text)}") return # type: ignore[return-value] def move_into_position(self) -> None: """Scale and move the generated mobject into position.""" if self.should_center: self.center() if self.svg_height is not None: self.set(height=self.svg_height) if self.svg_width is not None: self.set(width=self.svg_width) class VMobjectFromSVGPath(VMobject, metaclass=ConvertToOpenGL): """A vectorized mobject representing an SVG path. .. note:: The ``long_lines``, ``should_subdivide_sharp_curves``, and ``should_remove_null_curves`` keyword arguments are only respected with the OpenGL renderer. Parameters ---------- path_obj A parsed SVG path object. long_lines Whether or not straight lines in the vectorized mobject are drawn in one or two segments. should_subdivide_sharp_curves Whether or not to subdivide subcurves further in case two segments meet at an angle that is sharper than a given threshold. should_remove_null_curves Whether or not to remove subcurves of length 0. kwargs Further keyword arguments are passed to the parent class. """ def __init__( self, path_obj: se.Path, long_lines: bool = False, should_subdivide_sharp_curves: bool = False, should_remove_null_curves: bool = False, **kwargs: Any, ): # Get rid of arcs path_obj.approximate_arcs_with_quads() self.path_obj = path_obj self.long_lines = long_lines self.should_subdivide_sharp_curves = should_subdivide_sharp_curves self.should_remove_null_curves = should_remove_null_curves super().__init__(**kwargs) def generate_points(self) -> None: # TODO: cache mobject in a re-importable way self.handle_commands() if config.renderer == "opengl": if self.should_subdivide_sharp_curves: # For a healthy triangulation later self.subdivide_sharp_curves() if self.should_remove_null_curves: # Get rid of any null curves self.set_points(self.get_points_without_null_curves()) def init_points(self) -> None: self.generate_points() def handle_commands(self) -> None: all_points: list[np.ndarray] = [] last_move: np.ndarray = None curve_start = None last_true_move = None def move_pen(pt: np.ndarray, *, true_move: bool = False) -> None: nonlocal last_move, curve_start, last_true_move last_move = pt if curve_start is None: curve_start = last_move if true_move: last_true_move = last_move if self.n_points_per_curve == 4: def add_cubic( start: np.ndarray, cp1: np.ndarray, cp2: np.ndarray, end: np.ndarray ) -> None: nonlocal all_points assert len(all_points) % 4 == 0, len(all_points) all_points += [start, cp1, cp2, end] move_pen(end) def add_quad(start: np.ndarray, cp: np.ndarray, end: np.ndarray) -> None: add_cubic(start, (start + cp + cp) / 3, (cp + cp + end) / 3, end) move_pen(end) def add_line(start: np.ndarray, end: np.ndarray) -> None: add_cubic( start, (start + start + end) / 3, (start + end + end) / 3, end ) move_pen(end) else: def add_cubic( start: np.ndarray, cp1: np.ndarray, cp2: np.ndarray, end: np.ndarray ) -> None: nonlocal all_points assert len(all_points) % 3 == 0, len(all_points) two_quads = get_quadratic_approximation_of_cubic( start, cp1, cp2, end, ) all_points += two_quads[:3].tolist() all_points += two_quads[3:].tolist() move_pen(end) def add_quad(start: np.ndarray, cp: np.ndarray, end: np.ndarray) -> None: nonlocal all_points assert len(all_points) % 3 == 0, len(all_points) all_points += [start, cp, end] move_pen(end) def add_line(start: np.ndarray, end: np.ndarray) -> None: add_quad(start, (start + end) / 2, end) move_pen(end) for segment in self.path_obj: segment_class = segment.__class__ if segment_class == se.Move: move_pen(_convert_point_to_3d(*segment.end), true_move=True) elif segment_class == se.Line: add_line(last_move, _convert_point_to_3d(*segment.end)) elif segment_class == se.QuadraticBezier: add_quad( last_move, _convert_point_to_3d(*segment.control), _convert_point_to_3d(*segment.end), ) elif segment_class == se.CubicBezier: add_cubic( last_move, _convert_point_to_3d(*segment.control1), _convert_point_to_3d(*segment.control2), _convert_point_to_3d(*segment.end), ) elif segment_class == se.Close: # If the SVG path naturally ends at the beginning of the curve, # we do *not* need to draw a closing line. To account for floating # point precision, we use a small value to compare the two points. if abs(np.linalg.norm(last_move - last_true_move)) > 0.0001: add_line(last_move, last_true_move) curve_start = None else: raise AssertionError(f"Not implemented: {segment_class}") self.points = np.array(all_points, ndmin=2, dtype="float64") # If we have no points, make sure the array is shaped properly # (0 rows tall by 3 columns wide) so future operations can # add or remove points correctly. if len(all_points) == 0: self.points = np.reshape(self.points, (0, 3)) ================================================ FILE: manim/mobject/text/__init__.py ================================================ """Mobjects used to display Text using Pango or LaTeX. Modules ======= .. autosummary:: :toctree: ../reference ~code_mobject ~numbers ~tex_mobject ~text_mobject """ ================================================ FILE: manim/mobject/text/code_mobject.py ================================================ """Mobject representing highlighted source code listings.""" from __future__ import annotations __all__ = [ "Code", ] from pathlib import Path from typing import Any, Literal from bs4 import BeautifulSoup, Tag from pygments import highlight from pygments.formatters.html import HtmlFormatter from pygments.lexers import get_lexer_by_name, guess_lexer, guess_lexer_for_filename from pygments.styles import get_all_styles from manim.constants import * from manim.mobject.geometry.arc import Dot from manim.mobject.geometry.shape_matchers import SurroundingRectangle from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.types.vectorized_mobject import VGroup, VMobject from manim.typing import StrPath from manim.utils.color import WHITE, ManimColor class Code(VMobject, metaclass=ConvertToOpenGL): """A highlighted source code listing. Examples -------- Normal usage:: listing = Code( "helloworldcpp.cpp", tab_width=4, formatter_style="emacs", background="window", language="cpp", background_config={"stroke_color": WHITE}, paragraph_config={"font": "Noto Sans Mono"}, ) We can also render code passed as a string. As the automatic language detection can be a bit flaky, it is recommended to specify the language explicitly: .. manim:: CodeFromString :save_last_frame: class CodeFromString(Scene): def construct(self): code = '''from manim import Scene, Square class FadeInSquare(Scene): def construct(self): s = Square() self.play(FadeIn(s)) self.play(s.animate.scale(2)) self.wait()''' rendered_code = Code( code_string=code, language="python", background="window", background_config={"stroke_color": "maroon"}, ) self.add(rendered_code) Parameters ---------- code_file The path to the code file to display. code_string Alternatively, the code string to display. language The programming language of the code. If not specified, it will be guessed from the file extension or the code itself. formatter_style The style to use for the code highlighting. Defaults to ``"vim"``. A list of all available styles can be obtained by calling :meth:`.Code.get_styles_list`. tab_width The width of a tab character in spaces. Defaults to 4. add_line_numbers Whether to display line numbers. Defaults to ``True``. line_numbers_from The first line number to display. Defaults to 1. background The type of background to use. Can be either ``"rectangle"`` (the default) or ``"window"``. background_config Keyword arguments passed to the background constructor. Default settings are stored in the class attribute :attr:`.default_background_config` (which can also be modified directly). paragraph_config Keyword arguments passed to the constructor of the :class:`.Paragraph` objects holding the code, and the line numbers. Default settings are stored in the class attribute :attr:`.default_paragraph_config` (which can also be modified directly). """ _styles_list_cache: list[str] | None = None default_background_config: dict[str, Any] = { "buff": 0.3, "fill_color": ManimColor("#222"), "stroke_color": WHITE, "corner_radius": 0.2, "stroke_width": 1, "fill_opacity": 1, } default_paragraph_config: dict[str, Any] = { "font": "Monospace", "font_size": 24, "line_spacing": 0.5, "disable_ligatures": True, } code: VMobject def __init__( self, code_file: StrPath | None = None, code_string: str | None = None, language: str | None = None, formatter_style: str = "vim", tab_width: int = 4, add_line_numbers: bool = True, line_numbers_from: int = 1, background: Literal["rectangle", "window"] = "rectangle", background_config: dict[str, Any] | None = None, paragraph_config: dict[str, Any] | None = None, ): super().__init__() if code_file is not None: code_file = Path(code_file) code_string = code_file.read_text(encoding="utf-8") lexer = guess_lexer_for_filename(code_file.name, code_string) elif code_string is not None: if language is not None: lexer = get_lexer_by_name(language) else: lexer = guess_lexer(code_string) else: raise ValueError("Either a code file or a code string must be specified.") code_string = code_string.expandtabs(tabsize=tab_width) formatter = HtmlFormatter( style=formatter_style, noclasses=True, cssclasses="", ) soup = BeautifulSoup( highlight(code_string, lexer, formatter), features="html.parser" ) self._code_html = soup.find("pre") assert isinstance(self._code_html, Tag) # as we are using Paragraph to render the text, we need to find the character indices # of the segments of changed color in the HTML code color_ranges = [] current_line_color_ranges = [] current_line_char_index = 0 for child in self._code_html.children: if child.name == "span": try: child_style = child["style"] if isinstance(child_style, str): color = child_style.removeprefix("color: ") else: color = None except KeyError: color = None current_line_color_ranges.append( ( current_line_char_index, current_line_char_index + len(child.text), color, ) ) current_line_char_index += len(child.text) else: for char in child.text: if char == "\n": color_ranges.append(current_line_color_ranges) current_line_color_ranges = [] current_line_char_index = 0 else: current_line_char_index += 1 color_ranges.append(current_line_color_ranges) code_lines = self._code_html.get_text().removesuffix("\n").split("\n") if paragraph_config is None: paragraph_config = {} base_paragraph_config = self.default_paragraph_config.copy() base_paragraph_config.update(paragraph_config) from manim.mobject.text.text_mobject import Paragraph self.code_lines = Paragraph( *code_lines, **base_paragraph_config, ) for line, color_range in zip(self.code_lines, color_ranges): for start, end, color in color_range: line[start:end].set_color(color) if add_line_numbers: base_paragraph_config.update({"alignment": "right"}) self.line_numbers = Paragraph( *[ str(i) for i in range( line_numbers_from, line_numbers_from + len(self.code_lines) ) ], **base_paragraph_config, ) self.line_numbers.next_to(self.code_lines, direction=LEFT).align_to( self.code_lines, UP ) self.add(self.line_numbers) for line in self.code_lines: line.submobjects = [c for c in line if not isinstance(c, Dot)] self.add(self.code_lines) if background_config is None: background_config = {} background_config_base = self.default_background_config.copy() background_config_base.update(background_config) if background == "rectangle": self.background = SurroundingRectangle( self, **background_config_base, ) elif background == "window": buttons = VGroup( Dot(radius=0.1, stroke_width=0, color=button_color) for button_color in ["#ff5f56", "#ffbd2e", "#27c93f"] ).arrange(RIGHT, buff=0.1) buttons.next_to(self, UP, buff=0.1).align_to(self, LEFT).shift(LEFT * 0.1) self.background = SurroundingRectangle( VGroup(self, buttons), **background_config_base, ) buttons.shift(UP * 0.1 + LEFT * 0.1) self.background.add(buttons) else: raise ValueError(f"Unknown background type: {background}") self.add_to_back(self.background) @classmethod def get_styles_list(cls) -> list[str]: """Get the list of all available formatter styles.""" if cls._styles_list_cache is None: cls._styles_list_cache = list(get_all_styles()) return cls._styles_list_cache ================================================ FILE: manim/mobject/text/numbers.py ================================================ """Mobjects representing numbers.""" from __future__ import annotations __all__ = ["DecimalNumber", "Integer", "Variable"] from typing import Any import numpy as np from typing_extensions import Self from manim import config from manim.constants import * from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.text.tex_mobject import MathTex, SingleStringMathTex, Tex from manim.mobject.text.text_mobject import Text from manim.mobject.types.vectorized_mobject import VMobject from manim.mobject.value_tracker import ValueTracker from manim.typing import Vector3DLike string_to_mob_map: dict[str, SingleStringMathTex] = {} class DecimalNumber(VMobject, metaclass=ConvertToOpenGL): r"""An mobject representing a decimal number. Parameters ---------- number The numeric value to be displayed. It can later be modified using :meth:`.set_value`. num_decimal_places The number of decimal places after the decimal separator. Values are automatically rounded. mob_class The class for rendering digits and units, by default :class:`.MathTex`. include_sign Set to ``True`` to include a sign for positive numbers and zero. group_with_commas When ``True`` thousands groups are separated by commas for readability. digit_buff_per_font_unit Additional spacing between digits. Scales with font size. show_ellipsis When a number has been truncated by rounding, indicate with an ellipsis (``...``). unit A unit string which can be placed to the right of the numerical values. unit_buff_per_font_unit An additional spacing between the numerical values and the unit. A value of ``unit_buff_per_font_unit=0.003`` gives a decent spacing. Scales with font size. include_background_rectangle Adds a background rectangle to increase contrast on busy scenes. edge_to_fix Assuring right- or left-alignment of the full object. font_size Size of the font. Examples -------- .. manim:: MovingSquareWithUpdaters class MovingSquareWithUpdaters(Scene): def construct(self): decimal = DecimalNumber( 0, show_ellipsis=True, num_decimal_places=3, include_sign=True, unit=r"\text{M-Units}", unit_buff_per_font_unit=0.003 ) 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.animate.to_edge(DOWN), rate_func=there_and_back, run_time=5, ) self.wait() """ def __init__( self, number: float = 0, num_decimal_places: int = 2, mob_class: type[SingleStringMathTex] = MathTex, include_sign: bool = False, group_with_commas: bool = True, digit_buff_per_font_unit: float = 0.001, show_ellipsis: bool = False, unit: str | None = None, # Aligned to bottom unless it starts with "^" unit_buff_per_font_unit: float = 0, include_background_rectangle: bool = False, edge_to_fix: Vector3DLike = LEFT, font_size: float = DEFAULT_FONT_SIZE, stroke_width: float = 0, fill_opacity: float = 1.0, **kwargs: Any, ): super().__init__(**kwargs, fill_opacity=fill_opacity, stroke_width=stroke_width) self.number = number self.num_decimal_places = num_decimal_places self.include_sign = include_sign self.mob_class = mob_class self.group_with_commas = group_with_commas self.digit_buff_per_font_unit = digit_buff_per_font_unit self.show_ellipsis = show_ellipsis self.unit = unit self.unit_buff_per_font_unit = unit_buff_per_font_unit self.include_background_rectangle = include_background_rectangle self.edge_to_fix = edge_to_fix self._font_size = font_size self.fill_opacity = fill_opacity self.initial_config = kwargs.copy() self.initial_config.update( { "num_decimal_places": num_decimal_places, "include_sign": include_sign, "group_with_commas": group_with_commas, "digit_buff_per_font_unit": digit_buff_per_font_unit, "show_ellipsis": show_ellipsis, "unit": unit, "unit_buff_per_font_unit": unit_buff_per_font_unit, "include_background_rectangle": include_background_rectangle, "edge_to_fix": edge_to_fix, "font_size": font_size, "stroke_width": stroke_width, "fill_opacity": fill_opacity, }, ) self._set_submobjects_from_number(number) self.init_colors() @property def font_size(self) -> float: """The font size of the tex mobject.""" return_value: float = self.height / self.initial_height * self._font_size return return_value @font_size.setter def font_size(self, font_val: float) -> None: if font_val <= 0: raise ValueError("font_size must be greater than 0.") elif self.height > 0: # sometimes manim generates a SingleStringMathex mobject with 0 height. # can't be scaled regardless and will error without the elif. # scale to a factor of the initial height so that setting # font_size does not depend on current size. self.scale(font_val / self.font_size) def _set_submobjects_from_number(self, number: float) -> None: self.number = number self.submobjects = [] num_string = self._get_num_string(number) self.add(*(map(self._string_to_mob, num_string))) # Add non-numerical bits if self.show_ellipsis: self.add( self._string_to_mob("\\dots", SingleStringMathTex, color=self.color), ) self.arrange( buff=self.digit_buff_per_font_unit * self._font_size, aligned_edge=DOWN, ) if self.unit is not None: self.unit_sign = self._string_to_mob(self.unit, SingleStringMathTex) self.add( self.unit_sign.next_to( self, direction=RIGHT, buff=(self.unit_buff_per_font_unit + self.digit_buff_per_font_unit) * self._font_size, aligned_edge=DOWN, ) ) self.move_to(ORIGIN) # Handle alignment of parts that should be aligned # to the bottom for i, c in enumerate(num_string): if c == "-" and len(num_string) > i + 1: self[i].align_to(self[i + 1], UP) self[i].shift(self[i + 1].height * DOWN / 2) elif c == ",": self[i].shift(self[i].height * DOWN / 2) if self.unit and self.unit.startswith("^"): self.unit_sign.align_to(self, UP) # track the initial height to enable scaling via font_size self.initial_height: float = self.height if self.include_background_rectangle: self.add_background_rectangle() def _get_num_string(self, number: float | complex) -> str: if isinstance(number, complex): formatter = self._get_complex_formatter() else: formatter = self._get_formatter() num_string = formatter.format(number) rounded_num = np.round(number, self.num_decimal_places) if num_string.startswith("-") and rounded_num == 0: num_string = "+" + num_string[1:] if self.include_sign else num_string[1:] return num_string def _string_to_mob( self, string: str, mob_class: type[SingleStringMathTex] | None = None, **kwargs: Any, ) -> VMobject: if mob_class is None: mob_class = self.mob_class if string not in string_to_mob_map: string_to_mob_map[string] = mob_class(string, **kwargs) mob = string_to_mob_map[string].copy() mob.font_size = self._font_size return mob def _get_formatter(self, **kwargs: Any) -> str: """ Configuration is based first off instance attributes, but overwritten by any kew word argument. Relevant key words: - include_sign - group_with_commas - num_decimal_places - field_name (e.g. 0 or 0.real) """ config = { attr: getattr(self, attr) for attr in [ "include_sign", "group_with_commas", "num_decimal_places", ] } config.update(kwargs) return "".join( [ "{", config.get("field_name", ""), ":", "+" if config["include_sign"] else "", "," if config["group_with_commas"] else "", ".", str(config["num_decimal_places"]), "f", "}", ], ) def _get_complex_formatter(self) -> str: return "".join( [ self._get_formatter(field_name="0.real"), self._get_formatter(field_name="0.imag", include_sign=True), "i", ], ) def set_value(self, number: float) -> Self: """Set the value of the :class:`~.DecimalNumber` to a new number. Parameters ---------- number The value that will overwrite the current number of the :class:`~.DecimalNumber`. """ # creates a new number mob via `set_submobjects_from_number` # then matches the properties (color, font_size, etc...) # of the previous mobject to the new one # old_family needed with cairo old_family = self.get_family() old_font_size = self.font_size move_to_point = self.get_edge_center(self.edge_to_fix) old_submobjects = self.submobjects self._set_submobjects_from_number(number) self.font_size = old_font_size self.move_to(move_to_point, self.edge_to_fix) for sm1, sm2 in zip(self.submobjects, old_submobjects): sm1.match_style(sm2) if config.renderer == RendererType.CAIRO: for mob in old_family: # Dumb hack...due to how scene handles families # of animated mobjects # for compatibility with updaters to not leave first number in place while updating, # not needed with opengl renderer mob.points[:] = 0 self.init_colors() return self def get_value(self) -> float: return self.number def increment_value(self, delta_t: float = 1) -> None: self.set_value(self.get_value() + delta_t) class Integer(DecimalNumber): """A class for displaying Integers. Examples -------- .. manim:: IntegerExample :save_last_frame: class IntegerExample(Scene): def construct(self): self.add(Integer(number=2.5).set_color(ORANGE).scale(2.5).set_x(-0.5).set_y(0.8)) self.add(Integer(number=3.14159, show_ellipsis=True).set_x(3).set_y(3.3).scale(3.14159)) self.add(Integer(number=42).set_x(2.5).set_y(-2.3).set_color_by_gradient(BLUE, TEAL).scale(1.7)) self.add(Integer(number=6.28).set_x(-1.5).set_y(-2).set_color(YELLOW).scale(1.4)) """ def __init__( self, number: float = 0, num_decimal_places: int = 0, **kwargs: Any ) -> None: super().__init__(number=number, num_decimal_places=num_decimal_places, **kwargs) def get_value(self) -> int: return int(np.round(super().get_value())) class Variable(VMobject, metaclass=ConvertToOpenGL): """A class for displaying text that shows "label = value" with the value continuously updated from a :class:`~.ValueTracker`. Parameters ---------- var The initial value you need to keep track of and display. label The label for your variable. Raw strings are convertex to :class:`~.MathTex` objects. var_type The class used for displaying the number. Defaults to :class:`DecimalNumber`. num_decimal_places The number of decimal places to display in your variable. Defaults to 2. If `var_type` is an :class:`Integer`, this parameter is ignored. kwargs Other arguments to be passed to `~.Mobject`. Attributes ---------- label : Union[:class:`str`, :class:`~.Tex`, :class:`~.MathTex`, :class:`~.Text`, :class:`~.SingleStringMathTex`] The label for your variable, for example ``x = ...``. tracker : :class:`~.ValueTracker` Useful in updating the value of your variable on-screen. value : Union[:class:`DecimalNumber`, :class:`Integer`] The tex for the value of your variable. Examples -------- Normal usage:: # DecimalNumber type var = 0.5 on_screen_var = Variable(var, Text("var"), num_decimal_places=3) # Integer type int_var = 0 on_screen_int_var = Variable(int_var, Text("int_var"), var_type=Integer) # Using math mode for the label on_screen_int_var = Variable(int_var, "{a}_{i}", var_type=Integer) .. manim:: VariablesWithValueTracker 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.animate.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.animate.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:: VariableExample class VariableExample(Scene): def construct(self): start = 2.0 x_var = Variable(start, 'x', num_decimal_places=3) sqr_var = Variable(start**2, 'x^2', num_decimal_places=3) Group(x_var, sqr_var).arrange(DOWN) sqr_var.add_updater(lambda v: v.tracker.set_value(x_var.tracker.get_value()**2)) self.add(x_var, sqr_var) self.play(x_var.tracker.animate.set_value(5), run_time=2, rate_func=linear) self.wait(0.1) """ def __init__( self, var: float, label: str | Tex | MathTex | Text | SingleStringMathTex, var_type: type[DecimalNumber | Integer] = DecimalNumber, num_decimal_places: int = 2, **kwargs: Any, ): self.label = MathTex(label) if isinstance(label, str) else label equals = MathTex("=").next_to(self.label, RIGHT) self.label.add(equals) self.tracker = ValueTracker(var) if var_type == DecimalNumber: self.value = DecimalNumber( self.tracker.get_value(), num_decimal_places=num_decimal_places, ) elif var_type == Integer: self.value = Integer(self.tracker.get_value()) self.value.add_updater(lambda v: v.set_value(self.tracker.get_value())).next_to( self.label, RIGHT, ) super().__init__(**kwargs) self.add(self.label, self.value) ================================================ FILE: manim/mobject/text/tex_mobject.py ================================================ r"""Mobjects representing text rendered using LaTeX. .. important:: See the corresponding tutorial :ref:`rendering-with-latex` .. note:: Just as you can use :class:`~.Text` (from the module :mod:`~.text_mobject`) to add text to your videos, you can use :class:`~.Tex` and :class:`~.MathTex` to insert LaTeX. """ from __future__ import annotations from manim.utils.color import BLACK, ManimColor, ParsableManimColor __all__ = [ "SingleStringMathTex", "MathTex", "Tex", "BulletedList", "Title", ] import itertools as it import operator as op import re from collections.abc import Iterable, Sequence from functools import reduce from textwrap import dedent from typing import Any from typing_extensions import Self from manim import config, logger from manim.constants import * from manim.mobject.geometry.line import Line from manim.mobject.svg.svg_mobject import SVGMobject from manim.mobject.types.vectorized_mobject import VGroup, VMobject from manim.utils.tex import TexTemplate from manim.utils.tex_file_writing import tex_to_svg_file class SingleStringMathTex(SVGMobject): """Elementary building block for rendering text with LaTeX. Tests ----- Check that creating a :class:`~.SingleStringMathTex` object works:: >>> SingleStringMathTex('Test') # doctest: +SKIP SingleStringMathTex('Test') """ def __init__( self, tex_string: str, stroke_width: float = 0, should_center: bool = True, height: float | None = None, organize_left_to_right: bool = False, tex_environment: str | None = "align*", tex_template: TexTemplate | None = None, font_size: float = DEFAULT_FONT_SIZE, color: ParsableManimColor | None = None, **kwargs: Any, ): if color is None: color = VMobject().color self._font_size = font_size self.organize_left_to_right = organize_left_to_right self.tex_environment = tex_environment if tex_template is None: tex_template = config["tex_template"] self.tex_template: TexTemplate = tex_template self.tex_string = tex_string file_name = tex_to_svg_file( self._get_modified_expression(tex_string), environment=self.tex_environment, tex_template=self.tex_template, ) super().__init__( file_name=file_name, should_center=should_center, stroke_width=stroke_width, height=height, color=color, path_string_config={ "should_subdivide_sharp_curves": True, "should_remove_null_curves": True, }, **kwargs, ) self.init_colors() # used for scaling via font_size.setter self.initial_height = self.height if height is None: self.font_size = self._font_size if self.organize_left_to_right: self._organize_submobjects_left_to_right() def __repr__(self) -> str: return f"{type(self).__name__}({repr(self.tex_string)})" @property def font_size(self) -> float: """The font size of the tex mobject.""" return self.height / self.initial_height / SCALE_FACTOR_PER_FONT_POINT @font_size.setter def font_size(self, font_val: float) -> None: if font_val <= 0: raise ValueError("font_size must be greater than 0.") elif self.height > 0: # sometimes manim generates a SingleStringMathex mobject with 0 height. # can't be scaled regardless and will error without the elif. # scale to a factor of the initial height so that setting # font_size does not depend on current size. self.scale(font_val / self.font_size) def _get_modified_expression(self, tex_string: str) -> str: result = tex_string result = result.strip() result = self._modify_special_strings(result) return result def _modify_special_strings(self, tex: str) -> str: tex = tex.strip() should_add_filler = reduce( op.or_, [ # Fraction line needs something to be over tex == "\\over", tex == "\\overline", # Make sure sqrt has overbar tex == "\\sqrt", tex == "\\sqrt{", # Need to add blank subscript or superscript tex.endswith("_"), tex.endswith("^"), tex.endswith("dot"), ], ) if should_add_filler: filler = "{\\quad}" tex += filler if tex == "\\substack": tex = "\\quad" if tex == "": tex = "\\quad" # To keep files from starting with a line break if tex.startswith("\\\\"): tex = tex.replace("\\\\", "\\quad\\\\") # Handle imbalanced \left and \right num_lefts, num_rights = ( len([s for s in tex.split(substr)[1:] if s and s[0] in "(){}[]|.\\"]) for substr in ("\\left", "\\right") ) if num_lefts != num_rights: tex = tex.replace("\\left", "\\big") tex = tex.replace("\\right", "\\big") tex = self._remove_stray_braces(tex) for context in ["array"]: begin_in = ("\\begin{%s}" % context) in tex # noqa: UP031 end_in = ("\\end{%s}" % context) in tex # noqa: UP031 if begin_in ^ end_in: # Just turn this into a blank string, # which means caller should leave a # stray \\begin{...} with other symbols tex = "" return tex def _remove_stray_braces(self, tex: str) -> str: r""" Makes :class:`~.MathTex` resilient to unmatched braces. This is important when the braces in the TeX code are spread over multiple arguments as in, e.g., ``MathTex(r"e^{i", r"\tau} = 1")``. """ # "\{" does not count (it's a brace literal), but "\\{" counts (it's a new line and then brace) num_lefts = tex.count("{") - tex.count("\\{") + tex.count("\\\\{") num_rights = tex.count("}") - tex.count("\\}") + tex.count("\\\\}") while num_rights > num_lefts: tex = "{" + tex num_lefts += 1 while num_lefts > num_rights: tex = tex + "}" num_rights += 1 return tex def _organize_submobjects_left_to_right(self) -> Self: self.sort(lambda p: p[0]) return self def get_tex_string(self) -> str: return self.tex_string def init_colors(self, propagate_colors: bool = True) -> Self: for submobject in self.submobjects: # needed to preserve original (non-black) # TeX colors of individual submobjects if submobject.color != BLACK: continue submobject.color = self.color if config.renderer == RendererType.OPENGL: submobject.init_colors() elif config.renderer == RendererType.CAIRO: submobject.init_colors(propagate_colors=propagate_colors) return self class MathTex(SingleStringMathTex): r"""A string compiled with LaTeX in math mode. Examples -------- .. manim:: Formula :save_last_frame: 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') # doctest: +SKIP MathTex('a^2 + b^2 = c^2') Check that double brace group splitting works correctly:: >>> t1 = MathTex('{{ a }} + {{ b }} = {{ c }}') # doctest: +SKIP >>> len(t1.submobjects) # doctest: +SKIP 5 >>> t2 = MathTex(r"\frac{1}{a+b\sqrt{2}}") # doctest: +SKIP >>> len(t2.submobjects) # doctest: +SKIP 1 """ def __init__( self, *tex_strings: str, arg_separator: str = " ", substrings_to_isolate: Iterable[str] | None = None, tex_to_color_map: dict[str, ParsableManimColor] | None = None, tex_environment: str | None = "align*", **kwargs: Any, ): self.tex_template = kwargs.pop("tex_template", config["tex_template"]) self.arg_separator = arg_separator self.substrings_to_isolate = ( [] if substrings_to_isolate is None else substrings_to_isolate ) if tex_to_color_map is None: self.tex_to_color_map: dict[str, ParsableManimColor] = {} else: self.tex_to_color_map = tex_to_color_map self.tex_environment = tex_environment self.brace_notation_split_occurred = False self.tex_strings = self._break_up_tex_strings(tex_strings) try: super().__init__( self.arg_separator.join(self.tex_strings), tex_environment=self.tex_environment, tex_template=self.tex_template, **kwargs, ) self._break_up_by_substrings() except ValueError as compilation_error: if self.brace_notation_split_occurred: logger.error( dedent( """\ A group of double braces, {{ ... }}, was detected in your string. Manim splits TeX strings at the double braces, which might have caused the current compilation error. If you didn't use the double brace split intentionally, add spaces between the braces to avoid the automatic splitting: {{ ... }} --> { { ... } }. """, ), ) raise compilation_error self.set_color_by_tex_to_color_map(self.tex_to_color_map) if self.organize_left_to_right: self._organize_submobjects_left_to_right() def _break_up_tex_strings(self, tex_strings: Sequence[str]) -> list[str]: # Separate out anything surrounded in double braces pre_split_length = len(tex_strings) tex_strings_brace_splitted = [ re.split("{{(.*?)}}", str(t)) for t in tex_strings ] tex_strings_combined = sum(tex_strings_brace_splitted, []) if len(tex_strings_combined) > pre_split_length: self.brace_notation_split_occurred = True # Separate out any strings specified in the isolate # or tex_to_color_map lists. patterns = [] patterns.extend( [ f"({re.escape(ss)})" for ss in it.chain( self.substrings_to_isolate, self.tex_to_color_map.keys(), ) ], ) pattern = "|".join(patterns) if pattern: pieces = [] for s in tex_strings_combined: pieces.extend(re.split(pattern, s)) else: pieces = tex_strings_combined return [p for p in pieces if p] def _break_up_by_substrings(self) -> Self: """ Reorganize existing submobjects one layer deeper based on the structure of tex_strings (as a list of tex_strings) """ new_submobjects: list[VMobject] = [] curr_index = 0 for tex_string in self.tex_strings: sub_tex_mob = SingleStringMathTex( tex_string, tex_environment=self.tex_environment, tex_template=self.tex_template, ) num_submobs = len(sub_tex_mob.submobjects) new_index = ( curr_index + num_submobs + len("".join(self.arg_separator.split())) ) if num_submobs == 0: last_submob_index = min(curr_index, len(self.submobjects) - 1) sub_tex_mob.move_to(self.submobjects[last_submob_index], RIGHT) else: sub_tex_mob.submobjects = self.submobjects[curr_index:new_index] new_submobjects.append(sub_tex_mob) curr_index = new_index self.submobjects = new_submobjects return self def get_parts_by_tex( self, tex: str, substring: bool = True, case_sensitive: bool = True ) -> VGroup: def test(tex1: str, tex2: str) -> bool: if not case_sensitive: tex1 = tex1.lower() tex2 = tex2.lower() if substring: return tex1 in tex2 else: return tex1 == tex2 return VGroup(*(m for m in self.submobjects if test(tex, m.get_tex_string()))) def get_part_by_tex(self, tex: str, **kwargs: Any) -> MathTex | None: all_parts = self.get_parts_by_tex(tex, **kwargs) return all_parts[0] if all_parts else None def set_color_by_tex( self, tex: str, color: ParsableManimColor, **kwargs: Any ) -> Self: parts_to_color = self.get_parts_by_tex(tex, **kwargs) for part in parts_to_color: part.set_color(color) return self def set_opacity_by_tex( self, tex: str, opacity: float = 0.5, remaining_opacity: float | None = None, **kwargs: Any, ) -> Self: """ Sets the opacity of the tex specified. If 'remaining_opacity' is specified, then the remaining tex will be set to that opacity. Parameters ---------- tex The tex to set the opacity of. opacity Default 0.5. The opacity to set the tex to remaining_opacity Default None. The opacity to set the remaining tex to. If None, then the remaining tex will not be changed """ if remaining_opacity is not None: self.set_opacity(opacity=remaining_opacity) for part in self.get_parts_by_tex(tex): part.set_opacity(opacity) return self def set_color_by_tex_to_color_map( self, texs_to_color_map: dict[str, ParsableManimColor], **kwargs: Any ) -> Self: for texs, color in list(texs_to_color_map.items()): try: # If the given key behaves like tex_strings texs + "" self.set_color_by_tex(texs, ManimColor(color), **kwargs) except TypeError: # If the given key is a tuple for tex in texs: self.set_color_by_tex(tex, ManimColor(color), **kwargs) return self def index_of_part(self, part: MathTex) -> int: split_self = self.split() if part not in split_self: raise ValueError("Trying to get index of part not in MathTex") return split_self.index(part) def index_of_part_by_tex(self, tex: str, **kwargs: Any) -> int: part = self.get_part_by_tex(tex, **kwargs) if part is None: return -1 return self.index_of_part(part) def sort_alphabetically(self) -> None: self.submobjects.sort(key=lambda m: m.get_tex_string()) class Tex(MathTex): r"""A string compiled with LaTeX in normal mode. The color can be set using the ``color`` argument. Any parts of the ``tex_string`` that are colored by the TeX commands ``\color`` or ``\textcolor`` will retain their original color. Tests ----- Check whether writing a LaTeX string works:: >>> Tex('The horse does not eat cucumber salad.') # doctest: +SKIP Tex('The horse does not eat cucumber salad.') """ def __init__( self, *tex_strings: str, arg_separator: str = "", tex_environment: str | None = "center", **kwargs: Any, ): super().__init__( *tex_strings, arg_separator=arg_separator, tex_environment=tex_environment, **kwargs, ) class BulletedList(Tex): """A bulleted list. Examples -------- .. manim:: BulletedListExample :save_last_frame: class BulletedListExample(Scene): def construct(self): blist = BulletedList("Item 1", "Item 2", "Item 3", height=2, width=2) blist.set_color_by_tex("Item 1", RED) blist.set_color_by_tex("Item 2", GREEN) blist.set_color_by_tex("Item 3", BLUE) self.add(blist) """ def __init__( self, *items: str, buff: float = MED_LARGE_BUFF, dot_scale_factor: float = 2, tex_environment: str | None = None, **kwargs: Any, ): self.buff = buff self.dot_scale_factor = dot_scale_factor self.tex_environment = tex_environment line_separated_items = [s + "\\\\" for s in items] super().__init__( *line_separated_items, tex_environment=tex_environment, **kwargs, ) for part in self: dot = MathTex("\\cdot").scale(self.dot_scale_factor) dot.next_to(part[0], LEFT, SMALL_BUFF) part.add_to_back(dot) self.arrange(DOWN, aligned_edge=LEFT, buff=self.buff) def fade_all_but(self, index_or_string: int | str, opacity: float = 0.5) -> None: arg = index_or_string if isinstance(arg, str): part: VGroup | VMobject | None = self.get_part_by_tex(arg) if part is None: raise Exception( f"Could not locate part by provided tex string '{arg}'." ) elif isinstance(arg, int): part = self.submobjects[arg] else: raise TypeError(f"Expected int or string, got {arg}") for other_part in self.submobjects: if other_part is part: other_part.set_fill(opacity=1) else: other_part.set_fill(opacity=opacity) class Title(Tex): """A mobject representing an underlined title. Examples -------- .. manim:: TitleExample :save_last_frame: import manim class TitleExample(Scene): def construct(self): banner = ManimBanner() title = Title(f"Manim version {manim.__version__}") self.add(banner, title) """ def __init__( self, *text_parts: str, include_underline: bool = True, match_underline_width_to_text: bool = False, underline_buff: float = MED_SMALL_BUFF, **kwargs: Any, ): self.include_underline = include_underline self.match_underline_width_to_text = match_underline_width_to_text self.underline_buff = underline_buff super().__init__(*text_parts, **kwargs) self.to_edge(UP) if self.include_underline: underline_width = config["frame_width"] - 2 underline = Line(LEFT, RIGHT) underline.next_to(self, DOWN, buff=self.underline_buff) if self.match_underline_width_to_text: underline.match_width(self) else: underline.width = underline_width self.add(underline) self.underline = underline ================================================ FILE: manim/mobject/three_d/__init__.py ================================================ """Three-dimensional mobjects. Modules ======= .. autosummary:: :toctree: ../reference ~polyhedra ~three_d_utils ~three_dimensions """ ================================================ FILE: manim/mobject/three_d/polyhedra.py ================================================ """General polyhedral class and platonic solids.""" from __future__ import annotations from collections.abc import Hashable from typing import TYPE_CHECKING, Any import numpy as np from manim.mobject.geometry.polygram import Polygon from manim.mobject.graph import Graph from manim.mobject.three_d.three_dimensions import Dot3D from manim.mobject.types.vectorized_mobject import VGroup from manim.utils.qhull import QuickHull if TYPE_CHECKING: from manim.mobject.mobject import Mobject from manim.typing import Point3D, Point3DLike_Array __all__ = [ "Polyhedron", "Tetrahedron", "Octahedron", "Icosahedron", "Dodecahedron", "ConvexHull3D", ] class Polyhedron(VGroup): """An abstract polyhedra class. In this implementation, polyhedra are defined with a list of vertex coordinates in space, and a list of faces. This implementation mirrors that of a standard polyhedral data format (OFF, object file format). Parameters ---------- vertex_coords A list of coordinates of the corresponding vertices in the polyhedron. Each coordinate will correspond to a vertex. The vertices are indexed with the usual indexing of Python. faces_list A list of faces. Each face is a sublist containing the indices of the vertices that form the corners of that face. faces_config Configuration for the polygons representing the faces of the polyhedron. graph_config Configuration for the graph containing the vertices and edges of the polyhedron. Examples -------- To understand how to create a custom polyhedra, let's use the example of a rather simple one - a square pyramid. .. manim:: SquarePyramidScene :save_last_frame: class SquarePyramidScene(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) vertex_coords = [ [1, 1, 0], [1, -1, 0], [-1, -1, 0], [-1, 1, 0], [0, 0, 2] ] faces_list = [ [0, 1, 4], [1, 2, 4], [2, 3, 4], [3, 0, 4], [0, 1, 2, 3] ] pyramid = Polyhedron(vertex_coords, faces_list) self.add(pyramid) In defining the polyhedron above, we first defined the coordinates of the vertices. These are the corners of the square base, given as the first four coordinates in the vertex list, and the apex, the last coordinate in the list. Next, we define the faces of the polyhedron. The triangular surfaces of the pyramid are polygons with two adjacent vertices in the base and the vertex at the apex as corners. We thus define these surfaces in the first four elements of our face list. The last element defines the base of the pyramid. The graph and faces of polyhedra can also be accessed and modified directly, after instantiation. They are stored in the `graph` and `faces` attributes respectively. .. manim:: PolyhedronSubMobjects :save_last_frame: class PolyhedronSubMobjects(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) octahedron = Octahedron(edge_length = 3) octahedron.graph[0].set_color(RED) octahedron.faces[2].set_color(YELLOW) self.add(octahedron) """ def __init__( self, vertex_coords: Point3DLike_Array, faces_list: list[list[int]], faces_config: dict[str, str | int | float | bool] = {}, graph_config: dict[str, Any] = {}, ): super().__init__() self.faces_config = dict( {"fill_opacity": 0.5, "shade_in_3d": True}, **faces_config ) self.graph_config = dict( { "vertex_type": Dot3D, "edge_config": { "stroke_opacity": 0, # I find that having the edges visible makes the polyhedra look weird }, }, **graph_config, ) self.vertex_coords = vertex_coords self.vertex_indices = list(range(len(self.vertex_coords))) self.layout: dict[Hashable, Any] = dict(enumerate(self.vertex_coords)) self.faces_list = faces_list self.face_coords = [[self.layout[j] for j in i] for i in faces_list] self.edges = self.get_edges(self.faces_list) self.faces = self.create_faces(self.face_coords) self.graph = Graph( self.vertex_indices, self.edges, layout=self.layout, **self.graph_config ) self.add(self.faces, self.graph) self.add_updater(self.update_faces) def get_edges(self, faces_list: list[list[int]]) -> list[tuple[int, int]]: """Creates list of cyclic pairwise tuples.""" edges: list[tuple[int, int]] = [] for face in faces_list: edges += zip(face, face[1:] + face[:1]) return edges def create_faces( self, face_coords: Point3DLike_Array, ) -> VGroup: """Creates VGroup of faces from a list of face coordinates.""" face_group = VGroup() for face in face_coords: face_group.add(Polygon(*face, **self.faces_config)) return face_group def update_faces(self, m: Mobject) -> None: face_coords = self.extract_face_coords() new_faces = self.create_faces(face_coords) self.faces.match_points(new_faces) def extract_face_coords(self) -> Point3DLike_Array: """Extracts the coordinates of the vertices in the graph. Used for updating faces. """ new_vertex_coords = [] for v in self.graph.vertices: new_vertex_coords.append(self.graph[v].get_center()) layout = dict(enumerate(new_vertex_coords)) return [[layout[j] for j in i] for i in self.faces_list] class Tetrahedron(Polyhedron): """A tetrahedron, one of the five platonic solids. It has 4 faces, 6 edges, and 4 vertices. Parameters ---------- edge_length The length of an edge between any two vertices. Examples -------- .. manim:: TetrahedronScene :save_last_frame: class TetrahedronScene(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) obj = Tetrahedron() self.add(obj) """ def __init__(self, edge_length: float = 1, **kwargs: Any): unit = edge_length * np.sqrt(2) / 4 super().__init__( vertex_coords=[ np.array([unit, unit, unit]), np.array([unit, -unit, -unit]), np.array([-unit, unit, -unit]), np.array([-unit, -unit, unit]), ], faces_list=[[0, 1, 2], [3, 0, 2], [0, 1, 3], [3, 1, 2]], **kwargs, ) class Octahedron(Polyhedron): """An octahedron, one of the five platonic solids. It has 8 faces, 12 edges and 6 vertices. Parameters ---------- edge_length The length of an edge between any two vertices. Examples -------- .. manim:: OctahedronScene :save_last_frame: class OctahedronScene(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) obj = Octahedron() self.add(obj) """ def __init__(self, edge_length: float = 1, **kwargs: Any): unit = edge_length * np.sqrt(2) / 2 super().__init__( vertex_coords=[ np.array([unit, 0, 0]), np.array([-unit, 0, 0]), np.array([0, unit, 0]), np.array([0, -unit, 0]), np.array([0, 0, unit]), np.array([0, 0, -unit]), ], faces_list=[ [2, 4, 1], [0, 4, 2], [4, 3, 0], [1, 3, 4], [3, 5, 0], [1, 5, 3], [2, 5, 1], [0, 5, 2], ], **kwargs, ) class Icosahedron(Polyhedron): """An icosahedron, one of the five platonic solids. It has 20 faces, 30 edges and 12 vertices. Parameters ---------- edge_length The length of an edge between any two vertices. Examples -------- .. manim:: IcosahedronScene :save_last_frame: class IcosahedronScene(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) obj = Icosahedron() self.add(obj) """ def __init__(self, edge_length: float = 1, **kwargs: Any): unit_a = edge_length * ((1 + np.sqrt(5)) / 4) unit_b = edge_length * (1 / 2) super().__init__( vertex_coords=[ np.array([0, unit_b, unit_a]), np.array([0, -unit_b, unit_a]), np.array([0, unit_b, -unit_a]), np.array([0, -unit_b, -unit_a]), np.array([unit_b, unit_a, 0]), np.array([unit_b, -unit_a, 0]), np.array([-unit_b, unit_a, 0]), np.array([-unit_b, -unit_a, 0]), np.array([unit_a, 0, unit_b]), np.array([unit_a, 0, -unit_b]), np.array([-unit_a, 0, unit_b]), np.array([-unit_a, 0, -unit_b]), ], faces_list=[ [1, 8, 0], [1, 5, 7], [8, 5, 1], [7, 3, 5], [5, 9, 3], [8, 9, 5], [3, 2, 9], [9, 4, 2], [8, 4, 9], [0, 4, 8], [6, 4, 0], [6, 2, 4], [11, 2, 6], [3, 11, 2], [0, 6, 10], [10, 1, 0], [10, 7, 1], [11, 7, 3], [10, 11, 7], [10, 11, 6], ], **kwargs, ) class Dodecahedron(Polyhedron): """A dodecahedron, one of the five platonic solids. It has 12 faces, 30 edges and 20 vertices. Parameters ---------- edge_length The length of an edge between any two vertices. Examples -------- .. manim:: DodecahedronScene :save_last_frame: class DodecahedronScene(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) obj = Dodecahedron() self.add(obj) """ def __init__(self, edge_length: float = 1, **kwargs: Any): unit_a = edge_length * ((1 + np.sqrt(5)) / 4) unit_b = edge_length * ((3 + np.sqrt(5)) / 4) unit_c = edge_length * (1 / 2) super().__init__( vertex_coords=[ np.array([unit_a, unit_a, unit_a]), np.array([unit_a, unit_a, -unit_a]), np.array([unit_a, -unit_a, unit_a]), np.array([unit_a, -unit_a, -unit_a]), np.array([-unit_a, unit_a, unit_a]), np.array([-unit_a, unit_a, -unit_a]), np.array([-unit_a, -unit_a, unit_a]), np.array([-unit_a, -unit_a, -unit_a]), np.array([0, unit_c, unit_b]), np.array([0, unit_c, -unit_b]), np.array([0, -unit_c, -unit_b]), np.array([0, -unit_c, unit_b]), np.array([unit_c, unit_b, 0]), np.array([-unit_c, unit_b, 0]), np.array([unit_c, -unit_b, 0]), np.array([-unit_c, -unit_b, 0]), np.array([unit_b, 0, unit_c]), np.array([-unit_b, 0, unit_c]), np.array([unit_b, 0, -unit_c]), np.array([-unit_b, 0, -unit_c]), ], faces_list=[ [18, 16, 0, 12, 1], [3, 18, 16, 2, 14], [3, 10, 9, 1, 18], [1, 9, 5, 13, 12], [0, 8, 4, 13, 12], [2, 16, 0, 8, 11], [4, 17, 6, 11, 8], [17, 19, 5, 13, 4], [19, 7, 15, 6, 17], [6, 15, 14, 2, 11], [19, 5, 9, 10, 7], [7, 10, 3, 14, 15], ], **kwargs, ) class ConvexHull3D(Polyhedron): """A convex hull for a set of points Parameters ---------- points The points to consider. tolerance The tolerance used for quickhull. kwargs Forwarded to the parent constructor. Examples -------- .. manim:: ConvexHull3DExample :save_last_frame: :quality: high class ConvexHull3DExample(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) points = [ [ 1.93192757, 0.44134585, -1.52407061], [-0.93302521, 1.23206983, 0.64117067], [-0.44350918, -0.61043677, 0.21723705], [-0.42640268, -1.05260843, 1.61266094], [-1.84449637, 0.91238739, -1.85172623], [ 1.72068132, -0.11880457, 0.51881751], [ 0.41904805, 0.44938012, -1.86440686], [ 0.83864666, 1.66653337, 1.88960123], [ 0.22240514, -0.80986286, 1.34249326], [-1.29585759, 1.01516189, 0.46187522], [ 1.7776499, -1.59550796, -1.70240747], [ 0.80065226, -0.12530398, 1.70063977], [ 1.28960948, -1.44158255, 1.39938582], [-0.93538943, 1.33617705, -0.24852643], [-1.54868271, 1.7444399, -0.46170734] ] hull = ConvexHull3D( *points, faces_config = {"stroke_opacity": 0}, graph_config = { "vertex_type": Dot3D, "edge_config": { "stroke_color": BLUE, "stroke_width": 2, "stroke_opacity": 0.05, } } ) dots = VGroup(*[Dot3D(point) for point in points]) self.add(hull) self.add(dots) """ def __init__(self, *points: Point3D, tolerance: float = 1e-5, **kwargs: Any): # Build Convex Hull array = np.array(points) hull = QuickHull(tolerance) hull.build(array) # Setup Lists vertices = [] faces = [] # Extract Faces c = 0 d = {} facets = set(hull.facets) - hull.removed for facet in facets: tmp = set() for subfacet in facet.subfacets: for point in subfacet.points: if point not in d: vertices.append(point.coordinates) d[point] = c c += 1 tmp.add(point) faces.append([d[point] for point in tmp]) # Call Polyhedron super().__init__( vertex_coords=vertices, faces_list=faces, **kwargs, ) ================================================ FILE: manim/mobject/three_d/three_d_utils.py ================================================ """Utility functions for three-dimensional mobjects.""" from __future__ import annotations __all__ = [ "get_3d_vmob_gradient_start_and_end_points", "get_3d_vmob_start_corner_index", "get_3d_vmob_end_corner_index", "get_3d_vmob_start_corner", "get_3d_vmob_end_corner", "get_3d_vmob_unit_normal", "get_3d_vmob_start_corner_unit_normal", "get_3d_vmob_end_corner_unit_normal", ] from typing import TYPE_CHECKING, Literal import numpy as np from manim.constants import ORIGIN, UP from manim.utils.space_ops import get_unit_normal if TYPE_CHECKING: from manim.typing import Point3D, Vector3D from ..types.vectorized_mobject import VMobject def get_3d_vmob_gradient_start_and_end_points( vmob: VMobject, ) -> tuple[Point3D, Point3D]: return ( get_3d_vmob_start_corner(vmob), get_3d_vmob_end_corner(vmob), ) def get_3d_vmob_start_corner_index(vmob: VMobject) -> Literal[0]: return 0 def get_3d_vmob_end_corner_index(vmob: VMobject) -> int: return ((len(vmob.points) - 1) // 6) * 3 def get_3d_vmob_start_corner(vmob: VMobject) -> Point3D: 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: VMobject) -> Point3D: 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: VMobject, point_index: int) -> Vector3D: n_points = vmob.get_num_points() if len(vmob.get_anchors()) <= 2: return np.array(UP) i = point_index im3 = i - 3 if i > 2 else (n_points - 4) ip3 = i + 3 if i < (n_points - 3) else 3 unit_normal = get_unit_normal( vmob.points[ip3] - vmob.points[i], vmob.points[im3] - vmob.points[i], ) if np.linalg.norm(unit_normal) == 0: return np.array(UP) return unit_normal def get_3d_vmob_start_corner_unit_normal(vmob: VMobject) -> Vector3D: return get_3d_vmob_unit_normal(vmob, get_3d_vmob_start_corner_index(vmob)) def get_3d_vmob_end_corner_unit_normal(vmob: VMobject) -> Vector3D: return get_3d_vmob_unit_normal(vmob, get_3d_vmob_end_corner_index(vmob)) ================================================ FILE: manim/mobject/three_d/three_dimensions.py ================================================ """Three-dimensional mobjects.""" from __future__ import annotations __all__ = [ "ThreeDVMobject", "Surface", "Sphere", "Dot3D", "Cube", "Prism", "Cone", "Arrow3D", "Cylinder", "Line3D", "Torus", ] from collections.abc import Callable, Iterable, Sequence from typing import TYPE_CHECKING, Any import numpy as np from typing_extensions import Self from manim import config, logger from manim.constants import * from manim.mobject.geometry.arc import Circle from manim.mobject.geometry.polygram import Square from manim.mobject.mobject import * from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.opengl.opengl_mobject import OpenGLMobject from manim.mobject.types.vectorized_mobject import VectorizedPoint, VGroup, VMobject from manim.utils.color import ( BLUE, BLUE_D, BLUE_E, LIGHT_GREY, WHITE, ManimColor, ParsableManimColor, interpolate_color, ) from manim.utils.iterables import tuplify from manim.utils.space_ops import normalize, perpendicular_bisector, z_to_vector if TYPE_CHECKING: from manim.typing import Point3D, Point3DLike, Vector3DLike class ThreeDVMobject(VMobject, metaclass=ConvertToOpenGL): def __init__(self, shade_in_3d: bool = True, **kwargs): super().__init__(shade_in_3d=shade_in_3d, **kwargs) class Surface(VGroup, metaclass=ConvertToOpenGL): """Creates a Parametric Surface using a checkerboard pattern. Parameters ---------- func The function defining the :class:`Surface`. u_range The range of the ``u`` variable: ``(u_min, u_max)``. v_range The range of the ``v`` variable: ``(v_min, v_max)``. resolution The number of samples taken of the :class:`Surface`. A tuple can be used to define different resolutions for ``u`` and ``v`` respectively. fill_color The color of the :class:`Surface`. Ignored if ``checkerboard_colors`` is set. fill_opacity The opacity of the :class:`Surface`, from 0 being fully transparent to 1 being fully opaque. Defaults to 1. checkerboard_colors ng individual faces alternating colors. Overrides ``fill_color``. stroke_color Color of the stroke surrounding each face of :class:`Surface`. stroke_width Width of the stroke surrounding each face of :class:`Surface`. Defaults to 0.5. should_make_jagged Changes the anchor mode of the Bézier curves from smooth to jagged. Defaults to ``False``. Examples -------- .. manim:: ParaSurface :save_last_frame: class ParaSurface(ThreeDScene): def func(self, u, v): return np.array([np.cos(u) * np.cos(v), np.cos(u) * np.sin(v), u]) def construct(self): axes = ThreeDAxes(x_range=[-4,4], x_length=8) surface = Surface( lambda u, v: axes.c2p(*self.func(u, v)), u_range=[-PI, PI], v_range=[0, TAU], resolution=8, ) self.set_camera_orientation(theta=70 * DEGREES, phi=75 * DEGREES) self.add(axes, surface) """ def __init__( self, func: Callable[[float, float], np.ndarray], u_range: Sequence[float] = [0, 1], v_range: Sequence[float] = [0, 1], resolution: Sequence[int] = 32, surface_piece_config: dict = {}, fill_color: ParsableManimColor = BLUE_D, fill_opacity: float = 1.0, checkerboard_colors: Sequence[ParsableManimColor] | bool = [BLUE_D, BLUE_E], stroke_color: ParsableManimColor = LIGHT_GREY, stroke_width: float = 0.5, should_make_jagged: bool = False, pre_function_handle_to_anchor_scale_factor: float = 0.00001, **kwargs: Any, ) -> None: self.u_range = u_range self.v_range = v_range super().__init__( fill_color=fill_color, fill_opacity=fill_opacity, stroke_color=stroke_color, stroke_width=stroke_width, **kwargs, ) self.resolution = resolution self.surface_piece_config = surface_piece_config if checkerboard_colors: self.checkerboard_colors: list[ManimColor] = [ ManimColor(x) for x in checkerboard_colors ] else: self.checkerboard_colors = checkerboard_colors self.should_make_jagged = should_make_jagged self.pre_function_handle_to_anchor_scale_factor = ( pre_function_handle_to_anchor_scale_factor ) self._func = func self._setup_in_uv_space() self.apply_function(lambda p: func(p[0], p[1])) if self.should_make_jagged: self.make_jagged() def func(self, u: float, v: float) -> np.ndarray: return self._func(u, v) def _get_u_values_and_v_values(self) -> tuple[np.ndarray, np.ndarray]: res = tuplify(self.resolution) if len(res) == 1: u_res = v_res = res[0] else: u_res, v_res = res u_values = np.linspace(*self.u_range, u_res + 1) v_values = np.linspace(*self.v_range, v_res + 1) return u_values, v_values def _setup_in_uv_space(self) -> None: u_values, v_values = self._get_u_values_and_v_values() faces = VGroup() for i in range(len(u_values) - 1): for j in range(len(v_values) - 1): u1, u2 = u_values[i : i + 2] v1, v2 = v_values[j : j + 2] face = ThreeDVMobject() face.set_points_as_corners( [ [u1, v1, 0], [u2, v1, 0], [u2, v2, 0], [u1, v2, 0], [u1, v1, 0], ], ) faces.add(face) face.u_index = i face.v_index = j face.u1 = u1 face.u2 = u2 face.v1 = v1 face.v2 = v2 faces.set_fill(color=self.fill_color, opacity=self.fill_opacity) faces.set_stroke( color=self.stroke_color, width=self.stroke_width, opacity=self.stroke_opacity, ) self.add(*faces) if self.checkerboard_colors: self.set_fill_by_checkerboard(*self.checkerboard_colors) def set_fill_by_checkerboard( self, *colors: Iterable[ParsableManimColor], opacity: float | None = None ) -> Self: """Sets the fill_color of each face of :class:`Surface` in an alternating pattern. Parameters ---------- colors List of colors for alternating pattern. opacity The fill_opacity of :class:`Surface`, from 0 being fully transparent to 1 being fully opaque. Returns ------- :class:`~.Surface` The parametric surface with an alternating pattern. """ n_colors = len(colors) for face in self: c_index = (face.u_index + face.v_index) % n_colors face.set_fill(colors[c_index], opacity=opacity) return self def set_fill_by_value( self, axes: Mobject, colorscale: list[ParsableManimColor] | ParsableManimColor | None = None, axis: int = 2, **kwargs, ) -> Self: """Sets the color of each mobject of a parametric surface to a color relative to its axis-value. Parameters ---------- axes The axes for the parametric surface, which will be used to map axis-values to colors. colorscale A list of colors, ordered from lower axis-values to higher axis-values. If a list of tuples is passed containing colors paired with numbers, then those numbers will be used as the pivots. axis The chosen axis to use for the color mapping. (0 = x, 1 = y, 2 = z) Returns ------- :class:`~.Surface` The parametric surface with a gradient applied by value. For chaining. Examples -------- .. manim:: FillByValueExample :save_last_frame: class FillByValueExample(ThreeDScene): def construct(self): resolution_fa = 8 self.set_camera_orientation(phi=75 * DEGREES, theta=-160 * DEGREES) axes = ThreeDAxes(x_range=(0, 5, 1), y_range=(0, 5, 1), z_range=(-1, 1, 0.5)) def param_surface(u, v): x = u y = v z = np.sin(x) * np.cos(y) return z surface_plane = Surface( lambda u, v: axes.c2p(u, v, param_surface(u, v)), resolution=(resolution_fa, resolution_fa), v_range=[0, 5], u_range=[0, 5], ) surface_plane.set_style(fill_opacity=1) surface_plane.set_fill_by_value(axes=axes, colorscale=[(RED, -0.5), (YELLOW, 0), (GREEN, 0.5)], axis=2) self.add(axes, surface_plane) """ if "colors" in kwargs and colorscale is None: colorscale = kwargs.pop("colors") if kwargs: raise ValueError( "Unsupported keyword argument(s): " f"{', '.join(str(key) for key in kwargs)}" ) if colorscale is None: logger.warning( "The value passed to the colorscale keyword argument was None, " "the surface fill color has not been changed" ) return self ranges = [axes.x_range, axes.y_range, axes.z_range] if type(colorscale[0]) is tuple: new_colors, pivots = [ [i for i, j in colorscale], [j for i, j in colorscale], ] else: new_colors = colorscale pivot_min = ranges[axis][0] pivot_max = ranges[axis][1] pivot_frequency = (pivot_max - pivot_min) / (len(new_colors) - 1) pivots = np.arange( start=pivot_min, stop=pivot_max + pivot_frequency, step=pivot_frequency, ) for mob in self.family_members_with_points(): axis_value = axes.point_to_coords(mob.get_midpoint())[axis] if axis_value <= pivots[0]: mob.set_color(new_colors[0]) elif axis_value >= pivots[-1]: mob.set_color(new_colors[-1]) else: for i, pivot in enumerate(pivots): if pivot > axis_value: color_index = (axis_value - pivots[i - 1]) / ( pivots[i] - pivots[i - 1] ) color_index = min(color_index, 1) mob_color = interpolate_color( new_colors[i - 1], new_colors[i], color_index, ) if config.renderer == RendererType.OPENGL: mob.set_color(mob_color, recurse=False) elif config.renderer == RendererType.CAIRO: mob.set_color(mob_color, family=False) break return self # Specific shapes class Sphere(Surface): """A three-dimensional sphere. Parameters ---------- center Center of the :class:`Sphere`. radius The radius of the :class:`Sphere`. resolution The number of samples taken of the :class:`Sphere`. A tuple can be used to define different resolutions for ``u`` and ``v`` respectively. u_range The range of the ``u`` variable: ``(u_min, u_max)``. v_range The range of the ``v`` variable: ``(v_min, v_max)``. Examples -------- .. manim:: ExampleSphere :save_last_frame: class ExampleSphere(ThreeDScene): def construct(self): self.set_camera_orientation(phi=PI / 6, theta=PI / 6) sphere1 = Sphere( center=(3, 0, 0), radius=1, resolution=(20, 20), u_range=[0.001, PI - 0.001], v_range=[0, TAU] ) sphere1.set_color(RED) self.add(sphere1) sphere2 = Sphere(center=(-1, -3, 0), radius=2, resolution=(18, 18)) sphere2.set_color(GREEN) self.add(sphere2) sphere3 = Sphere(center=(-1, 2, 0), radius=2, resolution=(16, 16)) sphere3.set_color(BLUE) self.add(sphere3) """ def __init__( self, center: Point3DLike = ORIGIN, radius: float = 1, resolution: Sequence[int] | None = None, u_range: Sequence[float] = (0, TAU), v_range: Sequence[float] = (0, PI), **kwargs, ) -> None: if config.renderer == RendererType.OPENGL: res_value = (101, 51) elif config.renderer == RendererType.CAIRO: res_value = (24, 12) else: raise Exception("Unknown renderer") resolution = resolution if resolution is not None else res_value self.radius = radius super().__init__( self.func, resolution=resolution, u_range=u_range, v_range=v_range, **kwargs, ) self.shift(center) def func(self, u: float, v: float) -> np.ndarray: """The z values defining the :class:`Sphere` being plotted. Returns ------- :class:`numpy.array` The z values defining the :class:`Sphere`. """ return self.radius * np.array( [np.cos(u) * np.sin(v), np.sin(u) * np.sin(v), -np.cos(v)], ) class Dot3D(Sphere): """A spherical dot. Parameters ---------- point The location of the dot. radius The radius of the dot. color The color of the :class:`Dot3D`. resolution The number of samples taken of the :class:`Dot3D`. A tuple can be used to define different resolutions for ``u`` and ``v`` respectively. Examples -------- .. manim:: Dot3DExample :save_last_frame: class Dot3DExample(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75*DEGREES, theta=-45*DEGREES) axes = ThreeDAxes() dot_1 = Dot3D(point=axes.coords_to_point(0, 0, 1), color=RED) dot_2 = Dot3D(point=axes.coords_to_point(2, 0, 0), radius=0.1, color=BLUE) dot_3 = Dot3D(point=[0, 0, 0], radius=0.1, color=ORANGE) self.add(axes, dot_1, dot_2,dot_3) """ def __init__( self, point: list | np.ndarray = ORIGIN, radius: float = DEFAULT_DOT_RADIUS, color: ParsableManimColor = WHITE, resolution: tuple[int, int] = (8, 8), **kwargs, ) -> None: super().__init__(center=point, radius=radius, resolution=resolution, **kwargs) self.set_color(color) class Cube(VGroup): """A three-dimensional cube. Parameters ---------- side_length Length of each side of the :class:`Cube`. fill_opacity The opacity of the :class:`Cube`, from 0 being fully transparent to 1 being fully opaque. Defaults to 0.75. fill_color The color of the :class:`Cube`. stroke_width The width of the stroke surrounding each face of the :class:`Cube`. Examples -------- .. manim:: CubeExample :save_last_frame: class CubeExample(ThreeDScene): def construct(self): self.set_camera_orientation(phi=75*DEGREES, theta=-45*DEGREES) axes = ThreeDAxes() cube = Cube(side_length=3, fill_opacity=0.7, fill_color=BLUE) self.add(cube) """ def __init__( self, side_length: float = 2, fill_opacity: float = 0.75, fill_color: ParsableManimColor = BLUE, stroke_width: float = 0, **kwargs, ) -> None: self.side_length = side_length super().__init__( fill_color=fill_color, fill_opacity=fill_opacity, stroke_width=stroke_width, **kwargs, ) def generate_points(self) -> None: """Creates the sides of the :class:`Cube`.""" for vect in IN, OUT, LEFT, RIGHT, UP, DOWN: face = Square( side_length=self.side_length, shade_in_3d=True, joint_type=LineJointType.BEVEL, ) face.flip() face.shift(self.side_length * OUT / 2.0) face.apply_matrix(z_to_vector(vect)) self.add(face) def init_points(self) -> None: self.generate_points() class Prism(Cube): """A right rectangular prism (or rectangular cuboid). Defined by the length of each side in ``[x, y, z]`` format. Parameters ---------- dimensions Dimensions of the :class:`Prism` in ``[x, y, z]`` format. Examples -------- .. manim:: ExamplePrism :save_last_frame: class ExamplePrism(ThreeDScene): def construct(self): self.set_camera_orientation(phi=60 * DEGREES, theta=150 * DEGREES) prismSmall = Prism(dimensions=[1, 2, 3]).rotate(PI / 2) prismLarge = Prism(dimensions=[1.5, 3, 4.5]).move_to([2, 0, 0]) self.add(prismSmall, prismLarge) """ def __init__( self, dimensions: tuple[float, float, float] | np.ndarray = [3, 2, 1], **kwargs ) -> None: self.dimensions = dimensions super().__init__(**kwargs) def generate_points(self) -> None: """Creates the sides of the :class:`Prism`.""" super().generate_points() for dim, value in enumerate(self.dimensions): self.rescale_to_fit(value, dim, stretch=True) class Cone(Surface): """A circular cone. Can be defined using 2 parameters: its height, and its base radius. The polar angle, theta, can be calculated using arctan(base_radius / height) The spherical radius, r, is calculated using the pythagorean theorem. Parameters ---------- base_radius The base radius from which the cone tapers. height The height measured from the plane formed by the base_radius to the apex of the cone. direction The direction of the apex. show_base Whether to show the base plane or not. v_range The azimuthal angle to start and end at. u_min The radius at the apex. checkerboard_colors Show checkerboard grid texture on the cone. Examples -------- .. manim:: ExampleCone :save_last_frame: class ExampleCone(ThreeDScene): def construct(self): axes = ThreeDAxes() cone = Cone(direction=X_AXIS+Y_AXIS+2*Z_AXIS, resolution=8) self.set_camera_orientation(phi=5*PI/11, theta=PI/9) self.add(axes, cone) """ def __init__( self, base_radius: float = 1, height: float = 1, direction: np.ndarray = Z_AXIS, show_base: bool = False, v_range: Sequence[float] = [0, TAU], u_min: float = 0, checkerboard_colors: bool = False, **kwargs: Any, ) -> None: self.direction = direction self.theta = PI - np.arctan(base_radius / height) super().__init__( self.func, v_range=v_range, u_range=[u_min, np.sqrt(base_radius**2 + height**2)], checkerboard_colors=checkerboard_colors, **kwargs, ) # used for rotations self.new_height = height self._current_theta = 0 self._current_phi = 0 self.base_circle = Circle( radius=base_radius, color=self.fill_color, fill_opacity=self.fill_opacity, stroke_width=0, ) self.base_circle.shift(height * IN) self._set_start_and_end_attributes(direction) if show_base: self.add(self.base_circle) self._rotate_to_direction() def func(self, u: float, v: float) -> np.ndarray: """Converts from spherical coordinates to cartesian. Parameters ---------- u The radius. v The azimuthal angle. Returns ------- :class:`numpy.array` Points defining the :class:`Cone`. """ r = u phi = v return np.array( [ r * np.sin(self.theta) * np.cos(phi), r * np.sin(self.theta) * np.sin(phi), r * np.cos(self.theta), ], ) def get_start(self) -> np.ndarray: return self.start_point.get_center() def get_end(self) -> np.ndarray: return self.end_point.get_center() def _rotate_to_direction(self) -> None: x, y, z = self.direction r = np.sqrt(x**2 + y**2 + z**2) theta = np.arccos(z / r) if r > 0 else 0 if x == 0: if y == 0: # along the z axis phi = 0 else: phi = np.arctan(np.inf) if y < 0: phi += PI else: phi = np.arctan(y / x) if x < 0: phi += PI # Undo old rotation (in reverse order) self.rotate(-self._current_phi, Z_AXIS, about_point=ORIGIN) self.rotate(-self._current_theta, Y_AXIS, about_point=ORIGIN) # Do new rotation self.rotate(theta, Y_AXIS, about_point=ORIGIN) self.rotate(phi, Z_AXIS, about_point=ORIGIN) # Store values self._current_theta = theta self._current_phi = phi def set_direction(self, direction: np.ndarray) -> None: """Changes the direction of the apex of the :class:`Cone`. Parameters ---------- direction The direction of the apex. """ self.direction = direction self._rotate_to_direction() def get_direction(self) -> np.ndarray: """Returns the current direction of the apex of the :class:`Cone`. Returns ------- direction : :class:`numpy.array` The direction of the apex. """ return self.direction def _set_start_and_end_attributes(self, direction): normalized_direction = direction * np.linalg.norm(direction) start = self.base_circle.get_center() end = start + normalized_direction * self.new_height self.start_point = VectorizedPoint(start) self.end_point = VectorizedPoint(end) self.add(self.start_point, self.end_point) class Cylinder(Surface): """A cylinder, defined by its height, radius and direction, Parameters ---------- radius The radius of the cylinder. height The height of the cylinder. direction The direction of the central axis of the cylinder. v_range The height along the height axis (given by direction) to start and end on. show_ends Whether to show the end caps or not. resolution The number of samples taken of the :class:`Cylinder`. A tuple can be used to define different resolutions for ``u`` and ``v`` respectively. Examples -------- .. manim:: ExampleCylinder :save_last_frame: class ExampleCylinder(ThreeDScene): def construct(self): axes = ThreeDAxes() cylinder = Cylinder(radius=2, height=3) self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) self.add(axes, cylinder) """ def __init__( self, radius: float = 1, height: float = 2, direction: np.ndarray = Z_AXIS, v_range: Sequence[float] = [0, TAU], show_ends: bool = True, resolution: Sequence[int] = (24, 24), **kwargs, ) -> None: self._height = height self.radius = radius super().__init__( self.func, resolution=resolution, u_range=[-self._height / 2, self._height / 2], v_range=v_range, **kwargs, ) if show_ends: self.add_bases() self._current_phi = 0 self._current_theta = 0 self.set_direction(direction) def func(self, u: float, v: float) -> np.ndarray: """Converts from cylindrical coordinates to cartesian. Parameters ---------- u The height. v The azimuthal angle. Returns ------- :class:`numpy.ndarray` Points defining the :class:`Cylinder`. """ height = u phi = v r = self.radius return np.array([r * np.cos(phi), r * np.sin(phi), height]) def add_bases(self) -> None: """Adds the end caps of the cylinder.""" if config.renderer == RendererType.OPENGL: color = self.color opacity = self.opacity elif config.renderer == RendererType.CAIRO: color = self.fill_color opacity = self.fill_opacity self.base_top = Circle( radius=self.radius, color=color, fill_opacity=opacity, shade_in_3d=True, stroke_width=0, ) self.base_top.shift(self.u_range[1] * IN) self.base_bottom = Circle( radius=self.radius, color=color, fill_opacity=opacity, shade_in_3d=True, stroke_width=0, ) self.base_bottom.shift(self.u_range[0] * IN) self.add(self.base_top, self.base_bottom) def _rotate_to_direction(self) -> None: x, y, z = self.direction r = np.sqrt(x**2 + y**2 + z**2) theta = np.arccos(z / r) if r > 0 else 0 if x == 0: if y == 0: # along the z axis phi = 0 else: # along the x axis phi = np.arctan(np.inf) if y < 0: phi += PI else: phi = np.arctan(y / x) if x < 0: phi += PI # undo old rotation (in reverse direction) self.rotate(-self._current_phi, Z_AXIS, about_point=ORIGIN) self.rotate(-self._current_theta, Y_AXIS, about_point=ORIGIN) # do new rotation self.rotate(theta, Y_AXIS, about_point=ORIGIN) self.rotate(phi, Z_AXIS, about_point=ORIGIN) # store new values self._current_theta = theta self._current_phi = phi def set_direction(self, direction: np.ndarray) -> None: """Sets the direction of the central axis of the :class:`Cylinder`. Parameters ---------- direction : :class:`numpy.array` The direction of the central axis of the :class:`Cylinder`. """ # if get_norm(direction) is get_norm(self.direction): # pass self.direction = direction self._rotate_to_direction() def get_direction(self) -> np.ndarray: """Returns the direction of the central axis of the :class:`Cylinder`. Returns ------- direction : :class:`numpy.array` The direction of the central axis of the :class:`Cylinder`. """ return self.direction class Line3D(Cylinder): """A cylindrical line, for use in ThreeDScene. Parameters ---------- start The start point of the line. end The end point of the line. thickness The thickness of the line. color The color of the line. resolution The resolution of the line. By default this value is the number of points the line will sampled at. If you want the line to also come out checkered, use a tuple. For example, for a line made of 24 points with 4 checker points on each cylinder, pass the tuple (4, 24). Examples -------- .. manim:: ExampleLine3D :save_last_frame: class ExampleLine3D(ThreeDScene): def construct(self): axes = ThreeDAxes() line = Line3D(start=np.array([0, 0, 0]), end=np.array([2, 2, 2])) self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) self.add(axes, line) """ def __init__( self, start: np.ndarray = LEFT, end: np.ndarray = RIGHT, thickness: float = 0.02, color: ParsableManimColor | None = None, resolution: int | Sequence[int] = 24, **kwargs, ): self.thickness = thickness self.resolution = (2, resolution) if isinstance(resolution, int) else resolution self.set_start_and_end_attrs(start, end, **kwargs) if color is not None: self.set_color(color) def set_start_and_end_attrs( self, start: np.ndarray, end: np.ndarray, **kwargs ) -> None: """Sets the start and end points of the line. If either ``start`` or ``end`` are :class:`Mobjects <.Mobject>`, this gives their centers. Parameters ---------- start Starting point or :class:`Mobject`. end Ending point or :class:`Mobject`. """ rough_start = self.pointify(start) rough_end = self.pointify(end) self.vect = rough_end - rough_start self.length = np.linalg.norm(self.vect) self.direction = normalize(self.vect) # Now that we know the direction between them, # we can the appropriate boundary point from # start and end, if they're mobjects self.start = self.pointify(start, self.direction) self.end = self.pointify(end, -self.direction) super().__init__( height=np.linalg.norm(self.vect), radius=self.thickness, direction=self.direction, resolution=self.resolution, **kwargs, ) self.shift((self.start + self.end) / 2) def pointify( self, mob_or_point: Mobject | Point3DLike, direction: Vector3DLike | None = None, ) -> Point3D: """Gets a point representing the center of the :class:`Mobjects <.Mobject>`. Parameters ---------- mob_or_point :class:`Mobjects <.Mobject>` or point whose center should be returned. direction If an edge of a :class:`Mobjects <.Mobject>` should be returned, the direction of the edge. Returns ------- :class:`numpy.array` Center of the :class:`Mobjects <.Mobject>` or point, or edge if direction is given. """ if isinstance(mob_or_point, (Mobject, OpenGLMobject)): mob = mob_or_point if direction is None: return mob.get_center() else: return mob.get_boundary_point(direction) return np.array(mob_or_point) def get_start(self) -> np.ndarray: """Returns the starting point of the :class:`Line3D`. Returns ------- start : :class:`numpy.array` Starting point of the :class:`Line3D`. """ return self.start def get_end(self) -> np.ndarray: """Returns the ending point of the :class:`Line3D`. Returns ------- end : :class:`numpy.array` Ending point of the :class:`Line3D`. """ return self.end @classmethod def parallel_to( cls, line: Line3D, point: Point3DLike = ORIGIN, length: float = 5, **kwargs, ) -> Line3D: """Returns a line parallel to another line going through a given point. Parameters ---------- line The line to be parallel to. point The point to pass through. length Length of the parallel line. kwargs Additional parameters to be passed to the class. Returns ------- :class:`Line3D` Line parallel to ``line``. Examples -------- .. manim:: ParallelLineExample :save_last_frame: class ParallelLineExample(ThreeDScene): def construct(self): self.set_camera_orientation(PI / 3, -PI / 4) ax = ThreeDAxes((-5, 5), (-5, 5), (-5, 5), 10, 10, 10) line1 = Line3D(RIGHT * 2, UP + OUT, color=RED) line2 = Line3D.parallel_to(line1, color=YELLOW) self.add(ax, line1, line2) """ np_point = np.asarray(point) vect = normalize(line.vect) return cls( np_point + vect * length / 2, np_point - vect * length / 2, **kwargs, ) @classmethod def perpendicular_to( cls, line: Line3D, point: Vector3DLike = ORIGIN, length: float = 5, **kwargs, ) -> Line3D: """Returns a line perpendicular to another line going through a given point. Parameters ---------- line The line to be perpendicular to. point The point to pass through. length Length of the perpendicular line. kwargs Additional parameters to be passed to the class. Returns ------- :class:`Line3D` Line perpendicular to ``line``. Examples -------- .. manim:: PerpLineExample :save_last_frame: class PerpLineExample(ThreeDScene): def construct(self): self.set_camera_orientation(PI / 3, -PI / 4) ax = ThreeDAxes((-5, 5), (-5, 5), (-5, 5), 10, 10, 10) line1 = Line3D(RIGHT * 2, UP + OUT, color=RED) line2 = Line3D.perpendicular_to(line1, color=BLUE) self.add(ax, line1, line2) """ np_point = np.asarray(point) norm = np.cross(line.vect, np_point - line.start) if all(np.linalg.norm(norm) == np.zeros(3)): raise ValueError("Could not find the perpendicular.") start, end = perpendicular_bisector([line.start, line.end], norm) vect = normalize(end - start) return cls( np_point + vect * length / 2, np_point - vect * length / 2, **kwargs, ) class Arrow3D(Line3D): """An arrow made out of a cylindrical line and a conical tip. Parameters ---------- start The start position of the arrow. end The end position of the arrow. thickness The thickness of the arrow. height The height of the conical tip. base_radius The base radius of the conical tip. color The color of the arrow. resolution The resolution of the arrow line. Examples -------- .. manim:: ExampleArrow3D :save_last_frame: class ExampleArrow3D(ThreeDScene): def construct(self): axes = ThreeDAxes() arrow = Arrow3D( start=np.array([0, 0, 0]), end=np.array([2, 2, 2]), resolution=8 ) self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) self.add(axes, arrow) """ def __init__( self, start: np.ndarray = LEFT, end: np.ndarray = RIGHT, thickness: float = 0.02, height: float = 0.3, base_radius: float = 0.08, color: ParsableManimColor = WHITE, resolution: int | Sequence[int] = 24, **kwargs, ) -> None: super().__init__( start=start, end=end, thickness=thickness, color=color, resolution=resolution, **kwargs, ) self.length = np.linalg.norm(self.vect) self.set_start_and_end_attrs( self.start, self.end - height * self.direction, **kwargs, ) self.cone = Cone( direction=self.direction, base_radius=base_radius, height=height, **kwargs, ) self.cone.shift(end) self.end_point = VectorizedPoint(end) self.add(self.end_point, self.cone) self.set_color(color) def get_end(self) -> np.ndarray: return self.end_point.get_center() class Torus(Surface): """A torus. Parameters ---------- major_radius Distance from the center of the tube to the center of the torus. minor_radius Radius of the tube. u_range The range of the ``u`` variable: ``(u_min, u_max)``. v_range The range of the ``v`` variable: ``(v_min, v_max)``. resolution The number of samples taken of the :class:`Torus`. A tuple can be used to define different resolutions for ``u`` and ``v`` respectively. Examples -------- .. manim :: ExampleTorus :save_last_frame: class ExampleTorus(ThreeDScene): def construct(self): axes = ThreeDAxes() torus = Torus() self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES) self.add(axes, torus) """ def __init__( self, major_radius: float = 3, minor_radius: float = 1, u_range: Sequence[float] = (0, TAU), v_range: Sequence[float] = (0, TAU), resolution: tuple[int, int] | None = None, **kwargs, ) -> None: if config.renderer == RendererType.OPENGL: res_value = (101, 101) elif config.renderer == RendererType.CAIRO: res_value = (24, 24) resolution = resolution if resolution is not None else res_value self.R = major_radius self.r = minor_radius super().__init__( self.func, u_range=u_range, v_range=v_range, resolution=resolution, **kwargs, ) def func(self, u: float, v: float) -> np.ndarray: """The z values defining the :class:`Torus` being plotted. Returns ------- :class:`numpy.ndarray` The z values defining the :class:`Torus`. """ P = np.array([np.cos(u), np.sin(u), 0]) return (self.R - self.r * np.cos(v)) * P - self.r * np.sin(v) * OUT ================================================ FILE: manim/mobject/types/__init__.py ================================================ """Specialized mobject base classes. Modules ======= .. autosummary:: :toctree: ../reference ~image_mobject ~point_cloud_mobject ~vectorized_mobject """ ================================================ FILE: manim/mobject/types/image_mobject.py ================================================ """Mobjects representing raster images.""" from __future__ import annotations __all__ = ["AbstractImageMobject", "ImageMobject", "ImageMobjectFromCamera"] import pathlib from typing import TYPE_CHECKING, Any import numpy as np from PIL import Image from PIL.Image import Resampling from manim.mobject.geometry.shape_matchers import SurroundingRectangle from ... import config from ...camera.moving_camera import MovingCamera from ...constants import * from ...mobject.mobject import Mobject from ...utils.bezier import interpolate from ...utils.color import WHITE, ManimColor, color_to_int_rgb from ...utils.images import change_to_rgba_array, get_full_raster_image_path __all__ = ["ImageMobject", "ImageMobjectFromCamera"] if TYPE_CHECKING: import numpy.typing as npt from typing_extensions import Self from manim.typing import PixelArray, StrPath from ...camera.moving_camera import MovingCamera class AbstractImageMobject(Mobject): """ Automatically filters out black pixels Parameters ---------- scale_to_resolution At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best. This is a custom parameter of ImageMobject so that rendering a scene with e.g. the ``--quality low`` or ``--quality medium`` flag for faster rendering won't effect the position of the image on the screen. """ def __init__( self, scale_to_resolution: int, pixel_array_dtype: str = "uint8", resampling_algorithm: Resampling = Resampling.BICUBIC, **kwargs: Any, ) -> None: self.pixel_array_dtype = pixel_array_dtype self.scale_to_resolution = scale_to_resolution self.set_resampling_algorithm(resampling_algorithm) super().__init__(**kwargs) def get_pixel_array(self) -> PixelArray: raise NotImplementedError() def set_color(self, color, alpha=None, family=True): # Likely to be implemented in subclasses, but no obligation pass def set_resampling_algorithm(self, resampling_algorithm: int) -> Self: """ Sets the interpolation method for upscaling the image. By default the image is interpolated using bicubic algorithm. This method lets you change it. Interpolation is done internally using Pillow, and the function besides the string constants describing the algorithm accepts the Pillow integer constants. Parameters ---------- resampling_algorithm An integer constant described in the Pillow library, or one from the RESAMPLING_ALGORITHMS global dictionary, under the following keys: * 'bicubic' or 'cubic' * 'nearest' or 'none' * 'box' * 'bilinear' or 'linear' * 'hamming' * 'lanczos' or 'antialias' """ if isinstance(resampling_algorithm, int): self.resampling_algorithm = resampling_algorithm else: raise ValueError( "resampling_algorithm has to be an int, one of the values defined in " "RESAMPLING_ALGORITHMS or a Pillow resampling filter constant. " "Available algorithms: 'bicubic', 'nearest', 'box', 'bilinear', " "'hamming', 'lanczos'.", ) return self def reset_points(self) -> None: """Sets :attr:`points` to be the four image corners.""" self.points = np.array( [ UP + LEFT, UP + RIGHT, DOWN + LEFT, DOWN + RIGHT, ], ) self.center() h, w = self.get_pixel_array().shape[:2] if self.scale_to_resolution: height = h / self.scale_to_resolution * config["frame_height"] else: height = 3 # this is the case for ImageMobjectFromCamera self.stretch_to_fit_height(height) self.stretch_to_fit_width(height * w / h) class ImageMobject(AbstractImageMobject): """Displays an Image from a numpy array or a file. Parameters ---------- scale_to_resolution At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best. This is a custom parameter of ImageMobject so that rendering a scene with e.g. the ``--quality low`` or ``--quality medium`` flag for faster rendering won't effect the position of the image on the screen. 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.height = 7 self.add(image) Changing interpolation style: .. manim:: ImageInterpolationEx :save_last_frame: class ImageInterpolationEx(Scene): def construct(self): img = ImageMobject(np.uint8([[63, 0, 0, 0], [0, 127, 0, 0], [0, 0, 191, 0], [0, 0, 0, 255] ])) img.height = 2 img1 = img.copy() img2 = img.copy() img3 = img.copy() img4 = img.copy() img5 = img.copy() img1.set_resampling_algorithm(RESAMPLING_ALGORITHMS["nearest"]) img2.set_resampling_algorithm(RESAMPLING_ALGORITHMS["lanczos"]) img3.set_resampling_algorithm(RESAMPLING_ALGORITHMS["linear"]) img4.set_resampling_algorithm(RESAMPLING_ALGORITHMS["cubic"]) img5.set_resampling_algorithm(RESAMPLING_ALGORITHMS["box"]) img1.add(Text("nearest").scale(0.5).next_to(img1,UP)) img2.add(Text("lanczos").scale(0.5).next_to(img2,UP)) img3.add(Text("linear").scale(0.5).next_to(img3,UP)) img4.add(Text("cubic").scale(0.5).next_to(img4,UP)) img5.add(Text("box").scale(0.5).next_to(img5,UP)) x= Group(img1,img2,img3,img4,img5) x.arrange() self.add(x) """ def __init__( self, filename_or_array: StrPath | npt.NDArray, scale_to_resolution: int = QUALITIES[DEFAULT_QUALITY]["pixel_height"], invert: bool = False, image_mode: str = "RGBA", **kwargs: Any, ) -> None: self.fill_opacity: float = 1 self.stroke_opacity: float = 1 self.invert_image = invert self.image_mode = image_mode if isinstance(filename_or_array, (str, pathlib.PurePath)): path = get_full_raster_image_path(filename_or_array) image = Image.open(path).convert(self.image_mode) self.pixel_array = np.array(image) self.path = path else: self.pixel_array = np.array(filename_or_array) self.pixel_array_dtype = kwargs.get("pixel_array_dtype", "uint8") self.pixel_array = change_to_rgba_array( self.pixel_array, self.pixel_array_dtype ) if self.invert_image: self.pixel_array[:, :, :3] = ( np.iinfo(self.pixel_array_dtype).max - self.pixel_array[:, :, :3] ) self.orig_alpha_pixel_array = self.pixel_array[:, :, 3].copy() super().__init__(scale_to_resolution, **kwargs) def get_pixel_array(self): """A simple getter method.""" return self.pixel_array def set_color(self, color, alpha=None, family=True): rgb = color_to_int_rgb(color) self.pixel_array[:, :, :3] = rgb if alpha is not None: self.pixel_array[:, :, 3] = int(255 * alpha) for submob in self.submobjects: submob.set_color(color, alpha, family) self.color = color return self def set_opacity(self, alpha: float) -> Self: """Sets the image's opacity. Parameters ---------- alpha The alpha value of the object, 1 being opaque and 0 being transparent. """ self.pixel_array[:, :, 3] = self.orig_alpha_pixel_array * alpha self.stroke_opacity = alpha return self def fade(self, darkness: float = 0.5, family: bool = True) -> Self: """Sets the image's opacity using a 1 - alpha relationship. Parameters ---------- darkness The alpha value of the object, 1 being transparent and 0 being opaque. family Whether the submobjects of the ImageMobject should be affected. """ self.set_opacity(1 - darkness) super().fade(darkness, family) return self def interpolate_color( self, mobject1: ImageMobject, mobject2: ImageMobject, alpha: float ) -> None: """Interpolates the array of pixel color values from one ImageMobject into an array of equal size in the target ImageMobject. Parameters ---------- mobject1 The ImageMobject to transform from. mobject2 The ImageMobject to transform into. alpha Used to track the lerp relationship. Not opacity related. """ assert mobject1.pixel_array.shape == mobject2.pixel_array.shape, ( f"Mobject pixel array shapes incompatible for interpolation.\n" f"Mobject 1 ({mobject1}) : {mobject1.pixel_array.shape}\n" f"Mobject 2 ({mobject2}) : {mobject2.pixel_array.shape}" ) self.fill_opacity = interpolate( mobject1.fill_opacity, mobject2.fill_opacity, alpha, ) self.stroke_opacity = interpolate( mobject1.stroke_opacity, mobject2.stroke_opacity, alpha, ) self.pixel_array = interpolate( mobject1.pixel_array, mobject2.pixel_array, alpha, ).astype(self.pixel_array_dtype) def get_style(self) -> dict[str, Any]: return { "fill_color": ManimColor(self.color.get_rgb()).to_hex(), "fill_opacity": self.fill_opacity, } # TODO, add the ability to have the dimensions/orientation of this # mobject more strongly tied to the frame of the camera it contains, # in the case where that's a MovingCamera class ImageMobjectFromCamera(AbstractImageMobject): def __init__( self, camera: MovingCamera, default_display_frame_config: dict[str, Any] | None = None, **kwargs: Any, ) -> None: self.camera = camera if default_display_frame_config is None: default_display_frame_config = { "stroke_width": 3, "stroke_color": WHITE, "buff": 0, } self.default_display_frame_config = default_display_frame_config self.pixel_array = self.camera.pixel_array super().__init__(scale_to_resolution=False, **kwargs) # TODO: Get rid of this. def get_pixel_array(self): self.pixel_array = self.camera.pixel_array return self.pixel_array def add_display_frame(self, **kwargs: Any) -> Self: config = dict(self.default_display_frame_config) config.update(kwargs) self.display_frame = SurroundingRectangle(self, **config) self.add(self.display_frame) return self def interpolate_color(self, mobject1, mobject2, alpha) -> None: assert mobject1.pixel_array.shape == mobject2.pixel_array.shape, ( f"Mobject pixel array shapes incompatible for interpolation.\n" f"Mobject 1 ({mobject1}) : {mobject1.pixel_array.shape}\n" f"Mobject 2 ({mobject2}) : {mobject2.pixel_array.shape}" ) self.pixel_array = interpolate( mobject1.pixel_array, mobject2.pixel_array, alpha, ).astype(self.pixel_array_dtype) ================================================ FILE: manim/mobject/types/point_cloud_mobject.py ================================================ """Mobjects representing point clouds.""" from __future__ import annotations __all__ = ["PMobject", "Mobject1D", "Mobject2D", "PGroup", "PointCloudDot", "Point"] from collections.abc import Callable from typing import TYPE_CHECKING, Any import numpy as np from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL from manim.mobject.opengl.opengl_point_cloud_mobject import OpenGLPMobject from ...constants import * from ...mobject.mobject import Mobject from ...utils.bezier import interpolate from ...utils.color import ( BLACK, WHITE, YELLOW, ManimColor, ParsableManimColor, color_gradient, color_to_rgba, rgba_to_color, ) from ...utils.iterables import stretch_array_to_length __all__ = ["PMobject", "Mobject1D", "Mobject2D", "PGroup", "PointCloudDot", "Point"] if TYPE_CHECKING: import numpy.typing as npt from typing_extensions import Self from manim.typing import ( FloatRGBA_Array, FloatRGBALike_Array, ManimFloat, Point3D_Array, Point3DLike, Point3DLike_Array, ) class PMobject(Mobject, metaclass=ConvertToOpenGL): """A disc made of a cloud of Dots Examples -------- .. manim:: PMobjectExample :save_last_frame: class PMobjectExample(Scene): def construct(self): pG = PGroup() # This is just a collection of PMobject's # As the scale factor increases, the number of points # removed increases. for sf in range(1, 9 + 1): p = PointCloudDot(density=20, radius=1).thin_out(sf) # PointCloudDot is a type of PMobject # and can therefore be added to a PGroup pG.add(p) # This organizes all the shapes in a grid. pG.arrange_in_grid() self.add(pG) """ def __init__(self, stroke_width: int = DEFAULT_STROKE_WIDTH, **kwargs: Any) -> None: self.stroke_width = stroke_width super().__init__(**kwargs) def reset_points(self) -> Self: self.rgbas: FloatRGBA_Array = np.zeros((0, 4)) self.points: Point3D_Array = np.zeros((0, 3)) return self def get_array_attrs(self) -> list[str]: return super().get_array_attrs() + ["rgbas"] def add_points( self, points: Point3DLike_Array, rgbas: FloatRGBALike_Array | None = None, color: ParsableManimColor | None = None, alpha: float = 1.0, ) -> Self: """Add points. Points must be a Nx3 numpy array. Rgbas must be a Nx4 numpy array if it is not None. """ if not isinstance(points, np.ndarray): points = np.array(points) num_new_points = len(points) self.points = np.append(self.points, points, axis=0) if rgbas is None: color = ManimColor(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 ValueError("points and rgbas must have same length") self.rgbas = np.append(self.rgbas, rgbas, axis=0) return self def set_color( self, color: ParsableManimColor = YELLOW, family: bool = True ) -> Self: rgba = color_to_rgba(color) mobs = self.family_members_with_points() if family else [self] for mob in mobs: mob.rgbas[:, :] = rgba self.color = ManimColor.parse(color) return self def get_stroke_width(self) -> int: return self.stroke_width def set_stroke_width(self, width: int, family: bool = True) -> Self: mobs = self.family_members_with_points() if family else [self] for mob in mobs: mob.stroke_width = width return self def set_color_by_gradient(self, *colors: ParsableManimColor) -> Self: self.rgbas = np.array( list(map(color_to_rgba, color_gradient(*colors, len(self.points)))), ) return self def set_colors_by_radial_gradient( self, center: Point3DLike | None = None, radius: float = 1, inner_color: ParsableManimColor = WHITE, outer_color: ParsableManimColor = BLACK, ) -> Self: start_rgba, end_rgba = list(map(color_to_rgba, [inner_color, outer_color])) if center is None: center = self.get_center() for mob in self.family_members_with_points(): distances = np.abs(self.points - center) alphas = np.linalg.norm(distances, axis=1) / radius mob.rgbas = np.array( np.array( [interpolate(start_rgba, end_rgba, alpha) for alpha in alphas], ), ) return self def match_colors(self, mobject: Mobject) -> Self: Mobject.align_data(self, mobject) self.rgbas = np.array(mobject.rgbas) return self def filter_out(self, condition: npt.NDArray) -> Self: for mob in self.family_members_with_points(): to_eliminate = ~np.apply_along_axis(condition, 1, mob.points) mob.points = mob.points[to_eliminate] mob.rgbas = mob.rgbas[to_eliminate] return self def thin_out(self, factor: int = 5) -> Self: """Removes all but every nth point for n = factor""" for mob in self.family_members_with_points(): num_points = self.get_num_points() mob.apply_over_attr_arrays( lambda arr, n=num_points: arr[np.arange(0, n, factor)], ) return self def sort_points( self, function: Callable[[npt.NDArray[ManimFloat]], float] = lambda p: p[0] ) -> Self: """Function is any map from R^3 to R""" for mob in self.family_members_with_points(): indices = np.argsort(np.apply_along_axis(function, 1, mob.points)) mob.apply_over_attr_arrays(lambda arr, idx=indices: arr[idx]) return self def fade_to( self, color: ParsableManimColor, alpha: float, family: bool = True ) -> Self: self.rgbas = interpolate(self.rgbas, color_to_rgba(color), alpha) for mob in self.submobjects: mob.fade_to(color, alpha, family) return self def get_all_rgbas(self) -> npt.NDArray: return self.get_merged_array("rgbas") def ingest_submobjects(self) -> Self: attrs = self.get_array_attrs() arrays = list(map(self.get_merged_array, attrs)) for attr, array in zip(attrs, arrays): setattr(self, attr, array) self.submobjects = [] return self def get_color(self) -> ManimColor: return rgba_to_color(self.rgbas[0, :]) def point_from_proportion(self, alpha: float) -> Any: index = alpha * (self.get_num_points() - 1) return self.points[np.floor(index)] @staticmethod def get_mobject_type_class() -> type[PMobject]: return PMobject # Alignment def align_points_with_larger(self, larger_mobject: Mobject) -> None: assert isinstance(larger_mobject, PMobject) self.apply_over_attr_arrays( lambda a: stretch_array_to_length(a, larger_mobject.get_num_points()), ) def get_point_mobject(self, center: Point3DLike | None = None) -> Point: if center is None: center = self.get_center() return Point(center) def interpolate_color( self, mobject1: Mobject, mobject2: Mobject, alpha: float ) -> Self: self.rgbas = interpolate(mobject1.rgbas, mobject2.rgbas, alpha) self.set_stroke_width( interpolate( mobject1.get_stroke_width(), mobject2.get_stroke_width(), alpha, ), ) return self def pointwise_become_partial(self, mobject: Mobject, a: float, b: float) -> None: lower_index, upper_index = (int(x * mobject.get_num_points()) for x in (a, b)) for attr in self.get_array_attrs(): full_array = getattr(mobject, attr) partial_array = full_array[lower_index:upper_index] setattr(self, attr, partial_array) # TODO, Make the two implementations below non-redundant class Mobject1D(PMobject, metaclass=ConvertToOpenGL): def __init__(self, density: int = DEFAULT_POINT_DENSITY_1D, **kwargs: Any) -> None: self.density = density self.epsilon = 1.0 / self.density super().__init__(**kwargs) def add_line( self, start: npt.NDArray, end: npt.NDArray, color: ParsableManimColor | None = None, ) -> None: start, end = list(map(np.array, [start, end])) length = np.linalg.norm(end - start) if length == 0: points = np.array([start]) else: epsilon = self.epsilon / length points = np.array( [interpolate(start, end, t) for t in np.arange(0, 1, epsilon)] ) self.add_points(points, color=color) class Mobject2D(PMobject, metaclass=ConvertToOpenGL): def __init__(self, density: int = DEFAULT_POINT_DENSITY_2D, **kwargs: Any) -> None: self.density = density self.epsilon = 1.0 / self.density super().__init__(**kwargs) class PGroup(PMobject): """A group for several point mobjects. Examples -------- .. manim:: PgroupExample :save_last_frame: class PgroupExample(Scene): def construct(self): p1 = PointCloudDot(radius=1, density=20, color=BLUE) p1.move_to(4.5 * LEFT) p2 = PointCloudDot() p3 = PointCloudDot(radius=1.5, stroke_width=2.5, color=PINK) p3.move_to(4.5 * RIGHT) pList = PGroup(p1, p2, p3) self.add(pList) """ def __init__(self, *pmobs: Any, **kwargs: Any) -> None: if not all(isinstance(m, (PMobject, OpenGLPMobject)) for m in pmobs): raise ValueError( "All submobjects must be of type PMobject or OpenGLPMObject" " if using the opengl renderer", ) super().__init__(**kwargs) self.add(*pmobs) def fade_to( self, color: ParsableManimColor, alpha: float, family: bool = True ) -> Self: if family: for mob in self.submobjects: mob.fade_to(color, alpha, family) return self class PointCloudDot(Mobject1D): """A disc made of a cloud of dots. Examples -------- .. manim:: PointCloudDotExample :save_last_frame: class PointCloudDotExample(Scene): def construct(self): cloud_1 = PointCloudDot(color=RED) cloud_2 = PointCloudDot(stroke_width=4, radius=1) cloud_3 = PointCloudDot(density=15) group = Group(cloud_1, cloud_2, cloud_3).arrange() self.add(group) .. manim:: PointCloudDotExample2 class PointCloudDotExample2(Scene): def construct(self): plane = ComplexPlane() cloud = PointCloudDot(color=RED) self.add( plane, cloud ) self.wait() self.play( cloud.animate.apply_complex_function(lambda z: np.exp(z)) ) """ def __init__( self, center: Point3DLike = ORIGIN, radius: float = 2.0, stroke_width: int = 2, density: int = DEFAULT_POINT_DENSITY_1D, color: ManimColor = YELLOW, **kwargs: Any, ) -> None: self.radius = radius self.epsilon = 1.0 / density super().__init__( stroke_width=stroke_width, density=density, color=color, **kwargs ) self.shift(center) def init_points(self) -> None: self.reset_points() self.generate_points() def generate_points(self) -> None: self.add_points( np.array( [ r * (np.cos(theta) * RIGHT + np.sin(theta) * UP) for r in np.arange(self.epsilon, self.radius, self.epsilon) # Num is equal to int(stop - start)/ (step + 1) reformulated. for theta in np.linspace( 0, 2 * np.pi, num=int(2 * np.pi * (r + self.epsilon) / self.epsilon), ) ] ), ) class Point(PMobject): """A mobject representing a point. Examples -------- .. manim:: ExamplePoint :save_last_frame: class ExamplePoint(Scene): def construct(self): colorList = [RED, GREEN, BLUE, YELLOW] for i in range(200): point = Point(location=[0.63 * np.random.randint(-4, 4), 0.37 * np.random.randint(-4, 4), 0], color=np.random.choice(colorList)) self.add(point) for i in range(200): point = Point(location=[0.37 * np.random.randint(-4, 4), 0.63 * np.random.randint(-4, 4), 0], color=np.random.choice(colorList)) self.add(point) self.add(point) """ def __init__( self, location: Point3DLike = ORIGIN, color: ManimColor = BLACK, **kwargs: Any ) -> None: self.location = location super().__init__(color=color, **kwargs) def init_points(self) -> None: self.reset_points() self.generate_points() self.set_points([self.location]) def generate_points(self) -> None: self.add_points(np.array([self.location])) ================================================ FILE: manim/opengl/__init__.py ================================================ from __future__ import annotations import contextlib with contextlib.suppress(ImportError): from dearpygui import dearpygui as dpg from manim.mobject.opengl.dot_cloud import * from manim.mobject.opengl.opengl_image_mobject import * from manim.mobject.opengl.opengl_mobject import * from manim.mobject.opengl.opengl_point_cloud_mobject import * from manim.mobject.opengl.opengl_surface import * from manim.mobject.opengl.opengl_three_dimensions import * from manim.mobject.opengl.opengl_vectorized_mobject import * from ..renderer.shader import * from ..utils.opengl import * ================================================ FILE: manim/plugins/__init__.py ================================================ from __future__ import annotations from manim._config import config, logger from manim.plugins.plugins_flags import get_plugins, list_plugins __all__ = [ "get_plugins", "list_plugins", ] requested_plugins: set[str] = set(config["plugins"]) missing_plugins = requested_plugins - set(get_plugins().keys()) if missing_plugins: logger.warning("Missing Plugins: %s", missing_plugins) ================================================ FILE: manim/plugins/plugins_flags.py ================================================ """Plugin Managing Utility""" from __future__ import annotations import sys from typing import Any if sys.version_info < (3, 10): from importlib_metadata import entry_points else: from importlib.metadata import entry_points from manim._config import console __all__ = ["list_plugins"] def get_plugins() -> dict[str, Any]: plugins: dict[str, Any] = { entry_point.name: entry_point.load() for entry_point in entry_points(group="manim.plugins") } return plugins def list_plugins() -> None: console.print("[green bold]Plugins:[/green bold]", justify="left") plugins = get_plugins() for plugin_name in plugins: console.print(f" • {plugin_name}") ================================================ FILE: manim/renderer/__init__.py ================================================ [Empty file] ================================================ FILE: manim/renderer/cairo_renderer.py ================================================ from __future__ import annotations from collections.abc import Iterable from typing import TYPE_CHECKING, Any import numpy as np from manim.utils.hashing import get_hash_from_play_call from .. import config, logger from ..camera.camera import Camera from ..mobject.mobject import Mobject, _AnimationBuilder from ..scene.scene_file_writer import SceneFileWriter from ..utils.exceptions import EndSceneEarlyException from ..utils.iterables import list_update if TYPE_CHECKING: from manim.animation.animation import Animation from manim.scene.scene import Scene from ..typing import PixelArray __all__ = ["CairoRenderer"] class CairoRenderer: """A renderer using Cairo. Attributes ---------- num_plays : int Number of play() functions in the scene. time : float Time elapsed since initialisation of scene. """ def __init__( self, file_writer_class: type[SceneFileWriter] = SceneFileWriter, camera_class: type[Camera] | None = None, skip_animations: bool = False, **kwargs: Any, ) -> None: # 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_. self._file_writer_class = file_writer_class camera_cls = camera_class if camera_class is not None else Camera self.camera = camera_cls() self._original_skipping_status = skip_animations self.skip_animations = skip_animations self.animations_hashes = [] self.num_plays = 0 self.time = 0 self.static_image = None def init_scene(self, scene: Scene) -> None: self.file_writer: Any = self._file_writer_class( self, scene.__class__.__name__, ) def play( self, scene: Scene, *args: Animation | Mobject | _AnimationBuilder, **kwargs, ): # Reset skip_animations to the original state. # Needed when rendering only some animations, and skipping others. self.skip_animations = self._original_skipping_status self.update_skipping_status() scene.compile_animation_data(*args, **kwargs) if self.skip_animations: logger.debug(f"Skipping animation {self.num_plays}") hash_current_animation = None self.time += scene.duration else: if config["disable_caching"]: logger.info("Caching disabled.") hash_current_animation = f"uncached_{self.num_plays:05}" else: hash_current_animation = get_hash_from_play_call( scene, self.camera, scene.animations, scene.mobjects, ) if self.file_writer.is_already_cached(hash_current_animation): logger.info( f"Animation {self.num_plays} : Using cached data (hash : %(hash_current_animation)s)", {"hash_current_animation": hash_current_animation}, ) self.skip_animations = True self.time += scene.duration # adding None as a partial movie file will make file_writer ignore the latter. self.file_writer.add_partial_movie_file(hash_current_animation) self.animations_hashes.append(hash_current_animation) logger.debug( "List of the first few animation hashes of the scene: %(h)s", {"h": str(self.animations_hashes[:5])}, ) self.file_writer.begin_animation(not self.skip_animations) scene.begin_animations() # Save a static image, to avoid rendering non moving objects. self.save_static_frame_data(scene, scene.static_mobjects) if scene.is_current_animation_frozen_frame(): self.update_frame(scene, mobjects=scene.moving_mobjects) # self.duration stands for the total run time of all the animations. # In this case, as there is only a wait, it will be the length of the wait. self.freeze_current_frame(scene.duration) else: scene.play_internal() self.file_writer.end_animation(not self.skip_animations) self.num_plays += 1 def update_frame( # TODO Description in Docstring self, scene: Scene, mobjects: Iterable[Mobject] | None = None, include_submobjects: bool = True, ignore_skipping: bool = True, **kwargs: Any, ) -> None: """Update the frame. Parameters ---------- scene mobjects list of mobjects include_submobjects ignore_skipping **kwargs """ if self.skip_animations and not ignore_skipping: return if not mobjects: mobjects = list_update( scene.mobjects, scene.foreground_mobjects, ) if self.static_image is not None: self.camera.set_frame_to_background(self.static_image) else: self.camera.reset() kwargs["include_submobjects"] = include_submobjects self.camera.capture_mobjects(mobjects, **kwargs) def render(self, scene, time, moving_mobjects): self.update_frame(scene, moving_mobjects) self.add_frame(self.get_frame()) def get_frame(self) -> PixelArray: """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 add_frame(self, frame: np.ndarray, num_frames: int = 1): """Adds a frame to the video_file_stream Parameters ---------- frame The frame to add, as a pixel array. num_frames The number of times to add frame. """ dt = 1 / self.camera.frame_rate if self.skip_animations: return self.time += num_frames * dt self.file_writer.write_frame(frame, num_frames=num_frames) def freeze_current_frame(self, duration: float): """Adds a static frame to the movie for a given duration. The static frame is the current frame. Parameters ---------- duration [description] """ dt = 1 / self.camera.frame_rate self.add_frame( self.get_frame(), num_frames=int(duration / dt), ) 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 save_static_frame_data( self, scene: Scene, static_mobjects: Iterable[Mobject], ) -> Iterable[Mobject] | None: """Compute and save the static frame, that will be reused at each frame to avoid unnecessarily computing static mobjects. Parameters ---------- scene The scene played. static_mobjects Static mobjects of the scene. If None, self.static_image is set to None. Returns ------- typing.Iterable[Mobject] The static image computed. """ self.static_image = None if not static_mobjects: return None self.update_frame(scene, mobjects=static_mobjects) self.static_image = self.get_frame() return self.static_image 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. """ # there is always at least one section -> no out of bounds here if self.file_writer.sections[-1].skip_animations: self.skip_animations = True if config["save_last_frame"]: self.skip_animations = True if ( config.from_animation_number > 0 and self.num_plays < config.from_animation_number ): self.skip_animations = True if ( config.upto_animation_number >= 0 and self.num_plays > config.upto_animation_number ): self.skip_animations = True raise EndSceneEarlyException() def scene_finished(self, scene: Scene) -> None: # If no animations in scene, render an image instead if self.num_plays: self.file_writer.finish() elif config.write_to_movie: config.save_last_frame = True config.write_to_movie = False else: self.static_image = None self.update_frame(scene) if config["save_last_frame"]: self.static_image = None self.update_frame(scene) self.file_writer.save_image(self.camera.get_image()) ================================================ FILE: manim/renderer/opengl_renderer.py ================================================ from __future__ import annotations import contextlib import itertools as it import time from functools import cached_property from typing import TYPE_CHECKING, Any import moderngl import numpy as np from PIL import Image from manim import config, logger from manim.mobject.opengl.opengl_mobject import ( OpenGLMobject, OpenGLPoint, _AnimationBuilder, ) from manim.mobject.opengl.opengl_vectorized_mobject import OpenGLVMobject from manim.utils.caching import handle_caching_play from manim.utils.color import color_to_rgba from manim.utils.exceptions import EndSceneEarlyException from ..constants import * from ..scene.scene_file_writer import SceneFileWriter from ..utils import opengl from ..utils.config_ops import _Data from ..utils.simple_functions import clip from ..utils.space_ops import ( angle_of_vector, quaternion_from_angle_axis, quaternion_mult, rotation_matrix_transpose, rotation_matrix_transpose_from_quaternion, ) from .shader import Mesh, Shader from .vectorized_mobject_rendering import ( render_opengl_vectorized_mobject_fill, render_opengl_vectorized_mobject_stroke, ) if TYPE_CHECKING: from typing_extensions import Self from manim.animation.animation import Animation from manim.mobject.mobject import Mobject from manim.scene.scene import Scene from manim.typing import Point3D __all__ = ["OpenGLCamera", "OpenGLRenderer"] class OpenGLCamera(OpenGLMobject): euler_angles = _Data() def __init__( self, frame_shape=None, center_point=None, # Theta, phi, gamma euler_angles=[0, 0, 0], focal_distance=2, light_source_position=[-10, 10, 10], orthographic=False, minimum_polar_angle=-PI / 2, maximum_polar_angle=PI / 2, model_matrix=None, **kwargs, ): self.use_z_index = True self.frame_rate = 60 self.orthographic = orthographic self.minimum_polar_angle = minimum_polar_angle self.maximum_polar_angle = maximum_polar_angle if self.orthographic: self.projection_matrix = opengl.orthographic_projection_matrix() self.unformatted_projection_matrix = opengl.orthographic_projection_matrix( format_=False, ) else: self.projection_matrix = opengl.perspective_projection_matrix() self.unformatted_projection_matrix = opengl.perspective_projection_matrix( format_=False, ) if frame_shape is None: self.frame_shape = (config["frame_width"], config["frame_height"]) else: self.frame_shape = frame_shape if center_point is None: self.center_point = ORIGIN else: self.center_point = center_point if model_matrix is None: model_matrix = opengl.translation_matrix(0, 0, 11) self.focal_distance = focal_distance if light_source_position is None: self.light_source_position = [-10, 10, 10] else: self.light_source_position = light_source_position self.light_source = OpenGLPoint(self.light_source_position) self.default_model_matrix = model_matrix super().__init__(model_matrix=model_matrix, should_render=False, **kwargs) if euler_angles is None: euler_angles = [0, 0, 0] euler_angles = np.array(euler_angles, dtype=float) self.euler_angles = euler_angles self.refresh_rotation_matrix() def get_position(self) -> Point3D: return self.model_matrix[:, 3][:3] def set_position(self, position): self.model_matrix[:, 3][:3] = position return self @cached_property def formatted_view_matrix(self): return opengl.matrix_to_shader_input(np.linalg.inv(self.model_matrix)) @cached_property def unformatted_view_matrix(self): return np.linalg.inv(self.model_matrix) def init_points(self): self.set_points([ORIGIN, LEFT, RIGHT, DOWN, UP]) self.set_width(self.frame_shape[0], stretch=True) self.set_height(self.frame_shape[1], stretch=True) self.move_to(self.center_point) def to_default_state(self) -> Self: self.center() self.set_height(config["frame_height"]) self.set_width(config["frame_width"]) self.set_euler_angles(0, 0, 0) self.model_matrix = self.default_model_matrix return self def refresh_rotation_matrix(self): # Rotate based on camera orientation theta, phi, gamma = self.euler_angles quat = quaternion_mult( quaternion_from_angle_axis(theta, OUT, axis_normalized=True), quaternion_from_angle_axis(phi, RIGHT, axis_normalized=True), quaternion_from_angle_axis(gamma, OUT, axis_normalized=True), ) self.inverse_rotation_matrix = rotation_matrix_transpose_from_quaternion(quat) def rotate(self, angle, axis=OUT, **kwargs): curr_rot_T = self.inverse_rotation_matrix added_rot_T = rotation_matrix_transpose(angle, axis) new_rot_T = np.dot(curr_rot_T, added_rot_T) Fz = new_rot_T[2] phi = np.arccos(Fz[2]) theta = angle_of_vector(Fz[:2]) + PI / 2 partial_rot_T = np.dot( rotation_matrix_transpose(phi, RIGHT), rotation_matrix_transpose(theta, OUT), ) gamma = angle_of_vector(np.dot(partial_rot_T, new_rot_T.T)[:, 0]) self.set_euler_angles(theta, phi, gamma) return self def set_euler_angles(self, theta=None, phi=None, gamma=None): if theta is not None: self.euler_angles[0] = theta if phi is not None: self.euler_angles[1] = phi if gamma is not None: self.euler_angles[2] = gamma self.refresh_rotation_matrix() return self def set_theta(self, theta: float) -> Self: return self.set_euler_angles(theta=theta) def set_phi(self, phi: float) -> Self: return self.set_euler_angles(phi=phi) def set_gamma(self, gamma: float) -> Self: return self.set_euler_angles(gamma=gamma) def increment_theta(self, dtheta: float) -> Self: self.euler_angles[0] += dtheta self.refresh_rotation_matrix() return self def increment_phi(self, dphi: float) -> Self: phi = self.euler_angles[1] new_phi = clip(phi + dphi, -PI / 2, PI / 2) self.euler_angles[1] = new_phi self.refresh_rotation_matrix() return self def increment_gamma(self, dgamma: float) -> Self: self.euler_angles[2] += dgamma self.refresh_rotation_matrix() return self def get_shape(self): return (self.get_width(), self.get_height()) def get_center(self): # Assumes first point is at the center return self.points[0] def get_width(self) -> float: points = self.points return points[2, 0] - points[1, 0] def get_height(self) -> float: points = self.points return points[4, 1] - points[3, 1] def get_focal_distance(self) -> float: return self.focal_distance * self.get_height() def interpolate(self, *args, **kwargs): super().interpolate(*args, **kwargs) self.refresh_rotation_matrix() class OpenGLRenderer: def __init__( self, file_writer_class: type[SceneFileWriter] = SceneFileWriter, skip_animations: bool = False, ) -> None: # Measured in pixel widths, used for vector graphics self.anti_alias_width = 1.5 self._file_writer_class = file_writer_class self._original_skipping_status = skip_animations self.skip_animations = skip_animations self.animation_start_time = 0 self.animation_elapsed_time = 0 self.time = 0 self.animations_hashes = [] self.num_plays = 0 self.camera = OpenGLCamera() self.pressed_keys = set() self.window = None # Initialize texture map. self.path_to_texture_id = {} self.background_color = config["background_color"] def init_scene(self, scene: Scene) -> None: self.partial_movie_files = [] self.file_writer: Any = self._file_writer_class( self, scene.__class__.__name__, ) self.scene = scene self.background_color = config["background_color"] if self.should_create_window(): from .opengl_renderer_window import Window self.window = Window(self) self.context = self.window.ctx self.frame_buffer_object = self.context.detect_framebuffer() else: # self.window = None try: self.context = moderngl.create_context(standalone=True) except Exception: self.context = moderngl.create_context( standalone=True, backend="egl", ) self.frame_buffer_object = self.get_frame_buffer_object(self.context, 0) self.frame_buffer_object.use() self.context.enable(moderngl.BLEND) self.context.wireframe = config["enable_wireframe"] self.context.blend_func = ( moderngl.SRC_ALPHA, moderngl.ONE_MINUS_SRC_ALPHA, moderngl.ONE, moderngl.ONE, ) def should_create_window(self): if config["force_window"]: logger.warning( "'--force_window' is enabled, this is intended for debugging purposes " "and may impact performance if used when outputting files", ) return True return ( config["preview"] and not config["save_last_frame"] and not config["format"] and not config["write_to_movie"] and not config["dry_run"] ) def get_pixel_shape(self): if hasattr(self, "frame_buffer_object"): return self.frame_buffer_object.viewport[2:4] else: return None def refresh_perspective_uniforms(self, camera): pw, ph = self.get_pixel_shape() fw, fh = camera.get_shape() # TODO, this should probably be a mobject uniform, with # the camera taking care of the conversion factor anti_alias_width = self.anti_alias_width / (ph / fh) # Orient light rotation = camera.inverse_rotation_matrix light_pos = camera.light_source.get_location() light_pos = np.dot(rotation, light_pos) self.perspective_uniforms = { "frame_shape": camera.get_shape(), "anti_alias_width": anti_alias_width, "camera_center": tuple(camera.get_center()), "camera_rotation": tuple(np.array(rotation).T.flatten()), "light_source_position": tuple(light_pos), "focal_distance": camera.get_focal_distance(), } def render_mobject(self, mobject): if isinstance(mobject, OpenGLVMobject): if config["use_projection_fill_shaders"]: render_opengl_vectorized_mobject_fill(self, mobject) if config["use_projection_stroke_shaders"]: render_opengl_vectorized_mobject_stroke(self, mobject) shader_wrapper_list = mobject.get_shader_wrapper_list() # Convert ShaderWrappers to Meshes. for shader_wrapper in shader_wrapper_list: shader = Shader(self.context, shader_wrapper.shader_folder) # Set textures. for name, path in shader_wrapper.texture_paths.items(): tid = self.get_texture_id(path) shader.shader_program[name].value = tid # Set uniforms. for name, value in it.chain( shader_wrapper.uniforms.items(), self.perspective_uniforms.items(), ): with contextlib.suppress(KeyError): shader.set_uniform(name, value) try: shader.set_uniform( "u_view_matrix", self.scene.camera.formatted_view_matrix ) shader.set_uniform( "u_projection_matrix", self.scene.camera.projection_matrix, ) except KeyError: pass # Set depth test. if shader_wrapper.depth_test: self.context.enable(moderngl.DEPTH_TEST) else: self.context.disable(moderngl.DEPTH_TEST) # Render. mesh = Mesh( shader, shader_wrapper.vert_data, indices=shader_wrapper.vert_indices, use_depth_test=shader_wrapper.depth_test, primitive=mobject.render_primitive, ) mesh.set_uniforms(self) mesh.render() def get_texture_id(self, path): if repr(path) not in self.path_to_texture_id: tid = len(self.path_to_texture_id) texture = self.context.texture( size=path.size, components=len(path.getbands()), data=path.tobytes(), ) texture.repeat_x = False texture.repeat_y = False texture.filter = (moderngl.NEAREST, moderngl.NEAREST) texture.swizzle = "RRR1" if path.mode == "L" else "RGBA" texture.use(location=tid) self.path_to_texture_id[repr(path)] = tid return self.path_to_texture_id[repr(path)] def update_skipping_status(self) -> None: """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. """ # there is always at least one section -> no out of bounds here if self.file_writer.sections[-1].skip_animations: self.skip_animations = True if ( config.from_animation_number > 0 and self.num_plays < config.from_animation_number ): self.skip_animations = True if ( config.upto_animation_number >= 0 and self.num_plays > config.upto_animation_number ): self.skip_animations = True raise EndSceneEarlyException() @handle_caching_play def play( self, scene: Scene, *args: Animation | Mobject | _AnimationBuilder, **kwargs: Any, ) -> None: # TODO: Handle data locking / unlocking. self.animation_start_time = time.time() self.file_writer.begin_animation(not self.skip_animations) scene.compile_animation_data(*args, **kwargs) scene.begin_animations() if scene.is_current_animation_frozen_frame(): self.update_frame(scene) if not self.skip_animations: self.file_writer.write_frame( self, num_frames=int(config.frame_rate * scene.duration) ) if self.window is not None: self.window.swap_buffers() while time.time() - self.animation_start_time < scene.duration: pass self.animation_elapsed_time = scene.duration else: scene.play_internal() self.file_writer.end_animation(not self.skip_animations) self.time += scene.duration self.num_plays += 1 def clear_screen(self) -> None: self.frame_buffer_object.clear(*self.background_color) self.window.swap_buffers() def render( self, scene: Scene, frame_offset, moving_mobjects: list[Mobject] ) -> None: self.update_frame(scene) if self.skip_animations: return self.file_writer.write_frame(self) if self.window is not None: self.window.swap_buffers() while self.animation_elapsed_time < frame_offset: self.update_frame(scene) self.window.swap_buffers() def update_frame(self, scene): self.frame_buffer_object.clear(*self.background_color) self.refresh_perspective_uniforms(scene.camera) for mobject in scene.mobjects: if not mobject.should_render: continue self.render_mobject(mobject) for obj in scene.meshes: for mesh in obj.get_meshes(): mesh.set_uniforms(self) mesh.render() self.animation_elapsed_time = time.time() - self.animation_start_time def scene_finished(self, scene): # When num_plays is 0, no images have been output, so output a single # image in this case if self.num_plays > 0: self.file_writer.finish() elif self.num_plays == 0 and config.write_to_movie: config.write_to_movie = False if self.should_save_last_frame(): config.save_last_frame = True self.update_frame(scene) self.file_writer.save_image(self.get_image()) def should_save_last_frame(self): if config["save_last_frame"]: return True if self.scene.interactive_mode: return False return self.num_plays == 0 def get_image(self) -> Image.Image: """Returns an image from the current frame. The first argument passed to image represents the mode RGB with the alpha channel A. The data we read is from the currently bound frame buffer. We pass in 'raw' as the name of the decoder, 0 and -1 args are specifically used for the decoder tand represent the stride and orientation. 0 means there is no padding expected between bytes and -1 represents the orientation and means the first line of the image is the bottom line on the screen. Returns ------- PIL.Image The PIL image of the array. """ raw_buffer_data = self.get_raw_frame_buffer_object_data() image = Image.frombytes( "RGBA", self.get_pixel_shape(), raw_buffer_data, "raw", "RGBA", 0, -1, ) return image def save_static_frame_data(self, scene, static_mobjects): pass def get_frame_buffer_object(self, context, samples=0): pixel_width = config["pixel_width"] pixel_height = config["pixel_height"] num_channels = 4 return context.framebuffer( color_attachments=context.texture( (pixel_width, pixel_height), components=num_channels, samples=samples, ), depth_attachment=context.depth_renderbuffer( (pixel_width, pixel_height), samples=samples, ), ) def get_raw_frame_buffer_object_data(self, dtype="f1"): # Copy blocks from the fbo_msaa to the drawn fbo using Blit # pw, ph = self.get_pixel_shape() # gl.glBindFramebuffer(gl.GL_READ_FRAMEBUFFER, self.fbo_msaa.glo) # gl.glBindFramebuffer(gl.GL_DRAW_FRAMEBUFFER, self.fbo.glo) # gl.glBlitFramebuffer( # 0, 0, pw, ph, 0, 0, pw, ph, gl.GL_COLOR_BUFFER_BIT, gl.GL_LINEAR # ) num_channels = 4 ret = self.frame_buffer_object.read( viewport=self.frame_buffer_object.viewport, components=num_channels, dtype=dtype, ) return ret def get_frame(self): # get current pixel values as numpy data in order to test output raw = self.get_raw_frame_buffer_object_data(dtype="f1") pixel_shape = self.get_pixel_shape() result_dimensions = (pixel_shape[1], pixel_shape[0], 4) np_buf = np.frombuffer(raw, dtype="uint8").reshape(result_dimensions) np_buf = np.flipud(np_buf) return np_buf # Returns offset from the bottom left corner in pixels. # top_left flag should be set to True when using a GUI framework # where the (0,0) is at the top left: e.g. PySide6 def pixel_coords_to_space_coords( self, px: float, py: float, relative: bool = False, top_left: bool = False ) -> Point3D: pixel_shape = self.get_pixel_shape() if pixel_shape is None: return np.array([0, 0, 0]) pw, ph = pixel_shape fh = config["frame_height"] fc = self.camera.get_center() if relative: return 2 * np.array([px / pw, py / ph, 0]) else: # Only scale wrt one axis scale = fh / ph return fc + scale * np.array( [(px - pw / 2), (-1 if top_left else 1) * (py - ph / 2), 0] ) @property def background_color(self): return self._background_color @background_color.setter def background_color(self, value): self._background_color = color_to_rgba(value, 1.0) ================================================ FILE: manim/renderer/opengl_renderer_window.py ================================================ from __future__ import annotations from typing import TYPE_CHECKING, Any import moderngl_window as mglw from moderngl_window.context.pyglet.window import Window as PygletWindow from moderngl_window.timers.clock import Timer from screeninfo import Monitor, get_monitors from .. import __version__, config if TYPE_CHECKING: from .opengl_renderer import OpenGLRenderer __all__ = ["Window"] class Window(PygletWindow): fullscreen = False resizable = True gl_version = (3, 3) vsync = True cursor = True def __init__( self, renderer: OpenGLRenderer, window_size: str = config.window_size, **kwargs: Any, ) -> None: monitors = get_monitors() mon_index = config.window_monitor monitor = monitors[min(mon_index, len(monitors) - 1)] if window_size == "default": # make window_width half the width of the monitor # but make it full screen if --fullscreen window_width = monitor.width if not config.fullscreen: window_width //= 2 # by default window_height = 9/16 * window_width window_height = int( window_width * config.frame_height // config.frame_width, ) size = (window_width, window_height) elif len(window_size.split(",")) == 2: (window_width, window_height) = tuple(map(int, window_size.split(","))) size = (window_width, window_height) else: raise ValueError( "Window_size must be specified as 'width,height' or 'default'.", ) super().__init__(size=size) self.title = f"Manim Community {__version__}" self.size = size self.renderer = renderer mglw.activate_context(window=self) self.timer = Timer() self.config = mglw.WindowConfig(ctx=self.ctx, wnd=self, timer=self.timer) self.timer.start() self.swap_buffers() initial_position = self.find_initial_position(size, monitor) self.position = initial_position # Delegate event handling to scene. def on_mouse_motion(self, x: int, y: int, dx: int, dy: int) -> None: super().on_mouse_motion(x, y, dx, dy) point = self.renderer.pixel_coords_to_space_coords(x, y) d_point = self.renderer.pixel_coords_to_space_coords(dx, dy, relative=True) self.renderer.scene.on_mouse_motion(point, d_point) def on_mouse_scroll(self, x: int, y: int, x_offset: float, y_offset: float) -> None: super().on_mouse_scroll(x, y, x_offset, y_offset) point = self.renderer.pixel_coords_to_space_coords(x, y) offset = self.renderer.pixel_coords_to_space_coords( x_offset, y_offset, relative=True, ) self.renderer.scene.on_mouse_scroll(point, offset) def on_key_press(self, symbol: int, modifiers: int) -> bool: self.renderer.pressed_keys.add(symbol) event_handled: bool = super().on_key_press(symbol, modifiers) self.renderer.scene.on_key_press(symbol, modifiers) return event_handled def on_key_release(self, symbol: int, modifiers: int) -> None: if symbol in self.renderer.pressed_keys: self.renderer.pressed_keys.remove(symbol) super().on_key_release(symbol, modifiers) self.renderer.scene.on_key_release(symbol, modifiers) def on_mouse_drag( self, x: int, y: int, dx: int, dy: int, buttons: int, modifiers: int ) -> None: super().on_mouse_drag(x, y, dx, dy, buttons, modifiers) point = self.renderer.pixel_coords_to_space_coords(x, y) d_point = self.renderer.pixel_coords_to_space_coords(dx, dy, relative=True) self.renderer.scene.on_mouse_drag(point, d_point, buttons, modifiers) def find_initial_position( self, size: tuple[int, int], monitor: Monitor ) -> tuple[int, int]: custom_position = config.window_position window_width, window_height = size # Position might be specified with a string of the form x,y for integers x and y if len(custom_position) == 1: raise ValueError( "window_position must specify both Y and X positions (Y/X -> UR). Also accepts LEFT/RIGHT/ORIGIN/UP/DOWN.", ) # in the form Y/X (UR) if custom_position in ["LEFT", "RIGHT"]: custom_position = "O" + custom_position[0] elif custom_position in ["UP", "DOWN"]: custom_position = custom_position[0] + "O" elif custom_position == "ORIGIN": custom_position = "O" * 2 elif "," in custom_position: pos_y, pos_x = tuple(map(int, custom_position.split(","))) return (pos_x, pos_y) # Alternatively, it might be specified with a string like # UR, OO, DL, etc. specifying what corner it should go to char_to_n = {"L": 0, "U": 0, "O": 1, "R": 2, "D": 2} width_diff: int = monitor.width - window_width height_diff: int = monitor.height - window_height return ( monitor.x + char_to_n[custom_position[1]] * width_diff // 2, -monitor.y + char_to_n[custom_position[0]] * height_diff // 2, ) def on_mouse_press(self, x: int, y: int, button: int, modifiers: int) -> None: super().on_mouse_press(x, y, button, modifiers) point = self.renderer.pixel_coords_to_space_coords(x, y) mouse_button_map = { 1: "LEFT", 2: "MOUSE", 4: "RIGHT", } self.renderer.scene.on_mouse_press(point, mouse_button_map[button], modifiers) ================================================ FILE: manim/renderer/shader.py ================================================ from __future__ import annotations import contextlib import inspect import re import textwrap from collections.abc import Callable, Iterator, Sequence from pathlib import Path from typing import TYPE_CHECKING, Any import moderngl import numpy as np import numpy.typing as npt from typing_extensions import Self, TypeAlias if TYPE_CHECKING: from manim.renderer.opengl_renderer import OpenGLRenderer MeshTimeBasedUpdater: TypeAlias = Callable[["Object3D", float], None] MeshNonTimeBasedUpdater: TypeAlias = Callable[["Object3D"], None] MeshUpdater: TypeAlias = MeshNonTimeBasedUpdater | MeshTimeBasedUpdater from manim.typing import MatrixMN, Point3D from .. import config from ..utils import opengl SHADER_FOLDER = Path(__file__).parent / "shaders" shader_program_cache: dict[str, moderngl.Program] = {} file_path_to_code_map: dict[Path, str] = {} __all__ = [ "Object3D", "Mesh", "Shader", "FullScreenQuad", ] def get_shader_code_from_file(file_path: Path) -> str: if file_path in file_path_to_code_map: return file_path_to_code_map[file_path] source = file_path.read_text() include_lines = re.finditer( r"^#include (?P.*\.glsl)$", source, flags=re.MULTILINE, ) for match in include_lines: include_path = match.group("include_path") included_code = get_shader_code_from_file( file_path.parent / include_path, ) source = source.replace(match.group(0), included_code) file_path_to_code_map[file_path] = source return source def filter_attributes( unfiltered_attributes: npt.NDArray, attributes: Sequence[str] ) -> npt.NDArray: # Construct attributes for only those needed by the shader. filtered_attributes_dtype = [] for i, dtype_name in enumerate(unfiltered_attributes.dtype.names): if dtype_name in attributes: filtered_attributes_dtype.append( ( dtype_name, unfiltered_attributes.dtype[i].subdtype[0].str, unfiltered_attributes.dtype[i].shape, ), ) filtered_attributes = np.zeros( unfiltered_attributes[unfiltered_attributes.dtype.names[0]].shape[0], dtype=filtered_attributes_dtype, ) for dtype_name in unfiltered_attributes.dtype.names: if dtype_name in attributes: filtered_attributes[dtype_name] = unfiltered_attributes[dtype_name] return filtered_attributes class Object3D: def __init__(self, *children: Object3D): self.model_matrix = np.eye(4) self.normal_matrix = np.eye(4) self.children: list[Object3D] = [] self.parent: Object3D | None = None self.add(*children) self.init_updaters() # TODO: Use path_func. def interpolate(self, start: Object3D, end: Object3D, alpha: float, _: Any) -> None: self.model_matrix = (1 - alpha) * start.model_matrix + alpha * end.model_matrix self.normal_matrix = ( 1 - alpha ) * start.normal_matrix + alpha * end.normal_matrix def single_copy(self) -> Object3D: copy = Object3D() copy.model_matrix = self.model_matrix.copy() copy.normal_matrix = self.normal_matrix.copy() return copy def copy(self) -> Object3D: node_to_copy = {} bfs = [self] while bfs: node = bfs.pop(0) bfs.extend(node.children) node_copy = node.single_copy() node_to_copy[node] = node_copy # Add the copy to the copy of the parent. if node.parent is not None and node is not self: node_to_copy[node.parent].add(node_copy) return node_to_copy[self] def add(self, *children: Object3D) -> None: for child in children: if child.parent is not None: raise Exception( "Attempt to add child that's already added to another Object3D", ) self.remove(*children, current_children_only=False) self.children.extend(children) for child in children: child.parent = self def remove(self, *children: Object3D, current_children_only: bool = True) -> None: if current_children_only: for child in children: if child.parent != self: raise Exception( "Attempt to remove child that isn't added to this Object3D", ) self.children = list(filter(lambda child: child not in children, self.children)) for child in children: child.parent = None def get_position(self) -> Point3D: return self.model_matrix[:, 3][:3] def set_position(self, position: Point3D) -> Self: self.model_matrix[:, 3][:3] = position return self def get_meshes(self) -> Iterator[Mesh]: dfs = [self] while dfs: parent = dfs.pop() if isinstance(parent, Mesh): yield parent dfs.extend(parent.children) def get_family(self) -> Iterator[Object3D]: dfs = [self] while dfs: parent = dfs.pop() yield parent dfs.extend(parent.children) def align_data_and_family(self, _: Any) -> None: pass def hierarchical_model_matrix(self) -> MatrixMN: if self.parent is None: return self.model_matrix model_matrices = [self.model_matrix] current_object = self while current_object.parent is not None: model_matrices.append(current_object.parent.model_matrix) current_object = current_object.parent return np.linalg.multi_dot(list(reversed(model_matrices))) def hierarchical_normal_matrix(self) -> MatrixMN: if self.parent is None: return self.normal_matrix[:3, :3] normal_matrices = [self.normal_matrix] current_object = self while current_object.parent is not None: normal_matrices.append(current_object.parent.model_matrix) current_object = current_object.parent return np.linalg.multi_dot(list(reversed(normal_matrices)))[:3, :3] def init_updaters(self) -> None: self.time_based_updaters: list[MeshTimeBasedUpdater] = [] self.non_time_updaters: list[MeshNonTimeBasedUpdater] = [] self.has_updaters = False self.updating_suspended = False def update(self, dt: float = 0) -> Self: if not self.has_updaters or self.updating_suspended: return self for time_based_updater in self.time_based_updaters: time_based_updater(self, dt) for non_time_based_updater in self.non_time_updaters: non_time_based_updater(self) return self def get_time_based_updaters(self) -> list[MeshTimeBasedUpdater]: return self.time_based_updaters def has_time_based_updater(self) -> bool: return len(self.time_based_updaters) > 0 def get_updaters(self) -> list[MeshUpdater]: return self.time_based_updaters + self.non_time_updaters def add_updater( self, update_function: MeshUpdater, index: int | None = None, call_updater: bool = True, ) -> Self: if "dt" in inspect.signature(update_function).parameters: self._add_time_based_updater(update_function, index) # type: ignore[arg-type] else: self._add_non_time_updater(update_function, index) # type: ignore[arg-type] self.refresh_has_updater_status() if call_updater: self.update() return self def _add_time_based_updater( self, update_function: MeshTimeBasedUpdater, index: int | None = None ) -> None: if index is None: self.time_based_updaters.append(update_function) else: self.time_based_updaters.insert(index, update_function) def _add_non_time_updater( self, update_function: MeshNonTimeBasedUpdater, index: int | None = None ) -> None: if index is None: self.non_time_updaters.append(update_function) else: self.non_time_updaters.insert(index, update_function) def remove_updater(self, update_function: MeshUpdater) -> Self: while update_function in self.time_based_updaters: self.time_based_updaters.remove(update_function) # type: ignore[arg-type] while update_function in self.non_time_updaters: self.non_time_updaters.remove(update_function) # type: ignore[arg-type] self.refresh_has_updater_status() return self def clear_updaters(self) -> Self: self.time_based_updaters = [] self.non_time_updaters = [] self.refresh_has_updater_status() return self def match_updaters(self, mesh: Object3D) -> Self: self.clear_updaters() for updater in mesh.get_updaters(): self.add_updater(updater) return self def suspend_updating(self) -> Self: self.updating_suspended = True return self def resume_updating(self, call_updater: bool = True) -> Self: self.updating_suspended = False if call_updater: self.update(dt=0) return self def refresh_has_updater_status(self) -> Self: self.has_updaters = len(self.get_updaters()) > 0 return self class Mesh(Object3D): def __init__( self, shader: Shader | None = None, attributes: npt.NDArray | None = None, geometry: Mesh | None = None, material: Shader | None = None, indices: npt.NDArray | None = None, use_depth_test: bool = True, primitive: int = moderngl.TRIANGLES, ): super().__init__() if shader is not None and attributes is not None: self.shader: Shader = shader self.attributes = attributes self.indices = indices elif geometry is not None and material is not None: self.shader = material self.attributes = geometry.attributes self.indices = geometry.indices else: raise Exception( "Mesh requires either attributes and a Shader or a Geometry and a " "Material", ) self.use_depth_test = use_depth_test self.primitive = primitive self.skip_render: bool = False self.init_updaters() def single_copy(self) -> Mesh: copy = Mesh( attributes=self.attributes.copy(), shader=self.shader, indices=self.indices.copy() if self.indices is not None else None, use_depth_test=self.use_depth_test, primitive=self.primitive, ) copy.skip_render = self.skip_render copy.model_matrix = self.model_matrix.copy() copy.normal_matrix = self.normal_matrix.copy() # TODO: Copy updaters? return copy def set_uniforms(self, renderer: OpenGLRenderer) -> None: self.shader.set_uniform( "u_model_matrix", opengl.matrix_to_shader_input(self.model_matrix), ) self.shader.set_uniform("u_view_matrix", renderer.camera.formatted_view_matrix) self.shader.set_uniform( "u_projection_matrix", renderer.camera.projection_matrix, ) def render(self) -> None: if self.skip_render: return if self.use_depth_test: self.shader.context.enable(moderngl.DEPTH_TEST) else: self.shader.context.disable(moderngl.DEPTH_TEST) shader_attribute_names: list[str] = [] for member_name, member in self.shader.shader_program._members.items(): if isinstance(member, moderngl.Attribute): shader_attribute_names.append(member_name) filtered_shader_attributes = filter_attributes( self.attributes, shader_attribute_names ) vertex_buffer_object = self.shader.context.buffer( filtered_shader_attributes.tobytes() ) if self.indices is None: index_buffer_object = None else: vert_index_data = self.indices.astype("i4").tobytes() if vert_index_data: index_buffer_object = self.shader.context.buffer(vert_index_data) else: index_buffer_object = None vertex_array_object = self.shader.context.simple_vertex_array( self.shader.shader_program, vertex_buffer_object, *filtered_shader_attributes.dtype.names, index_buffer=index_buffer_object, ) vertex_array_object.render(self.primitive) vertex_buffer_object.release() vertex_array_object.release() if index_buffer_object is not None: index_buffer_object.release() class Shader: def __init__( self, context: moderngl.Context, name: str | None = None, source: dict[str, Any] | None = None, ): global shader_program_cache self.context = context self.name = name self.source = source # See if the program is cached. if ( self.name in shader_program_cache and shader_program_cache[self.name].ctx == self.context ): self.shader_program = shader_program_cache[self.name] elif self.source is not None: # Generate the shader from inline code if it was passed. self.shader_program = context.program(**self.source) elif self.name is not None: # Search for a file containing the shader. source_dict = {} source_dict_key = { "vert": "vertex_shader", "frag": "fragment_shader", "geom": "geometry_shader", } shader_folder = SHADER_FOLDER / self.name for shader_file in shader_folder.iterdir(): shader_file_path = shader_folder / shader_file shader_source = get_shader_code_from_file(shader_file_path) source_dict[source_dict_key[shader_file_path.stem]] = shader_source self.shader_program = context.program(**source_dict) else: raise Exception("Must either pass shader name or shader source.") # Cache the shader. if self.name is not None and self.name not in shader_program_cache: shader_program_cache[self.name] = self.shader_program def set_uniform(self, name: str, value: Any) -> None: with contextlib.suppress(KeyError): self.shader_program[name] = value class FullScreenQuad(Mesh): def __init__( self, context: moderngl.Context, fragment_shader_source: str | None = None, fragment_shader_name: str | None = None, ): if fragment_shader_source is None and fragment_shader_name is None: raise Exception("Must either pass shader name or shader source.") if fragment_shader_name is not None: # Use the name. shader_file_path = SHADER_FOLDER / f"{fragment_shader_name}.frag" fragment_shader_source = get_shader_code_from_file(shader_file_path) elif fragment_shader_source is not None: fragment_shader_source = textwrap.dedent(fragment_shader_source.lstrip()) shader = Shader( context, source={ "vertex_shader": """ #version 330 in vec4 in_vert; uniform mat4 u_model_view_matrix; uniform mat4 u_projection_matrix; void main() {{ vec4 camera_space_vertex = u_model_view_matrix * in_vert; vec4 clip_space_vertex = u_projection_matrix * camera_space_vertex; gl_Position = clip_space_vertex; }} """, "fragment_shader": fragment_shader_source, }, ) attributes = np.zeros(6, dtype=[("in_vert", np.float32, (4,))]) attributes["in_vert"] = np.array( [ [-config["frame_x_radius"], -config["frame_y_radius"], 0, 1], [-config["frame_x_radius"], config["frame_y_radius"], 0, 1], [config["frame_x_radius"], config["frame_y_radius"], 0, 1], [-config["frame_x_radius"], -config["frame_y_radius"], 0, 1], [config["frame_x_radius"], -config["frame_y_radius"], 0, 1], [config["frame_x_radius"], config["frame_y_radius"], 0, 1], ], ) shader.set_uniform("u_model_view_matrix", opengl.view_matrix()) shader.set_uniform( "u_projection_matrix", opengl.orthographic_projection_matrix(), ) super().__init__(shader, attributes) def render(self) -> None: super().render() ================================================ FILE: manim/renderer/shader_wrapper.py ================================================ from __future__ import annotations import copy import logging import re from collections.abc import Mapping, Sequence from pathlib import Path from typing import TYPE_CHECKING import moderngl import numpy as np import numpy.typing as npt from typing_extensions import Self, TypeAlias if TYPE_CHECKING: from manim.typing import FloatRGBLike_Array # Mobjects that should be rendered with # the same shader will be organized and # clumped together based on keeping track # of a dict holding all the relevant information # to that shader __all__ = ["ShaderWrapper"] logger = logging.getLogger("manim") def get_shader_dir(): return Path(__file__).parent / "shaders" def find_file(file_name: Path, directories: list[Path]) -> Path: # Check if what was passed in is already a valid path to a file if file_name.exists(): return file_name possible_paths = (directory / file_name for directory in directories) for path in possible_paths: if path.exists(): return path else: logger.debug(f"{path} does not exist.") raise OSError(f"{file_name} not Found") _ShaderDType: TypeAlias = np.void _ShaderData: TypeAlias = npt.NDArray[_ShaderDType] class ShaderWrapper: def __init__( self, vert_data: _ShaderData = None, vert_indices: Sequence[int] | None = None, shader_folder: Path | str | None = None, # A dictionary mapping names of uniform variables uniforms: dict[str, float | tuple[float, ...]] | None = None, # A dictionary mapping names to filepaths for textures. texture_paths: Mapping[str, Path | str] | None = None, depth_test: bool = False, render_primitive: int | str = moderngl.TRIANGLE_STRIP, ): self.vert_data: _ShaderData = vert_data self.vert_indices: Sequence[int] | None = vert_indices self.vert_attributes: tuple[str, ...] | None = vert_data.dtype.names self.shader_folder: Path = Path(shader_folder or "") self.uniforms: dict[str, float | tuple[float, ...]] = uniforms or {} self.texture_paths: Mapping[str, str | Path] = texture_paths or {} self.depth_test: bool = depth_test self.render_primitive: str = str(render_primitive) self.init_program_code() self.refresh_id() def copy(self): result = copy.copy(self) result.vert_data = np.array(self.vert_data) if result.vert_indices is not None: result.vert_indices = np.array(self.vert_indices) if self.uniforms: result.uniforms = dict(self.uniforms) if self.texture_paths: result.texture_paths = dict(self.texture_paths) return result def is_valid(self) -> bool: return all( [ self.vert_data is not None, self.program_code["vertex_shader"] is not None, self.program_code["fragment_shader"] is not None, ], ) def get_id(self) -> str: return self.id def get_program_id(self) -> int: return self.program_id def create_id(self): # A unique id for a shader return "|".join( map( str, [ self.program_id, self.uniforms, self.texture_paths, self.depth_test, self.render_primitive, ], ), ) def refresh_id(self) -> None: self.program_id: int = self.create_program_id() self.id: str = self.create_id() def create_program_id(self): return hash( "".join( self.program_code[f"{name}_shader"] or "" for name in ("vertex", "geometry", "fragment") ), ) def init_program_code(self): def get_code(name: str) -> str | None: return get_shader_code_from_file( self.shader_folder / f"{name}.glsl", ) self.program_code: dict[str, str | None] = { "vertex_shader": get_code("vert"), "geometry_shader": get_code("geom"), "fragment_shader": get_code("frag"), } def get_program_code(self): return self.program_code def replace_code(self, old: str, new: str) -> None: code_map = self.program_code for name, _code in code_map.items(): if code_map[name] is None: continue code_map[name] = re.sub(old, new, code_map[name]) self.refresh_id() def combine_with(self, *shader_wrappers: "ShaderWrapper") -> Self: # noqa: UP037 # Assume they are of the same type if len(shader_wrappers) == 0: return self if self.vert_indices is not None: num_verts = len(self.vert_data) indices_list = [self.vert_indices] data_list = [self.vert_data] for sw in shader_wrappers: indices_list.append(sw.vert_indices + num_verts) data_list.append(sw.vert_data) num_verts += len(sw.vert_data) self.vert_indices = np.hstack(indices_list) self.vert_data = np.hstack(data_list) else: self.vert_data = np.hstack( [self.vert_data, *(sw.vert_data for sw in shader_wrappers)], ) return self # For caching filename_to_code_map: dict = {} def get_shader_code_from_file(filename: Path) -> str | None: if filename in filename_to_code_map: return filename_to_code_map[filename] try: filepath = find_file( filename, directories=[get_shader_dir(), Path("/")], ) except OSError: return None result = filepath.read_text() # To share functionality between shaders, some functions are read in # from other files an inserted into the relevant strings before # passing to ctx.program for compiling # Replace "#INSERT " lines with relevant code insertions = re.findall( r"^#include ../include/.*\.glsl$", result, flags=re.MULTILINE, ) for line in insertions: inserted_code = get_shader_code_from_file( Path() / "include" / line.replace("#include ../include/", ""), ) if inserted_code is None: return None result = result.replace(line, inserted_code) filename_to_code_map[filename] = result return result def get_colormap_code(rgb_list: FloatRGBLike_Array) -> str: data = ",".join("vec3({}, {}, {})".format(*rgb) for rgb in rgb_list) return f"vec3[{len(rgb_list)}]({data})" ================================================ FILE: manim/renderer/vectorized_mobject_rendering.py ================================================ from __future__ import annotations from collections import defaultdict from collections.abc import Iterable, Sequence from typing import TYPE_CHECKING import numpy as np if TYPE_CHECKING: from manim.renderer.opengl_renderer import ( OpenGLRenderer, OpenGLVMobject, ) from manim.typing import MatrixMN from ..utils import opengl from ..utils.space_ops import cross2d, earclip_triangulation from .shader import Shader __all__ = [ "render_opengl_vectorized_mobject_fill", "render_opengl_vectorized_mobject_stroke", ] def build_matrix_lists( mob: OpenGLVMobject, ) -> defaultdict[tuple[float, ...], list[OpenGLVMobject]]: root_hierarchical_matrix = mob.hierarchical_model_matrix() matrix_to_mobject_list = defaultdict(list) if mob.has_points(): matrix_to_mobject_list[tuple(root_hierarchical_matrix.ravel())].append(mob) mobject_to_hierarchical_matrix = {mob: root_hierarchical_matrix} dfs = [mob] while dfs: parent = dfs.pop() for child in parent.submobjects: child_hierarchical_matrix = ( mobject_to_hierarchical_matrix[parent] @ child.model_matrix ) mobject_to_hierarchical_matrix[child] = child_hierarchical_matrix if child.has_points(): matrix_to_mobject_list[tuple(child_hierarchical_matrix.ravel())].append( child, ) dfs.append(child) return matrix_to_mobject_list def render_opengl_vectorized_mobject_fill( renderer: OpenGLRenderer, mobject: OpenGLVMobject ) -> None: matrix_to_mobject_list = build_matrix_lists(mobject) for matrix_tuple, mobject_list in matrix_to_mobject_list.items(): model_matrix = np.array(matrix_tuple).reshape((4, 4)) render_mobject_fills_with_matrix(renderer, model_matrix, mobject_list) def render_mobject_fills_with_matrix( renderer: OpenGLRenderer, model_matrix: MatrixMN, mobjects: Iterable[OpenGLVMobject], ) -> None: # Precompute the total number of vertices for which to reserve space. # Note that triangulate_mobject() will cache its results. total_size = 0 for submob in mobjects: total_size += triangulate_mobject(submob).shape[0] attributes = np.empty( total_size, dtype=[ ("in_vert", np.float32, (3,)), ("in_color", np.float32, (4,)), ("texture_coords", np.float32, (2,)), ("texture_mode", np.int32), ], ) write_offset = 0 for submob in mobjects: if not submob.has_points(): continue mobject_triangulation = triangulate_mobject(submob) end_offset = write_offset + mobject_triangulation.shape[0] attributes[write_offset:end_offset] = mobject_triangulation attributes["in_color"][write_offset:end_offset] = np.repeat( submob.fill_rgba, mobject_triangulation.shape[0], axis=0, ) write_offset = end_offset fill_shader = Shader(renderer.context, name="vectorized_mobject_fill") fill_shader.set_uniform( "u_model_view_matrix", opengl.matrix_to_shader_input( renderer.camera.unformatted_view_matrix @ model_matrix, ), ) fill_shader.set_uniform( "u_projection_matrix", renderer.camera.projection_matrix, ) vbo = renderer.context.buffer(attributes.tobytes()) vao = renderer.context.simple_vertex_array( fill_shader.shader_program, vbo, *attributes.dtype.names, ) vao.render() vao.release() vbo.release() def triangulate_mobject(mob: OpenGLVMobject) -> np.ndarray: if not mob.needs_new_triangulation: return mob.triangulation # Figure out how to triangulate the interior to know # how to send the points as to the vertex shader. # First triangles come directly from the points # normal_vector = mob.get_unit_normal() points = mob.points b0s = points[0::3] b1s = points[1::3] b2s = points[2::3] v01s = b1s - b0s v12s = b2s - b1s crosses = cross2d(v01s, v12s) convexities = np.sign(crosses) if mob.orientation == 1: concave_parts = convexities > 0 convex_parts = convexities <= 0 else: concave_parts = convexities < 0 convex_parts = convexities >= 0 # These are the vertices to which we'll apply a polygon triangulation atol = mob.tolerance_for_point_equality end_of_loop = np.zeros(len(b0s), dtype=bool) end_of_loop[:-1] = (np.abs(b2s[:-1] - b0s[1:]) > atol).any(1) end_of_loop[-1] = True indices = np.arange(len(points), dtype=int) inner_vert_indices = np.hstack( [ indices[0::3], indices[1::3][concave_parts], indices[2::3][end_of_loop], ], ) inner_vert_indices.sort() rings = np.arange(1, len(inner_vert_indices) + 1)[inner_vert_indices % 3 == 2] # Triangulate inner_verts = points[inner_vert_indices] inner_tri_indices = inner_vert_indices[earclip_triangulation(inner_verts, rings)] bezier_triangle_indices = np.reshape(indices, (-1, 3)) concave_triangle_indices = np.reshape(bezier_triangle_indices[concave_parts], (-1)) convex_triangle_indices = np.reshape(bezier_triangle_indices[convex_parts], (-1)) points = points[ np.hstack( [ concave_triangle_indices, convex_triangle_indices, inner_tri_indices, ], ) ] texture_coords = np.tile( [ [0.0, 0.0], [0.5, 0.0], [1.0, 1.0], ], (points.shape[0] // 3, 1), ) texture_mode = np.hstack( ( np.ones(concave_triangle_indices.shape[0]), -1 * np.ones(convex_triangle_indices.shape[0]), np.zeros(inner_tri_indices.shape[0]), ), ) attributes = np.zeros( points.shape[0], dtype=[ ("in_vert", np.float32, (3,)), ("in_color", np.float32, (4,)), ("texture_coords", np.float32, (2,)), ("texture_mode", np.int32), ], ) attributes["in_vert"] = points attributes["texture_coords"] = texture_coords attributes["texture_mode"] = texture_mode mob.triangulation = attributes mob.needs_new_triangulation = False return attributes def render_opengl_vectorized_mobject_stroke( renderer: OpenGLRenderer, mobject: OpenGLVMobject ) -> None: matrix_to_mobject_list = build_matrix_lists(mobject) for matrix_tuple, mobject_list in matrix_to_mobject_list.items(): model_matrix = np.array(matrix_tuple).reshape((4, 4)) render_mobject_strokes_with_matrix(renderer, model_matrix, mobject_list) def render_mobject_strokes_with_matrix( renderer: OpenGLRenderer, model_matrix: MatrixMN, mobjects: Sequence[OpenGLVMobject], ) -> None: # Precompute the total number of vertices for which to reserve space. total_size = 0 for submob in mobjects: total_size += submob.points.shape[0] points = np.empty((total_size, 3)) colors = np.empty((total_size, 4)) widths = np.empty(total_size) write_offset = 0 for submob in mobjects: if not submob.has_points(): continue end_offset = write_offset + submob.points.shape[0] points[write_offset:end_offset] = submob.points if submob.stroke_rgba.shape[0] == points[write_offset:end_offset].shape[0]: colors[write_offset:end_offset] = submob.stroke_rgba else: colors[write_offset:end_offset] = np.repeat( submob.stroke_rgba, submob.points.shape[0], axis=0, ) widths[write_offset:end_offset] = np.repeat( submob.stroke_width, submob.points.shape[0], ) write_offset = end_offset stroke_data = np.zeros( len(points), dtype=[ # ("previous_curve", np.float32, (3, 3)), ("current_curve", np.float32, (3, 3)), # ("next_curve", np.float32, (3, 3)), ("tile_coordinate", np.float32, (2,)), ("in_color", np.float32, (4,)), ("in_width", np.float32), ], ) stroke_data["in_color"] = colors stroke_data["in_width"] = widths curves = np.reshape(points, (-1, 3, 3)) # stroke_data["previous_curve"] = np.repeat(np.roll(curves, 1, axis=0), 3, axis=0) stroke_data["current_curve"] = np.repeat(curves, 3, axis=0) # stroke_data["next_curve"] = np.repeat(np.roll(curves, -1, axis=0), 3, axis=0) # Repeat each vertex in order to make a tile. stroke_data = np.tile(stroke_data, 2) stroke_data["tile_coordinate"] = np.vstack( ( np.tile( [ [0.0, 0.0], [0.0, 1.0], [1.0, 1.0], ], (len(points) // 3, 1), ), np.tile( [ [0.0, 0.0], [1.0, 0.0], [1.0, 1.0], ], (len(points) // 3, 1), ), ), ) shader = Shader(renderer.context, "vectorized_mobject_stroke") shader.set_uniform( "u_model_view_matrix", opengl.matrix_to_shader_input( renderer.camera.unformatted_view_matrix @ model_matrix, ), ) shader.set_uniform("u_projection_matrix", renderer.camera.projection_matrix) shader.set_uniform("manim_unit_normal", tuple(-mobjects[0].unit_normal[0])) vbo = renderer.context.buffer(stroke_data.tobytes()) vao = renderer.context.simple_vertex_array( shader.shader_program, vbo, *stroke_data.dtype.names ) renderer.frame_buffer_object.use() vao.render() vao.release() vbo.release() ================================================ FILE: manim/renderer/shaders/design.frag ================================================ #version 330 out vec4 frag_color; void main() { vec2 st = gl_FragCoord.xy / vec2(854, 360); vec3 color = vec3(0.0); st *= 3.0; st = fract(st); color = vec3(st, 0.0); frag_color = vec4(color, 1.0); } ================================================ FILE: manim/renderer/shaders/design_2.frag ================================================ #version 330 uniform vec2 u_resolution; out vec4 frag_color; #define PI 3.14159265358979323846 vec2 rotate2D(vec2 _st, float _angle){ _st -= 0.5; _st = mat2(cos(_angle),-sin(_angle), sin(_angle),cos(_angle)) * _st; _st += 0.5; return _st; } vec2 tile(vec2 _st, float _zoom){ _st *= _zoom; return fract(_st); } float box(vec2 _st, vec2 _size, float _smoothEdges){ _size = vec2(0.5)-_size*0.5; vec2 aa = vec2(_smoothEdges*0.5); vec2 uv = smoothstep(_size,_size+aa,_st); uv *= smoothstep(_size,_size+aa,vec2(1.0)-_st); return uv.x*uv.y; } void main(void){ vec2 st = gl_FragCoord.xy/u_resolution.xy; vec3 color = vec3(0.0); // Divide the space in 4 st = tile(st,4.); // Use a matrix to rotate the space 45 degrees st = rotate2D(st,PI*0.25); // Draw a square color = vec3(box(st,vec2(0.7),0.01)); // color = vec3(st,0.0); frag_color = vec4(color,1.0); } ================================================ FILE: manim/renderer/shaders/design_3.frag ================================================ #version 330 uniform vec3 u_resolution; uniform float u_time; out vec4 frag_color; vec3 palette(float d){ return mix(vec3(0.2,0.7,0.9),vec3(1.,0.,1.),d); } vec2 rotate(vec2 p,float a){ float c = cos(a); float s = sin(a); return p*mat2(c,s,-s,c); } float map(vec3 p){ for( int i = 0; i<8; ++i){ float t = u_time*0.1; p.xz =rotate(p.xz,t); p.xy =rotate(p.xy,t*1.89); p.xz = abs(p.xz); p.xz-=.5; } return dot(sign(p),p)/5.; } vec4 rm (vec3 ro, vec3 rd){ float t = 0.; vec3 col = vec3(0.); float d; for(float i =0.; i<64.; i++){ vec3 p = ro + rd*t; d = map(p)*.5; if(d<0.02){ break; } if(d>100.){ break; } //col+=vec3(0.6,0.8,0.8)/(400.*(d)); col+=palette(length(p)*.1)/(400.*(d)); t+=d; } return vec4(col,1./(d*100.)); } void main(void){ vec2 uv = (gl_FragCoord.xy-(u_resolution.xy/2.))/u_resolution.x; vec3 ro = vec3(0.,0.,-50.); ro.xz = rotate(ro.xz,u_time); vec3 cf = normalize(-ro); vec3 cs = normalize(cross(cf,vec3(0.,1.,0.))); vec3 cu = normalize(cross(cf,cs)); vec3 uuv = ro+cf*3. + uv.x*cs + uv.y*cu; vec3 rd = normalize(uuv-ro); vec4 col = rm(ro,rd); frag_color = vec4(col.xyz, 1); } ================================================ FILE: manim/renderer/shaders/simple_vert.glsl ================================================ #version 330 #include ../include/camera_uniform_declarations.glsl in vec3 point; // Analog of import for manim only #include ../include/get_gl_Position.glsl #include ../include/position_point_into_frame.glsl void main(){ gl_Position = get_gl_Position(position_point_into_frame(point)); } ================================================ FILE: manim/renderer/shaders/default/frag.glsl ================================================ #version 330 uniform vec4 u_color; out vec4 frag_color; void main() { frag_color = u_color; } ================================================ FILE: manim/renderer/shaders/default/vert.glsl ================================================ #version 330 in vec3 in_vert; uniform mat4 u_model_matrix; uniform mat4 u_view_matrix; uniform mat4 u_projection_matrix; void main() { gl_Position = u_projection_matrix * u_view_matrix * u_model_matrix * vec4(in_vert, 1.0); } ================================================ FILE: manim/renderer/shaders/image/frag.glsl ================================================ #version 330 uniform sampler2D Texture; in vec2 v_im_coords; in float v_opacity; out vec4 frag_color; void main() { frag_color = texture(Texture, v_im_coords); frag_color.a = v_opacity; } ================================================ FILE: manim/renderer/shaders/image/vert.glsl ================================================ #version 330 #include ../include/camera_uniform_declarations.glsl uniform sampler2D Texture; in vec3 point; in vec2 im_coords; in float opacity; out vec2 v_im_coords; out float v_opacity; // Analog of import for manim only #include ../include/get_gl_Position.glsl #include ../include/position_point_into_frame.glsl void main(){ v_im_coords = im_coords; v_opacity = opacity; gl_Position = get_gl_Position(position_point_into_frame(point)); } ================================================ FILE: manim/renderer/shaders/include/add_light.glsl ================================================ ///// INSERT COLOR_MAP FUNCTION HERE ///// vec4 add_light(vec4 color, vec3 point, vec3 unit_normal, vec3 light_coords, float gloss, float shadow){ ///// INSERT COLOR FUNCTION HERE ///// // The line above may be replaced by arbitrary code snippets, as per // the method Mobject.set_color_by_code if(gloss == 0.0 && shadow == 0.0) return color; // TODO, do we actually want this? It effectively treats surfaces as two-sided if(unit_normal.z < 0){ unit_normal *= -1; } // TODO, read this in as a uniform? float camera_distance = 6; // Assume everything has already been rotated such that camera is in the z-direction vec3 to_camera = vec3(0, 0, camera_distance) - point; vec3 to_light = light_coords - point; vec3 light_reflection = -to_light + 2 * unit_normal * dot(to_light, unit_normal); float dot_prod = dot(normalize(light_reflection), normalize(to_camera)); float shine = gloss * exp(-3 * pow(1 - dot_prod, 2)); float dp2 = dot(normalize(to_light), unit_normal); float darkening = mix(1, max(dp2, 0), shadow); return vec4( darkening * mix(color.rgb, vec3(1.0), shine), color.a ); } vec4 finalize_color(vec4 color, vec3 point, vec3 unit_normal, vec3 light_coords, float gloss, float shadow){ // Put insertion here instead return add_light(color, point, unit_normal, light_coords, gloss, shadow); } ================================================ FILE: manim/renderer/shaders/include/camera_uniform_declarations.glsl ================================================ uniform vec2 frame_shape; uniform float anti_alias_width; uniform vec3 camera_center; uniform mat3 camera_rotation; uniform float is_fixed_in_frame; uniform float is_fixed_orientation; uniform vec3 fixed_orientation_center; uniform float focal_distance; ================================================ FILE: manim/renderer/shaders/include/finalize_color.glsl ================================================ vec3 float_to_color(float value, float min_val, float max_val, vec3[9] colormap_data){ float alpha = clamp((value - min_val) / (max_val - min_val), 0.0, 1.0); int disc_alpha = min(int(alpha * 8), 7); return mix( colormap_data[disc_alpha], colormap_data[disc_alpha + 1], 8.0 * alpha - disc_alpha ); } vec4 add_light(vec4 color, vec3 point, vec3 unit_normal, vec3 light_coords, float gloss, float shadow){ if(gloss == 0.0 && shadow == 0.0) return color; // TODO, do we actually want this? It effectively treats surfaces as two-sided if(unit_normal.z < 0){ unit_normal *= -1; } // TODO, read this in as a uniform? float camera_distance = 6; // Assume everything has already been rotated such that camera is in the z-direction vec3 to_camera = vec3(0, 0, camera_distance) - point; vec3 to_light = light_coords - point; vec3 light_reflection = -to_light + 2 * unit_normal * dot(to_light, unit_normal); float dot_prod = dot(normalize(light_reflection), normalize(to_camera)); float shine = gloss * exp(-3 * pow(1 - dot_prod, 2)); float dp2 = dot(normalize(to_light), unit_normal); float darkening = mix(1, max(dp2, 0), shadow); return vec4( darkening * mix(color.rgb, vec3(1.0), shine), color.a ); } vec4 finalize_color(vec4 color, vec3 point, vec3 unit_normal, vec3 light_coords, float gloss, float shadow){ ///// INSERT COLOR FUNCTION HERE ///// // The line above may be replaced by arbitrary code snippets, as per // the method Mobject.set_color_by_code return add_light(color, point, unit_normal, light_coords, gloss, shadow); } ================================================ FILE: manim/renderer/shaders/include/get_gl_Position.glsl ================================================ // Assumes the following uniforms exist in the surrounding context: // uniform vec2 frame_shape; // uniform float focal_distance; // uniform float is_fixed_in_frame; // uniform float is_fixed_orientation; // uniform vec3 fixed_orientation_center; const vec2 DEFAULT_FRAME_SHAPE = vec2(8.0 * 16.0 / 9.0, 8.0); float perspective_scale_factor(float z, float focal_distance){ return max(0.0, focal_distance / (focal_distance - z)); } vec4 get_gl_Position(vec3 point){ vec4 result = vec4(point, 1.0); if(!bool(is_fixed_in_frame)){ result.x *= 2.0 / frame_shape.x; result.y *= 2.0 / frame_shape.y; float psf = perspective_scale_factor(result.z, focal_distance); if (psf > 0){ result.xy *= psf; // TODO, what's the better way to do this? // This is to keep vertices too far out of frame from getting cut. result.z *= 0.01; } } else{ if (!bool(is_fixed_orientation)){ result.x *= 2.0 / DEFAULT_FRAME_SHAPE.x; result.y *= 2.0 / DEFAULT_FRAME_SHAPE.y; } else{ result.x *= 2.0 / frame_shape.x; result.y *= 2.0 / frame_shape.y; } } result.z *= -1; return result; } ================================================ FILE: manim/renderer/shaders/include/get_rotated_surface_unit_normal_vector.glsl ================================================ // Assumes the following uniforms exist in the surrounding context: // uniform vec3 camera_center; // uniform mat3 camera_rotation; vec3 get_rotated_surface_unit_normal_vector(vec3 point, vec3 du_point, vec3 dv_point){ vec3 cp = cross( (du_point - point), (dv_point - point) ); if(length(cp) == 0){ // Instead choose a normal to just dv_point - point in the direction of point vec3 v2 = dv_point - point; cp = cross(cross(v2, point), v2); } return normalize(rotate_point_into_frame(cp)); } ================================================ FILE: manim/renderer/shaders/include/get_unit_normal.glsl ================================================ vec3 get_unit_normal(in vec3[3] points){ float tol = 1e-6; vec3 v1 = normalize(points[1] - points[0]); vec3 v2 = normalize(points[2] - points[0]); vec3 cp = cross(v1, v2); float cp_norm = length(cp); if(cp_norm < tol){ // Three points form a line, so find a normal vector // to that line in the plane shared with the z-axis vec3 k_hat = vec3(0.0, 0.0, 1.0); vec3 new_cp = cross(cross(v2, k_hat), v2); float new_cp_norm = length(new_cp); if(new_cp_norm < tol){ // We only come here if all three points line up // on the z-axis. return vec3(0.0, -1.0, 0.0); // return k_hat; } return new_cp / new_cp_norm; } return cp / cp_norm; } ================================================ FILE: manim/renderer/shaders/include/NOTE.md ================================================ There seems to be no analog to #include in C++ for OpenGL shaders. While there are other options for sharing code between shaders, a lot of them aren't great, especially if the goal is to have all the logic for which specific bits of code to share handled in the shader file itself. So the way manim currently works is to replace any line which looks like #INSERT with the code from one of the files in this folder. The functions in this file often include reference to uniforms which are assumed to be part of the surrounding context into which they are inserted. ================================================ FILE: manim/renderer/shaders/include/position_point_into_frame.glsl ================================================ // Assumes the following uniforms exist in the surrounding context: // uniform float is_fixed_in_frame; // uniform float is_fixed_orientation; // uniform vec3 fixed_orientation_center; // uniform vec3 camera_center; // uniform mat3 camera_rotation; vec3 rotate_point_into_frame(vec3 point){ if(bool(is_fixed_in_frame)){ return point; } return camera_rotation * point; } vec3 position_point_into_frame(vec3 point){ if(bool(is_fixed_in_frame)){ return point; } if(bool(is_fixed_orientation)){ vec3 new_center = rotate_point_into_frame(fixed_orientation_center); return point + (new_center - fixed_orientation_center); } return rotate_point_into_frame(point - camera_center); } ================================================ FILE: manim/renderer/shaders/include/quadratic_bezier_distance.glsl ================================================ // Must be inserted in a context with a definition for modify_distance_for_endpoints // All of this is with respect to a curve that's been rotated/scaled // so that b0 = (0, 0) and b1 = (1, 0). That is, b2 entirely // determines the shape of the curve vec2 bezier(float t, vec2 b2){ // Quick returns for the 0 and 1 cases if (t == 0) return vec2(0, 0); else if (t == 1) return b2; // Everything else return vec2( 2 * t * (1 - t) + b2.x * t*t, b2.y * t * t ); } float cube_root(float x){ return sign(x) * pow(abs(x), 1.0 / 3.0); } int cubic_solve(float a, float b, float c, float d, out float roots[3]){ // Normalize so a = 1 b = b / a; c = c / a; d = d / a; float p = c - b*b / 3.0; float q = b * (2.0*b*b - 9.0*c) / 27.0 + d; float p3 = p*p*p; float disc = q*q + 4.0*p3 / 27.0; float offset = -b / 3.0; if(disc >= 0.0){ float z = sqrt(disc); float u = (-q + z) / 2.0; float v = (-q - z) / 2.0; u = cube_root(u); v = cube_root(v); roots[0] = offset + u + v; return 1; } float u = sqrt(-p / 3.0); float v = acos(-sqrt( -27.0 / p3) * q / 2.0) / 3.0; float m = cos(v); float n = sin(v) * 1.732050808; float all_roots[3] = float[3]( offset + u * (n - m), offset - u * (n + m), offset + u * (m + m) ); // Only accept roots with a positive derivative int n_valid_roots = 0; for(int i = 0; i < 3; i++){ float r = all_roots[i]; if(3*r*r + 2*b*r + c > 0){ roots[n_valid_roots] = r; n_valid_roots++; } } return n_valid_roots; } float dist_to_line(vec2 p, vec2 b2){ float t = clamp(p.x / b2.x, 0, 1); float dist; if(t == 0) dist = length(p); else if(t == 1) dist = distance(p, b2); else dist = abs(p.y); return modify_distance_for_endpoints(p, dist, t); } float dist_to_point_on_curve(vec2 p, float t, vec2 b2){ t = clamp(t, 0, 1); return modify_distance_for_endpoints( p, length(p - bezier(t, b2)), t ); } float min_dist_to_curve(vec2 p, vec2 b2, float degree){ // Check if curve is really a a line if(degree == 1) return dist_to_line(p, b2); // Try finding the exact sdf by solving the equation // (d/dt) dist^2(t) = 0, which amount to the following // cubic. float xm2 = uv_b2.x - 2.0; float y = uv_b2.y; float a = xm2*xm2 + y*y; float b = 3 * xm2; float c = -(p.x*xm2 + p.y*y) + 2; float d = -p.x; float roots[3]; int n = cubic_solve(a, b, c, d, roots); // At most 2 roots will have been populated. float d0 = dist_to_point_on_curve(p, roots[0], b2); if(n == 1) return d0; float d1 = dist_to_point_on_curve(p, roots[1], b2); return min(d0, d1); } ================================================ FILE: manim/renderer/shaders/include/quadratic_bezier_geometry_functions.glsl ================================================ float cross2d(vec2 v, vec2 w){ return v.x * w.y - w.x * v.y; } mat3 get_xy_to_uv(vec2 b0, vec2 b1){ mat3 shift = mat3( 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, -b0.x, -b0.y, 1.0 ); float sf = length(b1 - b0); vec2 I = (b1 - b0) / sf; vec2 J = vec2(-I.y, I.x); mat3 rotate = mat3( I.x, J.x, 0.0, I.y, J.y, 0.0, 0.0, 0.0, 1.0 ); return (1 / sf) * rotate * shift; } // Orthogonal matrix to convert to a uv space defined so that // b0 goes to [0, 0] and b1 goes to [1, 0] mat4 get_xyz_to_uv(vec3 b0, vec3 b1, vec3 unit_normal){ mat4 shift = mat4( 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -b0.x, -b0.y, -b0.z, 1 ); float scale_factor = length(b1 - b0); vec3 I = (b1 - b0) / scale_factor; vec3 K = unit_normal; vec3 J = cross(K, I); // Transpose (hence inverse) of matrix taking // i-hat to I, k-hat to unit_normal, and j-hat to their cross mat4 rotate = mat4( I.x, J.x, K.x, 0.0, I.y, J.y, K.y, 0.0, I.z, J.z, K.z, 0.0, 0.0, 0.0, 0.0, 1.0 ); return (1 / scale_factor) * rotate * shift; } // Returns 0 for null curve, 1 for linear, 2 for quadratic. // Populates new_points with bezier control points for the curve, // which for quadratics will be the same, but for linear and null // might change. The idea is to inform the caller of the degree, // while also passing tangency information in the linear case. // float get_reduced_control_points(vec3 b0, vec3 b1, vec3 b2, out vec3 new_points[3]){ float get_reduced_control_points(in vec3 points[3], out vec3 new_points[3]){ float length_threshold = 1e-6; float angle_threshold = 5e-2; vec3 p0 = points[0]; vec3 p1 = points[1]; vec3 p2 = points[2]; vec3 v01 = (p1 - p0); vec3 v12 = (p2 - p1); float dot_prod = clamp(dot(normalize(v01), normalize(v12)), -1, 1); bool aligned = acos(dot_prod) < angle_threshold; bool distinct_01 = length(v01) > length_threshold; // v01 is considered nonzero bool distinct_12 = length(v12) > length_threshold; // v12 is considered nonzero int n_uniques = int(distinct_01) + int(distinct_12); bool quadratic = (n_uniques == 2) && !aligned; bool linear = (n_uniques == 1) || ((n_uniques == 2) && aligned); bool constant = (n_uniques == 0); if(quadratic){ new_points[0] = p0; new_points[1] = p1; new_points[2] = p2; return 2.0; }else if(linear){ new_points[0] = p0; new_points[1] = (p0 + p2) / 2.0; new_points[2] = p2; return 1.0; }else{ new_points[0] = p0; new_points[1] = p0; new_points[2] = p0; return 0.0; } } ================================================ FILE: manim/renderer/shaders/manim_coords/frag.glsl ================================================ #version 330 uniform vec4 u_color; out vec4 frag_color; void main() { frag_color = u_color; } ================================================ FILE: manim/renderer/shaders/manim_coords/vert.glsl ================================================ #version 330 in vec4 in_vert; uniform mat4 u_model_view_matrix; uniform mat4 u_projection_matrix; void main() { vec4 camera_space_vertex = u_model_view_matrix * in_vert; vec4 clip_space_vertex = u_projection_matrix * camera_space_vertex; gl_Position = clip_space_vertex; } ================================================ FILE: manim/renderer/shaders/quadratic_bezier_fill/frag.glsl ================================================ #version 330 #include ../include/camera_uniform_declarations.glsl in vec4 color; in float fill_all; // Either 0 or 1e in float uv_anti_alias_width; in vec3 xyz_coords; in float orientation; in vec2 uv_coords; in vec2 uv_b2; in float bezier_degree; out vec4 frag_color; // Needed for quadratic_bezier_distance insertion below float modify_distance_for_endpoints(vec2 p, float dist, float t){ return dist; } #include ../include/quadratic_bezier_distance.glsl float sdf(){ if(bezier_degree < 2){ return abs(uv_coords[1]); } float u2 = uv_b2.x; float v2 = uv_b2.y; // For really flat curves, just take the distance to x-axis if(abs(v2 / u2) < 0.1 * uv_anti_alias_width){ return abs(uv_coords[1]); } // For flat-ish curves, take the curve else if(abs(v2 / u2) < 0.5 * uv_anti_alias_width){ return min_dist_to_curve(uv_coords, uv_b2, bezier_degree); } // I know, I don't love this amount of arbitrary-seeming branching either, // but a number of strange dimples and bugs pop up otherwise. // This converts uv_coords to yet another space where the bezier points sit on // (0, 0), (1/2, 0) and (1, 1), so that the curve can be expressed implicityly // as y = x^2. mat2 to_simple_space = mat2( v2, 0, 2 - u2, 4 * v2 ); vec2 p = to_simple_space * uv_coords; // Sign takes care of whether we should be filling the inside or outside of curve. float sgn = orientation * sign(v2); float Fp = (p.x * p.x - p.y); if(sgn * Fp < 0){ return 0.0; }else{ return min_dist_to_curve(uv_coords, uv_b2, bezier_degree); } } void main() { if (color.a == 0) discard; frag_color = color; if (fill_all == 1.0) return; frag_color.a *= smoothstep(1, 0, sdf() / uv_anti_alias_width); } ================================================ FILE: manim/renderer/shaders/quadratic_bezier_fill/geom.glsl ================================================ #version 330 layout (triangles) in; layout (triangle_strip, max_vertices = 5) out; uniform float anti_alias_width; // Needed for get_gl_Position uniform vec2 frame_shape; uniform float focal_distance; uniform float is_fixed_in_frame; uniform float is_fixed_orientation; uniform vec3 fixed_orientation_center; // Needed for finalize_color uniform vec3 light_source_position; uniform float gloss; uniform float shadow; in vec3 bp[3]; in vec3 v_global_unit_normal[3]; in vec4 v_color[3]; in float v_vert_index[3]; out vec4 color; out float fill_all; out float uv_anti_alias_width; out vec3 xyz_coords; out float orientation; // uv space is where b0 = (0, 0), b1 = (1, 0), and transform is orthogonal out vec2 uv_coords; out vec2 uv_b2; out float bezier_degree; // Analog of import for manim only #include ../include/quadratic_bezier_geometry_functions.glsl #include ../include/get_gl_Position.glsl #include ../include/get_unit_normal.glsl #include ../include/finalize_color.glsl void emit_vertex_wrapper(vec3 point, int index){ color = finalize_color( v_color[index], point, v_global_unit_normal[index], light_source_position, gloss, shadow ); xyz_coords = point; gl_Position = get_gl_Position(xyz_coords); EmitVertex(); } void emit_simple_triangle(){ for(int i = 0; i < 3; i++){ emit_vertex_wrapper(bp[i], i); } EndPrimitive(); } void emit_pentagon(vec3[3] points, vec3 normal){ vec3 p0 = points[0]; vec3 p1 = points[1]; vec3 p2 = points[2]; // Tangent vectors vec3 t01 = normalize(p1 - p0); vec3 t12 = normalize(p2 - p1); // Vectors perpendicular to the curve in the plane of the curve pointing outside the curve vec3 p0_perp = cross(t01, normal); vec3 p2_perp = cross(t12, normal); bool fill_inside = orientation > 0; float aaw = anti_alias_width; vec3 corners[5]; if(fill_inside){ // Note, straight lines will also fall into this case, and since p0_perp and p2_perp // will point to the right of the curve, it's just what we want corners = vec3[5]( p0 + aaw * p0_perp, p0, p1 + 0.5 * aaw * (p0_perp + p2_perp), p2, p2 + aaw * p2_perp ); }else{ corners = vec3[5]( p0, p0 - aaw * p0_perp, p1, p2 - aaw * p2_perp, p2 ); } mat4 xyz_to_uv = get_xyz_to_uv(p0, p1, normal); uv_b2 = (xyz_to_uv * vec4(p2, 1)).xy; uv_anti_alias_width = anti_alias_width / length(p1 - p0); for(int i = 0; i < 5; i++){ vec3 corner = corners[i]; uv_coords = (xyz_to_uv * vec4(corner, 1)).xy; int j = int(sign(i - 1) + 1); // Maps i = [0, 1, 2, 3, 4] onto j = [0, 0, 1, 2, 2] emit_vertex_wrapper(corner, j); } EndPrimitive(); } void main(){ // If vert indices are sequential, don't fill all fill_all = float( (v_vert_index[1] - v_vert_index[0]) != 1.0 || (v_vert_index[2] - v_vert_index[1]) != 1.0 ); if(fill_all == 1.0){ emit_simple_triangle(); return; } vec3 new_bp[3]; bezier_degree = get_reduced_control_points(vec3[3](bp[0], bp[1], bp[2]), new_bp); vec3 local_unit_normal = get_unit_normal(new_bp); orientation = sign(dot(v_global_unit_normal[0], local_unit_normal)); if(bezier_degree >= 1){ emit_pentagon(new_bp, local_unit_normal); } // Don't emit any vertices for bezier_degree 0 } ================================================ FILE: manim/renderer/shaders/quadratic_bezier_fill/vert.glsl ================================================ #version 330 #include ../include/camera_uniform_declarations.glsl in vec3 point; in vec3 unit_normal; in vec4 color; in float vert_index; out vec3 bp; // Bezier control point out vec3 v_global_unit_normal; out vec4 v_color; out float v_vert_index; // Analog of import for manim only #include ../include/position_point_into_frame.glsl void main(){ bp = position_point_into_frame(point.xyz); v_global_unit_normal = rotate_point_into_frame(unit_normal.xyz); v_color = color; v_vert_index = vert_index; } ================================================ FILE: manim/renderer/shaders/quadratic_bezier_stroke/frag.glsl ================================================ #version 330 #include ../include/camera_uniform_declarations.glsl in vec2 uv_coords; in vec2 uv_b2; in float uv_stroke_width; in vec4 color; in float uv_anti_alias_width; in float has_prev; in float has_next; in float bevel_start; in float bevel_end; in float angle_from_prev; in float angle_to_next; in float bezier_degree; out vec4 frag_color; float cross2d(vec2 v, vec2 w){ return v.x * w.y - w.x * v.y; } float modify_distance_for_endpoints(vec2 p, float dist, float t){ float buff = 0.5 * uv_stroke_width - uv_anti_alias_width; // Check the beginning of the curve if(t == 0){ // Clip the start if(has_prev == 0) return max(dist, -p.x + buff); // Bevel start if(bevel_start == 1){ float a = angle_from_prev; mat2 rot = mat2( cos(a), sin(a), -sin(a), cos(a) ); // Dist for intersection of two lines float bevel_d = max(abs(p.y), abs((rot * p).y)); // Dist for union of this intersection with the real curve // intersected with radius 2 away from curve to smooth out // really sharp corners return max(min(dist, bevel_d), dist / 2); } // Otherwise, start will be rounded off }else if(t == 1){ // Check the end of the curve // TODO, too much code repetition vec2 v21 = (bezier_degree == 2) ? vec2(1, 0) - uv_b2 : vec2(-1, 0); float len_v21 = length(v21); if(len_v21 == 0){ v21 = -uv_b2; len_v21 = length(v21); } float perp_dist = dot(p - uv_b2, v21) / len_v21; if(has_next == 0) return max(dist, -perp_dist + buff); // Bevel end if(bevel_end == 1){ float a = -angle_to_next; mat2 rot = mat2( cos(a), sin(a), -sin(a), cos(a) ); vec2 v21_unit = v21 / length(v21); float bevel_d = max( abs(cross2d(p - uv_b2, v21_unit)), abs(cross2d((rot * (p - uv_b2)), v21_unit)) ); return max(min(dist, bevel_d), dist / 2); } // Otherwise, end will be rounded off } return dist; } #include ../include/quadratic_bezier_distance.glsl void main() { if (uv_stroke_width == 0) discard; float dist_to_curve = min_dist_to_curve(uv_coords, uv_b2, bezier_degree); // An sdf for the region around the curve we wish to color. float signed_dist = abs(dist_to_curve) - 0.5 * uv_stroke_width; frag_color = color; frag_color.a *= smoothstep(0.5, -0.5, signed_dist / uv_anti_alias_width); } ================================================ FILE: manim/renderer/shaders/quadratic_bezier_stroke/geom.glsl ================================================ #version 330 layout (triangles) in; layout (triangle_strip, max_vertices = 5) out; // Needed for get_gl_Position uniform vec2 frame_shape; uniform float focal_distance; uniform float is_fixed_in_frame; uniform float is_fixed_orientation; uniform vec3 fixed_orientation_center; uniform float anti_alias_width; uniform float flat_stroke; //Needed for lighting uniform vec3 light_source_position; uniform float joint_type; uniform float gloss; uniform float shadow; in vec3 bp[3]; in vec3 prev_bp[3]; in vec3 next_bp[3]; in vec3 v_global_unit_normal[3]; in vec4 v_color[3]; in float v_stroke_width[3]; out vec4 color; out float uv_stroke_width; out float uv_anti_alias_width; out float has_prev; out float has_next; out float bevel_start; out float bevel_end; out float angle_from_prev; out float angle_to_next; out float bezier_degree; out vec2 uv_coords; out vec2 uv_b2; // Codes for joint types const float AUTO_JOINT = 0; const float ROUND_JOINT = 1; const float BEVEL_JOINT = 2; const float MITER_JOINT = 3; const float PI = 3.141592653; #include ../include/quadratic_bezier_geometry_functions.glsl #include ../include/get_gl_Position.glsl #include ../include/get_unit_normal.glsl #include ../include/finalize_color.glsl void flatten_points(in vec3[3] points, out vec2[3] flat_points){ for(int i = 0; i < 3; i++){ float sf = perspective_scale_factor(points[i].z, focal_distance); flat_points[i] = sf * points[i].xy; } } float angle_between_vectors(vec2 v1, vec2 v2){ float v1_norm = length(v1); float v2_norm = length(v2); if(v1_norm == 0 || v2_norm == 0) return 0.0; float dp = dot(v1, v2) / (v1_norm * v2_norm); float angle = acos(clamp(dp, -1.0, 1.0)); float sn = sign(cross2d(v1, v2)); return sn * angle; } bool find_intersection(vec2 p0, vec2 v0, vec2 p1, vec2 v1, out vec2 intersection){ // Find the intersection of a line passing through // p0 in the direction v0 and one passing through p1 in // the direction p1. // That is, find a solutoin to p0 + v0 * t = p1 + v1 * s float det = -v0.x * v1.y + v1.x * v0.y; if(det == 0) return false; float t = cross2d(p0 - p1, v1) / det; intersection = p0 + v0 * t; return true; } void create_joint(float angle, vec2 unit_tan, float buff, vec2 static_c0, out vec2 changing_c0, vec2 static_c1, out vec2 changing_c1){ float shift; if(abs(angle) < 1e-3){ // No joint shift = 0; }else if(joint_type == MITER_JOINT){ shift = buff * (-1.0 - cos(angle)) / sin(angle); }else{ // For a Bevel joint shift = buff * (1.0 - cos(angle)) / sin(angle); } changing_c0 = static_c0 - shift * unit_tan; changing_c1 = static_c1 + shift * unit_tan; } // This function is responsible for finding the corners of // a bounding region around the bezier curve, which can be // emitted as a triangle fan int get_corners(vec2 controls[3], int degree, float stroke_widths[3], out vec2 corners[5]){ vec2 p0 = controls[0]; vec2 p1 = controls[1]; vec2 p2 = controls[2]; // Unit vectors for directions between control points vec2 v10 = normalize(p0 - p1); vec2 v12 = normalize(p2 - p1); vec2 v01 = -v10; vec2 v21 = -v12; vec2 p0_perp = vec2(-v01.y, v01.x); // Pointing to the left of the curve from p0 vec2 p2_perp = vec2(-v12.y, v12.x); // Pointing to the left of the curve from p2 // aaw is the added width given around the polygon for antialiasing. // In case the normal is faced away from (0, 0, 1), the vector to the // camera, this is scaled up. float aaw = anti_alias_width; float buff0 = 0.5 * stroke_widths[0] + aaw; float buff2 = 0.5 * stroke_widths[2] + aaw; float aaw0 = (1 - has_prev) * aaw; float aaw2 = (1 - has_next) * aaw; vec2 c0 = p0 - buff0 * p0_perp + aaw0 * v10; vec2 c1 = p0 + buff0 * p0_perp + aaw0 * v10; vec2 c2 = p2 + buff2 * p2_perp + aaw2 * v12; vec2 c3 = p2 - buff2 * p2_perp + aaw2 * v12; // Account for previous and next control points if(has_prev > 0) create_joint(angle_from_prev, v01, buff0, c0, c0, c1, c1); if(has_next > 0) create_joint(angle_to_next, v21, buff2, c3, c3, c2, c2); // Linear case is the simplest if(degree == 1){ // The order of corners should be for a triangle_strip. Last entry is a dummy corners = vec2[5](c0, c1, c3, c2, vec2(0.0)); return 4; } // Otherwise, form a pentagon around the curve float orientation = sign(cross2d(v01, v12)); // Positive for ccw curves if(orientation > 0) corners = vec2[5](c0, c1, p1, c2, c3); else corners = vec2[5](c1, c0, p1, c3, c2); // Replace corner[2] with convex hull point accounting for stroke width find_intersection(corners[0], v01, corners[4], v21, corners[2]); return 5; } void set_adjascent_info(vec2 c0, vec2 tangent, int degree, vec2 adj[3], out float bevel, out float angle ){ bool linear_adj = (angle_between_vectors(adj[1] - adj[0], adj[2] - adj[1]) < 1e-3); angle = angle_between_vectors(c0 - adj[1], tangent); // Decide on joint type bool one_linear = (degree == 1 || linear_adj); bool should_bevel = ( (joint_type == AUTO_JOINT && one_linear) || joint_type == BEVEL_JOINT ); bevel = should_bevel ? 1.0 : 0.0; } void find_joint_info(vec2 controls[3], vec2 prev[3], vec2 next[3], int degree){ float tol = 1e-6; // Made as floats not bools so they can be passed to the frag shader has_prev = float(distance(prev[2], controls[0]) < tol); has_next = float(distance(next[0], controls[2]) < tol); if(bool(has_prev)){ vec2 tangent = controls[1] - controls[0]; set_adjascent_info( controls[0], tangent, degree, prev, bevel_start, angle_from_prev ); } if(bool(has_next)){ vec2 tangent = controls[1] - controls[2]; set_adjascent_info( controls[2], tangent, degree, next, bevel_end, angle_to_next ); angle_to_next *= -1; } } void main() { // Convert control points to a standard form if they are linear or null vec3 controls[3]; vec3 prev[3]; vec3 next[3]; bezier_degree = get_reduced_control_points(vec3[3](bp[0], bp[1], bp[2]), controls); if(bezier_degree == 0.0) return; // Null curve int degree = int(bezier_degree); get_reduced_control_points(vec3[3](prev_bp[0], prev_bp[1], prev_bp[2]), prev); get_reduced_control_points(vec3[3](next_bp[0], next_bp[1], next_bp[2]), next); // Adjust stroke width based on distance from the camera float scaled_strokes[3]; for(int i = 0; i < 3; i++){ float sf = perspective_scale_factor(controls[i].z, focal_distance); if(bool(flat_stroke)){ vec3 to_cam = normalize(vec3(0.0, 0.0, focal_distance) - controls[i]); sf *= abs(dot(v_global_unit_normal[i], to_cam)); } scaled_strokes[i] = v_stroke_width[i] * sf; } // Control points are projected to the xy plane before drawing, which in turn // gets translated to a uv plane. The z-coordinate information will be remembered // by what's sent out to gl_Position, and by how it affects the lighting and stroke width vec2 flat_controls[3]; vec2 flat_prev[3]; vec2 flat_next[3]; flatten_points(controls, flat_controls); flatten_points(prev, flat_prev); flatten_points(next, flat_next); find_joint_info(flat_controls, flat_prev, flat_next, degree); // Corners of a bounding region around curve vec2 corners[5]; int n_corners = get_corners(flat_controls, degree, scaled_strokes, corners); int index_map[5] = int[5](0, 0, 1, 2, 2); if(n_corners == 4) index_map[2] = 2; // Find uv conversion matrix mat3 xy_to_uv = get_xy_to_uv(flat_controls[0], flat_controls[1]); float scale_factor = length(flat_controls[1] - flat_controls[0]); uv_anti_alias_width = anti_alias_width / scale_factor; uv_b2 = (xy_to_uv * vec3(flat_controls[2], 1.0)).xy; // Emit each corner for(int i = 0; i < n_corners; i++){ uv_coords = (xy_to_uv * vec3(corners[i], 1.0)).xy; uv_stroke_width = scaled_strokes[index_map[i]] / scale_factor; // Apply some lighting to the color before sending out. // vec3 xyz_coords = vec3(corners[i], controls[index_map[i]].z); vec3 xyz_coords = vec3(corners[i], controls[index_map[i]].z); color = finalize_color( v_color[index_map[i]], xyz_coords, v_global_unit_normal[index_map[i]], light_source_position, gloss, shadow ); gl_Position = vec4( get_gl_Position(vec3(corners[i], 0.0)).xy, get_gl_Position(controls[index_map[i]]).zw ); EmitVertex(); } EndPrimitive(); } ================================================ FILE: manim/renderer/shaders/quadratic_bezier_stroke/vert.glsl ================================================ #version 330 #include ../include/camera_uniform_declarations.glsl in vec3 point; in vec3 prev_point; in vec3 next_point; in vec3 unit_normal; in float stroke_width; in vec4 color; // Bezier control point out vec3 bp; out vec3 prev_bp; out vec3 next_bp; out vec3 v_global_unit_normal; out float v_stroke_width; out vec4 v_color; const float STROKE_WIDTH_CONVERSION = 0.01; #include ../include/position_point_into_frame.glsl void main(){ bp = position_point_into_frame(point); prev_bp = position_point_into_frame(prev_point); next_bp = position_point_into_frame(next_point); v_global_unit_normal = rotate_point_into_frame(unit_normal); v_stroke_width = STROKE_WIDTH_CONVERSION * stroke_width; v_color = color; } ================================================ FILE: manim/renderer/shaders/surface/frag.glsl ================================================ #version 330 uniform vec3 light_source_position; uniform float gloss; uniform float shadow; in vec3 xyz_coords; in vec3 v_normal; in vec4 v_color; out vec4 frag_color; #include ../include/finalize_color.glsl void main() { frag_color = finalize_color( v_color, xyz_coords, normalize(v_normal), light_source_position, gloss, shadow ); } ================================================ FILE: manim/renderer/shaders/surface/vert.glsl ================================================ #version 330 #include ../include/camera_uniform_declarations.glsl in vec3 point; in vec3 du_point; in vec3 dv_point; in vec4 color; out vec3 xyz_coords; out vec3 v_normal; out vec4 v_color; #include ../include/position_point_into_frame.glsl #include ../include/get_gl_Position.glsl #include ../include/get_rotated_surface_unit_normal_vector.glsl void main(){ xyz_coords = position_point_into_frame(point); v_normal = get_rotated_surface_unit_normal_vector(point, du_point, dv_point); v_color = color; gl_Position = get_gl_Position(xyz_coords); } ================================================ FILE: manim/renderer/shaders/test/frag.glsl ================================================ #version 330 in vec4 v_color; out vec4 frag_color; void main() { frag_color = v_color; } ================================================ FILE: manim/renderer/shaders/test/vert.glsl ================================================ #version 330 in vec2 in_vert; in vec4 in_color; out vec4 v_color; void main() { v_color = in_color; gl_Position = vec4(in_vert, 0.0, 1.0); } ================================================ FILE: manim/renderer/shaders/textured_surface/frag.glsl ================================================ #version 330 uniform sampler2D LightTexture; uniform sampler2D DarkTexture; uniform float num_textures; uniform vec3 light_source_position; uniform float gloss; uniform float shadow; in vec3 xyz_coords; in vec3 v_normal; in vec2 v_im_coords; in float v_opacity; out vec4 frag_color; #include ../include/finalize_color.glsl const float dark_shift = 0.2; void main() { vec4 color = texture(LightTexture, v_im_coords); if(num_textures == 2.0){ vec4 dark_color = texture(DarkTexture, v_im_coords); float dp = dot( normalize(light_source_position - xyz_coords), normalize(v_normal) ); float alpha = smoothstep(-dark_shift, dark_shift, dp); color = mix(dark_color, color, alpha); } frag_color = finalize_color( color, xyz_coords, normalize(v_normal), light_source_position, gloss, shadow ); frag_color.a = v_opacity; } ================================================ FILE: manim/renderer/shaders/textured_surface/vert.glsl ================================================ #version 330 #include ../include/camera_uniform_declarations.glsl in vec3 point; in vec3 du_point; in vec3 dv_point; in vec2 im_coords; in float opacity; out vec3 xyz_coords; out vec3 v_normal; out vec2 v_im_coords; out float v_opacity; #include ../include/position_point_into_frame.glsl #include ../include/get_gl_Position.glsl #include ../include/get_rotated_surface_unit_normal_vector.glsl void main(){ xyz_coords = position_point_into_frame(point); v_normal = get_rotated_surface_unit_normal_vector(point, du_point, dv_point); v_im_coords = im_coords; v_opacity = opacity; gl_Position = get_gl_Position(xyz_coords); } ================================================ FILE: manim/renderer/shaders/true_dot/frag.glsl ================================================ #version 330 uniform vec3 light_source_position; uniform float gloss; uniform float shadow; uniform float anti_alias_width; in vec4 color; in float point_radius; in vec2 center; in vec2 point; out vec4 frag_color; #include ../include/finalize_color.glsl void main() { vec2 diff = point - center; float dist = length(diff); float signed_dist = dist - point_radius; if (signed_dist > 0.5 * anti_alias_width){ discard; } vec3 normal = vec3(diff / point_radius, sqrt(1 - (dist * dist) / (point_radius * point_radius))); frag_color = finalize_color( color, vec3(point.xy, 0.0), normal, light_source_position, gloss, shadow ); frag_color.a *= smoothstep(0.5, -0.5, signed_dist / anti_alias_width); } ================================================ FILE: manim/renderer/shaders/true_dot/geom.glsl ================================================ #version 330 layout (points) in; layout (triangle_strip, max_vertices = 4) out; // Needed for get_gl_Position uniform vec2 frame_shape; uniform float focal_distance; uniform float is_fixed_in_frame; uniform float is_fixed_orientation; uniform vec3 fixed_orientation_center; uniform float anti_alias_width; in vec3 v_point[1]; in float v_point_radius[1]; in vec4 v_color[1]; out vec4 color; out float point_radius; out vec2 center; out vec2 point; #include ../include/get_gl_Position.glsl void main() { color = v_color[0]; point_radius = v_point_radius[0]; center = v_point[0].xy; point_radius = v_point_radius[0] / max(1.0 - v_point[0].z / focal_distance / frame_shape.y, 0.0); float rpa = point_radius + anti_alias_width; for(int i = 0; i < 4; i++){ // To account for perspective int x_index = 2 * (i % 2) - 1; int y_index = 2 * (i / 2) - 1; vec3 corner = v_point[0] + vec3(x_index * rpa, y_index * rpa, 0.0); gl_Position = get_gl_Position(corner); point = corner.xy; EmitVertex(); } EndPrimitive(); } ================================================ FILE: manim/renderer/shaders/true_dot/vert.glsl ================================================ #version 330 #include ../include/camera_uniform_declarations.glsl in vec3 point; in vec4 color; uniform float point_radius; out vec3 v_point; out float v_point_radius; out vec4 v_color; #include ../include/position_point_into_frame.glsl void main(){ v_point = position_point_into_frame(point); v_point_radius = point_radius; v_color = color; } ================================================ FILE: manim/renderer/shaders/vectorized_mobject_fill/frag.glsl ================================================ #version 330 in vec4 v_color; in vec2 v_texture_coords; flat in int v_texture_mode; out vec4 frag_color; void main() { float curve_func = v_texture_coords[0] * v_texture_coords[0] - v_texture_coords[1]; if (v_texture_mode * curve_func >= 0.0) { frag_color = v_color; } else { discard; } } ================================================ FILE: manim/renderer/shaders/vectorized_mobject_fill/vert.glsl ================================================ #version 330 uniform mat4 u_model_view_matrix; uniform mat4 u_projection_matrix; in vec3 in_vert; in vec4 in_color; in vec2 texture_coords; in int texture_mode; out vec4 v_color; out vec2 v_texture_coords; flat out int v_texture_mode; void main() { v_color = in_color; v_texture_coords = texture_coords; v_texture_mode = texture_mode; gl_Position = u_projection_matrix * u_model_view_matrix * vec4(in_vert, 1.0); } ================================================ FILE: manim/renderer/shaders/vectorized_mobject_stroke/frag.glsl ================================================ #version 330 in float v_degree; in float v_thickness; in vec2 uv_point; in vec2[3] uv_curve; in vec4 v_color; out vec4 frag_color; // https://www.shadertoy.com/view/ltXSDB // Test if point p crosses line (a, b), returns sign of result float testCross(vec2 a, vec2 b, vec2 p) { return sign((b.y-a.y) * (p.x-a.x) - (b.x-a.x) * (p.y-a.y)); } // Determine which side we're on (using barycentric parameterization) float signBezier(vec2 A, vec2 B, vec2 C, vec2 p) { vec2 a = C - A, b = B - A, c = p - A; vec2 bary = vec2(c.x*b.y-b.x*c.y,a.x*c.y-c.x*a.y) / (a.x*b.y-b.x*a.y); vec2 d = vec2(bary.y * 0.5, 0.0) + 1.0 - bary.x - bary.y; return mix(sign(d.x * d.x - d.y), mix(-1.0, 1.0, step(testCross(A, B, p) * testCross(B, C, p), 0.0)), step((d.x - d.y), 0.0)) * testCross(A, C, B); } // Solve cubic equation for roots vec3 solveCubic(float a, float b, float c) { float p = b - a*a / 3.0, p3 = p*p*p; float q = a * (2.0*a*a - 9.0*b) / 27.0 + c; float d = q*q + 4.0*p3 / 27.0; float offset = -a / 3.0; if(d >= 0.0) { float z = sqrt(d); vec2 x = (vec2(z, -z) - q) / 2.0; vec2 uv = sign(x)*pow(abs(x), vec2(1.0/3.0)); return vec3(offset + uv.x + uv.y); } float v = acos(-sqrt(-27.0 / p3) * q / 2.0) / 3.0; float m = cos(v), n = sin(v)*1.732050808; return vec3(m + m, -n - m, n - m) * sqrt(-p / 3.0) + offset; } // Find the signed distance from a point to a bezier curve float sdBezier(vec2 A, vec2 B, vec2 C, vec2 p) { B = mix(B + vec2(1e-4), B, abs(sign(B * 2.0 - A - C))); vec2 a = B - A, b = A - B * 2.0 + C, c = a * 2.0, d = A - p; vec3 k = vec3(3.*dot(a,b),2.*dot(a,a)+dot(d,b),dot(d,a)) / dot(b,b); vec3 t = clamp(solveCubic(k.x, k.y, k.z), 0.0, 1.0); vec2 pos = A + (c + b*t.x)*t.x; float dis = length(pos - p); pos = A + (c + b*t.y)*t.y; dis = min(dis, length(pos - p)); pos = A + (c + b*t.z)*t.z; dis = min(dis, length(pos - p)); return dis * signBezier(A, B, C, p); } // https://www.shadertoy.com/view/llcfR7 float dLine(vec2 p1, vec2 p2, vec2 x) { vec4 colA = vec4(clamp (5.0 - length (x - p1), 0.0, 1.0)); vec4 colB = vec4(clamp (5.0 - length (x - p2), 0.0, 1.0)); vec2 a_p1 = x - p1; vec2 p2_p1 = p2 - p1; float h = clamp (dot (a_p1, p2_p1) / dot (p2_p1, p2_p1), 0.0, 1.0); return length (a_p1 - p2_p1 * h); } void main() { float distance; if (v_degree == 2.0) { distance = sdBezier(uv_curve[0], uv_curve[1], uv_curve[2], uv_point); } else { distance = dLine(uv_curve[0], uv_curve[2], uv_point); } if (abs(distance) < v_thickness) { frag_color = v_color; } else { discard; } } ================================================ FILE: manim/renderer/shaders/vectorized_mobject_stroke/vert.glsl ================================================ #version 330 uniform vec3 manim_unit_normal; uniform mat4 u_model_view_matrix; uniform mat4 u_projection_matrix; in vec3[3] current_curve; in vec2 tile_coordinate; in vec4 in_color; in float in_width; out float v_degree; out float v_thickness; out vec2 uv_point; out vec2[3] uv_curve; out vec4 v_color; int get_degree(in vec3 points[3], out vec3 normal) { float length_threshold = 1e-6; float angle_threshold = 5e-2; vec3 v01 = (points[1] - points[0]); vec3 v12 = (points[2] - points[1]); float dot_prod = clamp(dot(normalize(v01), normalize(v12)), -1, 1); bool aligned = acos(dot_prod) < angle_threshold; bool distinct_01 = length(v01) > length_threshold; // v01 is considered nonzero bool distinct_12 = length(v12) > length_threshold; // v12 is considered nonzero int num_distinct = int(distinct_01) + int(distinct_12); bool quadratic = (num_distinct == 2) && !aligned; bool linear = (num_distinct == 1) || ((num_distinct == 2) && aligned); bool constant = (num_distinct == 0); if (quadratic) { // If the curve is quadratic pass a normal vector to the caller. normal = normalize(cross(v01, v12)); return 2; } else if (linear) { return 1; } else { return 0; } } // https://iquilezles.org/www/articles/bezierbbox/bezierbbox.htm vec4 bboxBezier(in vec2 p0, in vec2 p1, in vec2 p2) { vec2 mi = min(p0, p2); vec2 ma = max(p0, p2); if (p1.x < mi.x || p1.x > ma.x || p1.y < mi.y || p1.y > ma.y) { vec2 t = clamp((p0 - p1) / (p0 - 2.0 * p1 + p2), 0.0, 1.0); vec2 s = 1.0 - t; vec2 q = s * s * p0 + 2.0 * s * t * p1 + t * t * p2; mi = min(mi, q); ma = max(ma, q); } return vec4(mi, ma); } vec2 convert_to_uv(vec3 x_unit, vec3 y_unit, vec3 point) { return vec2(dot(point, x_unit), dot(point, y_unit)); } vec3 convert_from_uv(vec3 translation, vec3 x_unit, vec3 y_unit, vec2 point) { vec3 untranslated_point = point[0] * x_unit + point[1] * y_unit; return untranslated_point + translation; } void main() { float thickness_multiplier = 0.004; v_color = in_color; vec3 computed_normal; v_degree = get_degree(current_curve, computed_normal); vec3 tile_x_unit = normalize(current_curve[2] - current_curve[0]); vec3 unit_normal; vec3 tile_y_unit; if (v_degree == 0) { tile_y_unit = vec3(0.0, 0.0, 0.0); } else if (v_degree == 1) { // Since the curve forms a straight line there's no way to compute a normal. unit_normal = manim_unit_normal; tile_y_unit = cross(unit_normal, tile_x_unit); } else { // Prefer to use a computed normal vector rather than the one from manim. unit_normal = computed_normal; // Ensure tile_y_unit is pointing toward p1 from p0. tile_y_unit = cross(unit_normal, tile_x_unit); if (dot(tile_y_unit, current_curve[1] - current_curve[0]) < 0) { tile_y_unit *= -1; } } // Project the curve onto the tile. for(int i = 0; i < 3; i++) { uv_curve[i] = convert_to_uv(tile_x_unit, tile_y_unit, current_curve[i]); } // Compute the curve's bounding box. vec4 uv_bounding_box = bboxBezier(uv_curve[0], uv_curve[1], uv_curve[2]); vec3 tile_translation = unit_normal * dot(current_curve[0], unit_normal); vec3 bounding_box_min = convert_from_uv(tile_translation, tile_x_unit, tile_y_unit, uv_bounding_box.xy); vec3 bounding_box_max = convert_from_uv(tile_translation, tile_x_unit, tile_y_unit, uv_bounding_box.zw); vec3 bounding_box_vec = bounding_box_max - bounding_box_min; vec3 tile_origin = bounding_box_min; vec3 tile_x_vec = tile_x_unit * dot(tile_x_unit, bounding_box_vec); vec3 tile_y_vec = tile_y_unit * dot(tile_y_unit, bounding_box_vec); // Expand the tile according to the line's thickness. v_thickness = thickness_multiplier * in_width; tile_origin = current_curve[0] - v_thickness * (tile_x_unit + tile_y_unit); tile_x_vec += 2 * v_thickness * tile_x_unit; tile_y_vec += 2 * v_thickness * tile_y_unit; vec3 tile_point = tile_origin + \ tile_coordinate[0] * tile_x_vec + \ tile_coordinate[1] * tile_y_vec; gl_Position = u_projection_matrix * u_model_view_matrix * vec4(tile_point, 1.0); uv_point = convert_to_uv(tile_x_unit, tile_y_unit, tile_point); } ================================================ FILE: manim/renderer/shaders/vertex_colors/frag.glsl ================================================ #version 330 in vec4 v_color; out vec4 frag_color; void main() { frag_color = v_color; } ================================================ FILE: manim/renderer/shaders/vertex_colors/vert.glsl ================================================ #version 330 uniform mat4 u_model_matrix; uniform mat4 u_view_matrix; uniform mat4 u_projection_matrix; in vec4 in_vert; in vec4 in_color; out vec4 v_color; void main() { v_color = in_color; gl_Position = u_projection_matrix * u_view_matrix * u_model_matrix * in_vert; } ================================================ FILE: manim/scene/__init__.py ================================================ [Empty file] ================================================ FILE: manim/scene/moving_camera_scene.py ================================================ """A scene whose camera can be moved around. .. SEEALSO:: :mod:`.moving_camera` Examples -------- .. manim:: ChangingCameraWidthAndRestore class ChangingCameraWidthAndRestore(MovingCameraScene): def construct(self): text = Text("Hello World").set_color(BLUE) self.add(text) self.camera.frame.save_state() self.play(self.camera.frame.animate.set(width=text.width * 1.2)) self.wait(0.3) self.play(Restore(self.camera.frame)) .. manim:: MovingCameraCenter 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.animate.move_to(s)) self.wait(0.3) self.play(self.camera.frame.animate.move_to(t)) .. manim:: MovingAndZoomingCamera 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) self.add(s, t) self.play(self.camera.frame.animate.move_to(s).set(width=s.width*2)) self.wait(0.3) self.play(self.camera.frame.animate.move_to(t).set(width=t.width*2)) self.play(self.camera.frame.animate.move_to(ORIGIN).set(width=14)) .. manim:: MovingCameraOnGraph class MovingCameraOnGraph(MovingCameraScene): def construct(self): self.camera.frame.save_state() ax = Axes(x_range=[-1, 10], y_range=[-1, 10]) graph = ax.plot(lambda x: np.sin(x), color=WHITE, x_range=[0, 3 * PI]) dot_1 = Dot(ax.i2gp(graph.t_min, graph)) dot_2 = Dot(ax.i2gp(graph.t_max, graph)) self.add(ax, graph, dot_1, dot_2) self.play(self.camera.frame.animate.scale(0.5).move_to(dot_1)) self.play(self.camera.frame.animate.move_to(dot_2)) self.play(Restore(self.camera.frame)) self.wait() .. manim:: SlidingMultipleScenes class SlidingMultipleScenes(MovingCameraScene): def construct(self): def create_scene(number): frame = Rectangle(width=16,height=9) circ = Circle().shift(LEFT) text = Tex(f"This is Scene {str(number)}").next_to(circ, RIGHT) frame.add(circ,text) return frame group = VGroup(*(create_scene(i) for i in range(4))).arrange_in_grid(buff=4) self.add(group) self.camera.auto_zoom(group[0], animate=False) for scene in group: self.play(self.camera.auto_zoom(scene)) self.wait() self.play(self.camera.auto_zoom(group, margin=2)) """ from __future__ import annotations __all__ = ["MovingCameraScene"] from typing import Any from manim.animation.animation import Animation from manim.mobject.mobject import Mobject from ..camera.camera import Camera from ..camera.moving_camera import MovingCamera from ..scene.scene import Scene from ..utils.family import extract_mobject_family_members from ..utils.iterables import list_update class MovingCameraScene(Scene): """ This is a Scene, with special configurations and properties that make it suitable for cases where the camera must be moved around. Note: Examples are included in the moving_camera_scene module documentation, see below in the 'see also' section. .. SEEALSO:: :mod:`.moving_camera_scene` :class:`.MovingCamera` """ def __init__( self, camera_class: type[Camera] = MovingCamera, **kwargs: Any ) -> None: super().__init__(camera_class=camera_class, **kwargs) def get_moving_mobjects(self, *animations: Animation) -> list[Mobject]: """ This method returns a list of all of the Mobjects in the Scene that are moving, that are also in the animations passed. Parameters ---------- *animations The Animations whose mobjects will be checked. """ moving_mobjects = super().get_moving_mobjects(*animations) all_moving_mobjects = extract_mobject_family_members(moving_mobjects) movement_indicators = self.renderer.camera.get_mobjects_indicating_movement() # type: ignore[union-attr] for movement_indicator in movement_indicators: if movement_indicator in all_moving_mobjects: # When one of these is moving, the camera should # consider all mobjects to be moving return list_update(self.mobjects, moving_mobjects) return moving_mobjects ================================================ FILE: manim/scene/scene_file_writer.py ================================================ """The interface between scenes and ffmpeg.""" from __future__ import annotations __all__ = ["SceneFileWriter"] import json import shutil from fractions import Fraction from pathlib import Path from queue import Queue from tempfile import NamedTemporaryFile, _TemporaryFileWrapper from threading import Thread from typing import TYPE_CHECKING, Any import av import numpy as np import srt from PIL import Image from pydub import AudioSegment from manim import __version__ from .. import config, logger from .._config.logger_utils import set_file_logger from ..constants import RendererType from ..utils.file_ops import ( add_extension_if_not_present, add_version_before_extension, guarantee_existence, is_gif_format, is_png_format, modify_atime, write_to_movie, ) from ..utils.sounds import get_full_sound_file_path from .section import DefaultSectionType, Section if TYPE_CHECKING: from av.container.output import OutputContainer from av.stream import Stream from manim.renderer.cairo_renderer import CairoRenderer from manim.renderer.opengl_renderer import OpenGLRenderer from manim.typing import PixelArray, StrPath def to_av_frame_rate(fps: float) -> Fraction: epsilon1 = 1e-4 epsilon2 = 0.02 if isinstance(fps, int): (num, denom) = (fps, 1) elif abs(fps - round(fps)) < epsilon1: (num, denom) = (round(fps), 1) else: denom = 1001 num = round(fps * denom / 1000) * 1000 if abs(fps - num / denom) >= epsilon2: raise ValueError("invalid frame rate") return Fraction(num, denom) def convert_audio( input_path: Path, output_path: Path | _TemporaryFileWrapper[bytes], codec_name: str ) -> None: with ( av.open(input_path) as input_audio, av.open(output_path, "w") as output_audio, ): input_audio_stream = input_audio.streams.audio[0] output_audio_stream = output_audio.add_stream(codec_name) for frame in input_audio.decode(input_audio_stream): for packet in output_audio_stream.encode(frame): output_audio.mux(packet) for packet in output_audio_stream.encode(): output_audio.mux(packet) class SceneFileWriter: """SceneFileWriter is the object that actually writes the animations played, into video files, using FFMPEG. This is mostly for Manim's internal use. You will rarely, if ever, have to use the methods for this class, unless tinkering with the very fabric of Manim's reality. Attributes ---------- sections : list of :class:`.Section` used to segment scene sections_output_dir : :class:`pathlib.Path` where are section videos stored output_name : str name of movie without extension and basis for section video names Some useful attributes are: "write_to_movie" (bool=False) Whether or not to write the animations into a video file. "movie_file_extension" (str=".mp4") The file-type extension of the outputted video. "partial_movie_files" List of all the partial-movie files. """ force_output_as_scene_name = False def __init__( self, renderer: CairoRenderer | OpenGLRenderer, scene_name: str, **kwargs: Any, ) -> None: self.renderer = renderer self.init_output_directories(scene_name) self.init_audio() self.frame_count = 0 self.partial_movie_files: list[str | None] = [] self.subcaptions: list[srt.Subtitle] = [] self.sections: list[Section] = [] # first section gets automatically created for convenience # if you need the first section to be skipped, add a first section by hand, it will replace this one self.next_section( name="autocreated", type_=DefaultSectionType.NORMAL, skip_animations=False ) def init_output_directories(self, scene_name: str) -> None: """Initialise output directories. Notes ----- The directories are read from ``config``, for example ``config['media_dir']``. If the target directories don't already exist, they will be created. """ if config["dry_run"]: # in dry-run mode there is no output return module_name = config.get_dir("input_file").stem if config["input_file"] else "" if SceneFileWriter.force_output_as_scene_name: self.output_name = Path(scene_name) elif config["output_file"] and not config["write_all"]: self.output_name = config.get_dir("output_file") else: self.output_name = Path(scene_name) if config["media_dir"]: image_dir = guarantee_existence( config.get_dir( "images_dir", module_name=module_name, scene_name=scene_name ), ) self.image_file_path = image_dir / add_extension_if_not_present( self.output_name, ".png" ) if write_to_movie(): movie_dir = guarantee_existence( config.get_dir( "video_dir", module_name=module_name, scene_name=scene_name ), ) self.movie_file_path = movie_dir / add_extension_if_not_present( self.output_name, config["movie_file_extension"] ) # TODO: /dev/null would be good in case sections_output_dir is used without being set (doesn't work on Windows), everyone likes defensive programming, right? self.sections_output_dir = Path("") if config.save_sections: self.sections_output_dir = guarantee_existence( config.get_dir( "sections_dir", module_name=module_name, scene_name=scene_name ) ) if is_gif_format(): self.gif_file_path = add_extension_if_not_present( self.output_name, ".gif" ) if not config["output_file"]: self.gif_file_path = add_version_before_extension( self.gif_file_path ) self.gif_file_path = movie_dir / self.gif_file_path self.partial_movie_directory = guarantee_existence( config.get_dir( "partial_movie_dir", scene_name=scene_name, module_name=module_name, ), ) if config["log_to_file"]: log_dir = guarantee_existence(config.get_dir("log_dir")) set_file_logger( scene_name=scene_name, module_name=module_name, log_dir=log_dir ) def finish_last_section(self) -> None: """Delete current section if it is empty.""" if len(self.sections) and self.sections[-1].is_empty(): self.sections.pop() def next_section(self, name: str, type_: str, skip_animations: bool) -> None: """Create segmentation cut here.""" self.finish_last_section() # images don't support sections section_video: str | None = None # don't save when None if ( not config.dry_run and write_to_movie() and config.save_sections and not skip_animations ): # relative to index file section_video = f"{self.output_name}_{len(self.sections):04}_{name}{config.movie_file_extension}" self.sections.append( Section( type_, section_video, name, skip_animations, ), ) def add_partial_movie_file(self, hash_animation: str | None) -> None: """Adds a new partial movie file path to ``scene.partial_movie_files`` and current section from a hash. This method will compute the path from the hash. In addition to that it adds the new animation to the current section. Parameters ---------- hash_animation Hash of the animation. """ if not hasattr(self, "partial_movie_directory") or not write_to_movie(): return # None has to be added to partial_movie_files to keep the right index with scene.num_plays. # i.e if an animation is skipped, scene.num_plays is still incremented and we add an element to partial_movie_file be even with num_plays. if hash_animation is None: self.partial_movie_files.append(None) self.sections[-1].partial_movie_files.append(None) else: new_partial_movie_file = str( self.partial_movie_directory / f"{hash_animation}{config['movie_file_extension']}" ) self.partial_movie_files.append(new_partial_movie_file) self.sections[-1].partial_movie_files.append(new_partial_movie_file) def get_resolution_directory(self) -> str: """Get the name of the resolution directory directly containing the video file. This method gets the name of the directory that immediately contains the video file. This name is ``p``. For example, if you are rendering an 854x480 px animation at 15fps, the name of the directory that immediately contains the video, file will be ``480p15``. The file structure should look something like:: MEDIA_DIR |--Tex |--texts |--videos |-- |--p |--partial_movie_files |--.mp4 |--.srt Returns ------- :class:`str` The name of the directory. """ pixel_height = config["pixel_height"] frame_rate = config["frame_rate"] return f"{pixel_height}p{frame_rate}" # Sound def init_audio(self) -> None: """Preps the writer for adding audio to the movie.""" self.includes_sound = False def create_audio_segment(self) -> None: """Creates an empty, silent, Audio Segment.""" self.audio_segment = AudioSegment.silent() def add_audio_segment( self, new_segment: AudioSegment, time: float | None = None, gain_to_background: float | None = None, ) -> None: """This method adds an audio segment from an AudioSegment type object and suitable parameters. Parameters ---------- new_segment The audio segment to add time the timestamp at which the sound should be added. gain_to_background The gain of the segment from the background. """ if not self.includes_sound: self.includes_sound = True self.create_audio_segment() segment = self.audio_segment curr_end = segment.duration_seconds if time is None: time = curr_end if time < 0: raise ValueError("Adding sound at timestamp < 0") new_end = time + new_segment.duration_seconds diff = new_end - curr_end if diff > 0: segment = segment.append( AudioSegment.silent(int(np.ceil(diff * 1000))), crossfade=0, ) self.audio_segment = segment.overlay( new_segment, position=int(1000 * time), gain_during_overlay=gain_to_background, ) def add_sound( self, sound_file: StrPath, time: float | None = None, gain: float | None = None, **kwargs: Any, ) -> None: """This method adds an audio segment from a sound file. Parameters ---------- sound_file The path to the sound file. time The timestamp at which the audio should be added. gain The gain of the given audio segment. **kwargs This method uses add_audio_segment, so any keyword arguments used there can be referenced here. """ file_path = get_full_sound_file_path(sound_file) # we assume files with .wav / .raw suffix are actually # .wav and .raw files, respectively. if file_path.suffix not in (".wav", ".raw"): # we need to pass delete=False to work on Windows # TODO: figure out a way to cache the wav file generated (benchmark needed) with NamedTemporaryFile(suffix=".wav", delete=False) as wav_file_path: convert_audio(file_path, wav_file_path, "pcm_s16le") new_segment = AudioSegment.from_file(wav_file_path.name) logger.info(f"Automatically converted {file_path} to .wav") Path(wav_file_path.name).unlink() else: new_segment = AudioSegment.from_file(file_path) if gain: new_segment = new_segment.apply_gain(gain) self.add_audio_segment(new_segment, time, **kwargs) # Writers def begin_animation( self, allow_write: bool = False, file_path: StrPath | None = None ) -> None: """Used internally by manim to stream the animation to FFMPEG for displaying or writing to a file. Parameters ---------- allow_write Whether or not to write to a video file. """ if write_to_movie() and allow_write: self.open_partial_movie_stream(file_path=file_path) def end_animation(self, allow_write: bool = False) -> None: """Internally used by Manim to stop streaming to FFMPEG gracefully. Parameters ---------- allow_write Whether or not to write to a video file. """ if write_to_movie() and allow_write: self.close_partial_movie_stream() def listen_and_write(self) -> None: """For internal use only: blocks until new frame is available on the queue.""" while True: num_frames, frame_data = self.queue.get() if frame_data is None: break self.encode_and_write_frame(frame_data, num_frames) def encode_and_write_frame(self, frame: PixelArray, num_frames: int) -> None: """For internal use only: takes a given frame in ``np.ndarray`` format and writes it to the stream """ for _ in range(num_frames): # Notes: precomputing reusing packets does not work! # I.e., you cannot do `packets = encode(...)` # and reuse it, as it seems that `mux(...)` # consumes the packet. # The same issue applies for `av_frame`, # reusing it renders weird-looking frames. av_frame = av.VideoFrame.from_ndarray(frame, format="rgba") for packet in self.video_stream.encode(av_frame): self.video_container.mux(packet) def write_frame( self, frame_or_renderer: PixelArray | OpenGLRenderer, num_frames: int = 1 ) -> None: """Used internally by Manim to write a frame to the FFMPEG input buffer. Parameters ---------- frame_or_renderer Pixel array of the frame. num_frames The number of times to write frame. """ if write_to_movie(): if isinstance(frame_or_renderer, np.ndarray): frame = frame_or_renderer else: frame = ( frame_or_renderer.get_frame() if config.renderer == RendererType.OPENGL else frame_or_renderer ) msg = (num_frames, frame) self.queue.put(msg) if is_png_format() and not config["dry_run"]: if isinstance(frame_or_renderer, np.ndarray): image = Image.fromarray(frame_or_renderer) else: image = ( frame_or_renderer.get_image() if config.renderer == RendererType.OPENGL else Image.fromarray(frame_or_renderer) ) target_dir = self.image_file_path.parent / self.image_file_path.stem extension = self.image_file_path.suffix self.output_image( image, target_dir, extension, config["zero_pad"], ) def output_image( self, image: Image.Image, target_dir: StrPath, ext: str, zero_pad: int ) -> None: if zero_pad: image.save(f"{target_dir}{str(self.frame_count).zfill(zero_pad)}{ext}") else: image.save(f"{target_dir}{self.frame_count}{ext}") self.frame_count += 1 def save_image(self, image: Image.Image) -> None: """This method saves the image passed to it in the default image directory. Parameters ---------- image The pixel array of the image to save. """ if config["dry_run"]: return if not config["output_file"]: self.image_file_path = add_version_before_extension(self.image_file_path) image.save(self.image_file_path) self.print_file_ready_message(self.image_file_path) def finish(self) -> None: """Finishes writing to the FFMPEG buffer or writing images to output directory. Combines the partial movie files into the whole scene. If save_last_frame is True, saves the last frame in the default image directory. """ if write_to_movie(): self.combine_to_movie() if config.save_sections: self.combine_to_section_videos() if config["flush_cache"]: self.flush_cache_directory() else: self.clean_cache() elif is_png_format() and not config["dry_run"]: target_dir = self.image_file_path.parent / self.image_file_path.stem logger.info("\n%i images ready at %s\n", self.frame_count, str(target_dir)) if self.subcaptions: self.write_subcaption_file() def open_partial_movie_stream(self, file_path: StrPath | None = None) -> None: """Open a container holding a video stream. This is used internally by Manim initialize the container holding the video stream of a partial movie file. """ if file_path is None: file_path = self.partial_movie_files[self.renderer.num_plays] self.partial_movie_file_path = file_path fps = to_av_frame_rate(config.frame_rate) partial_movie_file_codec = "libx264" partial_movie_file_pix_fmt = "yuv420p" av_options = { "an": "1", # ffmpeg: -an, no audio "crf": "23", # ffmpeg: -crf, constant rate factor (improved bitrate) } if config.movie_file_extension == ".webm": partial_movie_file_codec = "libvpx-vp9" av_options["-auto-alt-ref"] = "1" if config.transparent: partial_movie_file_pix_fmt = "yuva420p" elif config.transparent: partial_movie_file_codec = "qtrle" partial_movie_file_pix_fmt = "argb" with av.open(file_path, mode="w") as video_container: stream = video_container.add_stream( partial_movie_file_codec, rate=fps, options=av_options, ) stream.pix_fmt = partial_movie_file_pix_fmt stream.width = config.pixel_width stream.height = config.pixel_height self.video_container: OutputContainer = video_container self.video_stream: Stream = stream self.queue: Queue[tuple[int, PixelArray | None]] = Queue() self.writer_thread = Thread(target=self.listen_and_write, args=()) self.writer_thread.start() def close_partial_movie_stream(self) -> None: """Close the currently opened video container. Used internally by Manim to first flush the remaining packages in the video stream holding a partial file, and then close the corresponding container. """ self.queue.put((-1, None)) self.writer_thread.join() for packet in self.video_stream.encode(): self.video_container.mux(packet) self.video_container.close() logger.info( f"Animation {self.renderer.num_plays} : Partial movie file written in %(path)s", {"path": f"'{self.partial_movie_file_path}'"}, ) def is_already_cached(self, hash_invocation: str) -> bool: """Will check if a file named with `hash_invocation` exists. Parameters ---------- hash_invocation The hash corresponding to an invocation to either `scene.play` or `scene.wait`. Returns ------- :class:`bool` Whether the file exists. """ if not hasattr(self, "partial_movie_directory") or not write_to_movie(): return False path = ( self.partial_movie_directory / f"{hash_invocation}{config['movie_file_extension']}" ) return path.exists() def combine_files( self, input_files: list[str], output_file: Path, create_gif: bool = False, includes_sound: bool = False, ) -> None: file_list = self.partial_movie_directory / "partial_movie_file_list.txt" logger.debug( f"Partial movie files to combine ({len(input_files)} files): %(p)s", {"p": input_files[:5]}, ) with file_list.open("w", encoding="utf-8") as fp: fp.write("# This file is used internally by FFMPEG.\n") for pf_path in input_files: pf_path = Path(pf_path).as_posix() fp.write(f"file 'file:{pf_path}'\n") av_options = { "safe": "0", # needed to read files } if not includes_sound: av_options["an"] = "1" partial_movies_input = av.open( str(file_list), options=av_options, format="concat" ) partial_movies_stream = partial_movies_input.streams.video[0] output_container = av.open(str(output_file), mode="w") output_container.metadata["comment"] = ( f"Rendered with Manim Community v{__version__}" ) output_stream = output_container.add_stream( codec_name="gif" if create_gif else None, template=partial_movies_stream if not create_gif else None, ) if config.transparent and config.movie_file_extension == ".webm": output_stream.pix_fmt = "yuva420p" if create_gif: """The following solution was largely inspired from this comment https://github.com/imageio/imageio/issues/995#issuecomment-1580533018, and the following code https://github.com/imageio/imageio/blob/65d79140018bb7c64c0692ea72cb4093e8d632a0/imageio/plugins/pyav.py#L927-L996. """ output_stream.pix_fmt = "rgb8" if config.transparent: output_stream.pix_fmt = "pal8" output_stream.width = config.pixel_width output_stream.height = config.pixel_height output_stream.rate = to_av_frame_rate(config.frame_rate) graph = av.filter.Graph() input_buffer = graph.add_buffer(template=partial_movies_stream) split = graph.add("split") palettegen = graph.add("palettegen", "stats_mode=diff") paletteuse = graph.add( "paletteuse", "dither=bayer:bayer_scale=5:diff_mode=rectangle" ) output_sink = graph.add("buffersink") input_buffer.link_to(split) split.link_to(palettegen, 0, 0) # 1st input of split -> input of palettegen split.link_to(paletteuse, 1, 0) # 2nd output of split -> 1st input palettegen.link_to(paletteuse, 0, 1) # output of palettegen -> 2nd input paletteuse.link_to(output_sink) graph.configure() for frame in partial_movies_input.decode(video=0): graph.push(frame) graph.push(None) # EOF: https://github.com/PyAV-Org/PyAV/issues/886. frames_written = 0 while True: try: frame = graph.pull() if output_stream.codec_context.time_base is not None: frame.time_base = output_stream.codec_context.time_base frame.pts = frames_written frames_written += 1 output_container.mux(output_stream.encode(frame)) except av.error.EOFError: break for packet in output_stream.encode(): output_container.mux(packet) else: for packet in partial_movies_input.demux(partial_movies_stream): # We need to skip the "flushing" packets that `demux` generates. if packet.dts is None: continue packet.dts = None # This seems to be needed, as dts from consecutive # files may not be monotically increasing, so we let libav compute it. # We need to assign the packet to the new stream. packet.stream = output_stream output_container.mux(packet) partial_movies_input.close() output_container.close() def combine_to_movie(self) -> None: """Used internally by Manim to combine the separate partial movie files that make up a Scene into a single video file for that Scene. """ partial_movie_files = [el for el in self.partial_movie_files if el is not None] # NOTE: Here we should do a check and raise an exception if partial # movie file is empty. We can't, as a lot of stuff (in particular, in # tests) use scene initialization, and this error would be raised as # it's just an empty scene initialized. # determine output path movie_file_path = self.movie_file_path if is_gif_format(): movie_file_path = self.gif_file_path if len(partial_movie_files) == 0: # Prevent calling concat on empty list logger.info("No animations are contained in this scene.") return logger.info("Combining to Movie file.") self.combine_files( partial_movie_files, movie_file_path, is_gif_format(), self.includes_sound, ) # handle sound if self.includes_sound and config.format != "gif": sound_file_path = movie_file_path.with_suffix(".wav") # Makes sure sound file length will match video file self.add_audio_segment(AudioSegment.silent(0)) self.audio_segment.export( sound_file_path, format="wav", bitrate="312k", ) # Audio added to a VP9 encoded (webm) video file needs # to be encoded as vorbis or opus. Directly exporting # self.audio_segment with such a codec works in principle, # but tries to call ffmpeg via its CLI -- which we want # to avoid. This is why we need to do the conversion # manually. if config.movie_file_extension == ".webm": ogg_sound_file_path = sound_file_path.with_suffix(".ogg") convert_audio(sound_file_path, ogg_sound_file_path, "libvorbis") sound_file_path = ogg_sound_file_path elif config.movie_file_extension == ".mp4": # Similarly, pyav may reject wav audio in an .mp4 file; # convert to AAC. aac_sound_file_path = sound_file_path.with_suffix(".aac") convert_audio(sound_file_path, aac_sound_file_path, "aac") sound_file_path = aac_sound_file_path temp_file_path = movie_file_path.with_name( f"{movie_file_path.stem}_temp{movie_file_path.suffix}" ) av_options = { "shortest": "1", "metadata": f"comment=Rendered with Manim Community v{__version__}", } with ( av.open(movie_file_path) as video_input, av.open(sound_file_path) as audio_input, ): video_stream = video_input.streams.video[0] audio_stream = audio_input.streams.audio[0] output_container = av.open( str(temp_file_path), mode="w", options=av_options ) output_video_stream = output_container.add_stream(template=video_stream) output_audio_stream = output_container.add_stream(template=audio_stream) for packet in video_input.demux(video_stream): # We need to skip the "flushing" packets that `demux` generates. if packet.dts is None: continue # We need to assign the packet to the new stream. packet.stream = output_video_stream output_container.mux(packet) for packet in audio_input.demux(audio_stream): # We need to skip the "flushing" packets that `demux` generates. if packet.dts is None: continue # We need to assign the packet to the new stream. packet.stream = output_audio_stream output_container.mux(packet) output_container.close() shutil.move(str(temp_file_path), str(movie_file_path)) sound_file_path.unlink() self.print_file_ready_message(str(movie_file_path)) if write_to_movie(): for file_path in partial_movie_files: # We have to modify the accessed time so if we have to clean the cache we remove the one used the longest. modify_atime(file_path) def combine_to_section_videos(self) -> None: """Concatenate partial movie files for each section.""" self.finish_last_section() sections_index: list[dict[str, Any]] = [] for section in self.sections: # only if section does want to be saved if section.video is not None: logger.info(f"Combining partial files for section '{section.name}'") self.combine_files( section.get_clean_partial_movie_files(), self.sections_output_dir / section.video, ) sections_index.append(section.get_dict(self.sections_output_dir)) with (self.sections_output_dir / f"{self.output_name}.json").open("w") as file: json.dump(sections_index, file, indent=4) def clean_cache(self) -> None: """Will clean the cache by removing the oldest partial_movie_files.""" cached_partial_movies = [ (self.partial_movie_directory / file_name) for file_name in self.partial_movie_directory.iterdir() if file_name != "partial_movie_file_list.txt" ] if len(cached_partial_movies) > config["max_files_cached"]: number_files_to_delete = ( len(cached_partial_movies) - config["max_files_cached"] ) oldest_files_to_delete = sorted( cached_partial_movies, key=lambda path: path.stat().st_atime, )[:number_files_to_delete] for file_to_delete in oldest_files_to_delete: file_to_delete.unlink() logger.info( f"The partial movie directory is full (> {config['max_files_cached']} files). Therefore, manim has removed the {number_files_to_delete} oldest file(s)." " You can change this behaviour by changing max_files_cached in config.", ) def flush_cache_directory(self) -> None: """Delete all the cached partial movie files""" cached_partial_movies = [ self.partial_movie_directory / file_name for file_name in self.partial_movie_directory.iterdir() if file_name != "partial_movie_file_list.txt" ] for f in cached_partial_movies: f.unlink() logger.info( f"Cache flushed. {len(cached_partial_movies)} file(s) deleted in %(par_dir)s.", {"par_dir": self.partial_movie_directory}, ) def write_subcaption_file(self) -> None: """Writes the subcaption file.""" if config.output_file is None: return subcaption_file = Path(config.output_file).with_suffix(".srt") subcaption_file.write_text(srt.compose(self.subcaptions), encoding="utf-8") logger.info(f"Subcaption file has been written as {subcaption_file}") def print_file_ready_message(self, file_path: StrPath) -> None: """Prints the "File Ready" message to STDOUT.""" config["output_file"] = file_path logger.info("\nFile ready at %(file_path)s\n", {"file_path": f"'{file_path}'"}) ================================================ FILE: manim/scene/section.py ================================================ """building blocks of segmented video API""" from __future__ import annotations from enum import Enum from pathlib import Path from typing import Any from manim import get_video_metadata __all__ = ["Section", "DefaultSectionType"] class DefaultSectionType(str, Enum): """The type of a section can be used for third party applications. A presentation system could for example use the types to created loops. Examples -------- This class can be reimplemented for more types:: class PresentationSectionType(str, Enum): # start, end, wait for continuation by user NORMAL = "presentation.normal" # start, end, immediately continue to next section SKIP = "presentation.skip" # start, end, restart, immediately continue to next section when continued by user LOOP = "presentation.loop" # start, end, restart, finish animation first when user continues COMPLETE_LOOP = "presentation.complete_loop" """ NORMAL = "default.normal" class Section: r"""A :class:`.Scene` can be segmented into multiple Sections. Refer to :doc:`the documentation` for more info. It consists of multiple animations. Attributes ---------- type\_ Can be used by a third party applications to classify different types of sections. video Path to video file with animations belonging to section relative to sections directory. If ``None``, then the section will not be saved. name Human readable, non-unique name for this section. skip_animations Skip rendering the animations in this section when ``True``. partial_movie_files Animations belonging to this section. See Also -------- :class:`.DefaultSectionType` :meth:`.CairoRenderer.update_skipping_status` :meth:`.OpenGLRenderer.update_skipping_status` """ def __init__( self, type_: str, video: str | None, name: str, skip_animations: bool ) -> None: self.type_ = type_ # None when not to be saved -> still keeps section alive self.video: str | None = video self.name = name self.skip_animations = skip_animations self.partial_movie_files: list[str | None] = [] def is_empty(self) -> bool: """Check whether this section is empty. Note that animations represented by ``None`` are also counted. """ return len(self.partial_movie_files) == 0 def get_clean_partial_movie_files(self) -> list[str]: """Return all partial movie files that are not ``None``.""" return [el for el in self.partial_movie_files if el is not None] def get_dict(self, sections_dir: Path) -> dict[str, Any]: """Get dictionary representation with metadata of output video. The output from this function is used from every section to build the sections index file. The output video must have been created in the ``sections_dir`` before executing this method. This is the main part of the Segmented Video API. """ if self.video is None: raise ValueError( f"Section '{self.name}' cannot be exported as dict, it does not have a video path assigned to it" ) video_metadata = get_video_metadata(sections_dir / self.video) return dict( { "name": self.name, "type": self.type_, "video": self.video, }, **video_metadata, ) def __repr__(self) -> str: return f"
" ================================================ FILE: manim/scene/three_d_scene.py ================================================ """A scene suitable for rendering three-dimensional objects and animations.""" from __future__ import annotations __all__ = ["ThreeDScene", "SpecialThreeDScene"] import warnings from collections.abc import Iterable, Sequence import numpy as np from manim.mobject.geometry.line import Line from manim.mobject.graphing.coordinate_systems import ThreeDAxes from manim.mobject.opengl.opengl_mobject import OpenGLMobject from manim.mobject.three_d.three_dimensions import Sphere from manim.mobject.value_tracker import ValueTracker from .. import config from ..animation.animation import Animation from ..animation.transform import Transform from ..camera.three_d_camera import ThreeDCamera from ..constants import DEGREES, RendererType from ..mobject.mobject import Mobject from ..mobject.types.vectorized_mobject import VectorizedPoint, VGroup from ..renderer.opengl_renderer import OpenGLCamera from ..scene.scene import Scene from ..utils.config_ops import merge_dicts_recursively class ThreeDScene(Scene): """ This is a Scene, with special configurations and properties that make it suitable for Three Dimensional Scenes. """ def __init__( self, camera_class=ThreeDCamera, ambient_camera_rotation=None, default_angled_camera_orientation_kwargs=None, **kwargs, ): self.ambient_camera_rotation = ambient_camera_rotation if default_angled_camera_orientation_kwargs is None: default_angled_camera_orientation_kwargs = { "phi": 70 * DEGREES, "theta": -135 * DEGREES, } self.default_angled_camera_orientation_kwargs = ( default_angled_camera_orientation_kwargs ) super().__init__(camera_class=camera_class, **kwargs) def set_camera_orientation( self, phi: float | None = None, theta: float | None = None, gamma: float | None = None, zoom: float | None = None, focal_distance: float | None = None, frame_center: Mobject | Sequence[float] | None = None, **kwargs, ): """ This method sets the orientation of the camera in the scene. Parameters ---------- phi The polar angle i.e the angle between Z_AXIS and Camera through ORIGIN in radians. theta The azimuthal angle i.e the angle that spins the camera around the Z_AXIS. focal_distance The focal_distance of the Camera. gamma The rotation of the camera about the vector from the ORIGIN to the Camera. zoom The zoom factor of the scene. frame_center The new center of the camera frame in cartesian coordinates. """ if phi is not None: self.renderer.camera.set_phi(phi) if theta is not None: self.renderer.camera.set_theta(theta) if focal_distance is not None: self.renderer.camera.set_focal_distance(focal_distance) if gamma is not None: self.renderer.camera.set_gamma(gamma) if zoom is not None: self.renderer.camera.set_zoom(zoom) if frame_center is not None: self.renderer.camera._frame_center.move_to(frame_center) def begin_ambient_camera_rotation(self, rate: float = 0.02, about: str = "theta"): """ This method begins an ambient rotation of the camera about the Z_AXIS, in the anticlockwise direction Parameters ---------- rate The rate at which the camera should rotate about the Z_AXIS. Negative rate means clockwise rotation. about one of 3 options: ["theta", "phi", "gamma"]. defaults to theta. """ # TODO, use a ValueTracker for rate, so that it # can begin and end smoothly about: str = about.lower() try: if config.renderer == RendererType.CAIRO: trackers = { "theta": self.camera.theta_tracker, "phi": self.camera.phi_tracker, "gamma": self.camera.gamma_tracker, } x: ValueTracker = trackers[about] x.add_updater(lambda m, dt: x.increment_value(rate * dt)) self.add(x) elif config.renderer == RendererType.OPENGL: cam: OpenGLCamera = self.camera methods = { "theta": cam.increment_theta, "phi": cam.increment_phi, "gamma": cam.increment_gamma, } cam.add_updater(lambda m, dt: methods[about](rate * dt)) self.add(self.camera) except Exception as e: raise ValueError("Invalid ambient rotation angle.") from e def stop_ambient_camera_rotation(self, about="theta"): """This method stops all ambient camera rotation.""" about: str = about.lower() try: if config.renderer == RendererType.CAIRO: trackers = { "theta": self.camera.theta_tracker, "phi": self.camera.phi_tracker, "gamma": self.camera.gamma_tracker, } x: ValueTracker = trackers[about] x.clear_updaters() self.remove(x) elif config.renderer == RendererType.OPENGL: self.camera.clear_updaters() except Exception as e: raise ValueError("Invalid ambient rotation angle.") from e def begin_3dillusion_camera_rotation( self, rate: float = 1, origin_phi: float | None = None, origin_theta: float | None = None, ): """ This method creates a 3D camera rotation illusion around the current camera orientation. Parameters ---------- rate The rate at which the camera rotation illusion should operate. origin_phi The polar angle the camera should move around. Defaults to the current phi angle. origin_theta The azimutal angle the camera should move around. Defaults to the current theta angle. """ if origin_theta is None: origin_theta = self.renderer.camera.theta_tracker.get_value() if origin_phi is None: origin_phi = self.renderer.camera.phi_tracker.get_value() val_tracker_theta = ValueTracker(0) def update_theta(m, dt): val_tracker_theta.increment_value(dt * rate) val_for_left_right = 0.2 * np.sin(val_tracker_theta.get_value()) return m.set_value(origin_theta + val_for_left_right) self.renderer.camera.theta_tracker.add_updater(update_theta) self.add(self.renderer.camera.theta_tracker) val_tracker_phi = ValueTracker(0) def update_phi(m, dt): val_tracker_phi.increment_value(dt * rate) val_for_up_down = 0.1 * np.cos(val_tracker_phi.get_value()) - 0.1 return m.set_value(origin_phi + val_for_up_down) 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.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, phi: float | None = None, theta: float | None = None, gamma: float | None = None, zoom: float | None = None, focal_distance: float | None = None, frame_center: Mobject | Sequence[float] | None = None, added_anims: Iterable[Animation] = [], **kwargs, ): """ This method animates the movement of the camera to the given spherical coordinates. Parameters ---------- phi The polar angle i.e the angle between Z_AXIS and Camera through ORIGIN in radians. theta The azimuthal angle i.e the angle that spins the camera around the Z_AXIS. focal_distance The radial focal_distance between ORIGIN and Camera. gamma The rotation of the camera about the vector from the ORIGIN to the Camera. zoom The zoom factor of the camera. frame_center The new center of the camera frame in cartesian coordinates. added_anims Any other animations to be played at the same time. """ anims = [] if config.renderer == RendererType.CAIRO: self.camera: ThreeDCamera value_tracker_pairs = [ (phi, self.camera.phi_tracker), (theta, self.camera.theta_tracker), (focal_distance, self.camera.focal_distance_tracker), (gamma, self.camera.gamma_tracker), (zoom, self.camera.zoom_tracker), ] for value, tracker in value_tracker_pairs: if value is not None: anims.append(tracker.animate.set_value(value)) if frame_center is not None: anims.append(self.camera._frame_center.animate.move_to(frame_center)) elif config.renderer == RendererType.OPENGL: cam: OpenGLCamera = self.camera cam2 = cam.copy() methods = { "theta": cam2.set_theta, "phi": cam2.set_phi, "gamma": cam2.set_gamma, "zoom": cam2.scale, "frame_center": cam2.move_to, } if frame_center is not None: if isinstance(frame_center, OpenGLMobject): frame_center = frame_center.get_center() frame_center = list(frame_center) zoom_value = None if zoom is not None: zoom_value = config.frame_height / (zoom * cam.height) for value, method in [ [theta, "theta"], [phi, "phi"], [gamma, "gamma"], [zoom_value, "zoom"], [frame_center, "frame_center"], ]: if value is not None: methods[method](value) if focal_distance is not None: warnings.warn( "focal distance of OpenGLCamera can not be adjusted.", stacklevel=2, ) anims += [Transform(cam, cam2)] self.play(*anims + added_anims, **kwargs) # These lines are added to improve performance. If manim thinks that frame_center is moving, # it is required to redraw every object. These lines remove frame_center from the Scene once # its animation is done, ensuring that manim does not think that it is moving. Since the # frame_center is never actually drawn, this shouldn't break anything. if frame_center is not None and config.renderer == RendererType.CAIRO: self.remove(self.camera._frame_center) def get_moving_mobjects(self, *animations: Animation): """ This method returns a list of all of the Mobjects in the Scene that are moving, that are also in the animations passed. Parameters ---------- *animations The animations whose mobjects will be checked. """ moving_mobjects = super().get_moving_mobjects(*animations) camera_mobjects = self.renderer.camera.get_value_trackers() + [ self.renderer.camera._frame_center, ] if any(cm in moving_mobjects for cm in camera_mobjects): return self.mobjects return moving_mobjects def add_fixed_orientation_mobjects(self, *mobjects: Mobject, **kwargs): """ This method is used to prevent the rotation and tilting of mobjects as the camera moves around. The mobject can still move in the x,y,z directions, but will always be at the angle (relative to the camera) that it was at when it was passed through this method.) Parameters ---------- *mobjects The Mobject(s) whose orientation must be fixed. **kwargs Some valid kwargs are use_static_center_func : bool center_func : function """ if config.renderer == RendererType.CAIRO: self.add(*mobjects) self.renderer.camera.add_fixed_orientation_mobjects(*mobjects, **kwargs) elif config.renderer == RendererType.OPENGL: for mob in mobjects: mob: OpenGLMobject mob.fix_orientation() self.add(mob) def add_fixed_in_frame_mobjects(self, *mobjects: Mobject): """ This method is used to prevent the rotation and movement of mobjects as the camera moves around. The mobject is essentially overlaid, and is not impacted by the camera's movement in any way. Parameters ---------- *mobjects The Mobjects whose orientation must be fixed. """ if config.renderer == RendererType.CAIRO: self.add(*mobjects) self.camera: ThreeDCamera self.camera.add_fixed_in_frame_mobjects(*mobjects) elif config.renderer == RendererType.OPENGL: for mob in mobjects: mob: OpenGLMobject mob.fix_in_frame() self.add(mob) def remove_fixed_orientation_mobjects(self, *mobjects: Mobject): """ This method "unfixes" the orientation of the mobjects passed, meaning they will no longer be at the same angle relative to the camera. This only makes sense if the mobject was passed through add_fixed_orientation_mobjects first. Parameters ---------- *mobjects The Mobjects whose orientation must be unfixed. """ if config.renderer == RendererType.CAIRO: self.renderer.camera.remove_fixed_orientation_mobjects(*mobjects) elif config.renderer == RendererType.OPENGL: for mob in mobjects: mob: OpenGLMobject mob.unfix_orientation() self.remove(mob) def remove_fixed_in_frame_mobjects(self, *mobjects: Mobject): """ This method undoes what add_fixed_in_frame_mobjects does. It allows the mobject to be affected by the movement of the camera. Parameters ---------- *mobjects The Mobjects whose position and orientation must be unfixed. """ if config.renderer == RendererType.CAIRO: self.renderer.camera.remove_fixed_in_frame_mobjects(*mobjects) elif config.renderer == RendererType.OPENGL: for mob in mobjects: mob: OpenGLMobject mob.unfix_from_frame() self.remove(mob) ## def set_to_default_angled_camera_orientation(self, **kwargs): """ This method sets the default_angled_camera_orientation to the keyword arguments passed, and sets the camera to that orientation. Parameters ---------- **kwargs Some recognised kwargs are phi, theta, focal_distance, gamma, which have the same meaning as the parameters in set_camera_orientation. """ config = dict( self.default_camera_orientation_kwargs, ) # Where doe this come from? config.update(kwargs) self.set_camera_orientation(**config) class SpecialThreeDScene(ThreeDScene): """An extension of :class:`ThreeDScene` with more settings. It has some extra configuration for axes, spheres, and an override for low quality rendering. Further key differences are: * The camera shades applicable 3DMobjects by default, except if rendering in low quality. * Some default params for Spheres and Axes have been added. """ def __init__( self, cut_axes_at_radius=True, camera_config={"should_apply_shading": True, "exponential_projection": True}, three_d_axes_config={ "num_axis_pieces": 1, "axis_config": { "unit_size": 2, "tick_frequency": 1, "numbers_with_elongated_ticks": [0, 1, 2], "stroke_width": 2, }, }, sphere_config={"radius": 2, "resolution": (24, 48)}, default_angled_camera_position={ "phi": 70 * DEGREES, "theta": -110 * DEGREES, }, # When scene is extracted with -l flag, this # configuration will override the above configuration. low_quality_config={ "camera_config": {"should_apply_shading": False}, "three_d_axes_config": {"num_axis_pieces": 1}, "sphere_config": {"resolution": (12, 24)}, }, **kwargs, ): self.cut_axes_at_radius = cut_axes_at_radius self.camera_config = camera_config self.three_d_axes_config = three_d_axes_config self.sphere_config = sphere_config self.default_angled_camera_position = default_angled_camera_position self.low_quality_config = low_quality_config if self.renderer.camera_config["pixel_width"] == config["pixel_width"]: _config = {} else: _config = self.low_quality_config _config = merge_dicts_recursively(_config, kwargs) super().__init__(**_config) def get_axes(self): """Return a set of 3D axes. Returns ------- :class:`.ThreeDAxes` A set of 3D axes. """ axes = ThreeDAxes(**self.three_d_axes_config) for axis in axes: if self.cut_axes_at_radius: p0 = axis.get_start() p1 = axis.number_to_point(-1) p2 = axis.number_to_point(1) p3 = axis.get_end() new_pieces = VGroup(Line(p0, p1), Line(p1, p2), Line(p2, p3)) for piece in new_pieces: piece.shade_in_3d = True new_pieces.match_style(axis.pieces) axis.pieces.submobjects = new_pieces.submobjects for tick in axis.tick_marks: tick.add(VectorizedPoint(1.5 * tick.get_center())) return axes def get_sphere(self, **kwargs): """ Returns a sphere with the passed keyword arguments as properties. Parameters ---------- **kwargs Any valid parameter of :class:`~.Sphere` or :class:`~.Surface`. Returns ------- :class:`~.Sphere` The sphere object. """ config = merge_dicts_recursively(self.sphere_config, kwargs) return Sphere(**config) def get_default_camera_position(self): """ Returns the default_angled_camera position. Returns ------- dict Dictionary of phi, theta, focal_distance, and gamma. """ return self.default_angled_camera_position def set_camera_to_default_position(self): """Sets the camera to its default position.""" self.set_camera_orientation(**self.default_angled_camera_position) ================================================ FILE: manim/scene/vector_space_scene.py ================================================ """A scene suitable for vector spaces.""" from __future__ import annotations __all__ = ["VectorScene", "LinearTransformationScene"] from collections.abc import Callable, Iterable from typing import TYPE_CHECKING, Any, cast import numpy as np from manim.animation.creation import DrawBorderThenFill, Group from manim.camera.camera import Camera from manim.mobject.geometry.arc import Dot from manim.mobject.geometry.line import Arrow, Line, Vector from manim.mobject.geometry.polygram import Rectangle from manim.mobject.graphing.coordinate_systems import Axes, NumberPlane from manim.mobject.opengl.opengl_mobject import OpenGLMobject from manim.mobject.text.tex_mobject import MathTex, Tex from manim.utils.config_ops import update_dict_recursively from .. import config from ..animation.animation import Animation from ..animation.creation import Create, Write from ..animation.fading import FadeOut from ..animation.growing import GrowArrow from ..animation.transform import ApplyFunction, ApplyPointwiseFunction, Transform from ..constants import * from ..mobject.matrix import Matrix from ..mobject.mobject import Mobject from ..mobject.types.vectorized_mobject import VGroup, VMobject from ..scene.scene import Scene from ..utils.color import ( BLACK, BLUE_D, GREEN_C, GREY, RED_C, WHITE, YELLOW, ManimColor, ParsableManimColor, ) from ..utils.rate_functions import rush_from, rush_into from ..utils.space_ops import angle_of_vector if TYPE_CHECKING: from typing_extensions import Self from manim.typing import ( MappingFunction, Point3D, Point3DLike, Vector2DLike, Vector3D, Vector3DLike, ) X_COLOR = GREEN_C Y_COLOR = RED_C Z_COLOR = BLUE_D # TODO: Much of this scene type seems dependent on the coordinate system chosen. # That is, being centered at the origin with grid units corresponding to the # arbitrary space units. Change it! # # Also, methods I would have thought of as getters, like coords_to_vector, are # actually doing a lot of animating. class VectorScene(Scene): def __init__(self, basis_vector_stroke_width: float = 6.0, **kwargs: Any) -> None: super().__init__(**kwargs) self.basis_vector_stroke_width = basis_vector_stroke_width def add_plane(self, animate: bool = False, **kwargs: Any) -> NumberPlane: """ Adds a NumberPlane object to the background. Parameters ---------- animate Whether or not to animate the addition of the plane via Create. **kwargs Any valid keyword arguments accepted by NumberPlane. Returns ------- NumberPlane The NumberPlane object. """ plane = NumberPlane(**kwargs) if animate: self.play(Create(plane, lag_ratio=0.5)) self.add(plane) return plane def add_axes( self, animate: bool = False, color: ParsableManimColor | Iterable[ParsableManimColor] = WHITE, ) -> Axes: """ Adds a pair of Axes to the Scene. Parameters ---------- animate Whether or not to animate the addition of the axes through Create. color The color of the axes. Defaults to WHITE. """ axes = Axes(color=color, axis_config={"unit_size": 1}) if animate: self.play(Create(axes)) self.add(axes) return axes def lock_in_faded_grid( self, dimness: float = 0.7, axes_dimness: float = 0.5 ) -> None: """ This method freezes the NumberPlane and Axes that were already in the background, and adds new, manipulatable ones to the foreground. Parameters ---------- dimness The required dimness of the NumberPlane axes_dimness The required dimness of the Axes. """ plane = self.add_plane() axes = plane.get_axes() plane.fade(dimness) axes.set_color(WHITE) axes.fade(axes_dimness) self.add(axes) # TODO # error: Missing positional argument "scene" in call to "update_frame" of "CairoRenderer" [call-arg] self.renderer.update_frame() # type: ignore[call-arg] self.renderer.camera = Camera(self.renderer.get_frame()) self.clear() def get_vector(self, numerical_vector: Vector3DLike, **kwargs: Any) -> Arrow: """ Returns an arrow on the Plane given an input numerical vector. Parameters ---------- numerical_vector The Vector to plot. **kwargs Any valid keyword argument of Arrow. Returns ------- Arrow The Arrow representing the Vector. """ return Arrow( # TODO # error: "VectorScene" has no attribute "plane" [attr-defined] self.plane.coords_to_point(0, 0), # type: ignore[attr-defined] self.plane.coords_to_point(*numerical_vector[:2]), # type: ignore[attr-defined] buff=0, **kwargs, ) def add_vector( self, vector: Arrow | Vector3DLike, color: ParsableManimColor | Iterable[ParsableManimColor] = YELLOW, animate: bool = True, **kwargs: Any, ) -> Arrow: """ Returns the Vector after adding it to the Plane. Parameters ---------- vector It can be a pre-made graphical vector, or the coordinates of one. color The string of the hex color of the vector. This is only taken into consideration if 'vector' is not an Arrow. Defaults to YELLOW. animate Whether or not to animate the addition of the vector by using GrowArrow **kwargs Any valid keyword argument of Arrow. These are only considered if vector is not an Arrow. Returns ------- Arrow The arrow representing the vector. """ if not isinstance(vector, Arrow): vector = Vector(np.asarray(vector), color=color, **kwargs) if animate: self.play(GrowArrow(vector)) self.add(vector) return vector def write_vector_coordinates(self, vector: Vector, **kwargs: Any) -> Matrix: """ Returns a column matrix indicating the vector coordinates, after writing them to the screen. Parameters ---------- vector The arrow representing the vector. **kwargs Any valid keyword arguments of :meth:`~.Vector.coordinate_label`: Returns ------- :class:`.Matrix` The column matrix representing the vector. """ coords: Matrix = vector.coordinate_label(**kwargs) self.play(Write(coords)) return coords def get_basis_vectors( self, i_hat_color: ParsableManimColor | Iterable[ParsableManimColor] = X_COLOR, j_hat_color: ParsableManimColor | Iterable[ParsableManimColor] = Y_COLOR, ) -> VGroup: """ Returns a VGroup of the Basis Vectors (1,0) and (0,1) Parameters ---------- i_hat_color The hex colour to use for the basis vector in the x direction j_hat_color The hex colour to use for the basis vector in the y direction Returns ------- VGroup VGroup of the Vector Mobjects representing the basis vectors. """ return VGroup( *( Vector( np.asarray(vect), color=color, stroke_width=self.basis_vector_stroke_width, ) for vect, color in [([1, 0], i_hat_color), ([0, 1], j_hat_color)] ) ) def get_basis_vector_labels(self, **kwargs: Any) -> VGroup: """ Returns naming labels for the basis vectors. Parameters ---------- **kwargs Any valid keyword arguments of get_vector_label: vector, label (str,MathTex) at_tip (bool=False), direction (str="left"), rotate (bool), color (str), label_scale_factor=VECTOR_LABEL_SCALE_FACTOR (int, float), """ i_hat, j_hat = self.get_basis_vectors() return VGroup( *( self.get_vector_label( vect, label, color=color, label_scale_factor=1, **kwargs ) for vect, label, color in [ (i_hat, "\\hat{\\imath}", X_COLOR), (j_hat, "\\hat{\\jmath}", Y_COLOR), ] ) ) def get_vector_label( self, vector: Vector, label: MathTex | str, at_tip: bool = False, direction: str = "left", rotate: bool = False, color: ParsableManimColor | None = None, label_scale_factor: float = LARGE_BUFF - 0.2, ) -> MathTex: """ Returns naming labels for the passed vector. Parameters ---------- vector Vector Object for which to get the label. at_tip Whether or not to place the label at the tip of the vector. direction If the label should be on the "left" or right of the vector. rotate Whether or not to rotate it to align it with the vector. color The color to give the label. label_scale_factor How much to scale the label by. Returns ------- MathTex The MathTex of the label. """ if not isinstance(label, MathTex): if len(label) == 1: label = "\\vec{\\textbf{%s}}" % label # noqa: UP031 label = MathTex(label) if color is None: prepared_color: ParsableManimColor = vector.get_color() else: prepared_color = color label.set_color(prepared_color) assert isinstance(label, MathTex) label.scale(label_scale_factor) label.add_background_rectangle() if at_tip: vect = vector.get_vector() vect /= np.linalg.norm(vect) label.next_to(vector.get_end(), vect, buff=SMALL_BUFF) else: angle = vector.get_angle() if not rotate: label.rotate(-angle, about_point=ORIGIN) if direction == "left": temp_shift_1: Vector3D = np.asarray(label.get_bottom()) label.shift(-temp_shift_1 + 0.1 * UP) else: temp_shift_2: Vector3D = np.asarray(label.get_top()) label.shift(-temp_shift_2 + 0.1 * DOWN) label.rotate(angle, about_point=ORIGIN) label.shift((vector.get_end() - vector.get_start()) / 2) return label def label_vector( self, vector: Vector, label: MathTex | str, animate: bool = True, **kwargs: Any ) -> MathTex: """ Shortcut method for creating, and animating the addition of a label for the vector. Parameters ---------- vector The vector for which the label must be added. label The MathTex/string of the label. animate Whether or not to animate the labelling w/ Write **kwargs Any valid keyword argument of get_vector_label Returns ------- :class:`~.MathTex` The MathTex of the label. """ mathtex_label = self.get_vector_label(vector, label, **kwargs) if animate: self.play(Write(mathtex_label, run_time=1)) self.add(mathtex_label) return mathtex_label def position_x_coordinate( self, x_coord: MathTex, x_line: Line, vector: Vector3DLike, ) -> MathTex: # TODO Write DocStrings for this. x_coord.next_to(x_line, -np.sign(vector[1]) * UP) x_coord.set_color(X_COLOR) return x_coord def position_y_coordinate( self, y_coord: MathTex, y_line: Line, vector: Vector3DLike, ) -> MathTex: # TODO Write DocStrings for this. y_coord.next_to(y_line, np.sign(vector[0]) * RIGHT) y_coord.set_color(Y_COLOR) return y_coord def coords_to_vector( self, vector: Vector2DLike, coords_start: Point3DLike = 2 * RIGHT + 2 * UP, clean_up: bool = True, ) -> None: """ This method writes the vector as a column matrix (henceforth called the label), takes the values in it one by one, and form the corresponding lines that make up the x and y components of the vector. Then, an Vector() based vector is created between the lines on the Screen. Parameters ---------- vector The vector to show. coords_start The starting point of the location of the label of the vector that shows it numerically. Defaults to 2 * RIGHT + 2 * UP or (2,2) clean_up Whether or not to remove whatever this method did after it's done. """ starting_mobjects = list(self.mobjects) array = Matrix(vector) array.shift(coords_start) arrow = Vector(vector) x_line = Line(ORIGIN, vector[0] * RIGHT) y_line = Line(x_line.get_end(), arrow.get_end()) x_line.set_color(X_COLOR) y_line.set_color(Y_COLOR) mob_matrix = array.get_mob_matrix() x_coord = mob_matrix[0][0] y_coord = mob_matrix[1][0] self.play(Write(array, run_time=1)) self.wait() self.play( ApplyFunction( lambda x: self.position_x_coordinate(x, x_line, vector), # type: ignore[arg-type] x_coord, ), ) self.play(Create(x_line)) animations = [ ApplyFunction( lambda y: self.position_y_coordinate(y, y_line, vector), # type: ignore[arg-type] y_coord, ), FadeOut(array.get_brackets()), ] self.play(*animations) # TODO: Can we delete the line below? I don't think it have any purpose. # y_coord, _ = (anim.mobject for anim in animations) self.play(Create(y_line)) self.play(Create(arrow)) self.wait() if clean_up: self.clear() self.add(*starting_mobjects) def vector_to_coords( self, vector: Vector3DLike, integer_labels: bool = True, clean_up: bool = True, ) -> tuple[Matrix, Line, Line]: """ This method displays vector as a Vector() based vector, and then shows the corresponding lines that make up the x and y components of the vector. Then, a column matrix (henceforth called the label) is created near the head of the Vector. Parameters ---------- vector The vector to show. integer_labels Whether or not to round the value displayed. in the vector's label to the nearest integer clean_up Whether or not to remove whatever this method did after it's done. """ starting_mobjects = list(self.mobjects) show_creation = False if isinstance(vector, Arrow): arrow = vector vector = arrow.get_end()[:2] else: arrow = Vector(vector) show_creation = True array = arrow.coordinate_label(integer_labels=integer_labels) x_line = Line(ORIGIN, vector[0] * RIGHT) y_line = Line(x_line.get_end(), arrow.get_end()) x_line.set_color(X_COLOR) y_line.set_color(Y_COLOR) x_coord, y_coord = cast(VGroup, array.get_entries()) x_coord_start = self.position_x_coordinate(x_coord.copy(), x_line, vector) y_coord_start = self.position_y_coordinate(y_coord.copy(), y_line, vector) brackets = array.get_brackets() if show_creation: self.play(Create(arrow)) self.play(Create(x_line), Write(x_coord_start), run_time=1) self.play(Create(y_line), Write(y_coord_start), run_time=1) self.wait() self.play( Transform(x_coord_start, x_coord, lag_ratio=0), Transform(y_coord_start, y_coord, lag_ratio=0), Write(brackets, run_time=1), ) self.wait() self.remove(x_coord_start, y_coord_start, brackets) self.add(array) if clean_up: self.clear() self.add(*starting_mobjects) return array, x_line, y_line def show_ghost_movement(self, vector: Arrow | Vector2DLike | Vector3DLike) -> None: """ This method plays an animation that partially shows the entire plane moving in the direction of a particular vector. This is useful when you wish to convey the idea of mentally moving the entire plane in a direction, without actually moving the plane. Parameters ---------- vector The vector which indicates the direction of movement. """ if isinstance(vector, Arrow): vector = vector.get_end() - vector.get_start() else: vector = np.asarray(vector) if len(vector) == 2: vector = np.append(np.array(vector), 0.0) vector_cleaned: Vector3D = vector x_max = int(config["frame_x_radius"] + abs(vector_cleaned[0])) y_max = int(config["frame_y_radius"] + abs(vector_cleaned[1])) # TODO: # I think that this should be a VGroup instead of a VMobject. dots = VMobject( *( # type: ignore[arg-type] Dot(x * RIGHT + y * UP) for x in range(-x_max, x_max) for y in range(-y_max, y_max) ) ) dots.set_fill(BLACK, opacity=0) dots_halfway = dots.copy().shift(vector_cleaned / 2).set_fill(WHITE, 1) dots_end = dots.copy().shift(vector_cleaned) self.play(Transform(dots, dots_halfway, rate_func=rush_into)) self.play(Transform(dots, dots_end, rate_func=rush_from)) self.remove(dots) class LinearTransformationScene(VectorScene): """ This scene contains special methods that make it especially suitable for showing linear transformations. Parameters ---------- include_background_plane Whether or not to include the background plane in the scene. include_foreground_plane Whether or not to include the foreground plane in the scene. background_plane_kwargs Parameters to be passed to :class:`NumberPlane` to adjust the background plane. foreground_plane_kwargs Parameters to be passed to :class:`NumberPlane` to adjust the foreground plane. show_coordinates Whether or not to include the coordinates for the background plane. show_basis_vectors Whether to show the basis x_axis -> ``i_hat`` and y_axis -> ``j_hat`` vectors. basis_vector_stroke_width The ``stroke_width`` of the basis vectors. i_hat_color The color of the ``i_hat`` vector. j_hat_color The color of the ``j_hat`` vector. leave_ghost_vectors Indicates the previous position of the basis vectors following a transformation. Examples ------- .. manim:: LinearTransformationSceneExample class LinearTransformationSceneExample(LinearTransformationScene): def __init__(self, **kwargs): LinearTransformationScene.__init__( self, show_coordinates=True, leave_ghost_vectors=True, **kwargs ) def construct(self): matrix = [[1, 1], [0, 1]] self.apply_matrix(matrix) self.wait() """ def __init__( self, include_background_plane: bool = True, include_foreground_plane: bool = True, background_plane_kwargs: dict[str, Any] | None = None, foreground_plane_kwargs: dict[str, Any] | None = None, show_coordinates: bool = False, show_basis_vectors: bool = True, basis_vector_stroke_width: float = 6, i_hat_color: ParsableManimColor = X_COLOR, j_hat_color: ParsableManimColor = Y_COLOR, leave_ghost_vectors: bool = False, **kwargs: Any, ) -> None: super().__init__(**kwargs) self.include_background_plane = include_background_plane self.include_foreground_plane = include_foreground_plane self.show_coordinates = show_coordinates self.show_basis_vectors = show_basis_vectors self.basis_vector_stroke_width = basis_vector_stroke_width self.i_hat_color = ManimColor(i_hat_color) self.j_hat_color = ManimColor(j_hat_color) self.leave_ghost_vectors = leave_ghost_vectors self.background_plane_kwargs: dict[str, Any] = { "color": GREY, "axis_config": { "color": GREY, }, "background_line_style": { "stroke_color": GREY, "stroke_width": 1, }, } self.ghost_vectors = VGroup() self.foreground_plane_kwargs: dict[str, Any] = { "x_range": np.array([-config["frame_width"], config["frame_width"], 1.0]), "y_range": np.array([-config["frame_width"], config["frame_width"], 1.0]), "faded_line_ratio": 1, } self.update_default_configs( (self.foreground_plane_kwargs, self.background_plane_kwargs), (foreground_plane_kwargs, background_plane_kwargs), ) @staticmethod def update_default_configs( default_configs: Iterable[dict[str, Any]], passed_configs: Iterable[dict[str, Any] | None], ) -> None: for default_config, passed_config in zip(default_configs, passed_configs): if passed_config is not None: update_dict_recursively(default_config, passed_config) def setup(self) -> None: # The has_already_setup attr is to not break all the old Scenes if hasattr(self, "has_already_setup"): return self.has_already_setup = True self.background_mobjects: list[Mobject] = [] self.foreground_mobjects: list[Mobject] = [] self.transformable_mobjects: list[Mobject] = [] self.moving_vectors: list[Mobject] = [] self.transformable_labels: list[MathTex] = [] self.moving_mobjects: list[Mobject] = [] self.background_plane = NumberPlane(**self.background_plane_kwargs) if self.show_coordinates: self.background_plane.add_coordinates() if self.include_background_plane: self.add_background_mobject(self.background_plane) if self.include_foreground_plane: self.plane = NumberPlane(**self.foreground_plane_kwargs) self.add_transformable_mobject(self.plane) if self.show_basis_vectors: self.basis_vectors = self.get_basis_vectors( i_hat_color=self.i_hat_color, j_hat_color=self.j_hat_color, ) self.moving_vectors += list(self.basis_vectors) self.i_hat, self.j_hat = self.basis_vectors self.add(self.basis_vectors) def add_special_mobjects( self, mob_list: list[Mobject], *mobs_to_add: Mobject ) -> None: """ Adds mobjects to a separate list that can be tracked, if these mobjects have some extra importance. Parameters ---------- mob_list The special list to which you want to add these mobjects. *mobs_to_add The mobjects to add. """ for mobject in mobs_to_add: if mobject not in mob_list: mob_list.append(mobject) self.add(mobject) def add_background_mobject(self, *mobjects: Mobject) -> None: """ Adds the mobjects to the special list self.background_mobjects. Parameters ---------- *mobjects The mobjects to add to the list. """ self.add_special_mobjects(self.background_mobjects, *mobjects) # TODO, this conflicts with Scene.add_foreground_mobject # Please be aware that there is also the method Scene.add_foreground_mobjects. def add_foreground_mobject(self, *mobjects: Mobject) -> None: # type: ignore[override] """ Adds the mobjects to the special list self.foreground_mobjects. Parameters ---------- *mobjects The mobjects to add to the list """ self.add_special_mobjects(self.foreground_mobjects, *mobjects) def add_transformable_mobject(self, *mobjects: Mobject) -> None: """ Adds the mobjects to the special list self.transformable_mobjects. Parameters ---------- *mobjects The mobjects to add to the list. """ self.add_special_mobjects(self.transformable_mobjects, *mobjects) def add_moving_mobject( self, mobject: Mobject, target_mobject: Mobject | None = None ) -> None: """ Adds the mobject to the special list self.moving_mobject, and adds a property to the mobject called mobject.target, which keeps track of what the mobject will move to or become etc. Parameters ---------- mobject The mobjects to add to the list target_mobject What the moving_mobject goes to, etc. """ mobject.target = target_mobject self.add_special_mobjects(self.moving_mobjects, mobject) def get_ghost_vectors(self) -> VGroup: """ Returns all ghost vectors ever added to ``self``. Each element is a ``VGroup`` of two ghost vectors. """ return self.ghost_vectors def get_unit_square( self, color: ParsableManimColor | Iterable[ParsableManimColor] = YELLOW, opacity: float = 0.3, stroke_width: float = 3, ) -> Rectangle: """ Returns a unit square for the current NumberPlane. Parameters ---------- color The string of the hex color code of the color wanted. opacity The opacity of the square stroke_width The stroke_width in pixels of the border of the square Returns ------- Square """ square = self.square = Rectangle( color=color, width=self.plane.get_x_unit_size(), height=self.plane.get_y_unit_size(), stroke_color=color, stroke_width=stroke_width, fill_color=color, fill_opacity=opacity, ) square.move_to(self.plane.coords_to_point(0, 0), DL) return square def add_unit_square(self, animate: bool = False, **kwargs: Any) -> Self: """ Adds a unit square to the scene via self.get_unit_square. Parameters ---------- animate Whether or not to animate the addition with DrawBorderThenFill. **kwargs Any valid keyword arguments of self.get_unit_square() Returns ------- Square The unit square. """ square = self.get_unit_square(**kwargs) if animate: self.play( DrawBorderThenFill(square), Animation(Group(*self.moving_vectors)), ) self.add_transformable_mobject(square) self.bring_to_front(*self.moving_vectors) self.square = square return self def add_vector( self, vector: Arrow | list | tuple | np.ndarray, color: ParsableManimColor = YELLOW, animate: bool = False, **kwargs: Any, ) -> Arrow: """ Adds a vector to the scene, and puts it in the special list self.moving_vectors. Parameters ---------- vector It can be a pre-made graphical vector, or the coordinates of one. color The string of the hex color of the vector. This is only taken into consideration if 'vector' is not an Arrow. Defaults to YELLOW. **kwargs Any valid keyword argument of VectorScene.add_vector. Returns ------- Arrow The arrow representing the vector. """ vector = super().add_vector(vector, color=color, animate=animate, **kwargs) self.moving_vectors.append(vector) return vector def write_vector_coordinates(self, vector: Vector, **kwargs: Any) -> Matrix: """ Returns a column matrix indicating the vector coordinates, after writing them to the screen, and adding them to the special list self.foreground_mobjects Parameters ---------- vector The arrow representing the vector. **kwargs Any valid keyword arguments of VectorScene.write_vector_coordinates Returns ------- Matrix The column matrix representing the vector. """ coords = super().write_vector_coordinates(vector, **kwargs) self.add_foreground_mobject(coords) return coords def add_transformable_label( self, vector: Vector, label: MathTex | str, transformation_name: str | MathTex = "L", new_label: str | MathTex | None = None, **kwargs: Any, ) -> MathTex: """ Method for creating, and animating the addition of a transformable label for the vector. Parameters ---------- vector The vector for which the label must be added. label The MathTex/string of the label. transformation_name The name to give the transformation as a label. new_label What the label should display after a Linear Transformation **kwargs Any valid keyword argument of get_vector_label Returns ------- :class:`~.MathTex` The MathTex of the label. """ # TODO: Clear up types in this function. This is currently a mess. label_mob = self.label_vector(vector, label, **kwargs) if new_label: label_mob.target_text = new_label # type: ignore[attr-defined] else: label_mob.target_text = ( # type: ignore[attr-defined] f"{transformation_name}({label_mob.get_tex_string()})" ) label_mob.vector = vector # type: ignore[attr-defined] label_mob.kwargs = kwargs # type: ignore[attr-defined] if "animate" in label_mob.kwargs: # type: ignore[operator] label_mob.kwargs.pop("animate") # type: ignore[attr-defined] self.transformable_labels.append(label_mob) return cast(MathTex, label_mob) def add_title( self, title: str | MathTex | Tex, scale_factor: float = 1.5, animate: bool = False, ) -> Self: """ Adds a title, after scaling it, adding a background rectangle, moving it to the top and adding it to foreground_mobjects adding it as a local variable of self. Returns the Scene. Parameters ---------- title What the title should be. scale_factor How much the title should be scaled by. animate Whether or not to animate the addition. Returns ------- LinearTransformationScene The scene with the title added to it. """ if not isinstance(title, (Mobject, OpenGLMobject)): title = Tex(title).scale(scale_factor) title.to_edge(UP) title.add_background_rectangle() if animate: self.play(Write(title)) self.add_foreground_mobject(title) self.title = title return self def get_matrix_transformation( self, matrix: np.ndarray | list | tuple ) -> Callable[[Point3D], Point3D]: """ Returns a function corresponding to the linear transformation represented by the matrix passed. Parameters ---------- matrix The matrix. """ return self.get_transposed_matrix_transformation(np.array(matrix).T) def get_transposed_matrix_transformation( self, transposed_matrix: np.ndarray | list | tuple ) -> Callable[[Point3D], Point3D]: """ Returns a function corresponding to the linear transformation represented by the transposed matrix passed. Parameters ---------- transposed_matrix The matrix. """ transposed_matrix = np.array(transposed_matrix) if transposed_matrix.shape == (2, 2): new_matrix = np.identity(3) new_matrix[:2, :2] = transposed_matrix transposed_matrix = new_matrix elif transposed_matrix.shape != (3, 3): raise ValueError("Matrix has bad dimensions") return lambda point: np.dot(point, transposed_matrix) def get_piece_movement(self, pieces: Iterable[Mobject]) -> Transform: """ This method returns an animation that moves an arbitrary mobject in "pieces" to its corresponding .target value. If self.leave_ghost_vectors is True, ghosts of the original positions/mobjects are left on screen Parameters ---------- pieces The pieces for which the movement must be shown. Returns ------- Animation The animation of the movement. """ v_pieces = [piece for piece in pieces if isinstance(piece, VMobject)] start = VGroup(*v_pieces) target = VGroup(*(mob.target for mob in v_pieces)) # don't add empty VGroups if self.leave_ghost_vectors and start.submobjects: # start.copy() gives a VGroup of Vectors self.ghost_vectors.add(start.copy().fade(0.7)) self.add(self.ghost_vectors[-1]) return Transform(start, target, lag_ratio=0) def get_moving_mobject_movement(self, func: MappingFunction) -> Transform: """ This method returns an animation that moves a mobject in "self.moving_mobjects" to its corresponding .target value. func is a function that determines where the .target goes. Parameters ---------- func The function that determines where the .target of the moving mobject goes. Returns ------- Animation The animation of the movement. """ for m in self.moving_mobjects: if m.target is None: m.target = m.copy() temp: Point3D = m.get_center() target_point = func(temp) m.target.move_to(target_point) return self.get_piece_movement(self.moving_mobjects) def get_vector_movement(self, func: MappingFunction) -> Transform: """ This method returns an animation that moves a mobject in "self.moving_vectors" to its corresponding .target value. func is a function that determines where the .target goes. Parameters ---------- func The function that determines where the .target of the moving mobject goes. Returns ------- Animation The animation of the movement. """ for v in self.moving_vectors: v.target = Vector(func(v.get_end()), color=v.get_color()) norm = float(np.linalg.norm(v.target.get_end())) if norm < 0.1: v.target.get_tip().scale(norm) return self.get_piece_movement(self.moving_vectors) def get_transformable_label_movement(self) -> Transform: """ This method returns an animation that moves all labels in "self.transformable_labels" to its corresponding .target . Returns ------- Animation The animation of the movement. """ for label in self.transformable_labels: # TODO: This location and lines 933 and 335 are the only locations in # the code where the target_text property is referenced. target_text: MathTex | str = label.target_text # type: ignore[assignment] label.target = self.get_vector_label( label.vector.target, # type: ignore[attr-defined] target_text, **label.kwargs, # type: ignore[arg-type] ) return self.get_piece_movement(self.transformable_labels) def apply_matrix(self, matrix: np.ndarray | list | tuple, **kwargs: Any) -> None: """ Applies the transformation represented by the given matrix to the number plane, and each vector/similar mobject on it. Parameters ---------- matrix The matrix. **kwargs Any valid keyword argument of self.apply_transposed_matrix() """ self.apply_transposed_matrix(np.array(matrix).T, **kwargs) def apply_inverse(self, matrix: np.ndarray | list | tuple, **kwargs: Any) -> None: """ This method applies the linear transformation represented by the inverse of the passed matrix to the number plane, and each vector/similar mobject on it. Parameters ---------- matrix The matrix whose inverse is to be applied. **kwargs Any valid keyword argument of self.apply_matrix() """ self.apply_matrix(np.linalg.inv(matrix), **kwargs) def apply_transposed_matrix( self, transposed_matrix: np.ndarray | list | tuple, **kwargs: Any ) -> None: """ Applies the transformation represented by the given transposed matrix to the number plane, and each vector/similar mobject on it. Parameters ---------- transposed_matrix The matrix. **kwargs Any valid keyword argument of self.apply_function() """ func = self.get_transposed_matrix_transformation(transposed_matrix) if "path_arc" not in kwargs: net_rotation = np.mean( [angle_of_vector(func(RIGHT)), angle_of_vector(func(UP)) - np.pi / 2], ) kwargs["path_arc"] = net_rotation self.apply_function(func, **kwargs) def apply_inverse_transpose( self, t_matrix: np.ndarray | list | tuple, **kwargs: Any ) -> None: """ Applies the inverse of the transformation represented by the given transposed matrix to the number plane and each vector/similar mobject on it. Parameters ---------- t_matrix The matrix. **kwargs Any valid keyword argument of self.apply_transposed_matrix() """ t_inv = np.linalg.inv(np.array(t_matrix).T).T self.apply_transposed_matrix(t_inv, **kwargs) def apply_nonlinear_transformation( self, function: Callable[[np.ndarray], np.ndarray], **kwargs: Any ) -> None: """ Applies the non-linear transformation represented by the given function to the number plane and each vector/similar mobject on it. Parameters ---------- function The function. **kwargs Any valid keyword argument of self.apply_function() """ self.plane.prepare_for_nonlinear_transform() self.apply_function(function, **kwargs) def apply_function( self, function: MappingFunction, added_anims: list[Animation] = [], **kwargs: Any, ) -> None: """ Applies the given function to each of the mobjects in self.transformable_mobjects, and plays the animation showing this. Parameters ---------- function The function that affects each point of each mobject in self.transformable_mobjects. added_anims Any other animations that need to be played simultaneously with this. **kwargs Any valid keyword argument of a self.play() call. """ if "run_time" not in kwargs: kwargs["run_time"] = 3 anims = ( [ ApplyPointwiseFunction(function, t_mob) # type: ignore[arg-type] for t_mob in self.transformable_mobjects ] + [ self.get_vector_movement(function), self.get_transformable_label_movement(), self.get_moving_mobject_movement(function), ] + [Animation(f_mob) for f_mob in self.foreground_mobjects] + added_anims ) self.play(*anims, **kwargs) ================================================ FILE: manim/scene/zoomed_scene.py ================================================ """A scene supporting zooming in on a specified section. Examples -------- .. manim:: UseZoomedScene class UseZoomedScene(ZoomedScene): def construct(self): dot = Dot().set_color(GREEN) self.add(dot) self.wait(1) self.activate_zooming(animate=False) self.wait(1) self.play(dot.animate.shift(LEFT)) .. manim:: ChangingZoomScale class ChangingZoomScale(ZoomedScene): def __init__(self, **kwargs): ZoomedScene.__init__( self, zoom_factor=0.3, zoomed_display_height=1, zoomed_display_width=3, image_frame_stroke_width=20, zoomed_camera_config={ "default_frame_stroke_width": 3, }, **kwargs ) def construct(self): dot = Dot().set_color(GREEN) sq = Circle(fill_opacity=1, radius=0.2).next_to(dot, RIGHT) self.add(dot, sq) self.wait(1) self.activate_zooming(animate=False) self.wait(1) self.play(dot.animate.shift(LEFT * 0.3)) self.play(self.zoomed_camera.frame.animate.scale(4)) self.play(self.zoomed_camera.frame.animate.shift(0.5 * DOWN)) """ from __future__ import annotations __all__ = ["ZoomedScene"] from typing import TYPE_CHECKING, Any from ..animation.transform import ApplyMethod from ..camera.camera import Camera from ..camera.moving_camera import MovingCamera from ..camera.multi_camera import MultiCamera from ..constants import * from ..mobject.types.image_mobject import ImageMobjectFromCamera from ..renderer.opengl_renderer import OpenGLCamera from ..scene.moving_camera_scene import MovingCameraScene if TYPE_CHECKING: from manim.typing import Point3DLike, Vector3D # Note, any scenes from old videos using ZoomedScene will almost certainly # break, as it was restructured. class ZoomedScene(MovingCameraScene): """This is a Scene with special configurations made for when a particular part of the scene must be zoomed in on and displayed separately. """ def __init__( self, camera_class: type[Camera] = MultiCamera, zoomed_display_height: float = 3, zoomed_display_width: float = 3, zoomed_display_center: Point3DLike | None = None, zoomed_display_corner: Vector3D = UP + RIGHT, zoomed_display_corner_buff: float = DEFAULT_MOBJECT_TO_EDGE_BUFFER, zoomed_camera_config: dict[str, Any] = { "default_frame_stroke_width": 2, "background_opacity": 1, }, zoomed_camera_image_mobject_config: dict[str, Any] = {}, zoomed_camera_frame_starting_position: Point3DLike = ORIGIN, zoom_factor: float = 0.15, image_frame_stroke_width: float = 3, zoom_activated: bool = False, **kwargs: Any, ) -> None: self.zoomed_display_height = zoomed_display_height self.zoomed_display_width = zoomed_display_width self.zoomed_display_center = zoomed_display_center self.zoomed_display_corner = zoomed_display_corner self.zoomed_display_corner_buff = zoomed_display_corner_buff self.zoomed_camera_config = zoomed_camera_config self.zoomed_camera_image_mobject_config = zoomed_camera_image_mobject_config self.zoomed_camera_frame_starting_position = ( zoomed_camera_frame_starting_position ) self.zoom_factor = zoom_factor self.image_frame_stroke_width = image_frame_stroke_width self.zoom_activated = zoom_activated super().__init__(camera_class=camera_class, **kwargs) def setup(self) -> None: """This method is used internally by Manim to setup the scene for proper use. """ super().setup() # Initialize camera and display zoomed_camera = MovingCamera(**self.zoomed_camera_config) zoomed_display = ImageMobjectFromCamera( zoomed_camera, **self.zoomed_camera_image_mobject_config ) zoomed_display.add_display_frame() for mob in zoomed_camera.frame, zoomed_display: mob.stretch_to_fit_height(self.zoomed_display_height) mob.stretch_to_fit_width(self.zoomed_display_width) zoomed_camera.frame.scale(self.zoom_factor) # Position camera and display zoomed_camera.frame.move_to(self.zoomed_camera_frame_starting_position) if self.zoomed_display_center is not None: zoomed_display.move_to(self.zoomed_display_center) else: zoomed_display.to_corner( self.zoomed_display_corner, buff=self.zoomed_display_corner_buff, ) self.zoomed_camera = zoomed_camera self.zoomed_display = zoomed_display def activate_zooming(self, animate: bool = False) -> None: """This method is used to activate the zooming for the zoomed_camera. Parameters ---------- animate Whether or not to animate the activation of the zoomed camera. """ self.zoom_activated = True self.renderer.camera.add_image_mobject_from_camera(self.zoomed_display) # type: ignore[union-attr] if animate: self.play(self.get_zoom_in_animation()) self.play(self.get_zoomed_display_pop_out_animation()) self.add_foreground_mobjects( self.zoomed_camera.frame, self.zoomed_display, ) def get_zoom_in_animation(self, run_time: float = 2, **kwargs: Any) -> ApplyMethod: """Returns the animation of camera zooming in. Parameters ---------- run_time The run_time of the animation of the camera zooming in. **kwargs Any valid keyword arguments of ApplyMethod() Returns ------- ApplyMethod The animation of the camera zooming in. """ frame = self.zoomed_camera.frame if isinstance(self.camera, OpenGLCamera): full_frame_width, full_frame_height = self.camera.frame_shape else: full_frame_height = self.camera.frame_height full_frame_width = self.camera.frame_width frame.save_state() frame.stretch_to_fit_width(full_frame_width) frame.stretch_to_fit_height(full_frame_height) frame.center() frame.set_stroke(width=0) return ApplyMethod(frame.restore, run_time=run_time, **kwargs) def get_zoomed_display_pop_out_animation(self, **kwargs: Any) -> ApplyMethod: """This is the animation of the popping out of the mini-display that shows the content of the zoomed camera. Returns ------- ApplyMethod The Animation of the Zoomed Display popping out. """ display = self.zoomed_display display.save_state() display.replace(self.zoomed_camera.frame, stretch=True) return ApplyMethod(display.restore) def get_zoom_factor(self) -> float: """Returns the Zoom factor of the Zoomed camera. Defined as the ratio between the height of the zoomed camera and the height of the zoomed mini display. Returns ------- float The zoom factor. """ zoom_factor: float = ( self.zoomed_camera.frame.height / self.zoomed_display.height ) return zoom_factor ================================================ FILE: manim/templates/Axes.mtp ================================================ class AxesTemplate(Scene): def construct(self): graph = Axes( x_range=[-1,10,1], y_range=[-1,10,1], x_length=9, y_length=6, axis_config={"include_tip":False} ) labels = graph.get_axis_labels() self.add(graph, labels) ================================================ FILE: manim/templates/Default.mtp ================================================ class DefaultTemplate(Scene): def construct(self): circle = Circle() # create a circle circle.set_fill(PINK, opacity=0.5) # set color and transparency square = Square() # create a square square.flip(RIGHT) # flip horizontally square.rotate(-3 * TAU / 8) # rotate a certain amount self.play(Create(square)) # animate the creation of the square self.play(Transform(square, circle)) # interpolate the square into the circle self.play(FadeOut(square)) # fade out animation ================================================ FILE: manim/templates/MovingCamera.mtp ================================================ class MovingCameraTemplate(MovingCameraScene): def construct(self): text = Text("Hello World").set_color(BLUE) self.add(text) self.camera.frame.save_state() self.play(self.camera.frame.animate.set(width=text.width * 1.2)) self.wait(0.3) self.play(Restore(self.camera.frame)) ================================================ FILE: manim/templates/template.cfg ================================================ [CLI] frame_rate = 30 pixel_height = 480 pixel_width = 854 background_color = BLACK background_opacity = 1 scene_names = DefaultScene ================================================ FILE: manim/utils/__init__.py ================================================ [Empty file] ================================================ FILE: manim/utils/caching.py ================================================ from __future__ import annotations from collections.abc import Callable from typing import TYPE_CHECKING, Any from .. import config, logger from ..utils.hashing import get_hash_from_play_call __all__ = ["handle_caching_play"] if TYPE_CHECKING: from manim.renderer.opengl_renderer import OpenGLRenderer from manim.scene.scene import Scene def handle_caching_play(func: Callable[..., None]) -> Callable[..., None]: """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 The play like function that has to be written to the video file stream. Take the same parameters as `scene.play`. """ # NOTE : This is only kept for OpenGL renderer. # The play logic of the cairo renderer as been refactored and does not need this function anymore. # When OpenGL renderer will have a proper testing system, # the play logic of the latter has to be refactored in the same way the cairo renderer has been, and thus this # method has to be deleted. def wrapper(self: OpenGLRenderer, scene: Scene, *args: Any, **kwargs: Any) -> None: self.skip_animations = self._original_skipping_status self.update_skipping_status() animations = scene.compile_animations(*args, **kwargs) scene.add_mobjects_from_animations(animations) if self.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.mobjects # TODO: the first argument seems wrong. Shouldn't it be scene instead? hash_play = get_hash_from_play_call( self, # type: ignore[arg-type] 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}, ) self.skip_animations = True else: hash_play = f"uncached_{self.num_plays:05}" 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 ================================================ FILE: manim/utils/commands.py ================================================ from __future__ import annotations import os from collections.abc import Generator from pathlib import Path from subprocess import run from typing import TypedDict import av from manim.typing import StrOrBytesPath __all__ = [ "capture", "get_video_metadata", "get_dir_layout", ] def capture( command: str, cwd: StrOrBytesPath | None = None, command_input: str | None = None ) -> tuple[str, str, int]: p = run( command, cwd=cwd, input=command_input, capture_output=True, text=True, encoding="utf-8", ) out, err = p.stdout, p.stderr return out, err, p.returncode class VideoMetadata(TypedDict): width: int height: int nb_frames: str duration: str avg_frame_rate: str codec_name: str pix_fmt: str def get_video_metadata(path_to_video: str | os.PathLike) -> VideoMetadata: with av.open(str(path_to_video)) as container: stream = container.streams.video[0] ctxt = stream.codec_context rate = stream.average_rate if stream.duration is not None: duration = float(stream.duration * stream.time_base) num_frames = stream.frames else: num_frames = sum(1 for _ in container.decode(video=0)) duration = float(num_frames / stream.base_rate) return { "width": ctxt.width, "height": ctxt.height, "nb_frames": str(num_frames), "duration": f"{duration:.6f}", "avg_frame_rate": f"{rate.numerator}/{rate.denominator}", # Can be a Fraction "codec_name": stream.codec_context.name, "pix_fmt": stream.codec_context.pix_fmt, } def get_dir_layout(dirpath: Path) -> Generator[str, None, None]: """Get list of paths relative to dirpath of all files in dir and subdirs recursively.""" for p in dirpath.iterdir(): if p.is_dir(): yield from get_dir_layout(p) continue yield str(p.relative_to(dirpath)) ================================================ FILE: manim/utils/config_ops.py ================================================ """Utilities that might be useful for configuration dictionaries.""" from __future__ import annotations __all__ = [ "merge_dicts_recursively", "update_dict_recursively", "DictAsObject", ] import itertools as it from typing import Any, Generic, Protocol, cast import numpy.typing as npt from typing_extensions import TypeVar def merge_dicts_recursively(*dicts: dict[Any, Any]) -> dict[Any, Any]: """ Creates a dict whose keyset is the union of all the input dictionaries. The value for each key is based on the first dict in the list with that key. dicts later in the list have higher priority When values are dictionaries, it is applied recursively """ result: dict = {} all_items = it.chain(*(d.items() for d in dicts)) for key, value in all_items: if key in result and isinstance(result[key], dict) and isinstance(value, dict): result[key] = merge_dicts_recursively(result[key], value) else: result[key] = value return result def update_dict_recursively( current_dict: dict[Any, Any], *others: dict[Any, Any] ) -> None: updated_dict = merge_dicts_recursively(current_dict, *others) current_dict.update(updated_dict) # Occasionally convenient in order to write dict.x instead of more laborious # (and less in keeping with all other attr accesses) dict["x"] class DictAsObject: def __init__(self, dictin: dict[str, Any]): self.__dict__ = dictin _Data_T = TypeVar("_Data_T", bound="npt.NDArray[Any]", default="npt.NDArray[Any]") class _HasData(Protocol): data: dict[str, npt.NDArray[Any]] class _Data(Generic[_Data_T]): """Descriptor that allows _Data variables to be grouped and accessed from self.data["attr"] via self.attr. self.data attributes must be arrays. """ def __set_name__(self, obj: _HasData, name: str) -> None: self.name: str = name def __get__(self, obj: _HasData, owner: Any) -> _Data_T: value = cast(_Data_T, obj.data[self.name]) return value def __set__(self, obj: _HasData, array: _Data_T) -> None: obj.data[self.name] = array _Uniforms_T = TypeVar("_Uniforms_T", bound="float | tuple[float, ...]", default=float) class _HasUniforms(Protocol): uniforms: dict[str, float | tuple[float, ...]] class _Uniforms(Generic[_Uniforms_T]): """Descriptor that allows _Uniforms variables to be grouped from self.uniforms["attr"] via self.attr. self.uniforms attributes must be floats or tuples of floats. """ def __set_name__(self, obj: _HasUniforms, name: str) -> None: self.name: str = name def __get__(self, obj: _HasUniforms, owner: Any) -> _Uniforms_T: val = cast(_Uniforms_T, obj.uniforms[self.name]) return val def __set__(self, obj: _HasUniforms, num: _Uniforms_T) -> None: obj.uniforms[self.name] = num ================================================ FILE: manim/utils/debug.py ================================================ """Debugging utilities.""" from __future__ import annotations __all__ = ["print_family", "index_labels"] from typing import Any from manim.mobject.mobject import Mobject from manim.mobject.text.numbers import Integer from manim.utils.color import ManimColor from ..mobject.types.vectorized_mobject import VGroup from .color import BLACK def print_family(mobject: Mobject, n_tabs: int = 0) -> None: """For debugging purposes""" print("\t" * n_tabs, mobject, id(mobject)) for submob in mobject.submobjects: print_family(submob, n_tabs + 1) def index_labels( mobject: Mobject, label_height: float = 0.15, background_stroke_width: float = 5, background_stroke_color: ManimColor = BLACK, **kwargs: Any, ) -> VGroup: r"""Returns a :class:`~.VGroup` of :class:`~.Integer` mobjects that shows the index of each submobject. Useful for working with parts of complicated mobjects. Parameters ---------- mobject The mobject that will have its submobjects labelled. label_height The height of the labels, by default 0.15. background_stroke_width The stroke width of the outline of the labels, by default 5. background_stroke_color The stroke color of the outline of labels. kwargs Additional parameters to be passed into the :class`~.Integer` mobjects used to construct the labels. Examples -------- .. manim:: IndexLabelsExample :save_last_frame: class IndexLabelsExample(Scene): def construct(self): text = MathTex( "\\frac{d}{dx}f(x)g(x)=", "f(x)\\frac{d}{dx}g(x)", "+", "g(x)\\frac{d}{dx}f(x)", ) #index the fist term in the MathTex mob indices = index_labels(text[0]) text[0][1].set_color(PURPLE_B) text[0][8:12].set_color(DARK_BLUE) self.add(text, indices) """ labels = VGroup() for n, submob in enumerate(mobject): label = Integer(n, **kwargs) label.set_stroke( background_stroke_color, background_stroke_width, background=True ) label.height = label_height label.move_to(submob) labels.add(label) return labels ================================================ FILE: manim/utils/deprecation.py ================================================ """Decorators for deprecating classes, functions and function parameters.""" from __future__ import annotations __all__ = ["deprecated", "deprecated_params"] import inspect import logging import re from collections.abc import Callable, Iterable from typing import Any, TypeVar, overload from decorator import decorate, decorator logger = logging.getLogger("manim") def _get_callable_info(callable_: Callable[..., Any], /) -> tuple[str, str]: """Returns type and name of a callable. Parameters ---------- callable The callable Returns ------- Tuple[str, str] The type and name of the callable. Type can can be one of "class", "method" (for functions defined in classes) or "function"). For methods, name is Class.method. """ what = type(callable_).__name__ name = callable_.__qualname__ if what == "function" and "." in name: what = "method" elif what != "function": what = "class" return (what, name) def _deprecation_text_component( since: str | None = None, until: str | None = None, message: str | None = None, ) -> str: """Generates a text component used in deprecation messages. Parameters ---------- since The version or date since deprecation until The version or date until removal of the deprecated callable message The reason for why the callable has been deprecated Returns ------- str The deprecation message text component. """ since = f"since {since} " if since else "" until = ( f"is expected to be removed after {until}" if until else "may be removed in a later version" ) msg = " " + message if message else "" return f"deprecated {since}and {until}.{msg}" # TODO: Use ParamSpec to type decorated functions when Python 3.9 is out of life T = TypeVar("T") @overload def deprecated( func: Callable[..., T], since: str | None = None, until: str | None = None, replacement: str | None = None, message: str | None = "", ) -> Callable[..., T]: ... @overload def deprecated( func: None = None, since: str | None = None, until: str | None = None, replacement: str | None = None, message: str | None = "", ) -> Callable[[Callable[..., T]], Callable[..., T]]: ... def deprecated( func: Callable[..., T] | None = None, since: str | None = None, until: str | None = None, replacement: str | None = None, message: str | None = "", ) -> Callable[..., T] | Callable[[Callable[..., T]], Callable[..., T]]: """Decorator to mark a callable as deprecated. The decorated callable will cause a warning when used. The docstring of the deprecated callable is adjusted to indicate that this callable is deprecated. Parameters ---------- func The function to be decorated. Should not be set by the user. since The version or date since deprecation. until The version or date until removal of the deprecated callable. replacement The identifier of the callable replacing the deprecated one. message The reason for why the callable has been deprecated. Returns ------- Callable The decorated callable. Examples -------- Basic usage:: from manim.utils.deprecation import deprecated @deprecated def foo(**kwargs): pass @deprecated class Bar: def __init__(self): pass @deprecated def baz(self): pass foo() # WARNING The function foo has been deprecated and may be removed in a later version. a = Bar() # WARNING The class Bar has been deprecated and may be removed in a later version. a.baz() # WARNING The method Bar.baz has been deprecated and may be removed in a later version. You can specify additional information for a more precise warning:: from manim.utils.deprecation import deprecated @deprecated( since="v0.2", until="v0.4", replacement="bar", message="It is cooler." ) def foo(): pass foo() # WARNING The function foo has been deprecated since v0.2 and is expected to be removed after v0.4. Use bar instead. It is cooler. You may also use dates instead of versions:: from manim.utils.deprecation import deprecated @deprecated(since="05/01/2021", until="06/01/2021") def foo(): pass foo() # WARNING The function foo has been deprecated since 05/01/2021 and is expected to be removed after 06/01/2021. """ # If used as factory: if func is None: return lambda func: deprecated(func, since, until, replacement, message) what, name = _get_callable_info(func) def warning_msg(for_docs: bool = False) -> str: """Generate the deprecation warning message. Parameters ---------- for_docs Whether or not to format the message for use in documentation. Returns ------- str The deprecation message. """ msg = message if replacement is not None: repl = replacement if for_docs: mapper = {"class": "class", "method": "meth", "function": "func"} repl = f":{mapper[what]}:`~.{replacement}`" msg = f"Use {repl} instead.{' ' + message if message else ''}" deprecated = _deprecation_text_component(since, until, msg) return f"The {what} {name} has been {deprecated}" def deprecate_docs(func: Callable) -> None: """Adjust docstring to indicate the deprecation. Parameters ---------- func The callable whose docstring to adjust. """ warning = warning_msg(True) doc_string = func.__doc__ or "" func.__doc__ = f"{doc_string}\n\n.. attention:: Deprecated\n {warning}" def deprecate(func: Callable[..., T], *args: Any, **kwargs: Any) -> T: """The actual decorator used to extend the callables behavior. Logs a warning message. Parameters ---------- func The callable to decorate. args The arguments passed to the given callable. kwargs The keyword arguments passed to the given callable. Returns ------- Any The return value of the given callable when being passed the given arguments. """ logger.warning(warning_msg()) return func(*args, **kwargs) if type(func).__name__ != "function": deprecate_docs(func) func.__init__ = decorate(func.__init__, deprecate) return func func = decorate(func, deprecate) deprecate_docs(func) return func def deprecated_params( params: str | Iterable[str] | None = None, since: str | None = None, until: str | None = None, message: str = "", redirections: None | (Iterable[tuple[str, str] | Callable[..., dict[str, Any]]]) = None, ) -> Callable[..., T]: """Decorator to mark parameters of a callable as deprecated. It can also be used to automatically redirect deprecated parameter values to their replacements. Parameters ---------- params The parameters to be deprecated. Can consist of: * An iterable of strings, with each element representing a parameter to deprecate * A single string, with parameter names separated by commas or spaces. since The version or date since deprecation. until The version or date until removal of the deprecated callable. message The reason for why the callable has been deprecated. redirections A list of parameter redirections. Each redirection can be one of the following: * A tuple of two strings. The first string defines the name of the deprecated parameter; the second string defines the name of the parameter to redirect to, when attempting to use the first string. * A function performing the mapping operation. The parameter names of the function determine which parameters are used as input. The function must return a dictionary which contains the redirected arguments. Redirected parameters are also implicitly deprecated. Returns ------- Callable The decorated callable. Raises ------ ValueError If no parameters are defined (neither explicitly nor implicitly). ValueError If defined parameters are invalid python identifiers. Examples -------- Basic usage:: from manim.utils.deprecation import deprecated_params @deprecated_params(params="a, b, c") def foo(**kwargs): pass foo(x=2, y=3, z=4) # No warning foo(a=2, b=3, z=4) # WARNING The parameters a and b of method foo have been deprecated and may be removed in a later version. You can also specify additional information for a more precise warning:: from manim.utils.deprecation import deprecated_params @deprecated_params( params="a, b, c", since="v0.2", until="v0.4", message="The letters x, y, z are cooler.", ) def foo(**kwargs): pass foo(a=2) # WARNING The parameter a of method foo has been deprecated since v0.2 and is expected to be removed after v0.4. The letters x, y, z are cooler. Basic parameter redirection:: from manim.utils.deprecation import deprecated_params @deprecated_params( redirections=[ # Two ways to redirect one parameter to another: ("old_param", "new_param"), lambda old_param2: {"new_param22": old_param2}, ] ) def foo(**kwargs): return kwargs foo(x=1, old_param=2) # WARNING The parameter old_param of method foo has been deprecated and may be removed in a later version. # returns {"x": 1, "new_param": 2} Redirecting using a calculated value:: from manim.utils.deprecation import deprecated_params @deprecated_params( redirections=[lambda runtime_in_ms: {"run_time": runtime_in_ms / 1000}] ) def foo(**kwargs): return kwargs foo(runtime_in_ms=500) # WARNING The parameter runtime_in_ms of method foo has been deprecated and may be removed in a later version. # returns {"run_time": 0.5} Redirecting multiple parameter values to one:: from manim.utils.deprecation import deprecated_params @deprecated_params( redirections=[lambda buff_x=1, buff_y=1: {"buff": (buff_x, buff_y)}] ) def foo(**kwargs): return kwargs foo(buff_x=2) # WARNING The parameter buff_x of method foo has been deprecated and may be removed in a later version. # returns {"buff": (2, 1)} Redirect one parameter to multiple:: from manim.utils.deprecation import deprecated_params @deprecated_params( redirections=[ lambda buff=1: {"buff_x": buff[0], "buff_y": buff[1]} if isinstance(buff, tuple) else {"buff_x": buff, "buff_y": buff} ] ) def foo(**kwargs): return kwargs foo(buff=0) # WARNING The parameter buff of method foo has been deprecated and may be removed in a later version. # returns {"buff_x": 0, buff_y: 0} foo(buff=(1, 2)) # WARNING The parameter buff of method foo has been deprecated and may be removed in a later version. # returns {"buff_x": 1, buff_y: 2} """ # Check if decorator is used without parenthesis if callable(params): raise ValueError("deprecate_parameters requires arguments to be specified.") if params is None: params = [] # Construct params list params = re.split(r"[,\s]+", params) if isinstance(params, str) else list(params) # Add params which are only implicitly given via redirections if redirections is None: redirections = [] for redirector in redirections: if isinstance(redirector, tuple): params.append(redirector[0]) else: params.extend(list(inspect.signature(redirector).parameters)) # Keep ordering of params so that warning message is consistently the same # This will also help pass unit testing params = list(dict.fromkeys(params)) # Make sure params only contains valid identifiers identifier = re.compile(r"^[^\d\W]\w*\Z", re.UNICODE) if not all(re.match(identifier, param) for param in params): raise ValueError("Given parameter values are invalid.") redirections = list(redirections) def warning_msg(func: Callable[..., T], used: list[str]) -> str: """Generate the deprecation warning message. Parameters ---------- func The callable with deprecated parameters. used The list of deprecated parameters used in a call. Returns ------- str The deprecation message. """ what, name = _get_callable_info(func) plural = len(used) > 1 parameter_s = "s" if plural else "" used_ = ", ".join(used[:-1]) + " and " + used[-1] if plural else used[0] has_have_been = "have been" if plural else "has been" deprecated = _deprecation_text_component(since, until, message) return f"The parameter{parameter_s} {used_} of {what} {name} {has_have_been} {deprecated}" def redirect_params(kwargs: dict[str, Any], used: list[str]) -> None: """Adjust the keyword arguments as defined by the redirections. Parameters ---------- kwargs The keyword argument dictionary to be updated. used The list of deprecated parameters used in a call. """ for redirector in redirections: if isinstance(redirector, tuple): old_param, new_param = redirector if old_param in used: kwargs[new_param] = kwargs.pop(old_param) else: redirector_params = list(inspect.signature(redirector).parameters) redirector_args = {} for redirector_param in redirector_params: if redirector_param in used: redirector_args[redirector_param] = kwargs.pop(redirector_param) if len(redirector_args) > 0: kwargs.update(redirector(**redirector_args)) def deprecate_params(func: Callable[..., T], *args: Any, **kwargs: Any) -> T: """The actual decorator function used to extend the callables behavior. Logs a warning message when a deprecated parameter is used and redirects it if specified. Parameters ---------- func The callable to decorate. args The arguments passed to the given callable. kwargs The keyword arguments passed to the given callable. Returns ------- Any The return value of the given callable when being passed the given arguments. """ used = [] for param in params: if param in kwargs: used.append(param) if len(used) > 0: logger.warning(warning_msg(func, used)) redirect_params(kwargs, used) return func(*args, **kwargs) return decorator(deprecate_params) # type: ignore[return-value] ================================================ FILE: manim/utils/exceptions.py ================================================ from __future__ import annotations __all__ = [ "EndSceneEarlyException", "RerunSceneException", "MultiAnimationOverrideException", ] class EndSceneEarlyException(Exception): pass class RerunSceneException(Exception): pass class MultiAnimationOverrideException(Exception): pass ================================================ FILE: manim/utils/family.py ================================================ from __future__ import annotations import itertools as it from collections.abc import Iterable from ..mobject.mobject import Mobject from ..utils.iterables import remove_list_redundancies __all__ = ["extract_mobject_family_members"] def extract_mobject_family_members( mobjects: Iterable[Mobject], use_z_index: bool = False, only_those_with_points: bool = False, ) -> list[Mobject]: """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 The Mobjects currently in the Scene only_those_with_points 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 extracted_mobjects = remove_list_redundancies( list(it.chain(*(method(m) for m in mobjects))), ) if use_z_index: return sorted(extracted_mobjects, key=lambda m: m.z_index) return extracted_mobjects ================================================ FILE: manim/utils/family_ops.py ================================================ from __future__ import annotations import itertools as it from manim.mobject.mobject import Mobject __all__ = [ "extract_mobject_family_members", "restructure_list_to_exclude_certain_family_members", ] def extract_mobject_family_members( mobject_list: list[Mobject], only_those_with_points: bool = False ) -> list[Mobject]: result = list(it.chain(*(mob.get_family() for mob in mobject_list))) if only_those_with_points: result = [mob for mob in result if mob.has_points()] return result def restructure_list_to_exclude_certain_family_members( mobject_list: list[Mobject], to_remove: list[Mobject] ) -> list[Mobject]: """ Removes anything in to_remove from mobject_list, but in the event that one of the items to be removed is a member of the family of an item in mobject_list, the other family members are added back into the list. This is useful in cases where a scene contains a group, e.g. Group(m1, m2, m3), but one of its submobjects is removed, e.g. scene.remove(m1), it's useful for the list of mobject_list to be edited to contain other submobjects, but not m1. """ new_list: list[Mobject] = [] to_remove = extract_mobject_family_members(to_remove) def add_safe_mobjects_from_list( list_to_examine: list[Mobject], set_to_remove: set[Mobject] ) -> None: for mob in list_to_examine: if mob in set_to_remove: continue intersect = set_to_remove.intersection(mob.get_family()) if intersect: add_safe_mobjects_from_list(mob.submobjects, intersect) else: new_list.append(mob) add_safe_mobjects_from_list(mobject_list, set(to_remove)) return new_list ================================================ FILE: manim/utils/file_ops.py ================================================ """Utility functions for interacting with the file system.""" from __future__ import annotations __all__ = [ "add_extension_if_not_present", "guarantee_existence", "guarantee_empty_existence", "seek_full_path_from_defaults", "modify_atime", "open_file", "is_mp4_format", "is_gif_format", "is_png_format", "is_webm_format", "is_mov_format", "write_to_movie", "ensure_executable", ] import os import platform import shutil import subprocess as sp import time from pathlib import Path from shutil import copyfile from typing import TYPE_CHECKING if TYPE_CHECKING: from manim.typing import StrPath from ..scene.scene_file_writer import SceneFileWriter from manim import __version__, config, logger from .. import console def is_mp4_format() -> bool: """ Determines if output format is .mp4 Returns ------- class:`bool` ``True`` if format is set as mp4 """ val: bool = config["format"] == "mp4" return val def is_gif_format() -> bool: """ Determines if output format is .gif Returns ------- class:`bool` ``True`` if format is set as gif """ val: bool = config["format"] == "gif" return val def is_webm_format() -> bool: """ Determines if output format is .webm Returns ------- class:`bool` ``True`` if format is set as webm """ val: bool = config["format"] == "webm" return val def is_mov_format() -> bool: """ Determines if output format is .mov Returns ------- class:`bool` ``True`` if format is set as mov """ val: bool = config["format"] == "mov" return val def is_png_format() -> bool: """ Determines if output format is .png Returns ------- class:`bool` ``True`` if format is set as png """ val: bool = config["format"] == "png" return val def write_to_movie() -> bool: """ Determines from config if the output is a video format such as mp4 or gif, if the --format is set as 'png' then it will take precedence event if the write_to_movie flag is set Returns ------- class:`bool` ``True`` if the output should be written in a movie format """ if is_png_format(): return False return ( config["write_to_movie"] or is_mp4_format() or is_gif_format() or is_webm_format() or is_mov_format() ) def ensure_executable(path_to_exe: Path) -> bool: if path_to_exe.parent == Path("."): executable: StrPath | None = shutil.which(path_to_exe.stem) if executable is None: return False else: executable = path_to_exe return os.access(executable, os.X_OK) def add_extension_if_not_present(file_name: Path, extension: str) -> Path: if file_name.suffix != extension: return file_name.with_suffix(file_name.suffix + extension) else: return file_name def add_version_before_extension(file_name: Path) -> Path: return file_name.with_name( f"{file_name.stem}_ManimCE_v{__version__}{file_name.suffix}" ) def guarantee_existence(path: Path) -> Path: if not path.exists(): path.mkdir(parents=True) return path.resolve(strict=True) def guarantee_empty_existence(path: Path) -> Path: if path.exists(): shutil.rmtree(str(path)) path.mkdir(parents=True) return path.resolve(strict=True) def seek_full_path_from_defaults( file_name: StrPath, default_dir: Path, extensions: list[str] ) -> Path: possible_paths = [Path(file_name).expanduser()] possible_paths += [ Path(default_dir) / f"{file_name}{extension}" for extension in ["", *extensions] ] for path in possible_paths: if path.exists(): return path error = ( f"From: {Path.cwd()}, could not find {file_name} at either " f"of these locations: {list(map(str, possible_paths))}" ) raise OSError(error) def modify_atime(file_path: str) -> None: """Will manually change the accessed time (called `atime`) of the file, as on a lot of OS the accessed time refresh is disabled by default. Parameters ---------- file_path The path of the file. """ os.utime(file_path, times=(time.time(), Path(file_path).stat().st_mtime)) def open_file(file_path: Path, in_browser: bool = False) -> None: current_os = platform.system() if current_os == "Windows": # The method os.startfile is only available in Windows, # ignoring type error caused by this. os.startfile(file_path if not in_browser else file_path.parent) # type: ignore[attr-defined] else: if current_os == "Linux": commands = ["xdg-open"] file_path = file_path if not in_browser else file_path.parent elif current_os.startswith("CYGWIN"): commands = ["cygstart"] file_path = file_path if not in_browser else file_path.parent elif current_os == "Darwin": commands = ["open"] if not in_browser else ["open", "-R"] else: raise OSError("Unable to identify your operating system...") # check after so that file path is set correctly if config.preview_command: commands = [config.preview_command] commands.append(str(file_path)) sp.run(commands) def open_media_file(file_writer: SceneFileWriter) -> None: file_paths = [] if config["save_last_frame"]: file_paths.append(file_writer.image_file_path) if write_to_movie() and not is_gif_format(): file_paths.append(file_writer.movie_file_path) if write_to_movie() and is_gif_format(): file_paths.append(file_writer.gif_file_path) for file_path in file_paths: if config["show_in_file_browser"]: open_file(file_path, True) if config["preview"]: open_file(file_path, False) logger.info(f"Previewed File at: '{file_path}'") def get_template_names() -> list[str]: """Returns template names from the templates directory. Returns ------- :class:`list` """ template_path = Path.resolve(Path(__file__).parent.parent / "templates") return [template_name.stem for template_name in template_path.glob("*.mtp")] def get_template_path() -> Path: """Returns the Path of templates directory. Returns ------- :class:`Path` """ return Path.resolve(Path(__file__).parent.parent / "templates") def add_import_statement(file: Path) -> None: """Prepends an import statement in a file Parameters ---------- file """ with file.open("r+") as f: import_line = "from manim import *" content = f.read() f.seek(0) f.write(import_line + "\n" + content) def copy_template_files( project_dir: Path = Path("."), template_name: str = "Default" ) -> None: """Copies template files from templates dir to project_dir. Parameters ---------- project_dir Path to project directory. template_name Name of template. """ template_cfg_path = Path.resolve( Path(__file__).parent.parent / "templates/template.cfg", ) template_scene_path = Path.resolve( Path(__file__).parent.parent / f"templates/{template_name}.mtp", ) if not template_cfg_path.exists(): raise FileNotFoundError(f"{template_cfg_path} : file does not exist") if not template_scene_path.exists(): raise FileNotFoundError(f"{template_scene_path} : file does not exist") copyfile(template_cfg_path, Path.resolve(project_dir / "manim.cfg")) console.print("\n\t[green]copied[/green] [blue]manim.cfg[/blue]\n") copyfile(template_scene_path, Path.resolve(project_dir / "main.py")) console.print("\n\t[green]copied[/green] [blue]main.py[/blue]\n") add_import_statement(Path.resolve(project_dir / "main.py")) ================================================ FILE: manim/utils/hashing.py ================================================ """Utilities for scene caching.""" from __future__ import annotations import copy import inspect import json import zlib from collections.abc import Callable, Hashable, Iterable from time import perf_counter from types import FunctionType, MappingProxyType, MethodType, ModuleType from typing import TYPE_CHECKING, Any import numpy as np from manim._config import config, logger if TYPE_CHECKING: from manim.animation.animation import Animation from manim.camera.camera import Camera from manim.mobject.mobject import Mobject from manim.renderer.opengl_renderer import OpenGLCamera from manim.scene.scene import Scene __all__ = ["KEYS_TO_FILTER_OUT", "get_hash_from_play_call", "get_json"] # Sometimes there are elements that are not suitable for hashing (too long or # run-dependent). This is used to filter them out. KEYS_TO_FILTER_OUT = { "original_id", "background", "pixel_array", "pixel_array_to_cairo_context", } class _Memoizer: """Implements the memoization logic to optimize the hashing procedure and prevent the circular references within iterable processed. Keeps a record of all the processed objects, and handle the logic to return a place holder instead of the original object if the object has already been processed by the hashing logic (i.e, recursively checked, converted to JSON, etc..). This class uses two signatures functions to keep a track of processed objects : hash or id. Whenever possible, hash is used to ensure a broader object content-equality detection. """ _already_processed = set() # Can be changed to whatever string to help debugging the JSon generation. ALREADY_PROCESSED_PLACEHOLDER = "AP" THRESHOLD_WARNING = 170_000 @classmethod def reset_already_processed(cls): cls._already_processed.clear() @classmethod def check_already_processed_decorator(cls: _Memoizer, is_method: bool = False): """Decorator to handle the arguments that goes through the decorated function. Returns _ALREADY_PROCESSED_PLACEHOLDER if the obj has been processed, or lets the decorated function call go ahead. Parameters ---------- is_method Whether the function passed is a method, by default False. """ def layer(func): # NOTE : There is probably a better way to separate both case when func is # a method or a function. if is_method: return lambda self, obj: cls._handle_already_processed( obj, default_function=lambda obj: func(self, obj), ) return lambda obj: cls._handle_already_processed(obj, default_function=func) return layer @classmethod def check_already_processed(cls, obj: Any) -> Any: """Checks if obj has been already processed. Returns itself if it has not been, or the value of _ALREADY_PROCESSED_PLACEHOLDER if it has. Marks the object as processed in the second case. Parameters ---------- obj The object to check. Returns ------- Any Either the object itself or the placeholder. """ # When the object is not memoized, we return the object itself. return cls._handle_already_processed(obj, lambda x: x) @classmethod def mark_as_processed(cls, obj: Any) -> None: """Marks an object as processed. Parameters ---------- obj The object to mark as processed. """ cls._handle_already_processed(obj, lambda x: x) return cls._return(obj, id, lambda x: x, memoizing=False) @classmethod def _handle_already_processed( cls, obj, default_function: Callable[[Any], Any], ): if isinstance( obj, ( int, float, str, complex, ), ) and obj not in [None, cls.ALREADY_PROCESSED_PLACEHOLDER]: # It makes no sense (and it'd slower) to memoize objects of these primitive # types. Hence, we simply return the object. return obj if isinstance(obj, Hashable): try: return cls._return(obj, hash, default_function) except TypeError: # In case of an error with the hash (eg an object is marked as hashable # but contains a non hashable within it) # Fallback to use the built-in function id instead. pass return cls._return(obj, id, default_function) @classmethod def _return( cls, obj: Any, obj_to_membership_sign: Callable[[Any], int], default_func, memoizing=True, ) -> str | Any: obj_membership_sign = obj_to_membership_sign(obj) if obj_membership_sign in cls._already_processed: return cls.ALREADY_PROCESSED_PLACEHOLDER if memoizing: if ( not config.disable_caching_warning and len(cls._already_processed) == cls.THRESHOLD_WARNING ): logger.warning( "It looks like the scene contains a lot of sub-mobjects. Caching " "is sometimes not suited to handle such large scenes, you might " "consider disabling caching with --disable_caching to potentially " "speed up the rendering process.", ) logger.warning( "You can disable this warning by setting disable_caching_warning " "to True in your config file.", ) cls._already_processed.add(obj_membership_sign) return default_func(obj) class _CustomEncoder(json.JSONEncoder): def default(self, obj: Any): """ This method is used to serialize objects to JSON format. If obj is a function, then it will return a dict with two keys : 'code', for the code source, and 'nonlocals' for all nonlocalsvalues. (including nonlocals functions, that will be serialized as this is recursive.) if obj is a np.darray, it converts it into a list. if obj is an object with __dict__ attribute, it returns its __dict__. Else, will let the JSONEncoder do the stuff, and throw an error if the type is not suitable for JSONEncoder. Parameters ---------- obj Arbitrary object to convert Returns ------- Any Python object that JSON encoder will recognize """ if not (isinstance(obj, ModuleType)) and isinstance( obj, (MethodType, FunctionType), ): cvars = inspect.getclosurevars(obj) cvardict = {**copy.copy(cvars.globals), **copy.copy(cvars.nonlocals)} for i in list(cvardict): # NOTE : All module types objects are removed, because otherwise it # throws ValueError: Circular reference detected if not. TODO if isinstance(cvardict[i], ModuleType): del cvardict[i] try: code = inspect.getsource(obj) except (OSError, TypeError): # This happens when rendering videos included in the documentation # within doctests and should be replaced by a solution avoiding # hash collision (due to the same, empty, code strings) at some point. # See https://github.com/ManimCommunity/manim/pull/402. code = "" return self._cleaned_iterable({"code": code, "nonlocals": cvardict}) elif isinstance(obj, np.ndarray): if obj.size > 1000: obj = np.resize(obj, (100, 100)) return f"TRUNCATED ARRAY: {repr(obj)}" # We return the repr and not a list to avoid the JsonEncoder to iterate over it. return repr(obj) elif hasattr(obj, "__dict__"): temp = obj.__dict__ # MappingProxy is scene-caching nightmare. It contains all of the object methods and attributes. We skip it as the mechanism will at some point process the object, but instantiated. # Indeed, there is certainly no case where scene-caching will receive only a non instancied object, as this is never used in the library or encouraged to be used user-side. if isinstance(temp, MappingProxyType): return "MappingProxy" return self._cleaned_iterable(temp) elif isinstance(obj, np.uint8): return int(obj) # Serialize it with only the type of the object. You can change this to whatever string when debugging the serialization process. return str(type(obj)) def _cleaned_iterable(self, iterable: Iterable[Any]): """Check for circular reference at each iterable that will go through the JSONEncoder, as well as key of the wrong format. If a key with a bad format is found (i.e not a int, string, or float), it gets replaced byt its hash using the same process implemented here. If a circular reference is found within the iterable, it will be replaced by the string "already processed". Parameters ---------- iterable The iterable to check. """ def _key_to_hash(key): return zlib.crc32(json.dumps(key, cls=_CustomEncoder).encode()) def _iter_check_list(lst): processed_list = [None] * len(lst) for i, el in enumerate(lst): el = _Memoizer.check_already_processed(el) if isinstance(el, (list, tuple)): new_value = _iter_check_list(el) elif isinstance(el, dict): new_value = _iter_check_dict(el) else: new_value = el processed_list[i] = new_value return processed_list def _iter_check_dict(dct): processed_dict = {} for k, v in dct.items(): v = _Memoizer.check_already_processed(v) if k in KEYS_TO_FILTER_OUT: continue # We check if the k is of the right format (supporter by Json) if not isinstance(k, (str, int, float, bool)) and k is not None: k_new = _key_to_hash(k) else: k_new = k if isinstance(v, dict): new_value = _iter_check_dict(v) elif isinstance(v, (list, tuple)): new_value = _iter_check_list(v) else: new_value = v processed_dict[k_new] = new_value return processed_dict if isinstance(iterable, (list, tuple)): return _iter_check_list(iterable) elif isinstance(iterable, dict): return _iter_check_dict(iterable) def encode(self, obj: Any): """Overriding of :meth:`JSONEncoder.encode`, to make our own process. Parameters ---------- obj The object to encode in JSON. Returns ------- :class:`str` The object encoder with the standard json process. """ _Memoizer.mark_as_processed(obj) if isinstance(obj, (dict, list, tuple)): return super().encode(self._cleaned_iterable(obj)) return super().encode(obj) def get_json(obj: dict): """Recursively serialize `object` to JSON using the :class:`CustomEncoder` class. Parameters ---------- obj The dict to flatten Returns ------- :class:`str` The flattened object """ return json.dumps(obj, cls=_CustomEncoder) def get_hash_from_play_call( scene_object: Scene, camera_object: Camera | OpenGLCamera, animations_list: Iterable[Animation], current_mobjects_list: Iterable[Mobject], ) -> str: """Take the list of animations and a list of mobjects and output their hashes. This is meant to be used for `scene.play` function. Parameters ----------- scene_object The scene object. camera_object The camera object used in the scene. animations_list The list of animations. current_mobjects_list The list of mobjects. Returns ------- :class:`str` A string concatenation of the respective hashes of `camera_object`, `animations_list` and `current_mobjects_list`, separated by `_`. """ logger.debug("Hashing ...") t_start = perf_counter() _Memoizer.mark_as_processed(scene_object) camera_json = get_json(camera_object) animations_list_json = [get_json(x) for x in sorted(animations_list, key=str)] current_mobjects_list_json = [get_json(x) for x in current_mobjects_list] hash_camera, hash_animations, hash_current_mobjects = ( zlib.crc32(repr(json_val).encode()) for json_val in [camera_json, animations_list_json, current_mobjects_list_json] ) hash_complete = f"{hash_camera}_{hash_animations}_{hash_current_mobjects}" t_end = perf_counter() logger.debug("Hashing done in %(time)s s.", {"time": str(t_end - t_start)[:8]}) # End of the hashing for the animation, reset all the memoize. _Memoizer.reset_already_processed() logger.debug("Hash generated : %(h)s", {"h": hash_complete}) return hash_complete ================================================ FILE: manim/utils/images.py ================================================ """Image manipulation utilities.""" from __future__ import annotations __all__ = [ "get_full_raster_image_path", "drag_pixels", "invert_image", "change_to_rgba_array", ] from pathlib import Path, PurePath from typing import TYPE_CHECKING import numpy as np from PIL import Image from manim.typing import RGBAPixelArray, RGBPixelArray from .. import config from ..utils.file_ops import seek_full_path_from_defaults if TYPE_CHECKING: pass def get_full_raster_image_path(image_file_name: str | PurePath) -> Path: return seek_full_path_from_defaults( image_file_name, default_dir=config.get_dir("assets_dir"), extensions=[".jpg", ".jpeg", ".png", ".gif", ".ico"], ) def get_full_vector_image_path(image_file_name: str | PurePath) -> Path: return seek_full_path_from_defaults( image_file_name, default_dir=config.get_dir("assets_dir"), extensions=[".svg"], ) def drag_pixels(frames: list[np.array]) -> list[np.array]: curr = frames[0] new_frames = [] for frame in frames: curr += (curr == 0) * np.array(frame) new_frames.append(np.array(curr)) return new_frames def invert_image(image: np.array) -> Image: arr = np.array(image) arr = (255 * np.ones(arr.shape)).astype(arr.dtype) - arr return Image.fromarray(arr) def change_to_rgba_array(image: RGBPixelArray, dtype: str = "uint8") -> RGBAPixelArray: """Converts an RGB array into RGBA with the alpha value opacity maxed.""" pa = image if len(pa.shape) == 2: pa = pa.reshape(list(pa.shape) + [1]) if pa.shape[2] == 1: pa = pa.repeat(3, axis=2) if pa.shape[2] == 3: alphas = 255 * np.ones( list(pa.shape[:2]) + [1], dtype=dtype, ) pa = np.append(pa, alphas, axis=2) return pa ================================================ FILE: manim/utils/ipython_magic.py ================================================ """Utilities for using Manim with IPython (in particular: Jupyter notebooks)""" from __future__ import annotations import mimetypes import shutil from datetime import datetime from pathlib import Path from typing import Any from manim import config, logger, tempconfig from manim.__main__ import main from manim.renderer.shader import shader_program_cache from ..constants import RendererType __all__ = ["ManimMagic"] try: from IPython import get_ipython from IPython.core.interactiveshell import InteractiveShell from IPython.core.magic import ( Magics, line_cell_magic, magics_class, needs_local_scope, ) from IPython.display import Image, Video, display except ImportError: pass else: @magics_class class ManimMagic(Magics): def __init__(self, shell: InteractiveShell) -> None: super().__init__(shell) self.rendered_files: dict[Path, Path] = {} @needs_local_scope @line_cell_magic def manim( self, line: str, cell: str | None = None, local_ns: dict[str, Any] | None = None, ) -> None: r"""Render Manim scenes contained in IPython cells. Works as a line or cell magic. .. hint:: This line and cell magic works best when used in a JupyterLab environment: while all of the functionality is available for classic Jupyter notebooks as well, it is possible that videos sometimes don't update on repeated execution of the same cell if the scene name stays the same. This problem does not occur when using JupyterLab. Please refer to ``_ for more information about JupyterLab and Jupyter notebooks. Usage in line mode:: %manim [CLI options] MyAwesomeScene Usage in cell mode:: %%manim [CLI options] MyAwesomeScene class MyAweseomeScene(Scene): def construct(self): ... Run ``%manim --help`` and ``%manim render --help`` for possible command line interface options. .. note:: The maximal width of the rendered videos that are displayed in the notebook can be configured via the ``media_width`` configuration option. The default is set to ``25vw``, which is 25% of your current viewport width. To allow the output to become as large as possible, set ``config.media_width = "100%"``. The ``media_embed`` option will embed the image/video output in the notebook. This is generally undesirable as it makes the notebooks very large, but is required on some platforms (notably Google's CoLab, where it is automatically enabled unless suppressed by ``config.embed = False``) and needed in cases when the notebook (or converted HTML file) will be moved relative to the video locations. Use-cases include building documentation with Sphinx and JupyterBook. See also the :mod:`manim directive for Sphinx `. Examples -------- First make sure to put ``import manim``, or even ``from manim import *`` in a cell and evaluate it. Then, a typical Jupyter notebook cell for Manim could look as follows:: %%manim -v WARNING --disable_caching -qm BannerExample config.media_width = "75%" config.media_embed = True class BannerExample(Scene): def construct(self): self.camera.background_color = "#ece6e2" banner_large = ManimBanner(dark_theme=False).scale(0.7) self.play(banner_large.create()) self.play(banner_large.expand()) Evaluating this cell will render and display the ``BannerExample`` scene defined in the body of the cell. .. note:: In case you want to hide the red box containing the output progress bar, the ``progress_bar`` config option should be set to ``None``. This can also be done by passing ``--progress_bar None`` as a CLI flag. """ if cell: exec(cell, local_ns) args = line.split() if not len(args) or "-h" in args or "--help" in args or "--version" in args: main(args, standalone_mode=False, prog_name="manim") return modified_args = self.add_additional_args(args) args = main(modified_args, standalone_mode=False, prog_name="manim") assert isinstance(local_ns, dict) with tempconfig(local_ns.get("config", {})): config.digest_args(args) renderer = None if config.renderer == RendererType.OPENGL: from manim.renderer.opengl_renderer import OpenGLRenderer renderer = OpenGLRenderer() try: SceneClass = local_ns[config["scene_names"][0]] scene = SceneClass(renderer=renderer) scene.render() finally: # Shader cache becomes invalid as the context is destroyed shader_program_cache.clear() # Close OpenGL window here instead of waiting for the main thread to # finish causing the window to stay open and freeze if renderer is not None and renderer.window is not None: renderer.window.close() if config["output_file"] is None: logger.info("No output file produced") return local_path = Path(config["output_file"]).relative_to(Path.cwd()) tmpfile = ( Path(config["media_dir"]) / "jupyter" / f"{_generate_file_name()}{local_path.suffix}" ) if local_path in self.rendered_files: self.rendered_files[local_path].unlink() self.rendered_files[local_path] = tmpfile tmpfile.parent.mkdir(parents=True, exist_ok=True) shutil.copy(local_path, tmpfile) file_type = mimetypes.guess_type(config["output_file"])[0] assert isinstance(file_type, str) embed = config["media_embed"] if not embed: # videos need to be embedded when running in google colab. # do this automatically in case config.media_embed has not been # set explicitly. embed = "google.colab" in str(get_ipython()) if file_type.startswith("image"): result = Image(filename=config["output_file"]) else: result = Video( tmpfile, html_attributes=f'controls autoplay loop style="max-width: {config["media_width"]};"', embed=embed, ) display(result) def add_additional_args(self, args: list[str]) -> list[str]: additional_args = ["--jupyter"] # Use webm to support transparency if "-t" in args and "--format" not in args: additional_args += ["--format", "webm"] return additional_args + args[:-1] + [""] + [args[-1]] def _generate_file_name() -> str: val: str = ( config["scene_names"][0] + "@" + datetime.now().strftime("%Y-%m-%d@%H-%M-%S") ) return val ================================================ FILE: manim/utils/iterables.py ================================================ """Operations on iterables.""" from __future__ import annotations __all__ = [ "adjacent_n_tuples", "adjacent_pairs", "all_elements_are_instances", "concatenate_lists", "list_difference_update", "list_update", "listify", "make_even", "make_even_by_cycling", "remove_list_redundancies", "remove_nones", "stretch_array_to_length", "tuplify", ] import itertools as it from collections.abc import ( Callable, Collection, Generator, Hashable, Iterable, Reversible, Sequence, ) from typing import TYPE_CHECKING, TypeVar, overload import numpy as np T = TypeVar("T") U = TypeVar("U") F = TypeVar("F", np.float64, np.int_) H = TypeVar("H", bound=Hashable) if TYPE_CHECKING: import numpy.typing as npt def adjacent_n_tuples(objects: Sequence[T], n: int) -> zip[tuple[T, ...]]: """Returns the Sequence objects cyclically split into n length tuples. See Also -------- adjacent_pairs : alias with n=2 Examples -------- .. code-block:: pycon >>> list(adjacent_n_tuples([1, 2, 3, 4], 2)) [(1, 2), (2, 3), (3, 4), (4, 1)] >>> list(adjacent_n_tuples([1, 2, 3, 4], 3)) [(1, 2, 3), (2, 3, 4), (3, 4, 1), (4, 1, 2)] """ return zip(*([*objects[k:], *objects[:k]] for k in range(n))) def adjacent_pairs(objects: Sequence[T]) -> zip[tuple[T, ...]]: """Alias for ``adjacent_n_tuples(objects, 2)``. See Also -------- adjacent_n_tuples Examples -------- .. code-block:: pycon >>> list(adjacent_pairs([1, 2, 3, 4])) [(1, 2), (2, 3), (3, 4), (4, 1)] """ return adjacent_n_tuples(objects, 2) def all_elements_are_instances(iterable: Iterable[object], Class: type[object]) -> bool: """Returns ``True`` if all elements of iterable are instances of Class. False otherwise. """ return all(isinstance(e, Class) for e in iterable) def batch_by_property( items: Iterable[T], property_func: Callable[[T], U] ) -> list[tuple[list[T], U | None]]: """Takes in a Sequence, and returns a list of tuples, (batch, prop) such that all items in a batch have the same output when put into the Callable property_func, and such that chaining all these batches together would give the original Sequence (i.e. order is preserved). Examples -------- .. code-block:: pycon >>> batch_by_property([(1, 2), (3, 4), (5, 6, 7), (8, 9)], len) [([(1, 2), (3, 4)], 2), ([(5, 6, 7)], 3), ([(8, 9)], 2)] """ batch_prop_pairs: list[tuple[list[T], U | None]] = [] curr_batch: list[T] = [] curr_prop = None for item in items: prop = property_func(item) if prop != curr_prop: # Add current batch if len(curr_batch) > 0: batch_prop_pairs.append((curr_batch, curr_prop)) # Redefine curr curr_prop = prop curr_batch = [item] else: curr_batch.append(item) if len(curr_batch) > 0: batch_prop_pairs.append((curr_batch, curr_prop)) return batch_prop_pairs def concatenate_lists(*list_of_lists: Iterable[T]) -> list[T]: """Combines the Iterables provided as arguments into one list. Examples -------- .. code-block:: pycon >>> concatenate_lists([1, 2], [3, 4], [5]) [1, 2, 3, 4, 5] """ return [item for lst in list_of_lists for item in lst] def list_difference_update(l1: Iterable[T], l2: Iterable[T]) -> list[T]: """Returns a list containing all the elements of l1 not in l2. Examples -------- .. code-block:: pycon >>> list_difference_update([1, 2, 3, 4], [2, 4]) [1, 3] """ return [e for e in l1 if e not in l2] def list_update(l1: Iterable[T], l2: Iterable[T]) -> list[T]: """Used instead of ``set.update()`` to maintain order, making sure duplicates are removed from l1, not l2. Removes overlap of l1 and l2 and then concatenates l2 unchanged. Examples -------- .. code-block:: pycon >>> list_update([1, 2, 3], [2, 4, 4]) [1, 3, 2, 4, 4] """ return [e for e in l1 if e not in l2] + list(l2) @overload def listify(obj: str) -> list[str]: ... @overload def listify(obj: Iterable[T]) -> list[T]: ... @overload def listify(obj: T) -> list[T]: ... def listify(obj: str | Iterable[T] | T) -> list[str] | list[T]: """Converts obj to a list intelligently. Examples -------- .. code-block:: pycon >>> listify("str") ['str'] >>> listify((1, 2)) [1, 2] >>> listify(len) [] """ if isinstance(obj, str): return [obj] if isinstance(obj, Iterable): return list(obj) else: return [obj] def make_even( iterable_1: Iterable[T], iterable_2: Iterable[U] ) -> tuple[list[T], list[U]]: """Extends the shorter of the two iterables with duplicate values until its length is equal to the longer iterable (favours earlier elements). See Also -------- make_even_by_cycling : cycles elements instead of favouring earlier ones Examples -------- .. code-block:: pycon >>> make_even([1, 2], [3, 4, 5, 6]) ([1, 1, 2, 2], [3, 4, 5, 6]) >>> make_even([1, 2], [3, 4, 5, 6, 7]) ([1, 1, 1, 2, 2], [3, 4, 5, 6, 7]) """ list_1, list_2 = list(iterable_1), list(iterable_2) len_list_1 = len(list_1) len_list_2 = len(list_2) length = max(len_list_1, len_list_2) return ( [list_1[(n * len_list_1) // length] for n in range(length)], [list_2[(n * len_list_2) // length] for n in range(length)], ) def make_even_by_cycling( iterable_1: Collection[T], iterable_2: Collection[U] ) -> tuple[list[T], list[U]]: """Extends the shorter of the two iterables with duplicate values until its length is equal to the longer iterable (cycles over shorter iterable). See Also -------- make_even : favours earlier elements instead of cycling them Examples -------- .. code-block:: pycon >>> make_even_by_cycling([1, 2], [3, 4, 5, 6]) ([1, 2, 1, 2], [3, 4, 5, 6]) >>> make_even_by_cycling([1, 2], [3, 4, 5, 6, 7]) ([1, 2, 1, 2, 1], [3, 4, 5, 6, 7]) """ length = max(len(iterable_1), len(iterable_2)) cycle1 = it.cycle(iterable_1) cycle2 = it.cycle(iterable_2) return ( [next(cycle1) for _ in range(length)], [next(cycle2) for _ in range(length)], ) def remove_list_redundancies(lst: Reversible[H]) -> list[H]: """Used instead of ``list(set(l))`` to maintain order. Keeps the last occurrence of each element. """ reversed_result = [] used = set() for x in reversed(lst): if x not in used: reversed_result.append(x) used.add(x) reversed_result.reverse() return reversed_result def remove_nones(sequence: Iterable[T | None]) -> list[T]: """Removes elements where bool(x) evaluates to False. Examples -------- .. code-block:: pycon >>> remove_nones(["m", "", "l", 0, 42, False, True]) ['m', 'l', 42, True] """ # Note this is redundant with it.chain return [x for x in sequence if x] def resize_array(nparray: npt.NDArray[F], length: int) -> npt.NDArray[F]: """Extends/truncates nparray so that ``len(result) == length``. The elements of nparray are cycled to achieve the desired length. See Also -------- resize_preserving_order : favours earlier elements instead of cycling them make_even_by_cycling : similar cycling behaviour for balancing 2 iterables Examples -------- .. code-block:: pycon >>> points = np.array([[1, 2], [3, 4]]) >>> resize_array(points, 1) array([[1, 2]]) >>> resize_array(points, 3) array([[1, 2], [3, 4], [1, 2]]) >>> resize_array(points, 2) array([[1, 2], [3, 4]]) """ if len(nparray) == length: return nparray return np.resize(nparray, (length, *nparray.shape[1:])) def resize_preserving_order( nparray: npt.NDArray[np.float64], length: int ) -> npt.NDArray[np.float64]: """Extends/truncates nparray so that ``len(result) == length``. The elements of nparray are duplicated to achieve the desired length (favours earlier elements). Constructs a zeroes array of length if nparray is empty. See Also -------- resize_array : cycles elements instead of favouring earlier ones make_even : similar earlier-favouring behaviour for balancing 2 iterables Examples -------- .. code-block:: pycon >>> resize_preserving_order(np.array([]), 5) array([0., 0., 0., 0., 0.]) >>> nparray = np.array([[1, 2], [3, 4]]) >>> resize_preserving_order(nparray, 1) array([[1, 2]]) >>> resize_preserving_order(nparray, 3) array([[1, 2], [1, 2], [3, 4]]) """ if len(nparray) == 0: return np.zeros((length, *nparray.shape[1:])) if len(nparray) == length: return nparray indices = np.arange(length) * len(nparray) // length return nparray[indices] def resize_with_interpolation(nparray: npt.NDArray[F], length: int) -> npt.NDArray[F]: """Extends/truncates nparray so that ``len(result) == length``. New elements are interpolated to achieve the desired length. Note that if nparray's length changes, its dtype may too (e.g. int -> float: see Examples) See Also -------- resize_array : cycles elements instead of interpolating resize_preserving_order : favours earlier elements instead of interpolating Examples -------- .. code-block:: pycon >>> nparray = np.array([[1, 2], [3, 4]]) >>> resize_with_interpolation(nparray, 1) array([[1., 2.]]) >>> resize_with_interpolation(nparray, 4) array([[1. , 2. ], [1.66666667, 2.66666667], [2.33333333, 3.33333333], [3. , 4. ]]) >>> nparray = np.array([[[1, 2], [3, 4]]]) >>> nparray = np.array([[1, 2], [3, 4], [5, 6]]) >>> resize_with_interpolation(nparray, 4) array([[1. , 2. ], [2.33333333, 3.33333333], [3.66666667, 4.66666667], [5. , 6. ]]) >>> nparray = np.array([[1, 2], [3, 4], [1, 2]]) >>> resize_with_interpolation(nparray, 4) array([[1. , 2. ], [2.33333333, 3.33333333], [2.33333333, 3.33333333], [1. , 2. ]]) """ if len(nparray) == length: return nparray cont_indices = np.linspace(0, len(nparray) - 1, length) return np.array( [ (1 - a) * nparray[lh] + a * nparray[rh] for ci in cont_indices for lh, rh, a in [(int(ci), int(np.ceil(ci)), ci % 1)] ], ) def stretch_array_to_length(nparray: npt.NDArray[F], length: int) -> npt.NDArray[F]: # todo: is this the same as resize_preserving_order()? curr_len = len(nparray) if curr_len > length: raise Warning("Trying to stretch array to a length shorter than its own") indices = np.arange(length) / float(length) indices *= curr_len return nparray[indices.astype(int)] @overload def tuplify(obj: str) -> tuple[str]: ... @overload def tuplify(obj: Iterable[T]) -> tuple[T]: ... @overload def tuplify(obj: T) -> tuple[T]: ... def tuplify(obj: str | Iterable[T] | T) -> tuple[str] | tuple[T]: """Converts obj to a tuple intelligently. Examples -------- .. code-block:: pycon >>> tuplify("str") ('str',) >>> tuplify([1, 2]) (1, 2) >>> tuplify(len) (,) """ if isinstance(obj, str): return (obj,) if isinstance(obj, Iterable): return tuple(obj) else: return (obj,) def uniq_chain(*args: Iterable[T]) -> Generator[T, None, None]: """Returns a generator that yields all unique elements of the Iterables provided via args in the order provided. Examples -------- .. code-block:: pycon >>> gen = uniq_chain([1, 2], [2, 3], [1, 4, 4]) >>> from collections.abc import Generator >>> isinstance(gen, Generator) True >>> tuple(gen) (1, 2, 3, 4) """ unique_items = set() for x in it.chain(*args): if x in unique_items: continue unique_items.add(x) yield x def hash_obj(obj: object) -> int: """Determines a hash, even of potentially mutable objects.""" if isinstance(obj, dict): return hash(tuple(sorted((hash_obj(k), hash_obj(v)) for k, v in obj.items()))) if isinstance(obj, set): return hash(tuple(sorted(hash_obj(e) for e in obj))) if isinstance(obj, (tuple, list)): return hash(tuple(hash_obj(e) for e in obj)) return hash(obj) ================================================ FILE: manim/utils/module_ops.py ================================================ from __future__ import annotations import importlib.util import inspect import re import sys import types import warnings from pathlib import Path from typing import TYPE_CHECKING, Any, Literal, overload from manim._config import config, console, logger from manim.constants import ( CHOOSE_NUMBER_MESSAGE, INVALID_NUMBER_MESSAGE, NO_SCENE_MESSAGE, SCENE_NOT_FOUND_MESSAGE, ) from manim.scene.scene_file_writer import SceneFileWriter if TYPE_CHECKING: from manim.scene.scene import Scene __all__ = ["scene_classes_from_file"] def get_module(file_name: Path) -> types.ModuleType: if str(file_name) == "-": module = types.ModuleType("input_scenes") logger.info( "Enter the animation's code & end with an EOF (CTRL+D on Linux/Unix, CTRL+Z on Windows):", ) code = sys.stdin.read() if not code.startswith("from manim import"): logger.warning( "Didn't find an import statement for Manim. Importing automatically...", ) code = "from manim import *\n" + code logger.info("Rendering animation from typed code...") try: exec(code, module.__dict__) return module except Exception as e: logger.error(f"Failed to render scene: {str(e)}") sys.exit(2) else: if file_name.exists(): ext = file_name.suffix if ext != ".py": raise ValueError(f"{file_name} is not a valid Manim python script.") module_name = ".".join(file_name.with_suffix("").parts) warnings.filterwarnings( "default", category=DeprecationWarning, module=module_name, ) spec = importlib.util.spec_from_file_location(module_name, file_name) if isinstance(spec, importlib.machinery.ModuleSpec): module = importlib.util.module_from_spec(spec) sys.modules[module_name] = module sys.path.insert(0, str(file_name.parent.absolute())) assert spec.loader spec.loader.exec_module(module) return module raise FileNotFoundError(f"{file_name} not found") else: raise FileNotFoundError(f"{file_name} not found") def get_scene_classes_from_module(module: types.ModuleType) -> list[type[Scene]]: from ..scene.scene import Scene def is_child_scene(obj: Any, module: types.ModuleType) -> bool: return ( inspect.isclass(obj) and issubclass(obj, Scene) and obj != Scene and obj.__module__.startswith(module.__name__) ) return [ member[1] for member in inspect.getmembers(module, lambda x: is_child_scene(x, module)) ] def get_scenes_to_render(scene_classes: list[type[Scene]]) -> list[type[Scene]]: if not scene_classes: logger.error(NO_SCENE_MESSAGE) return [] if config["write_all"]: return scene_classes result = [] for scene_name in config["scene_names"]: found = False for scene_class in scene_classes: if scene_class.__name__ == scene_name: result.append(scene_class) found = True break if not found and (scene_name != ""): logger.error(SCENE_NOT_FOUND_MESSAGE.format(scene_name)) if result: return result if len(scene_classes) == 1: config["scene_names"] = [scene_classes[0].__name__] return [scene_classes[0]] return prompt_user_for_choice(scene_classes) def prompt_user_for_choice(scene_classes: list[type[Scene]]) -> list[type[Scene]]: num_to_class = {} SceneFileWriter.force_output_as_scene_name = True for count, scene_class in enumerate(scene_classes, 1): name = scene_class.__name__ console.print(f"{count}: {name}", style="logging.level.info") num_to_class[count] = scene_class try: user_input = console.input( f"[log.message] {CHOOSE_NUMBER_MESSAGE} [/log.message]", ) scene_classes = [ num_to_class[int(num_str)] for num_str in re.split(r"\s*,\s*", user_input.strip()) ] config["scene_names"] = [scene_class.__name__ for scene_class in scene_classes] return scene_classes except KeyError: logger.error(INVALID_NUMBER_MESSAGE) sys.exit(2) except EOFError: sys.exit(1) except ValueError: logger.error("No scenes were selected. Exiting.") sys.exit(1) @overload def scene_classes_from_file( file_path: Path, require_single_scene: bool, full_list: Literal[True] ) -> list[type[Scene]]: ... @overload def scene_classes_from_file( file_path: Path, require_single_scene: Literal[True], full_list: Literal[False] = False, ) -> type[Scene]: ... @overload def scene_classes_from_file( file_path: Path, require_single_scene: Literal[False] = False, full_list: Literal[False] = False, ) -> list[type[Scene]]: ... def scene_classes_from_file( file_path: Path, require_single_scene: bool = False, full_list: bool = False ) -> type[Scene] | list[type[Scene]]: module = get_module(file_path) all_scene_classes = get_scene_classes_from_module(module) if full_list: return all_scene_classes scene_classes_to_render = get_scenes_to_render(all_scene_classes) if require_single_scene: assert len(scene_classes_to_render) == 1 return scene_classes_to_render[0] return scene_classes_to_render ================================================ FILE: manim/utils/opengl.py ================================================ from __future__ import annotations from typing import TYPE_CHECKING import numpy as np import numpy.linalg as linalg from manim._config import config from manim.typing import ManimFloat if TYPE_CHECKING: import numpy.typing as npt from typing_extensions import TypeAlias from manim.typing import MatrixMN, Point3D depth = 20 __all__ = [ "matrix_to_shader_input", "orthographic_projection_matrix", "perspective_projection_matrix", "translation_matrix", "x_rotation_matrix", "y_rotation_matrix", "z_rotation_matrix", "rotate_in_place_matrix", "rotation_matrix", "scale_matrix", "view_matrix", ] FlattenedMatrix4x4: TypeAlias = tuple[ float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, ] def matrix_to_shader_input(matrix: MatrixMN) -> FlattenedMatrix4x4: return tuple(matrix.T.ravel()) def orthographic_projection_matrix( width: float | None = None, height: float | None = None, near: float = 1, far: float = depth + 1, format_: bool = True, ) -> MatrixMN | FlattenedMatrix4x4: if width is None: width = config["frame_width"] if height is None: height = config["frame_height"] projection_matrix = np.array( [ [2 / width, 0, 0, 0], [0, 2 / height, 0, 0], [0, 0, -2 / (far - near), -(far + near) / (far - near)], [0, 0, 0, 1], ], ) if format_: return matrix_to_shader_input(projection_matrix) else: return projection_matrix def perspective_projection_matrix( width: float | None = None, height: float | None = None, near: float = 2, far: float = 50, format_: bool = True, ) -> MatrixMN | FlattenedMatrix4x4: if width is None: width = config["frame_width"] / 6 if height is None: height = config["frame_height"] / 6 projection_matrix = np.array( [ [2 * near / width, 0, 0, 0], [0, 2 * near / height, 0, 0], [0, 0, (far + near) / (near - far), (2 * far * near) / (near - far)], [0, 0, -1, 0], ], ) if format_: return matrix_to_shader_input(projection_matrix) else: return projection_matrix def translation_matrix(x: float = 0, y: float = 0, z: float = 0) -> MatrixMN: return np.array( [ [1, 0, 0, x], [0, 1, 0, y], [0, 0, 1, z], [0, 0, 0, 1], ], dtype=ManimFloat, ) def x_rotation_matrix(x: float = 0) -> MatrixMN: return np.array( [ [1, 0, 0, 0], [0, np.cos(x), -np.sin(x), 0], [0, np.sin(x), np.cos(x), 0], [0, 0, 0, 1], ], ) def y_rotation_matrix(y: float = 0) -> MatrixMN: return np.array( [ [np.cos(y), 0, np.sin(y), 0], [0, 1, 0, 0], [-np.sin(y), 0, np.cos(y), 0], [0, 0, 0, 1], ], ) def z_rotation_matrix(z: float = 0) -> MatrixMN: return np.array( [ [np.cos(z), -np.sin(z), 0, 0], [np.sin(z), np.cos(z), 0, 0], [0, 0, 1, 0], [0, 0, 0, 1], ], ) # TODO: When rotating around the x axis, rotation eventually stops. def rotate_in_place_matrix( initial_position: Point3D, x: float = 0, y: float = 0, z: float = 0 ) -> MatrixMN: return np.matmul( translation_matrix(*-initial_position), np.matmul( rotation_matrix(x, y, z), translation_matrix(*initial_position), ), ) def rotation_matrix(x: float = 0, y: float = 0, z: float = 0) -> MatrixMN: return np.matmul( np.matmul(x_rotation_matrix(x), y_rotation_matrix(y)), z_rotation_matrix(z), ) def scale_matrix(scale_factor: float = 1) -> npt.NDArray: return np.array( [ [scale_factor, 0, 0, 0], [0, scale_factor, 0, 0], [0, 0, scale_factor, 0], [0, 0, 0, 1], ], dtype=ManimFloat, ) def view_matrix( translation: Point3D | None = None, x_rotation: float = 0, y_rotation: float = 0, z_rotation: float = 0, ) -> MatrixMN: if translation is None: translation = np.array([0, 0, depth / 2 + 1]) model_matrix = np.matmul( np.matmul( translation_matrix(*translation), rotation_matrix(x=x_rotation, y=y_rotation, z=z_rotation), ), scale_matrix(), ) return tuple(linalg.inv(model_matrix).T.ravel()) ================================================ FILE: manim/utils/parameter_parsing.py ================================================ from __future__ import annotations from collections.abc import Iterable from types import GeneratorType from typing import TypeVar T = TypeVar("T") def flatten_iterable_parameters( args: Iterable[T | Iterable[T] | GeneratorType], ) -> list[T]: """Flattens an iterable of parameters into a list of parameters. Parameters ---------- args The iterable of parameters to flatten. [(generator), [], (), ...] Returns ------- :class:`list` The flattened list of parameters. """ flattened_parameters: list[T] = [] for arg in args: if isinstance(arg, (Iterable, GeneratorType)): flattened_parameters.extend(arg) else: flattened_parameters.append(arg) return flattened_parameters ================================================ FILE: manim/utils/paths.py ================================================ """Functions determining transformation paths between sets of points.""" from __future__ import annotations __all__ = [ "straight_path", "path_along_arc", "clockwise_path", "counterclockwise_path", ] from typing import TYPE_CHECKING import numpy as np from ..constants import OUT from ..utils.bezier import interpolate from ..utils.space_ops import normalize, rotation_matrix if TYPE_CHECKING: from manim.typing import ( PathFuncType, Point3D_Array, Point3DLike_Array, Vector3DLike, ) STRAIGHT_PATH_THRESHOLD = 0.01 def straight_path() -> PathFuncType: """Simplest path function. Each point in a set goes in a straight path toward its destination. Examples -------- .. manim :: StraightPathExample class StraightPathExample(Scene): def construct(self): colors = [RED, GREEN, BLUE] starting_points = VGroup( *[ Dot(LEFT + pos, color=color) for pos, color in zip([UP, DOWN, LEFT], colors) ] ) finish_points = VGroup( *[ Dot(RIGHT + pos, color=color) for pos, color in zip([ORIGIN, UP, DOWN], colors) ] ) self.add(starting_points) self.add(finish_points) for dot in starting_points: self.add(TracedPath(dot.get_center, stroke_color=dot.get_color())) self.wait() self.play( Transform( starting_points, finish_points, path_func=utils.paths.straight_path(), run_time=2, ) ) self.wait() """ return interpolate def path_along_circles( arc_angle: float, circles_centers: Point3DLike_Array, axis: Vector3DLike = OUT ) -> PathFuncType: """This function transforms each point by moving it roughly along a circle, each with its own specified center. The path may be seen as each point smoothly changing its orbit from its starting position to its destination. Parameters ---------- arc_angle The angle each point traverses around the quasicircle. circles_centers The centers of each point's quasicircle to rotate around. axis The axis of rotation. Examples -------- .. manim :: PathAlongCirclesExample class PathAlongCirclesExample(Scene): def construct(self): colors = [RED, GREEN, BLUE] starting_points = VGroup( *[ Dot(LEFT + pos, color=color) for pos, color in zip([UP, DOWN, LEFT], colors) ] ) finish_points = VGroup( *[ Dot(RIGHT + pos, color=color) for pos, color in zip([ORIGIN, UP, DOWN], colors) ] ) self.add(starting_points) self.add(finish_points) for dot in starting_points: self.add(TracedPath(dot.get_center, stroke_color=dot.get_color())) circle_center = Dot(3 * LEFT) self.add(circle_center) self.wait() self.play( Transform( starting_points, finish_points, path_func=utils.paths.path_along_circles( 2 * PI, circle_center.get_center() ), run_time=3, ) ) self.wait() """ unit_axis = normalize(axis, fall_back=OUT) def path( start_points: Point3D_Array, end_points: Point3D_Array, alpha: float ) -> Point3D_Array: detransformed_end_points = circles_centers + np.dot( end_points - circles_centers, rotation_matrix(-arc_angle, unit_axis).T ) rot_matrix = rotation_matrix(alpha * arc_angle, unit_axis) return circles_centers + np.dot( interpolate(start_points, detransformed_end_points, alpha) - circles_centers, rot_matrix.T, ) return path def path_along_arc(arc_angle: float, axis: Vector3DLike = OUT) -> PathFuncType: """This function transforms each point by moving it along a circular arc. Parameters ---------- arc_angle The angle each point traverses around a circular arc. axis The axis of rotation. Examples -------- .. manim :: PathAlongArcExample class PathAlongArcExample(Scene): def construct(self): colors = [RED, GREEN, BLUE] starting_points = VGroup( *[ Dot(LEFT + pos, color=color) for pos, color in zip([UP, DOWN, LEFT], colors) ] ) finish_points = VGroup( *[ Dot(RIGHT + pos, color=color) for pos, color in zip([ORIGIN, UP, DOWN], colors) ] ) self.add(starting_points) self.add(finish_points) for dot in starting_points: self.add(TracedPath(dot.get_center, stroke_color=dot.get_color())) self.wait() self.play( Transform( starting_points, finish_points, path_func=utils.paths.path_along_arc(TAU * 2 / 3), run_time=3, ) ) self.wait() """ if abs(arc_angle) < STRAIGHT_PATH_THRESHOLD: return straight_path() unit_axis = normalize(axis, fall_back=OUT) def path( start_points: Point3D_Array, end_points: Point3D_Array, alpha: float ) -> Point3D_Array: vects = end_points - start_points centers = start_points + 0.5 * vects if arc_angle != np.pi: centers += np.cross(unit_axis, vects / 2.0) / np.tan(arc_angle / 2) rot_matrix = rotation_matrix(alpha * arc_angle, unit_axis) return centers + np.dot(start_points - centers, rot_matrix.T) return path def clockwise_path() -> PathFuncType: """This function transforms each point by moving clockwise around a half circle. Examples -------- .. manim :: ClockwisePathExample class ClockwisePathExample(Scene): def construct(self): colors = [RED, GREEN, BLUE] starting_points = VGroup( *[ Dot(LEFT + pos, color=color) for pos, color in zip([UP, DOWN, LEFT], colors) ] ) finish_points = VGroup( *[ Dot(RIGHT + pos, color=color) for pos, color in zip([ORIGIN, UP, DOWN], colors) ] ) self.add(starting_points) self.add(finish_points) for dot in starting_points: self.add(TracedPath(dot.get_center, stroke_color=dot.get_color())) self.wait() self.play( Transform( starting_points, finish_points, path_func=utils.paths.clockwise_path(), run_time=2, ) ) self.wait() """ return path_along_arc(-np.pi) def counterclockwise_path() -> PathFuncType: """This function transforms each point by moving counterclockwise around a half circle. Examples -------- .. manim :: CounterclockwisePathExample class CounterclockwisePathExample(Scene): def construct(self): colors = [RED, GREEN, BLUE] starting_points = VGroup( *[ Dot(LEFT + pos, color=color) for pos, color in zip([UP, DOWN, LEFT], colors) ] ) finish_points = VGroup( *[ Dot(RIGHT + pos, color=color) for pos, color in zip([ORIGIN, UP, DOWN], colors) ] ) self.add(starting_points) self.add(finish_points) for dot in starting_points: self.add(TracedPath(dot.get_center, stroke_color=dot.get_color())) self.wait() self.play( Transform( starting_points, finish_points, path_func=utils.paths.counterclockwise_path(), run_time=2, ) ) self.wait() """ return path_along_arc(np.pi) def spiral_path(angle: float, axis: Vector3DLike = OUT) -> PathFuncType: """This function transforms each point by moving along a spiral to its destination. Parameters ---------- angle The angle each point traverses around a spiral. axis The axis of rotation. Examples -------- .. manim :: SpiralPathExample class SpiralPathExample(Scene): def construct(self): colors = [RED, GREEN, BLUE] starting_points = VGroup( *[ Dot(LEFT + pos, color=color) for pos, color in zip([UP, DOWN, LEFT], colors) ] ) finish_points = VGroup( *[ Dot(RIGHT + pos, color=color) for pos, color in zip([ORIGIN, UP, DOWN], colors) ] ) self.add(starting_points) self.add(finish_points) for dot in starting_points: self.add(TracedPath(dot.get_center, stroke_color=dot.get_color())) self.wait() self.play( Transform( starting_points, finish_points, path_func=utils.paths.spiral_path(2 * TAU), run_time=5, ) ) self.wait() """ if abs(angle) < STRAIGHT_PATH_THRESHOLD: return straight_path() unit_axis = normalize(axis, fall_back=OUT) def path( start_points: Point3D_Array, end_points: Point3D_Array, alpha: float ) -> Point3D_Array: rot_matrix = rotation_matrix((alpha - 1) * angle, unit_axis) return start_points + alpha * np.dot(end_points - start_points, rot_matrix.T) return path ================================================ FILE: manim/utils/polylabel.py ================================================ #!/usr/bin/env python from __future__ import annotations from queue import PriorityQueue from typing import TYPE_CHECKING import numpy as np if TYPE_CHECKING: from collections.abc import Sequence from manim.typing import ( Point2D, Point2D_Array, Point2DLike, Point2DLike_Array, Point3DLike_Array, ) class Polygon: """ Initializes the Polygon with the given rings. Parameters ---------- rings A sequence of points, where each sequence represents the rings of the polygon. Typically, multiple rings indicate holes in the polygon. """ def __init__(self, rings: Sequence[Point2DLike_Array]) -> None: np_rings: list[Point2D_Array] = [np.asarray(ring) for ring in rings] # Flatten Array csum = np.cumsum([ring.shape[0] for ring in np_rings]) self.array: Point2D_Array = np.concatenate(np_rings, axis=0) # Compute Boundary self.start: Point2D_Array = np.delete(self.array, csum - 1, axis=0) self.stop: Point2D_Array = np.delete(self.array, csum % csum[-1], axis=0) self.diff: Point2D_Array = np.delete( np.diff(self.array, axis=0), csum[:-1] - 1, axis=0 ) self.norm: Point2D_Array = self.diff / np.einsum( "ij,ij->i", self.diff, self.diff ).reshape(-1, 1) # Compute Centroid x, y = self.start[:, 0], self.start[:, 1] xr, yr = self.stop[:, 0], self.stop[:, 1] self.area: float = 0.5 * (np.dot(x, yr) - np.dot(xr, y)) if self.area: factor = x * yr - xr * y cx = np.sum((x + xr) * factor) / (6.0 * self.area) cy = np.sum((y + yr) * factor) / (6.0 * self.area) self.centroid = np.array([cx, cy]) def compute_distance(self, point: Point2DLike) -> float: """Compute the minimum distance from a point to the polygon.""" scalars = np.einsum("ij,ij->i", self.norm, point - self.start) clips = np.clip(scalars, 0, 1).reshape(-1, 1) d: float = np.min( np.linalg.norm(self.start + self.diff * clips - point, axis=1) ) return d if self.inside(point) else -d def _is_point_on_segment( self, x_point: float, y_point: float, x0: float, y0: float, x1: float, y1: float, ) -> bool: """ Check if a point is on the segment. The segment is defined by (x0, y0) to (x1, y1). """ if min(x0, x1) <= x_point <= max(x0, x1) and min(y0, y1) <= y_point <= max( y0, y1 ): dx = x1 - x0 dy = y1 - y0 cross = dx * (y_point - y0) - dy * (x_point - x0) return bool(np.isclose(cross, 0.0)) return False def _ray_crosses_segment( self, x_point: float, y_point: float, x0: float, y0: float, x1: float, y1: float, ) -> bool: """ Check if a horizontal ray to the right from point (x_point, y_point) crosses the segment. The segment is defined by (x0, y0) to (x1, y1). """ if (y0 > y_point) != (y1 > y_point): slope = (x1 - x0) / (y1 - y0) x_intersect = slope * (y_point - y0) + x0 return bool(x_point < x_intersect) return False def inside(self, point: Point2DLike) -> bool: """ Check if a point is inside the polygon. Uses ray casting algorithm and checks boundary points consistently. """ point_x, point_y = point start_x, start_y = self.start[:, 0], self.start[:, 1] stop_x, stop_y = self.stop[:, 0], self.stop[:, 1] segment_count = len(start_x) for i in range(segment_count): if self._is_point_on_segment( point_x, point_y, start_x[i], start_y[i], stop_x[i], stop_y[i], ): return True crossings = 0 for i in range(segment_count): if self._ray_crosses_segment( point_x, point_y, start_x[i], start_y[i], stop_x[i], stop_y[i], ): crossings += 1 return crossings % 2 == 1 class Cell: """ A square in a mesh covering the :class:`~.Polygon` passed as an argument. Parameters ---------- c Center coordinates of the Cell. h Half-Size of the Cell. polygon :class:`~.Polygon` object for which the distance is computed. """ def __init__(self, c: Point2DLike, h: float, polygon: Polygon) -> None: self.c: Point2D = np.asarray(c) self.h = h self.d = polygon.compute_distance(self.c) self.p = self.d + self.h * np.sqrt(2) def __lt__(self, other: Cell) -> bool: return self.d < other.d def __gt__(self, other: Cell) -> bool: return self.d > other.d def __le__(self, other: Cell) -> bool: return self.d <= other.d def __ge__(self, other: Cell) -> bool: return self.d >= other.d def polylabel(rings: Sequence[Point3DLike_Array], precision: float = 0.01) -> Cell: """ Finds the pole of inaccessibility (the point that is farthest from the edges of the polygon) using an iterative grid-based approach. Parameters ---------- rings A list of lists, where each list is a sequence of points representing the rings of the polygon. Typically, multiple rings indicate holes in the polygon. precision The precision of the result (default is 0.01). Returns ------- Cell A Cell containing the pole of inaccessibility to a given precision. """ # Precompute Polygon Data np_rings: list[Point2D_Array] = [np.asarray(ring)[:, :2] for ring in rings] polygon = Polygon(np_rings) # Bounding Box mins = np.min(polygon.array, axis=0) maxs = np.max(polygon.array, axis=0) dims = maxs - mins s = np.min(dims) h = s / 2.0 # Initial Grid queue: PriorityQueue[Cell] = PriorityQueue() xv, yv = np.meshgrid(np.arange(mins[0], maxs[0], s), np.arange(mins[1], maxs[1], s)) for corner in np.vstack([xv.ravel(), yv.ravel()]).T: queue.put(Cell(corner + h, h, polygon)) # Initial Guess best = Cell(polygon.centroid, 0, polygon) bbox = Cell(mins + (dims / 2), 0, polygon) if bbox.d > best.d: best = bbox # While there are cells to consider... directions = np.array([[-1, -1], [1, -1], [-1, 1], [1, 1]]) while not queue.empty(): cell = queue.get() if cell > best: best = cell # If a cell is promising, subdivide! if cell.p - best.d > precision: h = cell.h / 2.0 offsets = cell.c + directions * h queue.put(Cell(offsets[0], h, polygon)) queue.put(Cell(offsets[1], h, polygon)) queue.put(Cell(offsets[2], h, polygon)) queue.put(Cell(offsets[3], h, polygon)) return best ================================================ FILE: manim/utils/qhull.py ================================================ #!/usr/bin/env python from __future__ import annotations from typing import TYPE_CHECKING import numpy as np if TYPE_CHECKING: from manim.typing import PointND, PointND_Array class QuickHullPoint: def __init__(self, coordinates: PointND_Array) -> None: self.coordinates = coordinates def __hash__(self) -> int: return hash(self.coordinates.tobytes()) def __eq__(self, other: object) -> bool: if not isinstance(other, QuickHullPoint): raise ValueError are_coordinates_equal: bool = np.array_equal( self.coordinates, other.coordinates ) return are_coordinates_equal class SubFacet: def __init__(self, coordinates: PointND_Array) -> None: self.coordinates = coordinates self.points = frozenset(QuickHullPoint(c) for c in coordinates) def __hash__(self) -> int: return hash(self.points) def __eq__(self, other: object) -> bool: if not isinstance(other, SubFacet): raise ValueError return self.points == other.points class Facet: def __init__(self, coordinates: PointND_Array, internal: PointND) -> None: self.coordinates = coordinates self.center: PointND = np.mean(coordinates, axis=0) self.normal = self.compute_normal(internal) self.subfacets = frozenset( SubFacet(np.delete(self.coordinates, i, axis=0)) for i in range(self.coordinates.shape[0]) ) def compute_normal(self, internal: PointND) -> PointND: centered = self.coordinates - self.center _, _, vh = np.linalg.svd(centered) normal: PointND = vh[-1, :] normal /= np.linalg.norm(normal) # If the normal points towards the internal point, flip it! if np.dot(normal, self.center - internal) < 0: normal *= -1 return normal def __hash__(self) -> int: return hash(self.subfacets) def __eq__(self, other: object) -> bool: if not isinstance(other, Facet): raise ValueError return self.subfacets == other.subfacets class Horizon: def __init__(self) -> None: self.facets: set[Facet] = set() self.boundary: list[SubFacet] = [] class QuickHull: """ QuickHull algorithm for constructing a convex hull from a set of points. Parameters ---------- tolerance A tolerance threshold for determining when points lie on the convex hull (default is 1e-5). Attributes ---------- facets List of facets considered. removed Set of internal facets that have been removed from the hull during the construction process. outside Dictionary mapping each facet to its outside points and eye point. neighbors Mapping of subfacets to their neighboring facets. Each subfacet links precisely two neighbors. unclaimed Points that have not yet been classified as inside or outside the current hull. internal An internal point (i.e., the center of the initial simplex) used as a reference during hull construction. tolerance The tolerance used to determine if points are considered outside the current hull. """ def __init__(self, tolerance: float = 1e-5) -> None: self.facets: list[Facet] = [] self.removed: set[Facet] = set() self.outside: dict[Facet, tuple[PointND_Array | None, PointND | None]] = {} self.neighbors: dict[SubFacet, set[Facet]] = {} self.unclaimed: PointND_Array | None = None self.internal: PointND | None = None self.tolerance = tolerance def initialize(self, points: PointND_Array) -> None: # Sample Points simplex = points[ np.random.choice(points.shape[0], points.shape[1] + 1, replace=False) ] self.unclaimed = points new_internal: PointND = np.mean(simplex, axis=0) self.internal = new_internal # Build Simplex for c in range(simplex.shape[0]): facet = Facet(np.delete(simplex, c, axis=0), internal=new_internal) self.classify(facet) self.facets.append(facet) # Attach Neighbors for f in self.facets: for sf in f.subfacets: self.neighbors.setdefault(sf, set()).add(f) def classify(self, facet: Facet) -> None: assert self.unclaimed is not None, ( "Call .initialize() before using .classify()." ) if not self.unclaimed.size: self.outside[facet] = (None, None) return # Compute Projections projections = (self.unclaimed - facet.center) @ facet.normal arg = np.argmax(projections) mask = projections > self.tolerance # Identify Eye and Outside Set eye = self.unclaimed[arg] if projections[arg] > self.tolerance else None outside = self.unclaimed[mask] self.outside[facet] = (outside, eye) self.unclaimed = self.unclaimed[~mask] def compute_horizon(self, eye: PointND, start_facet: Facet) -> Horizon: horizon = Horizon() self._recursive_horizon(eye, start_facet, horizon) return horizon def _recursive_horizon(self, eye: PointND, facet: Facet, horizon: Horizon) -> bool: visible = np.dot(facet.normal, eye - facet.center) > 0 if not visible: return False # If the eye is visible from the facet: # Label the facet as visible and cross each edge horizon.facets.add(facet) for subfacet in facet.subfacets: neighbor = (self.neighbors[subfacet] - {facet}).pop() # If the neighbor is not visible, then the edge shared must be on the boundary if neighbor not in horizon.facets and not self._recursive_horizon( eye, neighbor, horizon ): horizon.boundary.append(subfacet) return True def build(self, points: PointND_Array) -> None: num, dim = points.shape if (dim == 0) or (num < dim + 1): raise ValueError("Not enough points supplied to build Convex Hull!") if dim == 1: raise ValueError("The Convex Hull of 1D data is its min-max!") self.initialize(points) # This helps the type checker. assert self.unclaimed is not None assert self.internal is not None while True: updated = False for facet in self.facets: if facet in self.removed: continue outside, eye = self.outside[facet] if eye is not None: updated = True horizon = self.compute_horizon(eye, facet) for f in horizon.facets: points_to_append = self.outside[f][0] # TODO: is this always true? assert points_to_append is not None self.unclaimed = np.vstack((self.unclaimed, points_to_append)) self.removed.add(f) for sf in f.subfacets: self.neighbors[sf].discard(f) if self.neighbors[sf] == set(): del self.neighbors[sf] for sf in horizon.boundary: nf = Facet( np.vstack((sf.coordinates, eye)), internal=self.internal ) self.classify(nf) self.facets.append(nf) for nsf in nf.subfacets: self.neighbors.setdefault(nsf, set()).add(nf) if not updated: break ================================================ FILE: manim/utils/rate_functions.py ================================================ """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 .. manim:: RateFuncExample :save_last_frame: class RateFuncExample(Scene): def construct(self): x = VGroup() for k, v in rate_functions.__dict__.items(): if "function" in str(v): if ( not k.startswith("__") and not k.startswith("sqrt") and not k.startswith("bezier") ): try: rate_func = v plot = ( ParametricFunction( lambda x: [x, rate_func(x), 0], t_range=[0, 1, .01], use_smoothing=False, color=YELLOW, ) .stretch_to_fit_width(1.5) .stretch_to_fit_height(1) ) plot_bg = SurroundingRectangle(plot).set_color(WHITE) plot_title = ( Text(rate_func.__name__, weight=BOLD) .scale(0.5) .next_to(plot_bg, UP, buff=0.1) ) x.add(VGroup(plot_bg, plot, plot_title)) except: # because functions `not_quite_there`, `function squish_rate_func` are not working. pass x.arrange_in_grid(cols=8) x.height = config.frame_height x.width = config.frame_width x.move_to(ORIGIN).scale(0.95) self.add(x) 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() """ from __future__ import annotations __all__ = [ "linear", "smooth", "smoothstep", "smootherstep", "smoothererstep", "rush_into", "rush_from", "slow_into", "double_smooth", "there_and_back", "there_and_back_with_pause", "running_start", "not_quite_there", "wiggle", "squish_rate_func", "lingering", "exponential_decay", ] from functools import wraps from math import sqrt from typing import Any, Protocol import numpy as np from manim.utils.simple_functions import sigmoid # TODO: rewrite this to use ParamSpec when Python 3.9 is out of life class RateFunction(Protocol): def __call__(self, t: float, *args: Any, **kwargs: Any) -> float: ... # This is a decorator that makes sure any function it's used on will # return 0 if t<0 and 1 if t>1. def unit_interval(function: RateFunction) -> RateFunction: @wraps(function) def wrapper(t: float, *args: Any, **kwargs: Any) -> float: if 0 <= t <= 1: return function(t, *args, **kwargs) elif t < 0: return 0 else: return 1 return wrapper # This is a decorator that makes sure any function it's used on will # return 0 if t<0 or t>1. def zero(function: RateFunction) -> RateFunction: @wraps(function) def wrapper(t: float, *args: Any, **kwargs: Any) -> float: if 0 <= t <= 1: return function(t, *args, **kwargs) else: return 0 return wrapper @unit_interval def linear(t: float) -> float: return t @unit_interval def smooth(t: float, inflection: float = 10.0) -> float: error = sigmoid(-inflection / 2) return min( max((sigmoid(inflection * (t - 0.5)) - error) / (1 - 2 * error), 0), 1, ) @unit_interval def smoothstep(t: float) -> float: """Implementation of the 1st order SmoothStep sigmoid function. The 1st derivative (speed) is zero at the endpoints. https://en.wikipedia.org/wiki/Smoothstep """ return 3 * t**2 - 2 * t**3 @unit_interval def smootherstep(t: float) -> float: """Implementation of the 2nd order SmoothStep sigmoid function. The 1st and 2nd derivatives (speed and acceleration) are zero at the endpoints. https://en.wikipedia.org/wiki/Smoothstep """ return 6 * t**5 - 15 * t**4 + 10 * t**3 @unit_interval def smoothererstep(t: float) -> float: """Implementation of the 3rd order SmoothStep sigmoid function. The 1st, 2nd and 3rd derivatives (speed, acceleration and jerk) are zero at the endpoints. https://en.wikipedia.org/wiki/Smoothstep """ return 35 * t**4 - 84 * t**5 + 70 * t**6 - 20 * t**7 @unit_interval def rush_into(t: float, inflection: float = 10.0) -> float: return 2 * smooth(t / 2.0, inflection) @unit_interval def rush_from(t: float, inflection: float = 10.0) -> float: return 2 * smooth(t / 2.0 + 0.5, inflection) - 1 @unit_interval def slow_into(t: float) -> float: val: float = np.sqrt(1 - (1 - t) * (1 - t)) return val @unit_interval def double_smooth(t: float) -> float: if t < 0.5: return 0.5 * smooth(2 * t) else: return 0.5 * (1 + smooth(2 * t - 1)) @zero def there_and_back(t: float, inflection: float = 10.0) -> float: new_t = 2 * t if t < 0.5 else 2 * (1 - t) return smooth(new_t, inflection) @zero def there_and_back_with_pause(t: float, pause_ratio: float = 1.0 / 3) -> float: a = 2.0 / (1.0 - pause_ratio) if t < 0.5 - pause_ratio / 2: return smooth(a * t) elif t < 0.5 + pause_ratio / 2: return 1 else: return smooth(a - a * t) @unit_interval def running_start( t: float, pull_factor: float = -0.5, ) -> float: t2 = t * t t3 = t2 * t t4 = t3 * t t5 = t4 * t t6 = t5 * t mt = 1 - t mt2 = mt * mt mt3 = mt2 * mt mt4 = mt3 * mt # This is equivalent to creating a Bézier with [0, 0, pull_factor, pull_factor, 1, 1, 1] # and evaluating it at t. return ( 15 * t2 * mt4 * pull_factor + 20 * t3 * mt3 * pull_factor + 15 * t4 * mt2 + 6 * t5 * mt + t6 ) def not_quite_there( func: RateFunction = smooth, proportion: float = 0.7, ) -> RateFunction: def result(t: float, *args: Any, **kwargs: Any) -> float: return proportion * func(t, *args, **kwargs) return result @zero def wiggle(t: float, wiggles: float = 2) -> float: val: float = np.sin(wiggles * np.pi * t) return there_and_back(t) * val def squish_rate_func( func: RateFunction, a: float = 0.4, b: float = 0.6, ) -> RateFunction: def result(t: float, *args: Any, **kwargs: Any) -> float: if a == b: return a if t < a: new_t = 0.0 elif t > b: new_t = 1.0 else: new_t = (t - a) / (b - a) return func(new_t, *args, **kwargs) return result # Stylistically, should this take parameters (with default values)? # Ultimately, the functionality is entirely subsumed by squish_rate_func, # but it may be useful to have a nice name for with nice default params for # "lingering", different from squish_rate_func's default params @unit_interval def lingering(t: float) -> float: def identity(t: float) -> float: return t # TODO: Isn't this just 0.8 * t? return squish_rate_func(identity, 0, 0.8)(t) @unit_interval def exponential_decay(t: float, half_life: float = 0.1) -> float: # The half-life should be rather small to minimize # the cut-off error at the end val: float = 1 - np.exp(-t / half_life) return val @unit_interval def ease_in_sine(t: float) -> float: val: float = 1 - np.cos((t * np.pi) / 2) return val @unit_interval def ease_out_sine(t: float) -> float: val: float = np.sin((t * np.pi) / 2) return val @unit_interval def ease_in_out_sine(t: float) -> float: val: float = -(np.cos(np.pi * t) - 1) / 2 return val @unit_interval def ease_in_quad(t: float) -> float: return t * t @unit_interval def ease_out_quad(t: float) -> float: return 1 - (1 - t) * (1 - t) @unit_interval def ease_in_out_quad(t: float) -> float: return 2 * t * t if t < 0.5 else 1 - pow(-2 * t + 2, 2) / 2 @unit_interval def ease_in_cubic(t: float) -> float: return t * t * t @unit_interval def ease_out_cubic(t: float) -> float: return 1 - pow(1 - t, 3) @unit_interval def ease_in_out_cubic(t: float) -> float: return 4 * t * t * t if t < 0.5 else 1 - pow(-2 * t + 2, 3) / 2 @unit_interval def ease_in_quart(t: float) -> float: return t * t * t * t @unit_interval def ease_out_quart(t: float) -> float: return 1 - pow(1 - t, 4) @unit_interval def ease_in_out_quart(t: float) -> float: return 8 * t * t * t * t if t < 0.5 else 1 - pow(-2 * t + 2, 4) / 2 @unit_interval def ease_in_quint(t: float) -> float: return t * t * t * t * t @unit_interval def ease_out_quint(t: float) -> float: return 1 - pow(1 - t, 5) @unit_interval def ease_in_out_quint(t: float) -> float: return 16 * t * t * t * t * t if t < 0.5 else 1 - pow(-2 * t + 2, 5) / 2 @unit_interval def ease_in_expo(t: float) -> float: return 0 if t == 0 else pow(2, 10 * t - 10) @unit_interval def ease_out_expo(t: float) -> float: return 1 if t == 1 else 1 - pow(2, -10 * t) @unit_interval def ease_in_out_expo(t: float) -> float: 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 @unit_interval def ease_in_circ(t: float) -> float: return 1 - sqrt(1 - pow(t, 2)) @unit_interval def ease_out_circ(t: float) -> float: return sqrt(1 - pow(t - 1, 2)) @unit_interval def ease_in_out_circ(t: float) -> float: return ( (1 - sqrt(1 - pow(2 * t, 2))) / 2 if t < 0.5 else (sqrt(1 - pow(-2 * t + 2, 2)) + 1) / 2 ) @unit_interval def ease_in_back(t: float) -> float: c1 = 1.70158 c3 = c1 + 1 return c3 * t * t * t - c1 * t * t @unit_interval def ease_out_back(t: float) -> float: c1 = 1.70158 c3 = c1 + 1 return 1 + c3 * pow(t - 1, 3) + c1 * pow(t - 1, 2) @unit_interval def ease_in_out_back(t: float) -> float: 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 ) @unit_interval def ease_in_elastic(t: float) -> float: c4 = (2 * np.pi) / 3 if t == 0: return 0 elif t == 1: return 1 else: val: float = -pow(2, 10 * t - 10) * np.sin((t * 10 - 10.75) * c4) return val @unit_interval def ease_out_elastic(t: float) -> float: c4 = (2 * np.pi) / 3 if t == 0: return 0 elif t == 1: return 1 else: val: float = pow(2, -10 * t) * np.sin((t * 10 - 0.75) * c4) + 1 return val @unit_interval def ease_in_out_elastic(t: float) -> float: c5 = (2 * np.pi) / 4.5 if t == 0: return 0 elif t == 1: return 1 elif t < 0.5: val: float = -(pow(2, 20 * t - 10) * np.sin((20 * t - 11.125) * c5)) / 2 return val else: val = (pow(2, -20 * t + 10) * np.sin((20 * t - 11.125) * c5)) / 2 + 1 return val @unit_interval def ease_in_bounce(t: float) -> float: return 1 - ease_out_bounce(1 - t) @unit_interval def ease_out_bounce(t: float) -> float: 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 - 1.5 / d1) + 0.75 elif t < 2.5 / d1: return n1 * (t - 2.25 / d1) * (t - 2.25 / d1) + 0.9375 else: return n1 * (t - 2.625 / d1) * (t - 2.625 / d1) + 0.984375 @unit_interval def ease_in_out_bounce(t: float) -> float: if t < 0.5: return (1 - ease_out_bounce(1 - 2 * t)) / 2 else: return (1 + ease_out_bounce(2 * t - 1)) / 2 ================================================ FILE: manim/utils/simple_functions.py ================================================ """A collection of simple functions.""" from __future__ import annotations __all__ = [ "binary_search", "choose", "clip", "sigmoid", ] from collections.abc import Callable from functools import lru_cache from typing import Any, Protocol, TypeVar import numpy as np from scipy import special def binary_search( function: Callable[[float], float], target: float, lower_bound: float, upper_bound: float, tolerance: float = 1e-4, ) -> float | None: """Searches for a value in a range by repeatedly dividing the range in half. To be more precise, performs numerical binary search to determine the input to ``function``, between the bounds given, that outputs ``target`` to within ``tolerance`` (default of 0.0001). Returns ``None`` if no input can be found within the bounds. Examples -------- Consider the polynomial :math:`x^2 + 3x + 1` where we search for a target value of :math:`11`. An exact solution is :math:`x = 2`. :: >>> solution = binary_search(lambda x: x**2 + 3*x + 1, 11, 0, 5) >>> bool(abs(solution - 2) < 1e-4) True >>> solution = binary_search(lambda x: x**2 + 3*x + 1, 11, 0, 5, tolerance=0.01) >>> bool(abs(solution - 2) < 0.01) True Searching in the interval :math:`[0, 5]` for a target value of :math:`71` does not yield a solution:: >>> binary_search(lambda x: x**2 + 3*x + 1, 71, 0, 5) is None True """ lh = lower_bound rh = upper_bound mh: float = np.mean(np.array([lh, rh])) while abs(rh - lh) > tolerance: mh = np.mean(np.array([lh, rh])) lx, mx, rx = (function(h) for h in (lh, mh, rh)) if lx == target: return lh if rx == target: return rh if lx <= target <= rx: if mx > target: rh = mh else: lh = mh elif lx > target > rx: lh, rh = rh, lh else: return None return mh @lru_cache(maxsize=10) def choose(n: int, k: int) -> int: r"""The binomial coefficient n choose k. :math:`\binom{n}{k}` describes the number of possible choices of :math:`k` elements from a set of :math:`n` elements. References ---------- - https://en.wikipedia.org/wiki/Combination - https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.comb.html """ value: int = special.comb(n, k, exact=True) return value class Comparable(Protocol): def __lt__(self, other: Any) -> bool: ... def __gt__(self, other: Any) -> bool: ... ComparableT = TypeVar("ComparableT", bound=Comparable) def clip(a: ComparableT, min_a: ComparableT, max_a: ComparableT) -> ComparableT: """Clips ``a`` to the interval [``min_a``, ``max_a``]. Accepts any comparable objects (i.e. those that support <, >). Returns ``a`` if it is between ``min_a`` and ``max_a``. Otherwise, whichever of ``min_a`` and ``max_a`` is closest. Examples -------- :: >>> clip(15, 11, 20) 15 >>> clip('a', 'h', 'k') 'h' """ if a < min_a: return min_a elif a > max_a: return max_a return a def sigmoid(x: float) -> float: r"""Returns the output of the logistic function. The logistic function, a common example of a sigmoid function, is defined as :math:`\frac{1}{1 + e^{-x}}`. References ---------- - https://en.wikipedia.org/wiki/Sigmoid_function - https://en.wikipedia.org/wiki/Logistic_function """ value: float = 1.0 / (1 + np.exp(-x)) return value ================================================ FILE: manim/utils/sounds.py ================================================ """Sound-related utility functions.""" from __future__ import annotations __all__ = [ "get_full_sound_file_path", ] from typing import TYPE_CHECKING from .. import config from ..utils.file_ops import seek_full_path_from_defaults if TYPE_CHECKING: from pathlib import Path from manim.typing import StrPath # Still in use by add_sound() function in scene_file_writer.py def get_full_sound_file_path(sound_file_name: StrPath) -> Path: return seek_full_path_from_defaults( sound_file_name, default_dir=config.get_dir("assets_dir"), extensions=[".wav", ".mp3"], ) ================================================ FILE: manim/utils/space_ops.py ================================================ """Utility functions for two- and three-dimensional vectors.""" from __future__ import annotations import itertools as it from collections.abc import Callable, Sequence from typing import TYPE_CHECKING import numpy as np from mapbox_earcut import triangulate_float32 as earcut from scipy.spatial.transform import Rotation from manim.constants import DOWN, OUT, PI, RIGHT, TAU, UP from manim.utils.iterables import adjacent_pairs if TYPE_CHECKING: import numpy.typing as npt from manim.typing import ( ManimFloat, MatrixMN, Point2D_Array, Point3D, Point3DLike, Point3DLike_Array, PointND, PointNDLike_Array, Vector2D, Vector2D_Array, Vector3D, Vector3DLike, Vector3DLike_Array, ) __all__ = [ "quaternion_mult", "quaternion_from_angle_axis", "angle_axis_from_quaternion", "quaternion_conjugate", "rotate_vector", "thick_diagonal", "rotation_matrix", "rotation_about_z", "z_to_vector", "angle_of_vector", "angle_between_vectors", "normalize", "get_unit_normal", "compass_directions", "regular_vertices", "complex_to_R3", "R3_to_complex", "complex_func_to_R3_func", "center_of_mass", "midpoint", "find_intersection", "line_intersection", "get_winding_number", "shoelace", "shoelace_direction", "cross2d", "earclip_triangulation", "cartesian_to_spherical", "spherical_to_cartesian", "perpendicular_bisector", ] def norm_squared(v: float) -> float: val: float = np.dot(v, v) return val def cross(v1: Vector3DLike, v2: Vector3DLike) -> Vector3D: return np.array( [ v1[1] * v2[2] - v1[2] * v2[1], v1[2] * v2[0] - v1[0] * v2[2], v1[0] * v2[1] - v1[1] * v2[0], ] ) # Quaternions # TODO, implement quaternion type def quaternion_mult( *quats: Sequence[float], ) -> np.ndarray | list[float | np.ndarray]: """Gets the Hamilton product of the quaternions provided. For more information, check `this Wikipedia page `__. Returns ------- Union[np.ndarray, List[Union[float, np.ndarray]]] Returns a list of product of two quaternions. """ if len(quats) == 0: return [1, 0, 0, 0] result = quats[0] for next_quat in quats[1:]: w1, x1, y1, z1 = result w2, x2, y2, z2 = next_quat result = [ w1 * w2 - x1 * x2 - y1 * y2 - z1 * z2, w1 * x2 + x1 * w2 + y1 * z2 - z1 * y2, w1 * y2 + y1 * w2 + z1 * x2 - x1 * z2, w1 * z2 + z1 * w2 + x1 * y2 - y1 * x2, ] return result def quaternion_from_angle_axis( angle: float, axis: np.ndarray, axis_normalized: bool = False, ) -> list[float]: """Gets a quaternion from an angle and an axis. For more information, check `this Wikipedia page `__. Parameters ---------- angle The angle for the quaternion. axis The axis for the quaternion axis_normalized Checks whether the axis is normalized, by default False Returns ------- list[float] Gives back a quaternion from the angle and axis """ if not axis_normalized: axis = normalize(axis) return [np.cos(angle / 2), *(np.sin(angle / 2) * axis)] def angle_axis_from_quaternion(quaternion: Sequence[float]) -> Sequence[float]: """Gets angle and axis from a quaternion. Parameters ---------- quaternion The quaternion from which we get the angle and axis. Returns ------- Sequence[float] Gives the angle and axis """ axis = normalize(quaternion[1:], fall_back=np.array([1, 0, 0])) angle = 2 * np.arccos(quaternion[0]) if angle > TAU / 2: angle = TAU - angle return angle, axis def quaternion_conjugate(quaternion: Sequence[float]) -> np.ndarray: """Used for finding the conjugate of the quaternion Parameters ---------- quaternion The quaternion for which you want to find the conjugate for. Returns ------- np.ndarray The conjugate of the quaternion. """ result = np.array(quaternion) result[1:] *= -1 return result def rotate_vector( vector: Vector3DLike, angle: float, axis: Vector3DLike = OUT ) -> Vector3D: """Function for rotating a vector. Parameters ---------- vector The vector to be rotated. angle The angle to be rotated by. axis The axis to be rotated, by default OUT Returns ------- np.ndarray The rotated vector with provided angle and axis. Raises ------ ValueError If vector is not of dimension 2 or 3. """ if len(vector) > 3: raise ValueError("Vector must have the correct dimensions.") if len(vector) == 2: vector = np.append(vector, 0) return rotation_matrix(angle, axis) @ vector def thick_diagonal(dim: int, thickness: int = 2) -> MatrixMN: row_indices = np.arange(dim).repeat(dim).reshape((dim, dim)) col_indices = np.transpose(row_indices) return (np.abs(row_indices - col_indices) < thickness).astype("uint8") def rotation_matrix_transpose_from_quaternion(quat: np.ndarray) -> list[np.ndarray]: """Converts the quaternion, quat, to an equivalent rotation matrix representation. For more information, check `this page `_. Parameters ---------- quat The quaternion which is to be converted. Returns ------- List[np.ndarray] Gives back the Rotation matrix representation, returned as a 3-by-3 matrix or 3-by-3-by-N multidimensional array. """ quat_inv = quaternion_conjugate(quat) return [ quaternion_mult(quat, [0, *basis], quat_inv)[1:] for basis in [ [1, 0, 0], [0, 1, 0], [0, 0, 1], ] ] def rotation_matrix_from_quaternion(quat: np.ndarray) -> np.ndarray: return np.transpose(rotation_matrix_transpose_from_quaternion(quat)) def rotation_matrix_transpose(angle: float, axis: Vector3DLike) -> np.ndarray: if all(np.array(axis)[:2] == np.zeros(2)): return rotation_about_z(angle * np.sign(axis[2])).T return rotation_matrix(angle, axis).T def rotation_matrix( angle: float, axis: Vector3DLike, homogeneous: bool = False, ) -> np.ndarray: """Rotation in R^3 about a specified axis of rotation.""" inhomogeneous_rotation_matrix = Rotation.from_rotvec( angle * normalize(axis) ).as_matrix() if not homogeneous: return inhomogeneous_rotation_matrix else: rotation_matrix = np.eye(4) rotation_matrix[:3, :3] = inhomogeneous_rotation_matrix return rotation_matrix def rotation_about_z(angle: float) -> np.ndarray: """Returns a rotation matrix for a given angle. Parameters ---------- angle Angle for the rotation matrix. Returns ------- np.ndarray Gives back the rotated matrix. """ c, s = np.cos(angle), np.sin(angle) return np.array( [ [c, -s, 0], [s, c, 0], [0, 0, 1], ] ) def z_to_vector(vector: np.ndarray) -> np.ndarray: """ Returns some matrix in SO(3) which takes the z-axis to the (normalized) vector provided as an argument """ axis_z = normalize(vector) axis_y = normalize(cross(axis_z, RIGHT)) axis_x = cross(axis_y, axis_z) if np.linalg.norm(axis_y) == 0: # the vector passed just so happened to be in the x direction. axis_x = normalize(cross(UP, axis_z)) axis_y = -cross(axis_x, axis_z) return np.array([axis_x, axis_y, axis_z]).T def angle_of_vector(vector: Sequence[float] | np.ndarray) -> float: """Returns polar coordinate theta when vector is projected on xy plane. Parameters ---------- vector The vector to find the angle for. Returns ------- float The angle of the vector projected. """ if isinstance(vector, np.ndarray) and len(vector.shape) > 1: if vector.shape[0] < 2: raise ValueError("Vector must have the correct dimensions. (2, n)") c_vec = np.empty(vector.shape[1], dtype=np.complex128) c_vec.real = vector[0] c_vec.imag = vector[1] val1: float = np.angle(c_vec) return val1 val: float = np.angle(complex(*vector[:2])) return val def angle_between_vectors(v1: np.ndarray, v2: np.ndarray) -> float: """Returns the angle between two vectors. This angle will always be between 0 and pi Parameters ---------- v1 The first vector. v2 The second vector. Returns ------- float The angle between the vectors. """ val: float = 2 * np.arctan2( np.linalg.norm(normalize(v1) - normalize(v2)), np.linalg.norm(normalize(v1) + normalize(v2)), ) return val def normalize( vect: np.ndarray | tuple[float], fall_back: np.ndarray | None = None ) -> np.ndarray: norm = np.linalg.norm(vect) if norm > 0: return np.array(vect) / norm else: return fall_back or np.zeros(len(vect)) def normalize_along_axis(array: np.ndarray, axis: np.ndarray) -> np.ndarray: """Normalizes an array with the provided axis. Parameters ---------- array The array which has to be normalized. axis The axis to be normalized to. Returns ------- np.ndarray Array which has been normalized according to the axis. """ norms = np.sqrt((array * array).sum(axis)) norms[norms == 0] = 1 buffed_norms = np.repeat(norms, array.shape[axis]).reshape(array.shape) array /= buffed_norms return array def get_unit_normal(v1: Vector3DLike, v2: Vector3DLike, tol: float = 1e-6) -> Vector3D: """Gets the unit normal of the vectors. Parameters ---------- v1 The first vector. v2 The second vector tol [description], by default 1e-6 Returns ------- np.ndarray The normal of the two vectors. """ np_v1 = np.asarray(v1) np_v2 = np.asarray(v2) # Instead of normalizing v1 and v2, just divide by the greatest # of all their absolute components, which is just enough div1, div2 = max(np.abs(np_v1)), max(np.abs(np_v2)) if div1 == 0.0: if div2 == 0.0: return DOWN u = np_v2 / div2 elif div2 == 0.0: u = np_v1 / div1 else: # Normal scenario: v1 and v2 are both non-null u1, u2 = np_v1 / div1, np_v2 / div2 cp = cross(u1, u2) cp_norm = np.sqrt(norm_squared(cp)) if cp_norm > tol: return cp / cp_norm # Otherwise, v1 and v2 were aligned u = u1 # If you are here, you have an "unique", non-zero, unit-ish vector u # If it's also too aligned to the Z axis, just return DOWN if abs(u[0]) < tol and abs(u[1]) < tol: return DOWN # Otherwise rotate u in the plane it shares with the Z axis, # 90° TOWARDS the Z axis. This is done via (u x [0, 0, 1]) x u, # which gives [-xz, -yz, x²+y²] (slightly scaled as well) cp = np.array([-u[0] * u[2], -u[1] * u[2], u[0] * u[0] + u[1] * u[1]]) cp_norm = np.sqrt(norm_squared(cp)) # Because the norm(u) == 0 case was filtered in the beginning, # there is no need to check if the norm of cp is 0 return cp / cp_norm ### def compass_directions(n: int = 4, start_vect: np.ndarray = RIGHT) -> np.ndarray: """Finds the cardinal directions using tau. Parameters ---------- n The amount to be rotated, by default 4 start_vect The direction for the angle to start with, by default RIGHT Returns ------- np.ndarray The angle which has been rotated. """ angle = TAU / n return np.array([rotate_vector(start_vect, k * angle) for k in range(n)]) def regular_vertices( n: int, *, radius: float = 1, start_angle: float | None = None ) -> tuple[np.ndarray, float]: """Generates regularly spaced vertices around a circle centered at the origin. Parameters ---------- n The number of vertices radius The radius of the circle that the vertices are placed on. start_angle The angle the vertices start at. If unspecified, for even ``n`` values, ``0`` will be used. For odd ``n`` values, 90 degrees is used. Returns ------- vertices : :class:`numpy.ndarray` The regularly spaced vertices. start_angle : :class:`float` The angle the vertices start at. """ if start_angle is None: start_angle = 0 if n % 2 == 0 else TAU / 4 start_vector = rotate_vector(RIGHT * radius, start_angle) vertices = compass_directions(n, start_vector) return vertices, start_angle def complex_to_R3(complex_num: complex) -> np.ndarray: return np.array((complex_num.real, complex_num.imag, 0)) def R3_to_complex(point: Sequence[float]) -> np.ndarray: return complex(*point[:2]) def complex_func_to_R3_func( complex_func: Callable[[complex], complex], ) -> Callable[[Point3DLike], Point3D]: return lambda p: complex_to_R3(complex_func(R3_to_complex(p))) def center_of_mass(points: PointNDLike_Array) -> PointND: """Gets the center of mass of the points in space. Parameters ---------- points The points to find the center of mass from. Returns ------- np.ndarray The center of mass of the points. """ return np.average(points, 0, np.ones(len(points))) def midpoint( point1: Sequence[float], point2: Sequence[float], ) -> float | np.ndarray: """Gets the midpoint of two points. Parameters ---------- point1 The first point. point2 The second point. Returns ------- Union[float, np.ndarray] The midpoint of the points """ return center_of_mass([point1, point2]) def line_intersection( line1: Sequence[np.ndarray], line2: Sequence[np.ndarray] ) -> np.ndarray: """Returns the intersection point of two lines, each defined by a pair of distinct points lying on the line. Parameters ---------- line1 A list of two points that determine the first line. line2 A list of two points that determine the second line. Returns ------- np.ndarray The intersection points of the two lines which are intersecting. Raises ------ ValueError Error is produced if the two lines don't intersect with each other or if the coordinates don't lie on the xy-plane. """ if any(np.array([line1, line2])[:, :, 2].reshape(-1)): # checks for z coordinates != 0 raise ValueError("Coords must be in the xy-plane.") # algorithm from https://stackoverflow.com/a/42727584 padded = ( np.pad(np.array(i)[:, :2], ((0, 0), (0, 1)), constant_values=1) for i in (line1, line2) ) line1, line2 = (cross(*i) for i in padded) x, y, z = cross(line1, line2) if z == 0: raise ValueError( "The lines are parallel, there is no unique intersection point." ) return np.array([x / z, y / z, 0]) def find_intersection( p0s: Point3DLike_Array, v0s: Vector3DLike_Array, p1s: Point3DLike_Array, v1s: Vector3DLike_Array, threshold: float = 1e-5, ) -> list[Point3D]: """ Return the intersection of a line passing through p0 in direction v0 with one passing through p1 in direction v1 (or array of intersections from arrays of such points/directions). For 3d values, it returns the point on the ray p0 + v0 * t closest to the ray p1 + v1 * t """ # algorithm from https://en.wikipedia.org/wiki/Skew_lines#Nearest_points result = [] for p0, v0, p1, v1 in zip(p0s, v0s, p1s, v1s): normal = cross(v1, cross(v0, v1)) denom = max(np.dot(v0, normal), threshold) result += [p0 + np.dot(p1 - p0, normal) / denom * v0] return result def get_winding_number(points: Sequence[np.ndarray]) -> float: """Determine the number of times a polygon winds around the origin. The orientation is measured mathematically positively, i.e., counterclockwise. Parameters ---------- points The vertices of the polygon being queried. Examples -------- >>> from manim import Square, get_winding_number >>> polygon = Square() >>> get_winding_number(polygon.get_vertices()) np.float64(1.0) >>> polygon.shift(2 * UP) Square >>> get_winding_number(polygon.get_vertices()) np.float64(0.0) """ total_angle: float = 0 for p1, p2 in adjacent_pairs(points): d_angle = angle_of_vector(p2) - angle_of_vector(p1) d_angle = ((d_angle + PI) % TAU) - PI total_angle += d_angle val: float = total_angle / TAU return val def shoelace(x_y: Point2D_Array) -> float: """2D implementation of the shoelace formula. Returns ------- :class:`float` Returns signed area. """ x = x_y[:, 0] y = x_y[:, 1] val: float = np.trapz(y, x) return val def shoelace_direction(x_y: Point2D_Array) -> str: """ Uses the area determined by the shoelace method to determine whether the input set of points is directed clockwise or counterclockwise. Returns ------- :class:`str` Either ``"CW"`` or ``"CCW"``. """ area = shoelace(x_y) return "CW" if area > 0 else "CCW" def cross2d( a: Vector2D | Vector2D_Array, b: Vector2D | Vector2D_Array, ) -> ManimFloat | npt.NDArray[ManimFloat]: """Compute the determinant(s) of the passed vector (sequences). Parameters ---------- a A vector or a sequence of vectors. b A vector or a sequence of vectors. Returns ------- Sequence[float] | float The determinant or sequence of determinants of the first two components of the specified vectors. Examples -------- .. code-block:: pycon >>> cross2d(np.array([1, 2]), np.array([3, 4])) np.int64(-2) >>> cross2d( ... np.array([[1, 2, 0], [1, 0, 0]]), ... np.array([[3, 4, 0], [0, 1, 0]]), ... ) array([-2, 1]) """ if len(a.shape) == 2: return a[:, 0] * b[:, 1] - a[:, 1] * b[:, 0] else: return a[0] * b[1] - b[0] * a[1] def earclip_triangulation(verts: np.ndarray, ring_ends: list) -> list: """Returns a list of indices giving a triangulation of a polygon, potentially with holes. Parameters ---------- verts verts is a numpy array of points. ring_ends ring_ends is a list of indices indicating where the ends of new paths are. Returns ------- list A list of indices giving a triangulation of a polygon. """ # First, connect all the rings so that the polygon # with holes is instead treated as a (very convex) # polygon with one edge. Do this by drawing connections # between rings close to each other rings = [list(range(e0, e1)) for e0, e1 in zip([0, *ring_ends], ring_ends)] attached_rings = rings[:1] detached_rings = rings[1:] loop_connections = {} while detached_rings: i_range, j_range = ( list( filter( # Ignore indices that are already being # used to draw some connection lambda i: i not in loop_connections, it.chain(*ring_group), ), ) for ring_group in (attached_rings, detached_rings) ) # Closest point on the attached rings to an estimated midpoint # of the detached rings tmp_j_vert = midpoint(verts[j_range[0]], verts[j_range[len(j_range) // 2]]) i = min(i_range, key=lambda i: norm_squared(verts[i] - tmp_j_vert)) # Closest point of the detached rings to the aforementioned # point of the attached rings j = min(j_range, key=lambda j: norm_squared(verts[i] - verts[j])) # Recalculate i based on new j i = min(i_range, key=lambda i: norm_squared(verts[i] - verts[j])) # Remember to connect the polygon at these points loop_connections[i] = j loop_connections[j] = i # Move the ring which j belongs to from the # attached list to the detached list new_ring = next( (ring for ring in detached_rings if ring[0] <= j < ring[-1]), None ) if new_ring is not None: detached_rings.remove(new_ring) attached_rings.append(new_ring) else: raise Exception("Could not find a ring to attach") # Setup linked list after: list[int] = [] end0 = 0 for end1 in ring_ends: after.extend(range(end0 + 1, end1)) after.append(end0) end0 = end1 # Find an ordering of indices walking around the polygon indices = [] i = 0 for _ in range(len(verts) + len(ring_ends) - 1): # starting = False if i in loop_connections: j = loop_connections[i] indices.extend([i, j]) i = after[j] else: indices.append(i) i = after[i] if i == 0: break meta_indices = earcut(verts[indices, :2], [len(indices)]) return [indices[mi] for mi in meta_indices] def cartesian_to_spherical(vec: Sequence[float]) -> np.ndarray: """Returns an array of numbers corresponding to each polar coordinate value (distance, phi, theta). Parameters ---------- vec A numpy array ``[x, y, z]``. """ norm = np.linalg.norm(vec) if norm == 0: return 0, 0, 0 r = norm phi = np.arccos(vec[2] / r) theta = np.arctan2(vec[1], vec[0]) return np.array([r, theta, phi]) def spherical_to_cartesian(spherical: Sequence[float]) -> np.ndarray: """Returns a numpy array ``[x, y, z]`` based on the spherical coordinates given. Parameters ---------- spherical A list of three floats that correspond to the following: r - The distance between the point and the origin. theta - The azimuthal angle of the point to the positive x-axis. phi - The vertical angle of the point to the positive z-axis. """ r, theta, phi = spherical return np.array( [ r * np.cos(theta) * np.sin(phi), r * np.sin(theta) * np.sin(phi), r * np.cos(phi), ], ) def perpendicular_bisector( line: Sequence[np.ndarray], norm_vector: Vector3D = OUT, ) -> Sequence[np.ndarray]: """Returns a list of two points that correspond to the ends of the perpendicular bisector of the two points given. Parameters ---------- line a list of two numpy array points (corresponding to the ends of a line). norm_vector the vector perpendicular to both the line given and the perpendicular bisector. Returns ------- list A list of two numpy array points that correspond to the ends of the perpendicular bisector """ p1 = line[0] p2 = line[1] direction = cross(p1 - p2, norm_vector) m = midpoint(p1, p2) return [m + direction, m - direction] ================================================ FILE: manim/utils/tex.py ================================================ """Utilities for processing LaTeX templates.""" from __future__ import annotations __all__ = [ "TexTemplate", ] import copy import re import warnings from dataclasses import dataclass, field from pathlib import Path from typing import TYPE_CHECKING, Any if TYPE_CHECKING: from typing_extensions import Self from manim.typing import StrPath _DEFAULT_PREAMBLE = r"""\usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb}""" _BEGIN_DOCUMENT = r"\begin{document}" _END_DOCUMENT = r"\end{document}" @dataclass(eq=True) class TexTemplate: """TeX templates are used to create ``Tex`` and ``MathTex`` objects.""" _body: str = field(default="", init=False) """A custom body, can be set from a file.""" tex_compiler: str = "latex" """The TeX compiler to be used, e.g. ``latex``, ``pdflatex`` or ``lualatex``.""" description: str = "" """A description of the template""" output_format: str = ".dvi" """The output format resulting from compilation, e.g. ``.dvi`` or ``.pdf``.""" documentclass: str = r"\documentclass[preview]{standalone}" r"""The command defining the documentclass, e.g. ``\documentclass[preview]{standalone}``.""" preamble: str = _DEFAULT_PREAMBLE r"""The document's preamble, i.e. the part between ``\documentclass`` and ``\begin{document}``.""" placeholder_text: str = "YourTextHere" """Text in the document that will be replaced by the expression to be rendered.""" post_doc_commands: str = "" r"""Text (definitions, commands) to be inserted at right after ``\begin{document}``, e.g. ``\boldmath``.""" @property def body(self) -> str: """The entire TeX template.""" return self._body or "\n".join( filter( None, [ self.documentclass, self.preamble, _BEGIN_DOCUMENT, self.post_doc_commands, self.placeholder_text, _END_DOCUMENT, ], ) ) @body.setter def body(self, value: str) -> None: self._body = value @classmethod def from_file(cls, file: StrPath = "tex_template.tex", **kwargs: Any) -> Self: """Create an instance by reading the content of a file. Using the ``add_to_preamble`` and ``add_to_document`` methods on this instance will have no effect, as the body is read from the file. """ instance = cls(**kwargs) instance.body = Path(file).read_text(encoding="utf-8") return instance def add_to_preamble(self, txt: str, prepend: bool = False) -> Self: r"""Adds text to the TeX template's preamble (e.g. definitions, packages). Text can be inserted at the beginning or at the end of the preamble. Parameters ---------- txt String containing the text to be added, e.g. ``\usepackage{hyperref}``. prepend Whether the text should be added at the beginning of the preamble, i.e. right after ``\documentclass``. Default is to add it at the end of the preamble, i.e. right before ``\begin{document}``. """ if self._body: warnings.warn( "This TeX template was created with a fixed body, trying to add text the preamble will have no effect.", UserWarning, stacklevel=2, ) if prepend: self.preamble = txt + "\n" + self.preamble else: self.preamble += "\n" + txt return self def add_to_document(self, txt: str) -> Self: r"""Adds text to the TeX template just after \begin{document}, e.g. ``\boldmath``. Parameters ---------- txt String containing the text to be added. """ if self._body: warnings.warn( "This TeX template was created with a fixed body, trying to add text the document will have no effect.", UserWarning, stacklevel=2, ) self.post_doc_commands += txt return self def get_texcode_for_expression(self, expression: str) -> str: r"""Inserts expression verbatim into TeX template. Parameters ---------- expression The string containing the expression to be typeset, e.g. ``$\sqrt{2}$`` Returns ------- :class:`str` LaTeX code based on current template, containing the given ``expression`` and ready for typesetting """ return self.body.replace(self.placeholder_text, expression) def get_texcode_for_expression_in_env( self, expression: str, environment: str ) -> str: r"""Inserts expression into TeX template wrapped in ``\begin{environment}`` and ``\end{environment}``. Parameters ---------- expression The string containing the expression to be typeset, e.g. ``$\sqrt{2}$``. environment The string containing the environment in which the expression should be typeset, e.g. ``align*``. Returns ------- :class:`str` LaTeX code based on template, containing the given expression inside its environment, ready for typesetting """ begin, end = _texcode_for_environment(environment) return self.body.replace( self.placeholder_text, "\n".join([begin, expression, end]) ) def copy(self) -> Self: """Create a deep copy of the TeX template instance.""" return copy.deepcopy(self) def _texcode_for_environment(environment: str) -> tuple[str, str]: r"""Processes the tex_environment string to return the correct ``\begin{environment}[extra]{extra}`` and ``\end{environment}`` strings. Parameters ---------- environment The tex_environment as a string. Acceptable formats include: ``{align*}``, ``align*``, ``{tabular}[t]{cccl}``, ``tabular}{cccl``, ``\begin{tabular}[t]{cccl}``. Returns ------- 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}`` """ environment = environment.removeprefix(r"\begin").removeprefix("{") # The \begin command takes everything and closes with a brace begin = r"\begin{" + environment # If it doesn't end on } or ], assume missing } if not begin.endswith(("}", "]")): begin += "}" # While the \end command terminates at the first closing brace split_at_brace = re.split("}", environment, maxsplit=1) end = r"\end{" + split_at_brace[0] + "}" return begin, end ================================================ FILE: manim/utils/tex_file_writing.py ================================================ """Interface for writing, compiling, and converting ``.tex`` files. .. SEEALSO:: :mod:`.mobject.svg.tex_mobject` """ from __future__ import annotations import hashlib import re import subprocess import unicodedata from collections.abc import Generator, Iterable, Sequence from pathlib import Path from re import Match from typing import Any from manim.utils.tex import TexTemplate from .. import config, logger __all__ = ["tex_to_svg_file"] def tex_hash(expression: Any) -> str: id_str = str(expression) hasher = hashlib.sha256() hasher.update(id_str.encode()) # Truncating at 16 bytes for cleanliness return hasher.hexdigest()[:16] def tex_to_svg_file( expression: str, environment: str | None = None, tex_template: TexTemplate | None = None, ) -> Path: r"""Takes a tex expression and returns the svg version of the compiled tex Parameters ---------- expression String containing the TeX expression to be rendered, e.g. ``\\sqrt{2}`` or ``foo`` environment The string containing the environment in which the expression should be typeset, e.g. ``align*`` tex_template Template class used to typesetting. If not set, use default template set via `config["tex_template"]` Returns ------- :class:`Path` Path to generated SVG file. """ if tex_template is None: tex_template = config["tex_template"] tex_file = generate_tex_file(expression, environment, tex_template) # check if svg already exists svg_file = tex_file.with_suffix(".svg") if svg_file.exists(): return svg_file dvi_file = compile_tex( tex_file, tex_template.tex_compiler, tex_template.output_format, ) svg_file = convert_to_svg(dvi_file, tex_template.output_format) if not config["no_latex_cleanup"]: delete_nonsvg_files() return svg_file def generate_tex_file( expression: str, environment: str | None = None, tex_template: TexTemplate | None = None, ) -> Path: r"""Takes a tex expression (and an optional tex environment), and returns a fully formed tex file ready for compilation. Parameters ---------- expression String containing the TeX expression to be rendered, e.g. ``\\sqrt{2}`` or ``foo`` environment The string containing the environment in which the expression should be typeset, e.g. ``align*`` tex_template Template class used to typesetting. If not set, use default template set via `config["tex_template"]` Returns ------- :class:`Path` 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.get_dir("tex_dir") if not tex_dir.exists(): tex_dir.mkdir() result = tex_dir / (tex_hash(output) + ".tex") if not result.exists(): logger.info( "Writing %(expression)s to %(path)s", {"expression": expression, "path": f"{result}"}, ) result.write_text(output, encoding="utf-8") return result def make_tex_compilation_command( tex_compiler: str, output_format: str, tex_file: Path, tex_dir: Path ) -> list[str]: """Prepares the TeX compilation command, i.e. the TeX compiler name and all necessary CLI flags. Parameters ---------- tex_compiler String containing the compiler to be used, e.g. ``pdflatex`` or ``lualatex`` output_format String containing the output format generated by the compiler, e.g. ``.dvi`` or ``.pdf`` tex_file File name of TeX file to be typeset. tex_dir Path to the directory where compiler output will be stored. Returns ------- :class:`list[str]` Compilation command according to given parameters """ if tex_compiler in {"latex", "pdflatex", "luatex", "lualatex"}: command = [ tex_compiler, "-interaction=batchmode", f"-output-format={output_format[1:]}", "-halt-on-error", f"-output-directory={tex_dir.as_posix()}", f"{tex_file.as_posix()}", ] elif tex_compiler == "xelatex": if output_format == ".xdv": outflag = ["-no-pdf"] elif output_format == ".pdf": outflag = [] else: raise ValueError("xelatex output is either pdf or xdv") command = [ "xelatex", *outflag, "-interaction=batchmode", "-halt-on-error", f"-output-directory={tex_dir.as_posix()}", f"{tex_file.as_posix()}", ] else: raise ValueError(f"Tex compiler {tex_compiler} unknown.") return command def insight_inputenc_error(matching: Match[str]) -> Generator[str]: code_point = chr(int(matching[1], 16)) name = unicodedata.name(code_point) yield f"TexTemplate does not support character '{name}' (U+{matching[1]})." yield "See the documentation for manim.mobject.svg.tex_mobject for details on using a custom TexTemplate." def insight_package_not_found_error(matching: Match[str]) -> Generator[str]: yield f"You do not have package {matching[1]} installed." yield f"Install {matching[1]} it using your LaTeX package manager, or check for typos." def compile_tex(tex_file: Path, tex_compiler: str, output_format: str) -> Path: """Compiles a tex_file into a .dvi or a .xdv or a .pdf Parameters ---------- tex_file File name of TeX file to be typeset. tex_compiler String containing the compiler to be used, e.g. ``pdflatex`` or ``lualatex`` output_format String containing the output format generated by the compiler, e.g. ``.dvi`` or ``.pdf`` Returns ------- :class:`Path` Path to generated output file in desired format (DVI, XDV or PDF). """ result = tex_file.with_suffix(output_format) tex_dir = config.get_dir("tex_dir") if not result.exists(): command = make_tex_compilation_command( tex_compiler, output_format, tex_file, tex_dir, ) cp = subprocess.run(command, stdout=subprocess.DEVNULL) if cp.returncode != 0: log_file = tex_file.with_suffix(".log") print_all_tex_errors(log_file, tex_compiler, tex_file) raise ValueError( f"{tex_compiler} error converting to" f" {output_format[1:]}. See log output above or" f" the log file: {log_file}", ) return result def convert_to_svg(dvi_file: Path, extension: str, page: int = 1) -> Path: """Converts a .dvi, .xdv, or .pdf file into an svg using dvisvgm. Parameters ---------- dvi_file File name of the input file to be converted. extension String containing the file extension and thus indicating the file type, e.g. ``.dvi`` or ``.pdf`` page Page to be converted if input file is multi-page. Returns ------- :class:`Path` Path to generated SVG file. """ result = dvi_file.with_suffix(".svg") if not result.exists(): command = [ "dvisvgm", *(["--pdf"] if extension == ".pdf" else []), f"--page={page}", "--no-fonts", "--verbosity=0", f"--output={result.as_posix()}", f"{dvi_file.as_posix()}", ] subprocess.run(command, stdout=subprocess.DEVNULL) # if the file does not exist now, this means conversion failed if not result.exists(): raise ValueError( f"Your installation does not support converting {dvi_file.suffix} 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://docs.manim.community/en/stable/faq/general.html#my-installation-" f"does-not-support-converting-pdf-to-svg-help", ) return result def delete_nonsvg_files(additional_endings: Iterable[str] = ()) -> None: """Deletes every file that does not have a suffix in ``(".svg", ".tex", *additional_endings)`` Parameters ---------- additional_endings Additional endings to whitelist """ tex_dir = config.get_dir("tex_dir") file_suffix_whitelist = {".svg", ".tex", *additional_endings} for f in tex_dir.iterdir(): if f.suffix not in file_suffix_whitelist: f.unlink() def print_all_tex_errors(log_file: Path, tex_compiler: str, tex_file: Path) -> None: if not log_file.exists(): raise RuntimeError( f"{tex_compiler} failed but did not produce a log file. " "Check your LaTeX installation.", ) with log_file.open(encoding="utf-8") as f: tex_compilation_log = f.readlines() error_indices = [ index for index, line in enumerate(tex_compilation_log) if line.startswith("!") ] if error_indices: with tex_file.open(encoding="utf-8") as f: tex = f.readlines() for error_index in error_indices: print_tex_error(tex_compilation_log, error_index, tex) LATEX_ERROR_INSIGHTS = [ ( r"inputenc Error: Unicode character (?:.*) \(U\+([0-9a-fA-F]+)\)", insight_inputenc_error, ), ( r"LaTeX Error: File `(.*?[clsty])' not found", insight_package_not_found_error, ), ] def print_tex_error( tex_compilation_log: Sequence[str], error_start_index: int, tex_source: Sequence[str], ) -> None: logger.error( f"LaTeX compilation error: {tex_compilation_log[error_start_index][2:]}", ) # TeX errors eventually contain a line beginning 'l.xxx` where xxx is the line number that caused the compilation # failure. This code finds the next such line after the error current error message line_of_tex_error = ( int( [ log_line for log_line in tex_compilation_log[error_start_index:] if log_line.startswith("l.") ][0] .split(" ")[0] .split(".")[1], ) - 1 ) # our tex error may be on a line outside our user input because of post-processing if line_of_tex_error >= len(tex_source): return None context = ["Context of error: \n"] if line_of_tex_error < 3: context += tex_source[: line_of_tex_error + 3] context[-4] = "-> " + context[-4] elif line_of_tex_error > len(tex_source) - 3: context += tex_source[line_of_tex_error - 1 :] context[1] = "-> " + context[1] else: context += tex_source[line_of_tex_error - 3 : line_of_tex_error + 3] context[-4] = "-> " + context[-4] context_joined = "".join(context) logger.error(context_joined) for insights in LATEX_ERROR_INSIGHTS: prob, get_insight = insights matching = re.search( prob, "".join(tex_compilation_log[error_start_index])[2:], ) if matching is not None: for insight in get_insight(matching): logger.info(insight) ================================================ FILE: manim/utils/tex_templates.py ================================================ """A library of LaTeX templates.""" from __future__ import annotations __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() -> TexTemplate: """Returns a simple Tex Template with only basic AMS packages""" preamble = r""" \usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb} """ return TexTemplate(preamble=preamble) """ Tex Template preamble used by original upstream 3b1b """ _3b1b_preamble = r""" \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \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} """ # TexTemplateLibrary # class TexTemplateLibrary: """ 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(preamble=_3b1b_preamble) """An instance of the default TeX template in manim""" threeb1b = TexTemplate(preamble=_3b1b_preamble) """ An instance of the default TeX template used by 3b1b """ ctex = TexTemplate( tex_compiler="xelatex", output_format=".xdv", preamble=_3b1b_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 = ".xdv" # 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: """ 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""" ================================================ FILE: manim/utils/unit.py ================================================ """Implement the Unit class.""" from __future__ import annotations import numpy as np from .. import config, constants from ..typing import Vector3D __all__ = ["Pixels", "Degrees", "Munits", "Percent"] class _PixelUnits: def __mul__(self, val: float) -> float: return val * config.frame_width / config.pixel_width def __rmul__(self, val: float) -> float: return val * config.frame_width / config.pixel_width class Percent: def __init__(self, axis: Vector3D) -> None: if np.array_equal(axis, constants.X_AXIS): self.length = config.frame_width if np.array_equal(axis, constants.Y_AXIS): self.length = config.frame_height if np.array_equal(axis, constants.Z_AXIS): raise NotImplementedError("length of Z axis is undefined") def __mul__(self, val: float) -> float: return val / 100 * self.length def __rmul__(self, val: float) -> float: return val / 100 * self.length Pixels = _PixelUnits() Degrees = constants.PI / 180 Munits = 1 ================================================ FILE: manim/utils/color/__init__.py ================================================ """Utilities for working with colors and predefined color constants. Color data structure -------------------- .. autosummary:: :toctree: ../reference core Predefined colors ----------------- There are several predefined colors available in Manim: - The colors listed in :mod:`.color.manim_colors` are loaded into Manim's global name space. - The colors in :mod:`.color.AS2700`, :mod:`.color.BS381`, :mod:`.color.DVIPSNAMES`, :mod:`.color.SVGNAMES`, :mod:`.color.X11` and :mod:`.color.XKCD` need to be accessed via their module (which are available in Manim's global name space), or imported separately. For example: .. code:: pycon >>> from manim import XKCD >>> XKCD.AVOCADO ManimColor('#90B134') Or, alternatively: .. code:: pycon >>> from manim.utils.color.XKCD import AVOCADO >>> AVOCADO ManimColor('#90B134') The following modules contain the predefined color constants: .. autosummary:: :toctree: ../reference manim_colors AS2700 BS381 DVIPSNAMES SVGNAMES XKCD X11 """ from __future__ import annotations from . import AS2700, BS381, DVIPSNAMES, SVGNAMES, X11, XKCD from .core import * from .manim_colors import * _all_color_dict: dict[str, ManimColor] = { k: v for k, v in globals().items() if isinstance(v, ManimColor) } ================================================ FILE: manim/utils/color/AS2700.py ================================================ """Australian Color Standard In 1985 the Australian Independent Color Standard AS 2700 was created. In this standard, all colors can be identified via a category code (one of B -- Blue, G -- Green, N -- Neutrals (grey), P -- Purple, R -- Red, T -- Blue/Green, X -- Yellow/Red, Y -- Yellow) and a number. The colors also have (natural) names. To use the colors from this list, access them directly from the module (which is exposed to Manim's global name space): .. code:: pycon >>> from manim import AS2700 >>> AS2700.B23_BRIGHT_BLUE ManimColor('#174F90') List of Color Constants ----------------------- These hex values (taken from https://www.w3schools.com/colors/colors_australia.asp) are non official approximate values intended to simulate AS 2700 colors: .. automanimcolormodule:: manim.utils.color.AS2700 """ from __future__ import annotations from .core import ManimColor B11_RICH_BLUE = ManimColor("#2B3770") B12_ROYAL_BLUE = ManimColor("#2C3563") B13_NAVY_BLUE = ManimColor("#28304D") B14_SAPHHIRE = ManimColor("#28426B") B15_MID_BLUE = ManimColor("#144B6F") B21_ULTRAMARINE = ManimColor("#2C5098") B22_HOMEBUSH_BLUE = ManimColor("#215097") B23_BRIGHT_BLUE = ManimColor("#174F90") B24_HARBOUR_BLUE = ManimColor("#1C6293") B25_AQUA = ManimColor("#5097AC") B32_POWDER_BLUE = ManimColor("#B7C8DB") B33_MIST_BLUE = ManimColor("#E0E6E2") B34_PARADISE_BLUE = ManimColor("#3499BA") B35_PALE_BLUE = ManimColor("#CDE4E2") B41_BLUEBELL = ManimColor("#5B94D1") B42_PURPLE_BLUE = ManimColor("#5E7899") B43_GREY_BLUE = ManimColor("#627C8D") B44_LIGHT_GREY_BLUE = ManimColor("#C0C0C1") B45_SKY_BLUE = ManimColor("#7DB7C7") B51_PERIWINKLE = ManimColor("#3871AC") B53_DARK_GREY_BLUE = ManimColor("#4F6572") B55_STORM_BLUE = ManimColor("#3F7C94") B61_CORAL_SEA = ManimColor("#2B3873") B62_MIDNIGHT_BLUE = ManimColor("#292A34") B64_CHARCOAL = ManimColor("#363E45") G11_BOTTLE_GREEN = ManimColor("#253A32") G12_HOLLY = ManimColor("#21432D") G13_EMERALD = ManimColor("#195F35") G14_MOSS_GREEN = ManimColor("#33572D") G15_RAINFOREST_GREEN = ManimColor("#3D492D") G16_TRAFFIC_GREEN = ManimColor("#305442") G17_MINT_GREEN = ManimColor("#006B45") G21_JADE = ManimColor("#127453") G22_SERPENTINE = ManimColor("#78A681") G23_SHAMROCK = ManimColor("#336634") G24_FERN_TREE = ManimColor("#477036") G25_OLIVE = ManimColor("#595B2A") G26_APPLE_GREEN = ManimColor("#4E9843") G27_HOMEBUSH_GREEN = ManimColor("#017F4D") G31_VERTIGRIS = ManimColor("#468A65") G32_OPALINE = ManimColor("#AFCBB8") G33_LETTUCE = ManimColor("#7B9954") G34_AVOCADO = ManimColor("#757C4C") G35_LIME_GREEN = ManimColor("#89922E") G36_KIKUYU = ManimColor("#95B43B") G37_BEANSTALK = ManimColor("#45A56A") G41_LAWN_GREEN = ManimColor("#0D875D") G42_GLACIER = ManimColor("#D5E1D2") G43_SURF_GREEN = ManimColor("#C8C8A7") G44_PALM_GREEN = ManimColor("#99B179") G45_CHARTREUSE = ManimColor("#C7C98D") G46_CITRONELLA = ManimColor("#BFC83E") G47_CRYSTAL_GREEN = ManimColor("#ADCCA8") G51_SPRUCE = ManimColor("#05674F") G52_EUCALYPTUS = ManimColor("#66755B") G53_BANKSIA = ManimColor("#929479") G54_MIST_GREEN = ManimColor("#7A836D") G55_LICHEN = ManimColor("#A7A98C") G56_SAGE_GREEN = ManimColor("#677249") G61_DARK_GREEN = ManimColor("#283533") G62_RIVERGUM = ManimColor("#617061") G63_DEEP_BRONZE_GREEN = ManimColor("#333334") G64_SLATE = ManimColor("#5E6153") G65_TI_TREE = ManimColor("#5D5F4E") G66_ENVIRONMENT_GREEN = ManimColor("#484C3F") G67_ZUCCHINI = ManimColor("#2E443A") N11_PEARL_GREY = ManimColor("#D8D3C7") N12_PASTEL_GREY = ManimColor("#CCCCCC") N14_WHITE = ManimColor("#FFFFFF") N15_HOMEBUSH_GREY = ManimColor("#A29B93") N22_CLOUD_GREY = ManimColor("#C4C1B9") N23_NEUTRAL_GREY = ManimColor("#CCCCCC") N24_SILVER_GREY = ManimColor("#BDC7C5") N25_BIRCH_GREY = ManimColor("#ABA498") N32_GREEN_GREY = ManimColor("#8E9282") N33_LIGHTBOX_GREY = ManimColor("#ACADAD") N35_LIGHT_GREY = ManimColor("#A6A7A1") N41_OYSTER = ManimColor("#998F78") N42_STORM_GREY = ManimColor("#858F88") N43_PIPELINE_GREY = ManimColor("#999999") N44_BRIDGE_GREY = ManimColor("#767779") N45_KOALA_GREY = ManimColor("#928F88") N52_MID_GREY = ManimColor("#727A77") N53_BLUE_GREY = ManimColor("#7C8588") N54_BASALT = ManimColor("#585C63") N55_LEAD_GREY = ManimColor("#5E5C58") N61_BLACK = ManimColor("#2A2A2C") N63_PEWTER = ManimColor("#596064") N64_DARK_GREY = ManimColor("#4B5259") N65_GRAPHITE_GREY = ManimColor("#45474A") P11_MAGENTA = ManimColor("#7B2B48") P12_PURPLE = ManimColor("#85467B") P13_VIOLET = ManimColor("#5D3A61") P14_BLUEBERRY = ManimColor("#4C4176") P21_SUNSET_PINK = ManimColor("#E3BBBD") P22_CYCLAMEN = ManimColor("#83597D") P23_LILAC = ManimColor("#A69FB1") P24_JACKARANDA = ManimColor("#795F91") P31_DUSTY_PINK = ManimColor("#DBBEBC") P33_RIBBON_PINK = ManimColor("#D1BCC9") P41_ERICA_PINK = ManimColor("#C55A83") P42_MULBERRY = ManimColor("#A06574") P43_WISTERIA = ManimColor("#756D91") P52_PLUM = ManimColor("#6E3D4B") R11_INTERNATIONAL_ORANGE = ManimColor("#CE482A") R12_SCARLET = ManimColor("#CD392A") R13_SIGNAL_RED = ManimColor("#BA312B") R14_WARATAH = ManimColor("#AA2429") R15_CRIMSON = ManimColor("#9E2429") R21_TANGERINE = ManimColor("#E96957") R22_HOMEBUSH_RED = ManimColor("#D83A2D") R23_LOLLIPOP = ManimColor("#CC5058") R24_STRAWBERRY = ManimColor("#B4292A") R25_ROSE_PINK = ManimColor("#E8919C") R32_APPLE_BLOSSOM = ManimColor("#F2E1D8") R33_GHOST_GUM = ManimColor("#E8DAD4") R34_MUSHROOM = ManimColor("#D7C0B6") R35_DEEP_ROSE = ManimColor("#CD6D71") R41_SHELL_PINK = ManimColor("#F9D9BB") R42_SALMON_PINK = ManimColor("#D99679") R43_RED_DUST = ManimColor("#D0674F") R44_POSSUM = ManimColor("#A18881") R45_RUBY = ManimColor("#8F3E5C") R51_BURNT_PINK = ManimColor("#E19B8E") R52_TERRACOTTA = ManimColor("#A04C36") R53_RED_GUM = ManimColor("#8D4338") R54_RASPBERRY = ManimColor("#852F31") R55_CLARET = ManimColor("#67292D") R62_VENETIAN_RED = ManimColor("#77372B") R63_RED_OXIDE = ManimColor("#663334") R64_DEEP_INDIAN_RED = ManimColor("#542E2B") R65_MAROON = ManimColor("#3F2B3C") T11_TROPICAL_BLUE = ManimColor("#006698") T12_DIAMANTIA = ManimColor("#006C74") T14_MALACHITE = ManimColor("#105154") T15_TURQUOISE = ManimColor("#098587") T22_ORIENTAL_BLUE = ManimColor("#358792") T24_BLUE_JADE = ManimColor("#427F7E") T32_HUON_GREEN = ManimColor("#72B3B1") T33_SMOKE_BLUE = ManimColor("#9EB6B2") T35_GREEN_ICE = ManimColor("#78AEA2") T44_BLUE_GUM = ManimColor("#6A8A88") T45_COOTAMUNDRA = ManimColor("#759E91") T51_MOUNTAIN_BLUE = ManimColor("#295668") T53_PEACOCK_BLUE = ManimColor("#245764") T63_TEAL = ManimColor("#183F4E") X11_BUTTERSCOTCH = ManimColor("#D38F43") X12_PUMPKIN = ManimColor("#DD7E1A") X13_MARIGOLD = ManimColor("#ED7F15") X14_MANDARIN = ManimColor("#E45427") X15_ORANGE = ManimColor("#E36C2B") X21_PALE_OCHRE = ManimColor("#DAA45F") X22_SAFFRON = ManimColor("#F6AA51") X23_APRICOT = ManimColor("#FEB56D") X24_ROCKMELON = ManimColor("#F6894B") X31_RAFFIA = ManimColor("#EBC695") X32_MAGNOLIA = ManimColor("#F1DEBE") X33_WARM_WHITE = ManimColor("#F3E7D4") X34_DRIFTWOOD = ManimColor("#D5C4AE") X41_BUFF = ManimColor("#C28A44") X42_BISCUIT = ManimColor("#DEBA92") X43_BEIGE = ManimColor("#C9AA8C") X45_CINNAMON = ManimColor("#AC826D") X51_TAN = ManimColor("#8F5F32") X52_COFFEE = ManimColor("#AD7948") X53_GOLDEN_TAN = ManimColor("#925629") X54_BROWN = ManimColor("#68452C") X55_NUT_BROWN = ManimColor("#764832") X61_WOMBAT = ManimColor("#6E5D52") X62_DARK_EARTH = ManimColor("#6E5D52") X63_IRONBARK = ManimColor("#443B36") X64_CHOCOLATE = ManimColor("#4A3B31") X65_DARK_BROWN = ManimColor("#4F372D") Y11_CANARY = ManimColor("#E7BD11") Y12_WATTLE = ManimColor("#E8AF01") Y13_VIVID_YELLOW = ManimColor("#FCAE01") Y14_GOLDEN_YELLOW = ManimColor("#F5A601") Y15_SUNFLOWER = ManimColor("#FFA709") Y16_INCA_GOLD = ManimColor("#DF8C19") Y21_PRIMROSE = ManimColor("#F5CF5B") Y22_CUSTARD = ManimColor("#EFD25C") Y23_BUTTERCUP = ManimColor("#E0CD41") Y24_STRAW = ManimColor("#E3C882") Y25_DEEP_CREAM = ManimColor("#F3C968") Y26_HOMEBUSH_GOLD = ManimColor("#FCC51A") Y31_LILY_GREEN = ManimColor("#E3E3CD") Y32_FLUMMERY = ManimColor("#E6DF9E") Y33_PALE_PRIMROSE = ManimColor("#F5F3CE") Y34_CREAM = ManimColor("#EFE3BE") Y35_OFF_WHITE = ManimColor("#F1E9D5") Y41_OLIVE_YELLOW = ManimColor("#8E7426") Y42_MUSTARD = ManimColor("#C4A32E") Y43_PARCHMENT = ManimColor("#D4C9A3") Y44_SAND = ManimColor("#DCC18B") Y45_MANILLA = ManimColor("#E5D0A7") Y51_BRONZE_OLIVE = ManimColor("#695D3E") Y52_CHAMOIS = ManimColor("#BEA873") Y53_SANDSTONE = ManimColor("#D5BF8E") Y54_OATMEAL = ManimColor("#CAAE82") Y55_DEEP_STONE = ManimColor("#BC9969") Y56_MERINO = ManimColor("#C9B79E") Y61_BLACK_OLIVE = ManimColor("#47473B") Y62_SUGAR_CANE = ManimColor("#BCA55C") Y63_KHAKI = ManimColor("#826843") Y65_MUSHROOM = ManimColor("#A39281") Y66_MUDSTONE = ManimColor("#574E45") ================================================ FILE: manim/utils/color/BS381.py ================================================ """British Color Standard This module contains colors defined in one of the British Standards for colors, BS381C. This standard specifies colors used in identification, coding, and other special purposes. See https://www.britishstandardcolour.com/ for more information. To use the colors from this list, access them directly from the module (which is exposed to Manim's global name space): .. code:: pycon >>> from manim import BS381 >>> BS381.OXFORD_BLUE ManimColor('#1F3057') List of Color Constants ----------------------- These hex values (taken from https://www.w3schools.com/colors/colors_british.asp) are non official approximate values intended to simulate the ones defined in the standard: .. automanimcolormodule:: manim.utils.color.BS381 """ from __future__ import annotations from .core import ManimColor BS381_101 = ManimColor("#94BFAC") SKY_BLUE = ManimColor("#94BFAC") BS381_102 = ManimColor("#5B9291") TURQUOISE_BLUE = ManimColor("#5B9291") BS381_103 = ManimColor("#3B6879") PEACOCK_BLUE = ManimColor("#3B6879") BS381_104 = ManimColor("#264D7E") AZURE_BLUE = ManimColor("#264D7E") BS381_105 = ManimColor("#1F3057") OXFORD_BLUE = ManimColor("#1F3057") BS381_106 = ManimColor("#2A283D") ROYAL_BLUE = ManimColor("#2A283D") BS381_107 = ManimColor("#3A73A9") STRONG_BLUE = ManimColor("#3A73A9") BS381_108 = ManimColor("#173679") AIRCRAFT_BLUE = ManimColor("#173679") BS381_109 = ManimColor("#1C5680") MIDDLE_BLUE = ManimColor("#1C5680") BS381_110 = ManimColor("#2C3E75") ROUNDEL_BLUE = ManimColor("#2C3E75") BS381_111 = ManimColor("#8CC5BB") PALE_BLUE = ManimColor("#8CC5BB") BS381_112 = ManimColor("#78ADC2") ARCTIC_BLUE = ManimColor("#78ADC2") FIESTA_BLUE = ManimColor("#78ADC2") BS381_113 = ManimColor("#3F687D") DEEP_SAXE_BLUE = ManimColor("#3F687D") BS381_114 = ManimColor("#1F4B61") RAIL_BLUE = ManimColor("#1F4B61") BS381_115 = ManimColor("#5F88C1") COBALT_BLUE = ManimColor("#5F88C1") BS381_166 = ManimColor("#2458AF") FRENCH_BLUE = ManimColor("#2458AF") BS381_169 = ManimColor("#135B75") TRAFFIC_BLUE = ManimColor("#135B75") BS381_172 = ManimColor("#A7C6EB") PALE_ROUNDEL_BLUE = ManimColor("#A7C6EB") BS381_174 = ManimColor("#64A0AA") ORIENT_BLUE = ManimColor("#64A0AA") BS381_175 = ManimColor("#4F81C5") LIGHT_FRENCH_BLUE = ManimColor("#4F81C5") BS381_210 = ManimColor("#BBC9A5") SKY = ManimColor("#BBC9A5") BS381_216 = ManimColor("#BCD890") EAU_DE_NIL = ManimColor("#BCD890") BS381_217 = ManimColor("#96BF65") SEA_GREEN = ManimColor("#96BF65") BS381_218 = ManimColor("#698B47") GRASS_GREEN = ManimColor("#698B47") BS381_219 = ManimColor("#757639") SAGE_GREEN = ManimColor("#757639") BS381_220 = ManimColor("#4B5729") OLIVE_GREEN = ManimColor("#4B5729") BS381_221 = ManimColor("#507D3A") BRILLIANT_GREEN = ManimColor("#507D3A") BS381_222 = ManimColor("#6A7031") LIGHT_BRONZE_GREEN = ManimColor("#6A7031") BS381_223 = ManimColor("#49523A") MIDDLE_BRONZE_GREEN = ManimColor("#49523A") BS381_224 = ManimColor("#3E4630") DEEP_BRONZE_GREEN = ManimColor("#3E4630") BS381_225 = ManimColor("#406A28") LIGHT_BRUNSWICK_GREEN = ManimColor("#406A28") BS381_226 = ManimColor("#33533B") MID_BRUNSWICK_GREEN = ManimColor("#33533B") BS381_227 = ManimColor("#254432") DEEP_BRUNSWICK_GREEN = ManimColor("#254432") BS381_228 = ManimColor("#428B64") EMERALD_GREEN = ManimColor("#428B64") BS381_241 = ManimColor("#4F5241") DARK_GREEN = ManimColor("#4F5241") BS381_262 = ManimColor("#44945E") BOLD_GREEN = ManimColor("#44945E") BS381_267 = ManimColor("#476A4C") DEEP_CHROME_GREEN = ManimColor("#476A4C") TRAFFIC_GREEN = ManimColor("#476A4C") BS381_275 = ManimColor("#8FC693") OPALINE_GREEN = ManimColor("#8FC693") BS381_276 = ManimColor("#2E4C1E") LINCON_GREEN = ManimColor("#2E4C1E") BS381_277 = ManimColor("#364A20") CYPRESS_GREEN = ManimColor("#364A20") BS381_278 = ManimColor("#87965A") LIGHT_OLIVE_GREEN = ManimColor("#87965A") BS381_279 = ManimColor("#3B3629") STEEL_FURNITURE_GREEN = ManimColor("#3B3629") BS381_280 = ManimColor("#68AB77") VERDIGRIS_GREEN = ManimColor("#68AB77") BS381_282 = ManimColor("#506B52") FOREST_GREEN = ManimColor("#506B52") BS381_283 = ManimColor("#7E8F6E") AIRCRAFT_GREY_GREEN = ManimColor("#7E8F6E") BS381_284 = ManimColor("#6B6F5A") SPRUCE_GREEN = ManimColor("#6B6F5A") BS381_285 = ManimColor("#5F5C4B") NATO_GREEN = ManimColor("#5F5C4B") BS381_298 = ManimColor("#4F5138") OLIVE_DRAB = ManimColor("#4F5138") BS381_309 = ManimColor("#FEEC04") CANARY_YELLOW = ManimColor("#FEEC04") BS381_310 = ManimColor("#FEF963") PRIMROSE = ManimColor("#FEF963") BS381_315 = ManimColor("#FEF96A") GRAPEFRUIT = ManimColor("#FEF96A") BS381_320 = ManimColor("#9E7339") LIGHT_BROWN = ManimColor("#9E7339") BS381_337 = ManimColor("#4C4A3C") VERY_DARK_DRAB = ManimColor("#4C4A3C") BS381_350 = ManimColor("#7B6B4F") DARK_EARTH = ManimColor("#7B6B4F") BS381_352 = ManimColor("#FCED96") PALE_CREAM = ManimColor("#FCED96") BS381_353 = ManimColor("#FDF07A") DEEP_CREAM = ManimColor("#FDF07A") BS381_354 = ManimColor("#E9BB43") PRIMROSE_2 = ManimColor("#E9BB43") BS381_355 = ManimColor("#FDD906") LEMON = ManimColor("#FDD906") BS381_356 = ManimColor("#FCC808") GOLDEN_YELLOW = ManimColor("#FCC808") BS381_358 = ManimColor("#F6C870") LIGHT_BUFF = ManimColor("#F6C870") BS381_359 = ManimColor("#DBAC50") MIDDLE_BUFF = ManimColor("#DBAC50") BS381_361 = ManimColor("#D4B97D") LIGHT_STONE = ManimColor("#D4B97D") BS381_362 = ManimColor("#AC7C42") MIDDLE_STONE = ManimColor("#AC7C42") BS381_363 = ManimColor("#FDE706") BOLD_YELLOW = ManimColor("#FDE706") BS381_364 = ManimColor("#CEC093") PORTLAND_STONE = ManimColor("#CEC093") BS381_365 = ManimColor("#F4F0BD") VELLUM = ManimColor("#F4F0BD") BS381_366 = ManimColor("#F5E7A1") LIGHT_BEIGE = ManimColor("#F5E7A1") BS381_367 = ManimColor("#FEF6BF") MANILLA = ManimColor("#fef6bf") BS381_368 = ManimColor("#DD7B00") TRAFFIC_YELLOW = ManimColor("#DD7B00") BS381_369 = ManimColor("#FEEBA8") BISCUIT = ManimColor("#feeba8") BS381_380 = ManimColor("#BBA38A") CAMOUFLAGE_DESERT_SAND = ManimColor("#BBA38A") BS381_384 = ManimColor("#EEDFA5") LIGHT_STRAW = ManimColor("#EEDFA5") BS381_385 = ManimColor("#E8C88F") LIGHT_BISCUIT = ManimColor("#E8C88F") BS381_386 = ManimColor("#E6C18D") CHAMPAGNE = ManimColor("#e6c18d") BS381_387 = ManimColor("#CFB48A") SUNRISE = ManimColor("#cfb48a") SUNSHINE = ManimColor("#cfb48a") BS381_388 = ManimColor("#E4CF93") BEIGE = ManimColor("#e4cf93") BS381_389 = ManimColor("#B2A788") CAMOUFLAGE_BEIGE = ManimColor("#B2A788") BS381_397 = ManimColor("#F3D163") JASMINE_YELLOW = ManimColor("#F3D163") BS381_411 = ManimColor("#74542F") MIDDLE_BROWN = ManimColor("#74542F") BS381_412 = ManimColor("#5C422E") DARK_BROWN = ManimColor("#5C422E") BS381_413 = ManimColor("#402D21") NUT_BROWN = ManimColor("#402D21") BS381_414 = ManimColor("#A86C29") GOLDEN_BROWN = ManimColor("#A86C29") BS381_415 = ManimColor("#61361E") IMPERIAL_BROWN = ManimColor("#61361E") BS381_420 = ManimColor("#A89177") DARK_CAMOUFLAGE_DESERT_SAND = ManimColor("#A89177") BS381_435 = ManimColor("#845B4D") CAMOUFLAGE_RED = ManimColor("#845B4D") BS381_436 = ManimColor("#564B47") DARK_CAMOUFLAGE_BROWN = ManimColor("#564B47") BS381_439 = ManimColor("#753B1E") ORANGE_BROWN = ManimColor("#753B1E") BS381_443 = ManimColor("#C98A71") SALMON = ManimColor("#c98a71") BS381_444 = ManimColor("#A65341") TERRACOTTA = ManimColor("#a65341") BS381_445 = ManimColor("#83422B") VENETIAN_RED = ManimColor("#83422B") BS381_446 = ManimColor("#774430") RED_OXIDE = ManimColor("#774430") BS381_447 = ManimColor("#F3B28B") SALMON_PINK = ManimColor("#F3B28B") BS381_448 = ManimColor("#67403A") DEEP_INDIAN_RED = ManimColor("#67403A") BS381_449 = ManimColor("#693B3F") LIGHT_PURPLE_BROWN = ManimColor("#693B3F") BS381_452 = ManimColor("#613339") DARK_CRIMSON = ManimColor("#613339") BS381_453 = ManimColor("#FBDED6") SHELL_PINK = ManimColor("#FBDED6") BS381_454 = ManimColor("#E8A1A2") PALE_ROUNDEL_RED = ManimColor("#E8A1A2") BS381_460 = ManimColor("#BD8F56") DEEP_BUFF = ManimColor("#BD8F56") BS381_473 = ManimColor("#793932") GULF_RED = ManimColor("#793932") BS381_489 = ManimColor("#8D5B41") LEAF_BROWN = ManimColor("#8D5B41") BS381_490 = ManimColor("#573320") BEECH_BROWN = ManimColor("#573320") BS381_499 = ManimColor("#59493E") SERVICE_BROWN = ManimColor("#59493E") BS381_536 = ManimColor("#BB3016") POPPY = ManimColor("#bb3016") BS381_537 = ManimColor("#DD3420") SIGNAL_RED = ManimColor("#DD3420") BS381_538 = ManimColor("#C41C22") POST_OFFICE_RED = ManimColor("#C41C22") CHERRY = ManimColor("#c41c22") BS381_539 = ManimColor("#D21E2B") CURRANT_RED = ManimColor("#D21E2B") BS381_540 = ManimColor("#8B1A32") CRIMSON = ManimColor("#8b1a32") BS381_541 = ManimColor("#471B21") MAROON = ManimColor("#471b21") BS381_542 = ManimColor("#982D57") RUBY = ManimColor("#982d57") BS381_557 = ManimColor("#EF841E") LIGHT_ORANGE = ManimColor("#EF841E") BS381_564 = ManimColor("#DD3524") BOLD_RED = ManimColor("#DD3524") BS381_568 = ManimColor("#FB9C06") APRICOT = ManimColor("#fb9c06") BS381_570 = ManimColor("#A83C19") TRAFFIC_RED = ManimColor("#A83C19") BS381_591 = ManimColor("#D04E09") DEEP_ORANGE = ManimColor("#D04E09") BS381_592 = ManimColor("#E45523") INTERNATIONAL_ORANGE = ManimColor("#E45523") BS381_593 = ManimColor("#F24816") RAIL_RED = ManimColor("#F24816") AZO_ORANGE = ManimColor("#F24816") BS381_626 = ManimColor("#A0A9AA") CAMOUFLAGE_GREY = ManimColor("#A0A9AA") BS381_627 = ManimColor("#BEC0B8") LIGHT_AIRCRAFT_GREY = ManimColor("#BEC0B8") BS381_628 = ManimColor("#9D9D7E") SILVER_GREY = ManimColor("#9D9D7E") BS381_629 = ManimColor("#7A838B") DARK_CAMOUFLAGE_GREY = ManimColor("#7A838B") BS381_630 = ManimColor("#A5AD98") FRENCH_GREY = ManimColor("#A5AD98") BS381_631 = ManimColor("#9AAA9F") LIGHT_GREY = ManimColor("#9AAA9F") BS381_632 = ManimColor("#6B7477") DARK_ADMIRALTY_GREY = ManimColor("#6B7477") BS381_633 = ManimColor("#424C53") RAF_BLUE_GREY = ManimColor("#424C53") BS381_634 = ManimColor("#6F7264") SLATE = ManimColor("#6f7264") BS381_635 = ManimColor("#525B55") LEAD = ManimColor("#525b55") BS381_636 = ManimColor("#5F7682") PRU_BLUE = ManimColor("#5F7682") BS381_637 = ManimColor("#8E9B9C") MEDIUM_SEA_GREY = ManimColor("#8E9B9C") BS381_638 = ManimColor("#6C7377") DARK_SEA_GREY = ManimColor("#6C7377") BS381_639 = ManimColor("#667563") LIGHT_SLATE_GREY = ManimColor("#667563") BS381_640 = ManimColor("#566164") EXTRA_DARK_SEA_GREY = ManimColor("#566164") BS381_642 = ManimColor("#282B2F") NIGHT = ManimColor("#282b2f") BS381_671 = ManimColor("#4E5355") MIDDLE_GRAPHITE = ManimColor("#4E5355") BS381_676 = ManimColor("#A9B7B9") LIGHT_WEATHERWORK_GREY = ManimColor("#A9B7B9") BS381_677 = ManimColor("#676F76") DARK_WEATHERWORK_GREY = ManimColor("#676F76") BS381_692 = ManimColor("#7B93A3") SMOKE_GREY = ManimColor("#7B93A3") BS381_693 = ManimColor("#88918D") AIRCRAFT_GREY = ManimColor("#88918D") BS381_694 = ManimColor("#909A92") DOVE_GREY = ManimColor("#909A92") BS381_697 = ManimColor("#B6D3CC") LIGHT_ADMIRALTY_GREY = ManimColor("#B6D3CC") BS381_796 = ManimColor("#6E4A75") DARK_VIOLET = ManimColor("#6E4A75") BS381_797 = ManimColor("#C9A8CE") LIGHT_VIOLET = ManimColor("#C9A8CE") ================================================ FILE: manim/utils/color/DVIPSNAMES.py ================================================ r"""dvips Colors This module contains the colors defined in the dvips driver, which are commonly accessed as named colors in LaTeX via the ``\usepackage[dvipsnames]{xcolor}`` package. To use the colors from this list, access them directly from the module (which is exposed to Manim's global name space): .. code:: pycon >>> from manim import DVIPSNAMES >>> DVIPSNAMES.DARKORCHID ManimColor('#A4538A') List of Color Constants ----------------------- These hex values are derived from those specified in the ``xcolor`` package documentation (see https://ctan.org/pkg/xcolor): .. automanimcolormodule:: manim.utils.color.DVIPSNAMES """ from __future__ import annotations from .core import ManimColor AQUAMARINE = ManimColor("#00B5BE") BITTERSWEET = ManimColor("#C04F17") APRICOT = ManimColor("#FBB982") BLACK = ManimColor("#221E1F") BLUE = ManimColor("#2D2F92") BLUEGREEN = ManimColor("#00B3B8") BLUEVIOLET = ManimColor("#473992") BRICKRED = ManimColor("#B6321C") BROWN = ManimColor("#792500") BURNTORANGE = ManimColor("#F7921D") CADETBLUE = ManimColor("#74729A") CARNATIONPINK = ManimColor("#F282B4") CERULEAN = ManimColor("#00A2E3") CORNFLOWERBLUE = ManimColor("#41B0E4") CYAN = ManimColor("#00AEEF") DANDELION = ManimColor("#FDBC42") DARKORCHID = ManimColor("#A4538A") EMERALD = ManimColor("#00A99D") FORESTGREEN = ManimColor("#009B55") FUCHSIA = ManimColor("#8C368C") GOLDENROD = ManimColor("#FFDF42") GRAY = ManimColor("#949698") GREEN = ManimColor("#00A64F") GREENYELLOW = ManimColor("#DFE674") JUNGLEGREEN = ManimColor("#00A99A") LAVENDER = ManimColor("#F49EC4") LIMEGREEN = ManimColor("#8DC73E") MAGENTA = ManimColor("#EC008C") MAHOGANY = ManimColor("#A9341F") MAROON = ManimColor("#AF3235") MELON = ManimColor("#F89E7B") MIDNIGHTBLUE = ManimColor("#006795") MULBERRY = ManimColor("#A93C93") NAVYBLUE = ManimColor("#006EB8") OLIVEGREEN = ManimColor("#3C8031") ORANGE = ManimColor("#F58137") ORANGERED = ManimColor("#ED135A") ORCHID = ManimColor("#AF72B0") PEACH = ManimColor("#F7965A") PERIWINKLE = ManimColor("#7977B8") PINEGREEN = ManimColor("#008B72") PLUM = ManimColor("#92268F") PROCESSBLUE = ManimColor("#00B0F0") PURPLE = ManimColor("#99479B") RAWSIENNA = ManimColor("#974006") RED = ManimColor("#ED1B23") REDORANGE = ManimColor("#F26035") REDVIOLET = ManimColor("#A1246B") RHODAMINE = ManimColor("#EF559F") ROYALBLUE = ManimColor("#0071BC") ROYALPURPLE = ManimColor("#613F99") RUBINERED = ManimColor("#ED017D") SALMON = ManimColor("#F69289") SEAGREEN = ManimColor("#3FBC9D") SEPIA = ManimColor("#671800") SKYBLUE = ManimColor("#46C5DD") SPRINGGREEN = ManimColor("#C6DC67") TAN = ManimColor("#DA9D76") TEALBLUE = ManimColor("#00AEB3") THISTLE = ManimColor("#D883B7") TURQUOISE = ManimColor("#00B4CE") VIOLET = ManimColor("#58429B") VIOLETRED = ManimColor("#EF58A0") WHITE = ManimColor("#FFFFFF") WILDSTRAWBERRY = ManimColor("#EE2967") YELLOW = ManimColor("#FFF200") YELLOWGREEN = ManimColor("#98CC70") YELLOWORANGE = ManimColor("#FAA21A") ================================================ FILE: manim/utils/color/manim_colors.py ================================================ """Colors included in the global name space. These colors form Manim's default color space. .. manim:: ColorsOverview :save_last_frame: :hide_source: import manim.utils.color.manim_colors as Colors class ColorsOverview(Scene): def construct(self): def color_group(color): group = VGroup( *[ Line(ORIGIN, RIGHT * 1.5, stroke_width=35, color=getattr(Colors, name.upper())) for name in subnames(color) ] ).arrange_submobjects(buff=0.4, direction=DOWN) name = Text(color).scale(0.6).next_to(group, UP, buff=0.3) if any(decender in color for decender in "gjpqy"): name.shift(DOWN * 0.08) group.add(name) return group def subnames(name): return [name + "_" + char for char in "abcde"] color_groups = VGroup( *[ color_group(color) for color in [ "blue", "teal", "green", "yellow", "gold", "red", "maroon", "purple", ] ] ).arrange_submobjects(buff=0.2, aligned_edge=DOWN) for line, char in zip(color_groups[0], "abcde"): color_groups.add(Text(char).scale(0.6).next_to(line, LEFT, buff=0.2)) def named_lines_group(length, color_names, labels, align_to_block): colors = [getattr(Colors, color.upper()) for color in color_names] lines = VGroup( *[ Line( ORIGIN, RIGHT * length, stroke_width=55, color=color, ) for color in colors ] ).arrange_submobjects(buff=0.6, direction=DOWN) for line, name, color in zip(lines, labels, colors): line.add(Text(name, color=color.contrasting()).scale(0.6).move_to(line)) lines.next_to(color_groups, DOWN, buff=0.5).align_to( color_groups[align_to_block], LEFT ) return lines other_colors = ( "pink", "light_pink", "orange", "light_brown", "dark_brown", "gray_brown", ) other_lines = named_lines_group( 3.2, other_colors, other_colors, 0, ) gray_lines = named_lines_group( 6.6, ["white"] + subnames("gray") + ["black"], [ "white", "lighter_gray / gray_a", "light_gray / gray_b", "gray / gray_c", "dark_gray / gray_d", "darker_gray / gray_e", "black", ], 2, ) pure_colors = ( "pure_red", "pure_green", "pure_blue", ) pure_lines = named_lines_group( 3.2, pure_colors, pure_colors, 6, ) self.add(color_groups, other_lines, gray_lines, pure_lines) VGroup(*self.mobjects).move_to(ORIGIN) .. automanimcolormodule:: manim.utils.color.manim_colors """ from __future__ import annotations from .core import ManimColor WHITE = ManimColor("#FFFFFF") GRAY_A = ManimColor("#DDDDDD") GREY_A = ManimColor("#DDDDDD") GRAY_B = ManimColor("#BBBBBB") GREY_B = ManimColor("#BBBBBB") GRAY_C = ManimColor("#888888") GREY_C = ManimColor("#888888") GRAY_D = ManimColor("#444444") GREY_D = ManimColor("#444444") GRAY_E = ManimColor("#222222") GREY_E = ManimColor("#222222") BLACK = ManimColor("#000000") LIGHTER_GRAY = ManimColor("#DDDDDD") LIGHTER_GREY = ManimColor("#DDDDDD") LIGHT_GRAY = ManimColor("#BBBBBB") LIGHT_GREY = ManimColor("#BBBBBB") GRAY = ManimColor("#888888") GREY = ManimColor("#888888") DARK_GRAY = ManimColor("#444444") DARK_GREY = ManimColor("#444444") DARKER_GRAY = ManimColor("#222222") DARKER_GREY = ManimColor("#222222") BLUE_A = ManimColor("#C7E9F1") BLUE_B = ManimColor("#9CDCEB") BLUE_C = ManimColor("#58C4DD") BLUE_D = ManimColor("#29ABCA") BLUE_E = ManimColor("#236B8E") PURE_BLUE = ManimColor("#0000FF") BLUE = ManimColor("#58C4DD") DARK_BLUE = ManimColor("#236B8E") TEAL_A = ManimColor("#ACEAD7") TEAL_B = ManimColor("#76DDC0") TEAL_C = ManimColor("#5CD0B3") TEAL_D = ManimColor("#55C1A7") TEAL_E = ManimColor("#49A88F") TEAL = ManimColor("#5CD0B3") GREEN_A = ManimColor("#C9E2AE") GREEN_B = ManimColor("#A6CF8C") GREEN_C = ManimColor("#83C167") GREEN_D = ManimColor("#77B05D") GREEN_E = ManimColor("#699C52") PURE_GREEN = ManimColor("#00FF00") GREEN = ManimColor("#83C167") YELLOW_A = ManimColor("#FFF1B6") YELLOW_B = ManimColor("#FFEA94") YELLOW_C = ManimColor("#FFFF00") YELLOW_D = ManimColor("#F4D345") YELLOW_E = ManimColor("#E8C11C") YELLOW = ManimColor("#FFFF00") GOLD_A = ManimColor("#F7C797") GOLD_B = ManimColor("#F9B775") GOLD_C = ManimColor("#F0AC5F") GOLD_D = ManimColor("#E1A158") GOLD_E = ManimColor("#C78D46") GOLD = ManimColor("#F0AC5F") RED_A = ManimColor("#F7A1A3") RED_B = ManimColor("#FF8080") RED_C = ManimColor("#FC6255") RED_D = ManimColor("#E65A4C") RED_E = ManimColor("#CF5044") PURE_RED = ManimColor("#FF0000") RED = ManimColor("#FC6255") MAROON_A = ManimColor("#ECABC1") MAROON_B = ManimColor("#EC92AB") MAROON_C = ManimColor("#C55F73") MAROON_D = ManimColor("#A24D61") MAROON_E = ManimColor("#94424F") MAROON = ManimColor("#C55F73") PURPLE_A = ManimColor("#CAA3E8") PURPLE_B = ManimColor("#B189C6") PURPLE_C = ManimColor("#9A72AC") PURPLE_D = ManimColor("#715582") PURPLE_E = ManimColor("#644172") PURPLE = ManimColor("#9A72AC") PINK = ManimColor("#D147BD") LIGHT_PINK = ManimColor("#DC75CD") ORANGE = ManimColor("#FF862F") LIGHT_BROWN = ManimColor("#CD853F") DARK_BROWN = ManimColor("#8B4513") GRAY_BROWN = ManimColor("#736357") GREY_BROWN = ManimColor("#736357") # Colors used for Manim Community's logo and banner LOGO_WHITE = ManimColor("#ECE7E2") LOGO_GREEN = ManimColor("#87C2A5") LOGO_BLUE = ManimColor("#525893") LOGO_RED = ManimColor("#E07A5F") LOGO_BLACK = ManimColor("#343434") _all_manim_colors: list[ManimColor] = [ x for x in globals().values() if isinstance(x, ManimColor) ] ================================================ FILE: manim/utils/color/SVGNAMES.py ================================================ r"""SVG 1.1 Colors This module contains the colors defined in the SVG 1.1 specification, which are commonly accessed as named colors in LaTeX via the ``\usepackage[svgnames]{xcolor}`` package. To use the colors from this list, access them directly from the module (which is exposed to Manim's global name space): .. code:: pycon >>> from manim import SVGNAMES >>> SVGNAMES.LIGHTCORAL ManimColor('#EF7F7F') List of Color Constants ----------------------- These hex values are derived from those specified in the ``xcolor`` package documentation (see https://ctan.org/pkg/xcolor): .. automanimcolormodule:: manim.utils.color.SVGNAMES """ from __future__ import annotations from .core import ManimColor ALICEBLUE = ManimColor("#EFF7FF") ANTIQUEWHITE = ManimColor("#F9EAD7") AQUA = ManimColor("#00FFFF") AQUAMARINE = ManimColor("#7EFFD3") AZURE = ManimColor("#EFFFFF") BEIGE = ManimColor("#F4F4DC") BISQUE = ManimColor("#FFE3C4") BLACK = ManimColor("#000000") BLANCHEDALMOND = ManimColor("#FFEACD") BLUE = ManimColor("#0000FF") BLUEVIOLET = ManimColor("#892BE2") BROWN = ManimColor("#A52A2A") BURLYWOOD = ManimColor("#DDB787") CADETBLUE = ManimColor("#5E9EA0") CHARTREUSE = ManimColor("#7EFF00") CHOCOLATE = ManimColor("#D2681D") CORAL = ManimColor("#FF7E4F") CORNFLOWERBLUE = ManimColor("#6395ED") CORNSILK = ManimColor("#FFF7DC") CRIMSON = ManimColor("#DC143B") CYAN = ManimColor("#00FFFF") DARKBLUE = ManimColor("#00008A") DARKCYAN = ManimColor("#008A8A") DARKGOLDENROD = ManimColor("#B7850B") DARKGRAY = ManimColor("#A9A9A9") DARKGREEN = ManimColor("#006300") DARKGREY = ManimColor("#A9A9A9") DARKKHAKI = ManimColor("#BCB66B") DARKMAGENTA = ManimColor("#8A008A") DARKOLIVEGREEN = ManimColor("#546B2F") DARKORANGE = ManimColor("#FF8C00") DARKORCHID = ManimColor("#9931CC") DARKRED = ManimColor("#8A0000") DARKSALMON = ManimColor("#E8967A") DARKSEAGREEN = ManimColor("#8EBB8E") DARKSLATEBLUE = ManimColor("#483D8A") DARKSLATEGRAY = ManimColor("#2F4F4F") DARKSLATEGREY = ManimColor("#2F4F4F") DARKTURQUOISE = ManimColor("#00CED1") DARKVIOLET = ManimColor("#9300D3") DEEPPINK = ManimColor("#FF1492") DEEPSKYBLUE = ManimColor("#00BFFF") DIMGRAY = ManimColor("#686868") DIMGREY = ManimColor("#686868") DODGERBLUE = ManimColor("#1D90FF") FIREBRICK = ManimColor("#B12121") FLORALWHITE = ManimColor("#FFF9EF") FORESTGREEN = ManimColor("#218A21") FUCHSIA = ManimColor("#FF00FF") GAINSBORO = ManimColor("#DCDCDC") GHOSTWHITE = ManimColor("#F7F7FF") GOLD = ManimColor("#FFD700") GOLDENROD = ManimColor("#DAA51F") GRAY = ManimColor("#7F7F7F") GREEN = ManimColor("#007F00") GREENYELLOW = ManimColor("#ADFF2F") GREY = ManimColor("#7F7F7F") HONEYDEW = ManimColor("#EFFFEF") HOTPINK = ManimColor("#FF68B3") INDIANRED = ManimColor("#CD5B5B") INDIGO = ManimColor("#4A0082") IVORY = ManimColor("#FFFFEF") KHAKI = ManimColor("#EFE58C") LAVENDER = ManimColor("#E5E5F9") LAVENDERBLUSH = ManimColor("#FFEFF4") LAWNGREEN = ManimColor("#7CFC00") LEMONCHIFFON = ManimColor("#FFF9CD") LIGHTBLUE = ManimColor("#ADD8E5") LIGHTCORAL = ManimColor("#EF7F7F") LIGHTCYAN = ManimColor("#E0FFFF") LIGHTGOLDENROD = ManimColor("#EDDD82") LIGHTGOLDENRODYELLOW = ManimColor("#F9F9D2") LIGHTGRAY = ManimColor("#D3D3D3") LIGHTGREEN = ManimColor("#90ED90") LIGHTGREY = ManimColor("#D3D3D3") LIGHTPINK = ManimColor("#FFB5C0") LIGHTSALMON = ManimColor("#FFA07A") LIGHTSEAGREEN = ManimColor("#1FB1AA") LIGHTSKYBLUE = ManimColor("#87CEF9") LIGHTSLATEBLUE = ManimColor("#8470FF") LIGHTSLATEGRAY = ManimColor("#778799") LIGHTSLATEGREY = ManimColor("#778799") LIGHTSTEELBLUE = ManimColor("#AFC4DD") LIGHTYELLOW = ManimColor("#FFFFE0") LIME = ManimColor("#00FF00") LIMEGREEN = ManimColor("#31CD31") LINEN = ManimColor("#F9EFE5") MAGENTA = ManimColor("#FF00FF") MAROON = ManimColor("#7F0000") MEDIUMAQUAMARINE = ManimColor("#66CDAA") MEDIUMBLUE = ManimColor("#0000CD") MEDIUMORCHID = ManimColor("#BA54D3") MEDIUMPURPLE = ManimColor("#9270DB") MEDIUMSEAGREEN = ManimColor("#3BB271") MEDIUMSLATEBLUE = ManimColor("#7B68ED") MEDIUMSPRINGGREEN = ManimColor("#00F99A") MEDIUMTURQUOISE = ManimColor("#48D1CC") MEDIUMVIOLETRED = ManimColor("#C61584") MIDNIGHTBLUE = ManimColor("#181870") MINTCREAM = ManimColor("#F4FFF9") MISTYROSE = ManimColor("#FFE3E1") MOCCASIN = ManimColor("#FFE3B5") NAVAJOWHITE = ManimColor("#FFDDAD") NAVY = ManimColor("#00007F") NAVYBLUE = ManimColor("#00007F") OLDLACE = ManimColor("#FCF4E5") OLIVE = ManimColor("#7F7F00") OLIVEDRAB = ManimColor("#6B8D22") ORANGE = ManimColor("#FFA500") ORANGERED = ManimColor("#FF4400") ORCHID = ManimColor("#DA70D6") PALEGOLDENROD = ManimColor("#EDE8AA") PALEGREEN = ManimColor("#97FB97") PALETURQUOISE = ManimColor("#AFEDED") PALEVIOLETRED = ManimColor("#DB7092") PAPAYAWHIP = ManimColor("#FFEED4") PEACHPUFF = ManimColor("#FFDAB8") PERU = ManimColor("#CD843F") PINK = ManimColor("#FFBFCA") PLUM = ManimColor("#DDA0DD") POWDERBLUE = ManimColor("#AFE0E5") PURPLE = ManimColor("#7F007F") RED = ManimColor("#FF0000") ROSYBROWN = ManimColor("#BB8E8E") ROYALBLUE = ManimColor("#4168E1") SADDLEBROWN = ManimColor("#8A4413") SALMON = ManimColor("#F97F72") SANDYBROWN = ManimColor("#F3A45F") SEAGREEN = ManimColor("#2D8A56") SEASHELL = ManimColor("#FFF4ED") SIENNA = ManimColor("#A0512C") SILVER = ManimColor("#BFBFBF") SKYBLUE = ManimColor("#87CEEA") SLATEBLUE = ManimColor("#6959CD") SLATEGRAY = ManimColor("#707F90") SLATEGREY = ManimColor("#707F90") SNOW = ManimColor("#FFF9F9") SPRINGGREEN = ManimColor("#00FF7E") STEELBLUE = ManimColor("#4682B3") TAN = ManimColor("#D2B38C") TEAL = ManimColor("#007F7F") THISTLE = ManimColor("#D8BFD8") TOMATO = ManimColor("#FF6347") TURQUOISE = ManimColor("#3FE0CF") VIOLET = ManimColor("#ED82ED") VIOLETRED = ManimColor("#D01F90") WHEAT = ManimColor("#F4DDB2") WHITE = ManimColor("#FFFFFF") WHITESMOKE = ManimColor("#F4F4F4") YELLOW = ManimColor("#FFFF00") YELLOWGREEN = ManimColor("#9ACD30") ================================================ FILE: manim/utils/color/X11.py ================================================ # from https://www.w3schools.com/colors/colors_x11.asp """X11 Colors These color and their names (taken from https://www.w3schools.com/colors/colors_x11.asp) were developed at the Massachusetts Intitute of Technology (MIT) during the development of color based computer display system. To use the colors from this list, access them directly from the module (which is exposed to Manim's global name space): .. code:: pycon >>> from manim import X11 >>> X11.BEIGE ManimColor('#F5F5DC') List of Color Constants ----------------------- .. automanimcolormodule:: manim.utils.color.X11 """ from __future__ import annotations from .core import ManimColor ALICEBLUE = ManimColor("#F0F8FF") ANTIQUEWHITE = ManimColor("#FAEBD7") ANTIQUEWHITE1 = ManimColor("#FFEFDB") ANTIQUEWHITE2 = ManimColor("#EEDFCC") ANTIQUEWHITE3 = ManimColor("#CDC0B0") ANTIQUEWHITE4 = ManimColor("#8B8378") AQUAMARINE1 = ManimColor("#7FFFD4") AQUAMARINE2 = ManimColor("#76EEC6") AQUAMARINE4 = ManimColor("#458B74") AZURE1 = ManimColor("#F0FFFF") AZURE2 = ManimColor("#E0EEEE") AZURE3 = ManimColor("#C1CDCD") AZURE4 = ManimColor("#838B8B") BEIGE = ManimColor("#F5F5DC") BISQUE1 = ManimColor("#FFE4C4") BISQUE2 = ManimColor("#EED5B7") BISQUE3 = ManimColor("#CDB79E") BISQUE4 = ManimColor("#8B7D6B") BLACK = ManimColor("#000000") BLANCHEDALMOND = ManimColor("#FFEBCD") BLUE1 = ManimColor("#0000FF") BLUE2 = ManimColor("#0000EE") BLUE4 = ManimColor("#00008B") BLUEVIOLET = ManimColor("#8A2BE2") BROWN = ManimColor("#A52A2A") BROWN1 = ManimColor("#FF4040") BROWN2 = ManimColor("#EE3B3B") BROWN3 = ManimColor("#CD3333") BROWN4 = ManimColor("#8B2323") BURLYWOOD = ManimColor("#DEB887") BURLYWOOD1 = ManimColor("#FFD39B") BURLYWOOD2 = ManimColor("#EEC591") BURLYWOOD3 = ManimColor("#CDAA7D") BURLYWOOD4 = ManimColor("#8B7355") CADETBLUE = ManimColor("#5F9EA0") CADETBLUE1 = ManimColor("#98F5FF") CADETBLUE2 = ManimColor("#8EE5EE") CADETBLUE3 = ManimColor("#7AC5CD") CADETBLUE4 = ManimColor("#53868B") CHARTREUSE1 = ManimColor("#7FFF00") CHARTREUSE2 = ManimColor("#76EE00") CHARTREUSE3 = ManimColor("#66CD00") CHARTREUSE4 = ManimColor("#458B00") CHOCOLATE = ManimColor("#D2691E") CHOCOLATE1 = ManimColor("#FF7F24") CHOCOLATE2 = ManimColor("#EE7621") CHOCOLATE3 = ManimColor("#CD661D") CORAL = ManimColor("#FF7F50") CORAL1 = ManimColor("#FF7256") CORAL2 = ManimColor("#EE6A50") CORAL3 = ManimColor("#CD5B45") CORAL4 = ManimColor("#8B3E2F") CORNFLOWERBLUE = ManimColor("#6495ED") CORNSILK1 = ManimColor("#FFF8DC") CORNSILK2 = ManimColor("#EEE8CD") CORNSILK3 = ManimColor("#CDC8B1") CORNSILK4 = ManimColor("#8B8878") CYAN1 = ManimColor("#00FFFF") CYAN2 = ManimColor("#00EEEE") CYAN3 = ManimColor("#00CDCD") CYAN4 = ManimColor("#008B8B") DARKGOLDENROD = ManimColor("#B8860B") DARKGOLDENROD1 = ManimColor("#FFB90F") DARKGOLDENROD2 = ManimColor("#EEAD0E") DARKGOLDENROD3 = ManimColor("#CD950C") DARKGOLDENROD4 = ManimColor("#8B6508") DARKGREEN = ManimColor("#006400") DARKKHAKI = ManimColor("#BDB76B") DARKOLIVEGREEN = ManimColor("#556B2F") DARKOLIVEGREEN1 = ManimColor("#CAFF70") DARKOLIVEGREEN2 = ManimColor("#BCEE68") DARKOLIVEGREEN3 = ManimColor("#A2CD5A") DARKOLIVEGREEN4 = ManimColor("#6E8B3D") DARKORANGE = ManimColor("#FF8C00") DARKORANGE1 = ManimColor("#FF7F00") DARKORANGE2 = ManimColor("#EE7600") DARKORANGE3 = ManimColor("#CD6600") DARKORANGE4 = ManimColor("#8B4500") DARKORCHID = ManimColor("#9932CC") DARKORCHID1 = ManimColor("#BF3EFF") DARKORCHID2 = ManimColor("#B23AEE") DARKORCHID3 = ManimColor("#9A32CD") DARKORCHID4 = ManimColor("#68228B") DARKSALMON = ManimColor("#E9967A") DARKSEAGREEN = ManimColor("#8FBC8F") DARKSEAGREEN1 = ManimColor("#C1FFC1") DARKSEAGREEN2 = ManimColor("#B4EEB4") DARKSEAGREEN3 = ManimColor("#9BCD9B") DARKSEAGREEN4 = ManimColor("#698B69") DARKSLATEBLUE = ManimColor("#483D8B") DARKSLATEGRAY = ManimColor("#2F4F4F") DARKSLATEGRAY1 = ManimColor("#97FFFF") DARKSLATEGRAY2 = ManimColor("#8DEEEE") DARKSLATEGRAY3 = ManimColor("#79CDCD") DARKSLATEGRAY4 = ManimColor("#528B8B") DARKTURQUOISE = ManimColor("#00CED1") DARKVIOLET = ManimColor("#9400D3") DEEPPINK1 = ManimColor("#FF1493") DEEPPINK2 = ManimColor("#EE1289") DEEPPINK3 = ManimColor("#CD1076") DEEPPINK4 = ManimColor("#8B0A50") DEEPSKYBLUE1 = ManimColor("#00BFFF") DEEPSKYBLUE2 = ManimColor("#00B2EE") DEEPSKYBLUE3 = ManimColor("#009ACD") DEEPSKYBLUE4 = ManimColor("#00688B") DIMGRAY = ManimColor("#696969") DODGERBLUE1 = ManimColor("#1E90FF") DODGERBLUE2 = ManimColor("#1C86EE") DODGERBLUE3 = ManimColor("#1874CD") DODGERBLUE4 = ManimColor("#104E8B") FIREBRICK = ManimColor("#B22222") FIREBRICK1 = ManimColor("#FF3030") FIREBRICK2 = ManimColor("#EE2C2C") FIREBRICK3 = ManimColor("#CD2626") FIREBRICK4 = ManimColor("#8B1A1A") FLORALWHITE = ManimColor("#FFFAF0") FORESTGREEN = ManimColor("#228B22") GAINSBORO = ManimColor("#DCDCDC") GHOSTWHITE = ManimColor("#F8F8FF") GOLD1 = ManimColor("#FFD700") GOLD2 = ManimColor("#EEC900") GOLD3 = ManimColor("#CDAD00") GOLD4 = ManimColor("#8B7500") GOLDENROD = ManimColor("#DAA520") GOLDENROD1 = ManimColor("#FFC125") GOLDENROD2 = ManimColor("#EEB422") GOLDENROD3 = ManimColor("#CD9B1D") GOLDENROD4 = ManimColor("#8B6914") GRAY = ManimColor("#BEBEBE") GRAY1 = ManimColor("#030303") GRAY2 = ManimColor("#050505") GRAY3 = ManimColor("#080808") GRAY4 = ManimColor("#0A0A0A") GRAY5 = ManimColor("#0D0D0D") GRAY6 = ManimColor("#0F0F0F") GRAY7 = ManimColor("#121212") GRAY8 = ManimColor("#141414") GRAY9 = ManimColor("#171717") GRAY10 = ManimColor("#1A1A1A") GRAY11 = ManimColor("#1C1C1C") GRAY12 = ManimColor("#1F1F1F") GRAY13 = ManimColor("#212121") GRAY14 = ManimColor("#242424") GRAY15 = ManimColor("#262626") GRAY16 = ManimColor("#292929") GRAY17 = ManimColor("#2B2B2B") GRAY18 = ManimColor("#2E2E2E") GRAY19 = ManimColor("#303030") GRAY20 = ManimColor("#333333") GRAY21 = ManimColor("#363636") GRAY22 = ManimColor("#383838") GRAY23 = ManimColor("#3B3B3B") GRAY24 = ManimColor("#3D3D3D") GRAY25 = ManimColor("#404040") GRAY26 = ManimColor("#424242") GRAY27 = ManimColor("#454545") GRAY28 = ManimColor("#474747") GRAY29 = ManimColor("#4A4A4A") GRAY30 = ManimColor("#4D4D4D") GRAY31 = ManimColor("#4F4F4F") GRAY32 = ManimColor("#525252") GRAY33 = ManimColor("#545454") GRAY34 = ManimColor("#575757") GRAY35 = ManimColor("#595959") GRAY36 = ManimColor("#5C5C5C") GRAY37 = ManimColor("#5E5E5E") GRAY38 = ManimColor("#616161") GRAY39 = ManimColor("#636363") GRAY40 = ManimColor("#666666") GRAY41 = ManimColor("#696969") GRAY42 = ManimColor("#6B6B6B") GRAY43 = ManimColor("#6E6E6E") GRAY44 = ManimColor("#707070") GRAY45 = ManimColor("#737373") GRAY46 = ManimColor("#757575") GRAY47 = ManimColor("#787878") GRAY48 = ManimColor("#7A7A7A") GRAY49 = ManimColor("#7D7D7D") GRAY50 = ManimColor("#7F7F7F") GRAY51 = ManimColor("#828282") GRAY52 = ManimColor("#858585") GRAY53 = ManimColor("#878787") GRAY54 = ManimColor("#8A8A8A") GRAY55 = ManimColor("#8C8C8C") GRAY56 = ManimColor("#8F8F8F") GRAY57 = ManimColor("#919191") GRAY58 = ManimColor("#949494") GRAY59 = ManimColor("#969696") GRAY60 = ManimColor("#999999") GRAY61 = ManimColor("#9C9C9C") GRAY62 = ManimColor("#9E9E9E") GRAY63 = ManimColor("#A1A1A1") GRAY64 = ManimColor("#A3A3A3") GRAY65 = ManimColor("#A6A6A6") GRAY66 = ManimColor("#A8A8A8") GRAY67 = ManimColor("#ABABAB") GRAY68 = ManimColor("#ADADAD") GRAY69 = ManimColor("#B0B0B0") GRAY70 = ManimColor("#B3B3B3") GRAY71 = ManimColor("#B5B5B5") GRAY72 = ManimColor("#B8B8B8") GRAY73 = ManimColor("#BABABA") GRAY74 = ManimColor("#BDBDBD") GRAY75 = ManimColor("#BFBFBF") GRAY76 = ManimColor("#C2C2C2") GRAY77 = ManimColor("#C4C4C4") GRAY78 = ManimColor("#C7C7C7") GRAY79 = ManimColor("#C9C9C9") GRAY80 = ManimColor("#CCCCCC") GRAY81 = ManimColor("#CFCFCF") GRAY82 = ManimColor("#D1D1D1") GRAY83 = ManimColor("#D4D4D4") GRAY84 = ManimColor("#D6D6D6") GRAY85 = ManimColor("#D9D9D9") GRAY86 = ManimColor("#DBDBDB") GRAY87 = ManimColor("#DEDEDE") GRAY88 = ManimColor("#E0E0E0") GRAY89 = ManimColor("#E3E3E3") GRAY90 = ManimColor("#E5E5E5") GRAY91 = ManimColor("#E8E8E8") GRAY92 = ManimColor("#EBEBEB") GRAY93 = ManimColor("#EDEDED") GRAY94 = ManimColor("#F0F0F0") GRAY95 = ManimColor("#F2F2F2") GRAY97 = ManimColor("#F7F7F7") GRAY98 = ManimColor("#FAFAFA") GRAY99 = ManimColor("#FCFCFC") GREEN1 = ManimColor("#00FF00") GREEN2 = ManimColor("#00EE00") GREEN3 = ManimColor("#00CD00") GREEN4 = ManimColor("#008B00") GREENYELLOW = ManimColor("#ADFF2F") HONEYDEW1 = ManimColor("#F0FFF0") HONEYDEW2 = ManimColor("#E0EEE0") HONEYDEW3 = ManimColor("#C1CDC1") HONEYDEW4 = ManimColor("#838B83") HOTPINK = ManimColor("#FF69B4") HOTPINK1 = ManimColor("#FF6EB4") HOTPINK2 = ManimColor("#EE6AA7") HOTPINK3 = ManimColor("#CD6090") HOTPINK4 = ManimColor("#8B3A62") INDIANRED = ManimColor("#CD5C5C") INDIANRED1 = ManimColor("#FF6A6A") INDIANRED2 = ManimColor("#EE6363") INDIANRED3 = ManimColor("#CD5555") INDIANRED4 = ManimColor("#8B3A3A") IVORY1 = ManimColor("#FFFFF0") IVORY2 = ManimColor("#EEEEE0") IVORY3 = ManimColor("#CDCDC1") IVORY4 = ManimColor("#8B8B83") KHAKI = ManimColor("#F0E68C") KHAKI1 = ManimColor("#FFF68F") KHAKI2 = ManimColor("#EEE685") KHAKI3 = ManimColor("#CDC673") KHAKI4 = ManimColor("#8B864E") LAVENDER = ManimColor("#E6E6FA") LAVENDERBLUSH1 = ManimColor("#FFF0F5") LAVENDERBLUSH2 = ManimColor("#EEE0E5") LAVENDERBLUSH3 = ManimColor("#CDC1C5") LAVENDERBLUSH4 = ManimColor("#8B8386") LAWNGREEN = ManimColor("#7CFC00") LEMONCHIFFON1 = ManimColor("#FFFACD") LEMONCHIFFON2 = ManimColor("#EEE9BF") LEMONCHIFFON3 = ManimColor("#CDC9A5") LEMONCHIFFON4 = ManimColor("#8B8970") LIGHT = ManimColor("#EEDD82") LIGHTBLUE = ManimColor("#ADD8E6") LIGHTBLUE1 = ManimColor("#BFEFFF") LIGHTBLUE2 = ManimColor("#B2DFEE") LIGHTBLUE3 = ManimColor("#9AC0CD") LIGHTBLUE4 = ManimColor("#68838B") LIGHTCORAL = ManimColor("#F08080") LIGHTCYAN1 = ManimColor("#E0FFFF") LIGHTCYAN2 = ManimColor("#D1EEEE") LIGHTCYAN3 = ManimColor("#B4CDCD") LIGHTCYAN4 = ManimColor("#7A8B8B") LIGHTGOLDENROD1 = ManimColor("#FFEC8B") LIGHTGOLDENROD2 = ManimColor("#EEDC82") LIGHTGOLDENROD3 = ManimColor("#CDBE70") LIGHTGOLDENROD4 = ManimColor("#8B814C") LIGHTGOLDENRODYELLOW = ManimColor("#FAFAD2") LIGHTGRAY = ManimColor("#D3D3D3") LIGHTPINK = ManimColor("#FFB6C1") LIGHTPINK1 = ManimColor("#FFAEB9") LIGHTPINK2 = ManimColor("#EEA2AD") LIGHTPINK3 = ManimColor("#CD8C95") LIGHTPINK4 = ManimColor("#8B5F65") LIGHTSALMON1 = ManimColor("#FFA07A") LIGHTSALMON2 = ManimColor("#EE9572") LIGHTSALMON3 = ManimColor("#CD8162") LIGHTSALMON4 = ManimColor("#8B5742") LIGHTSEAGREEN = ManimColor("#20B2AA") LIGHTSKYBLUE = ManimColor("#87CEFA") LIGHTSKYBLUE1 = ManimColor("#B0E2FF") LIGHTSKYBLUE2 = ManimColor("#A4D3EE") LIGHTSKYBLUE3 = ManimColor("#8DB6CD") LIGHTSKYBLUE4 = ManimColor("#607B8B") LIGHTSLATEBLUE = ManimColor("#8470FF") LIGHTSLATEGRAY = ManimColor("#778899") LIGHTSTEELBLUE = ManimColor("#B0C4DE") LIGHTSTEELBLUE1 = ManimColor("#CAE1FF") LIGHTSTEELBLUE2 = ManimColor("#BCD2EE") LIGHTSTEELBLUE3 = ManimColor("#A2B5CD") LIGHTSTEELBLUE4 = ManimColor("#6E7B8B") LIGHTYELLOW1 = ManimColor("#FFFFE0") LIGHTYELLOW2 = ManimColor("#EEEED1") LIGHTYELLOW3 = ManimColor("#CDCDB4") LIGHTYELLOW4 = ManimColor("#8B8B7A") LIMEGREEN = ManimColor("#32CD32") LINEN = ManimColor("#FAF0E6") MAGENTA = ManimColor("#FF00FF") MAGENTA2 = ManimColor("#EE00EE") MAGENTA3 = ManimColor("#CD00CD") MAGENTA4 = ManimColor("#8B008B") MAROON = ManimColor("#B03060") MAROON1 = ManimColor("#FF34B3") MAROON2 = ManimColor("#EE30A7") MAROON3 = ManimColor("#CD2990") MAROON4 = ManimColor("#8B1C62") MEDIUM = ManimColor("#66CDAA") MEDIUMAQUAMARINE = ManimColor("#66CDAA") MEDIUMBLUE = ManimColor("#0000CD") MEDIUMORCHID = ManimColor("#BA55D3") MEDIUMORCHID1 = ManimColor("#E066FF") MEDIUMORCHID2 = ManimColor("#D15FEE") MEDIUMORCHID3 = ManimColor("#B452CD") MEDIUMORCHID4 = ManimColor("#7A378B") MEDIUMPURPLE = ManimColor("#9370DB") MEDIUMPURPLE1 = ManimColor("#AB82FF") MEDIUMPURPLE2 = ManimColor("#9F79EE") MEDIUMPURPLE3 = ManimColor("#8968CD") MEDIUMPURPLE4 = ManimColor("#5D478B") MEDIUMSEAGREEN = ManimColor("#3CB371") MEDIUMSLATEBLUE = ManimColor("#7B68EE") MEDIUMSPRINGGREEN = ManimColor("#00FA9A") MEDIUMTURQUOISE = ManimColor("#48D1CC") MEDIUMVIOLETRED = ManimColor("#C71585") MIDNIGHTBLUE = ManimColor("#191970") MINTCREAM = ManimColor("#F5FFFA") MISTYROSE1 = ManimColor("#FFE4E1") MISTYROSE2 = ManimColor("#EED5D2") MISTYROSE3 = ManimColor("#CDB7B5") MISTYROSE4 = ManimColor("#8B7D7B") MOCCASIN = ManimColor("#FFE4B5") NAVAJOWHITE1 = ManimColor("#FFDEAD") NAVAJOWHITE2 = ManimColor("#EECFA1") NAVAJOWHITE3 = ManimColor("#CDB38B") NAVAJOWHITE4 = ManimColor("#8B795E") NAVYBLUE = ManimColor("#000080") OLDLACE = ManimColor("#FDF5E6") OLIVEDRAB = ManimColor("#6B8E23") OLIVEDRAB1 = ManimColor("#C0FF3E") OLIVEDRAB2 = ManimColor("#B3EE3A") OLIVEDRAB4 = ManimColor("#698B22") ORANGE1 = ManimColor("#FFA500") ORANGE2 = ManimColor("#EE9A00") ORANGE3 = ManimColor("#CD8500") ORANGE4 = ManimColor("#8B5A00") ORANGERED1 = ManimColor("#FF4500") ORANGERED2 = ManimColor("#EE4000") ORANGERED3 = ManimColor("#CD3700") ORANGERED4 = ManimColor("#8B2500") ORCHID = ManimColor("#DA70D6") ORCHID1 = ManimColor("#FF83FA") ORCHID2 = ManimColor("#EE7AE9") ORCHID3 = ManimColor("#CD69C9") ORCHID4 = ManimColor("#8B4789") PALE = ManimColor("#DB7093") PALEGOLDENROD = ManimColor("#EEE8AA") PALEGREEN = ManimColor("#98FB98") PALEGREEN1 = ManimColor("#9AFF9A") PALEGREEN2 = ManimColor("#90EE90") PALEGREEN3 = ManimColor("#7CCD7C") PALEGREEN4 = ManimColor("#548B54") PALETURQUOISE = ManimColor("#AFEEEE") PALETURQUOISE1 = ManimColor("#BBFFFF") PALETURQUOISE2 = ManimColor("#AEEEEE") PALETURQUOISE3 = ManimColor("#96CDCD") PALETURQUOISE4 = ManimColor("#668B8B") PALEVIOLETRED = ManimColor("#DB7093") PALEVIOLETRED1 = ManimColor("#FF82AB") PALEVIOLETRED2 = ManimColor("#EE799F") PALEVIOLETRED3 = ManimColor("#CD6889") PALEVIOLETRED4 = ManimColor("#8B475D") PAPAYAWHIP = ManimColor("#FFEFD5") PEACHPUFF1 = ManimColor("#FFDAB9") PEACHPUFF2 = ManimColor("#EECBAD") PEACHPUFF3 = ManimColor("#CDAF95") PEACHPUFF4 = ManimColor("#8B7765") PINK = ManimColor("#FFC0CB") PINK1 = ManimColor("#FFB5C5") PINK2 = ManimColor("#EEA9B8") PINK3 = ManimColor("#CD919E") PINK4 = ManimColor("#8B636C") PLUM = ManimColor("#DDA0DD") PLUM1 = ManimColor("#FFBBFF") PLUM2 = ManimColor("#EEAEEE") PLUM3 = ManimColor("#CD96CD") PLUM4 = ManimColor("#8B668B") POWDERBLUE = ManimColor("#B0E0E6") PURPLE = ManimColor("#A020F0") PURPLE1 = ManimColor("#9B30FF") PURPLE2 = ManimColor("#912CEE") PURPLE3 = ManimColor("#7D26CD") PURPLE4 = ManimColor("#551A8B") RED1 = ManimColor("#FF0000") RED2 = ManimColor("#EE0000") RED3 = ManimColor("#CD0000") RED4 = ManimColor("#8B0000") ROSYBROWN = ManimColor("#BC8F8F") ROSYBROWN1 = ManimColor("#FFC1C1") ROSYBROWN2 = ManimColor("#EEB4B4") ROSYBROWN3 = ManimColor("#CD9B9B") ROSYBROWN4 = ManimColor("#8B6969") ROYALBLUE = ManimColor("#4169E1") ROYALBLUE1 = ManimColor("#4876FF") ROYALBLUE2 = ManimColor("#436EEE") ROYALBLUE3 = ManimColor("#3A5FCD") ROYALBLUE4 = ManimColor("#27408B") SADDLEBROWN = ManimColor("#8B4513") SALMON = ManimColor("#FA8072") SALMON1 = ManimColor("#FF8C69") SALMON2 = ManimColor("#EE8262") SALMON3 = ManimColor("#CD7054") SALMON4 = ManimColor("#8B4C39") SANDYBROWN = ManimColor("#F4A460") SEAGREEN1 = ManimColor("#54FF9F") SEAGREEN2 = ManimColor("#4EEE94") SEAGREEN3 = ManimColor("#43CD80") SEAGREEN4 = ManimColor("#2E8B57") SEASHELL1 = ManimColor("#FFF5EE") SEASHELL2 = ManimColor("#EEE5DE") SEASHELL3 = ManimColor("#CDC5BF") SEASHELL4 = ManimColor("#8B8682") SIENNA = ManimColor("#A0522D") SIENNA1 = ManimColor("#FF8247") SIENNA2 = ManimColor("#EE7942") SIENNA3 = ManimColor("#CD6839") SIENNA4 = ManimColor("#8B4726") SKYBLUE = ManimColor("#87CEEB") SKYBLUE1 = ManimColor("#87CEFF") SKYBLUE2 = ManimColor("#7EC0EE") SKYBLUE3 = ManimColor("#6CA6CD") SKYBLUE4 = ManimColor("#4A708B") SLATEBLUE = ManimColor("#6A5ACD") SLATEBLUE1 = ManimColor("#836FFF") SLATEBLUE2 = ManimColor("#7A67EE") SLATEBLUE3 = ManimColor("#6959CD") SLATEBLUE4 = ManimColor("#473C8B") SLATEGRAY = ManimColor("#708090") SLATEGRAY1 = ManimColor("#C6E2FF") SLATEGRAY2 = ManimColor("#B9D3EE") SLATEGRAY3 = ManimColor("#9FB6CD") SLATEGRAY4 = ManimColor("#6C7B8B") SNOW1 = ManimColor("#FFFAFA") SNOW2 = ManimColor("#EEE9E9") SNOW3 = ManimColor("#CDC9C9") SNOW4 = ManimColor("#8B8989") SPRINGGREEN1 = ManimColor("#00FF7F") SPRINGGREEN2 = ManimColor("#00EE76") SPRINGGREEN3 = ManimColor("#00CD66") SPRINGGREEN4 = ManimColor("#008B45") STEELBLUE = ManimColor("#4682B4") STEELBLUE1 = ManimColor("#63B8FF") STEELBLUE2 = ManimColor("#5CACEE") STEELBLUE3 = ManimColor("#4F94CD") STEELBLUE4 = ManimColor("#36648B") TAN = ManimColor("#D2B48C") TAN1 = ManimColor("#FFA54F") TAN2 = ManimColor("#EE9A49") TAN3 = ManimColor("#CD853F") TAN4 = ManimColor("#8B5A2B") THISTLE = ManimColor("#D8BFD8") THISTLE1 = ManimColor("#FFE1FF") THISTLE2 = ManimColor("#EED2EE") THISTLE3 = ManimColor("#CDB5CD") THISTLE4 = ManimColor("#8B7B8B") TOMATO1 = ManimColor("#FF6347") TOMATO2 = ManimColor("#EE5C42") TOMATO3 = ManimColor("#CD4F39") TOMATO4 = ManimColor("#8B3626") TURQUOISE = ManimColor("#40E0D0") TURQUOISE1 = ManimColor("#00F5FF") TURQUOISE2 = ManimColor("#00E5EE") TURQUOISE3 = ManimColor("#00C5CD") TURQUOISE4 = ManimColor("#00868B") VIOLET = ManimColor("#EE82EE") VIOLETRED = ManimColor("#D02090") VIOLETRED1 = ManimColor("#FF3E96") VIOLETRED2 = ManimColor("#EE3A8C") VIOLETRED3 = ManimColor("#CD3278") VIOLETRED4 = ManimColor("#8B2252") WHEAT = ManimColor("#F5DEB3") WHEAT1 = ManimColor("#FFE7BA") WHEAT2 = ManimColor("#EED8AE") WHEAT3 = ManimColor("#CDBA96") WHEAT4 = ManimColor("#8B7E66") WHITE = ManimColor("#FFFFFF") WHITESMOKE = ManimColor("#F5F5F5") YELLOW1 = ManimColor("#FFFF00") YELLOW2 = ManimColor("#EEEE00") YELLOW3 = ManimColor("#CDCD00") YELLOW4 = ManimColor("#8B8B00") YELLOWGREEN = ManimColor("#9ACD32") ================================================ FILE: manim/utils/color/XKCD.py ================================================ """Colors from the XKCD Color Name Survey XKCD is a popular `web comic `__ created by Randall Munroe. His "`Color Name Survey `__" (with 200000 participants) resulted in a list of nearly 1000 color names. While the ``XKCD`` module is exposed to Manim's global name space, the colors included in it are not. This means that in order to use the colors, access them via the module name: .. code:: pycon >>> from manim import XKCD >>> XKCD.MANGO ManimColor('#FFA62B') List of Color Constants ----------------------- These hex values are non official approximate values intended to simulate the colors in HTML, taken from https://www.w3schools.com/colors/colors_xkcd.asp. .. automanimcolormodule:: manim.utils.color.XKCD """ from __future__ import annotations from .core import ManimColor ACIDGREEN = ManimColor("#8FFE09") ADOBE = ManimColor("#BD6C48") ALGAE = ManimColor("#54AC68") ALGAEGREEN = ManimColor("#21C36F") ALMOSTBLACK = ManimColor("#070D0D") AMBER = ManimColor("#FEB308") AMETHYST = ManimColor("#9B5FC0") APPLE = ManimColor("#6ECB3C") APPLEGREEN = ManimColor("#76CD26") APRICOT = ManimColor("#FFB16D") AQUA = ManimColor("#13EAC9") AQUABLUE = ManimColor("#02D8E9") AQUAGREEN = ManimColor("#12E193") AQUAMARINE = ManimColor("#2EE8BB") ARMYGREEN = ManimColor("#4B5D16") ASPARAGUS = ManimColor("#77AB56") AUBERGINE = ManimColor("#3D0734") AUBURN = ManimColor("#9A3001") AVOCADO = ManimColor("#90B134") AVOCADOGREEN = ManimColor("#87A922") AZUL = ManimColor("#1D5DEC") AZURE = ManimColor("#069AF3") BABYBLUE = ManimColor("#A2CFFE") BABYGREEN = ManimColor("#8CFF9E") BABYPINK = ManimColor("#FFB7CE") BABYPOO = ManimColor("#AB9004") BABYPOOP = ManimColor("#937C00") BABYPOOPGREEN = ManimColor("#8F9805") BABYPUKEGREEN = ManimColor("#B6C406") BABYPURPLE = ManimColor("#CA9BF7") BABYSHITBROWN = ManimColor("#AD900D") BABYSHITGREEN = ManimColor("#889717") BANANA = ManimColor("#FFFF7E") BANANAYELLOW = ManimColor("#FAFE4B") BARBIEPINK = ManimColor("#FE46A5") BARFGREEN = ManimColor("#94AC02") BARNEY = ManimColor("#AC1DB8") BARNEYPURPLE = ManimColor("#A00498") BATTLESHIPGREY = ManimColor("#6B7C85") BEIGE = ManimColor("#E6DAA6") BERRY = ManimColor("#990F4B") BILE = ManimColor("#B5C306") BLACK = ManimColor("#000000") BLAND = ManimColor("#AFA88B") BLOOD = ManimColor("#770001") BLOODORANGE = ManimColor("#FE4B03") BLOODRED = ManimColor("#980002") BLUE = ManimColor("#0343DF") BLUEBERRY = ManimColor("#464196") BLUEBLUE = ManimColor("#2242C7") BLUEGREEN = ManimColor("#0F9B8E") BLUEGREY = ManimColor("#85A3B2") BLUEPURPLE = ManimColor("#5A06EF") BLUEVIOLET = ManimColor("#5D06E9") BLUEWITHAHINTOFPURPLE = ManimColor("#533CC6") BLUEYGREEN = ManimColor("#2BB179") BLUEYGREY = ManimColor("#89A0B0") BLUEYPURPLE = ManimColor("#6241C7") BLUISH = ManimColor("#2976BB") BLUISHGREEN = ManimColor("#10A674") BLUISHGREY = ManimColor("#748B97") BLUISHPURPLE = ManimColor("#703BE7") BLURPLE = ManimColor("#5539CC") BLUSH = ManimColor("#F29E8E") BLUSHPINK = ManimColor("#FE828C") BOOGER = ManimColor("#9BB53C") BOOGERGREEN = ManimColor("#96B403") BORDEAUX = ManimColor("#7B002C") BORINGGREEN = ManimColor("#63B365") BOTTLEGREEN = ManimColor("#044A05") BRICK = ManimColor("#A03623") BRICKORANGE = ManimColor("#C14A09") BRICKRED = ManimColor("#8F1402") BRIGHTAQUA = ManimColor("#0BF9EA") BRIGHTBLUE = ManimColor("#0165FC") BRIGHTCYAN = ManimColor("#41FDFE") BRIGHTGREEN = ManimColor("#01FF07") BRIGHTLAVENDER = ManimColor("#C760FF") BRIGHTLIGHTBLUE = ManimColor("#26F7FD") BRIGHTLIGHTGREEN = ManimColor("#2DFE54") BRIGHTLILAC = ManimColor("#C95EFB") BRIGHTLIME = ManimColor("#87FD05") BRIGHTLIMEGREEN = ManimColor("#65FE08") BRIGHTMAGENTA = ManimColor("#FF08E8") BRIGHTOLIVE = ManimColor("#9CBB04") BRIGHTORANGE = ManimColor("#FF5B00") BRIGHTPINK = ManimColor("#FE01B1") BRIGHTPURPLE = ManimColor("#BE03FD") BRIGHTRED = ManimColor("#FF000D") BRIGHTSEAGREEN = ManimColor("#05FFA6") BRIGHTSKYBLUE = ManimColor("#02CCFE") BRIGHTTEAL = ManimColor("#01F9C6") BRIGHTTURQUOISE = ManimColor("#0FFEF9") BRIGHTVIOLET = ManimColor("#AD0AFD") BRIGHTYELLOW = ManimColor("#FFFD01") BRIGHTYELLOWGREEN = ManimColor("#9DFF00") BRITISHRACINGGREEN = ManimColor("#05480D") BRONZE = ManimColor("#A87900") BROWN = ManimColor("#653700") BROWNGREEN = ManimColor("#706C11") BROWNGREY = ManimColor("#8D8468") BROWNISH = ManimColor("#9C6D57") BROWNISHGREEN = ManimColor("#6A6E09") BROWNISHGREY = ManimColor("#86775F") BROWNISHORANGE = ManimColor("#CB7723") BROWNISHPINK = ManimColor("#C27E79") BROWNISHPURPLE = ManimColor("#76424E") BROWNISHRED = ManimColor("#9E3623") BROWNISHYELLOW = ManimColor("#C9B003") BROWNORANGE = ManimColor("#B96902") BROWNRED = ManimColor("#922B05") BROWNYELLOW = ManimColor("#B29705") BROWNYGREEN = ManimColor("#6F6C0A") BROWNYORANGE = ManimColor("#CA6B02") BRUISE = ManimColor("#7E4071") BUBBLEGUM = ManimColor("#FF6CB5") BUBBLEGUMPINK = ManimColor("#FF69AF") BUFF = ManimColor("#FEF69E") BURGUNDY = ManimColor("#610023") BURNTORANGE = ManimColor("#C04E01") BURNTRED = ManimColor("#9F2305") BURNTSIENA = ManimColor("#B75203") BURNTSIENNA = ManimColor("#B04E0F") BURNTUMBER = ManimColor("#A0450E") BURNTYELLOW = ManimColor("#D5AB09") BURPLE = ManimColor("#6832E3") BUTTER = ManimColor("#FFFF81") BUTTERSCOTCH = ManimColor("#FDB147") BUTTERYELLOW = ManimColor("#FFFD74") CADETBLUE = ManimColor("#4E7496") CAMEL = ManimColor("#C69F59") CAMO = ManimColor("#7F8F4E") CAMOGREEN = ManimColor("#526525") CAMOUFLAGEGREEN = ManimColor("#4B6113") CANARY = ManimColor("#FDFF63") CANARYYELLOW = ManimColor("#FFFE40") CANDYPINK = ManimColor("#FF63E9") CARAMEL = ManimColor("#AF6F09") CARMINE = ManimColor("#9D0216") CARNATION = ManimColor("#FD798F") CARNATIONPINK = ManimColor("#FF7FA7") CAROLINABLUE = ManimColor("#8AB8FE") CELADON = ManimColor("#BEFDB7") CELERY = ManimColor("#C1FD95") CEMENT = ManimColor("#A5A391") CERISE = ManimColor("#DE0C62") CERULEAN = ManimColor("#0485D1") CERULEANBLUE = ManimColor("#056EEE") CHARCOAL = ManimColor("#343837") CHARCOALGREY = ManimColor("#3C4142") CHARTREUSE = ManimColor("#C1F80A") CHERRY = ManimColor("#CF0234") CHERRYRED = ManimColor("#F7022A") CHESTNUT = ManimColor("#742802") CHOCOLATE = ManimColor("#3D1C02") CHOCOLATEBROWN = ManimColor("#411900") CINNAMON = ManimColor("#AC4F06") CLARET = ManimColor("#680018") CLAY = ManimColor("#B66A50") CLAYBROWN = ManimColor("#B2713D") CLEARBLUE = ManimColor("#247AFD") COBALT = ManimColor("#1E488F") COBALTBLUE = ManimColor("#030AA7") COCOA = ManimColor("#875F42") COFFEE = ManimColor("#A6814C") COOLBLUE = ManimColor("#4984B8") COOLGREEN = ManimColor("#33B864") COOLGREY = ManimColor("#95A3A6") COPPER = ManimColor("#B66325") CORAL = ManimColor("#FC5A50") CORALPINK = ManimColor("#FF6163") CORNFLOWER = ManimColor("#6A79F7") CORNFLOWERBLUE = ManimColor("#5170D7") CRANBERRY = ManimColor("#9E003A") CREAM = ManimColor("#FFFFC2") CREME = ManimColor("#FFFFB6") CRIMSON = ManimColor("#8C000F") CUSTARD = ManimColor("#FFFD78") CYAN = ManimColor("#00FFFF") DANDELION = ManimColor("#FEDF08") DARK = ManimColor("#1B2431") DARKAQUA = ManimColor("#05696B") DARKAQUAMARINE = ManimColor("#017371") DARKBEIGE = ManimColor("#AC9362") DARKBLUE = ManimColor("#030764") DARKBLUEGREEN = ManimColor("#005249") DARKBLUEGREY = ManimColor("#1F3B4D") DARKBROWN = ManimColor("#341C02") DARKCORAL = ManimColor("#CF524E") DARKCREAM = ManimColor("#FFF39A") DARKCYAN = ManimColor("#0A888A") DARKFORESTGREEN = ManimColor("#002D04") DARKFUCHSIA = ManimColor("#9D0759") DARKGOLD = ManimColor("#B59410") DARKGRASSGREEN = ManimColor("#388004") DARKGREEN = ManimColor("#054907") DARKGREENBLUE = ManimColor("#1F6357") DARKGREY = ManimColor("#363737") DARKGREYBLUE = ManimColor("#29465B") DARKHOTPINK = ManimColor("#D90166") DARKINDIGO = ManimColor("#1F0954") DARKISHBLUE = ManimColor("#014182") DARKISHGREEN = ManimColor("#287C37") DARKISHPINK = ManimColor("#DA467D") DARKISHPURPLE = ManimColor("#751973") DARKISHRED = ManimColor("#A90308") DARKKHAKI = ManimColor("#9B8F55") DARKLAVENDER = ManimColor("#856798") DARKLILAC = ManimColor("#9C6DA5") DARKLIME = ManimColor("#84B701") DARKLIMEGREEN = ManimColor("#7EBD01") DARKMAGENTA = ManimColor("#960056") DARKMAROON = ManimColor("#3C0008") DARKMAUVE = ManimColor("#874C62") DARKMINT = ManimColor("#48C072") DARKMINTGREEN = ManimColor("#20C073") DARKMUSTARD = ManimColor("#A88905") DARKNAVY = ManimColor("#000435") DARKNAVYBLUE = ManimColor("#00022E") DARKOLIVE = ManimColor("#373E02") DARKOLIVEGREEN = ManimColor("#3C4D03") DARKORANGE = ManimColor("#C65102") DARKPASTELGREEN = ManimColor("#56AE57") DARKPEACH = ManimColor("#DE7E5D") DARKPERIWINKLE = ManimColor("#665FD1") DARKPINK = ManimColor("#CB416B") DARKPLUM = ManimColor("#3F012C") DARKPURPLE = ManimColor("#35063E") DARKRED = ManimColor("#840000") DARKROSE = ManimColor("#B5485D") DARKROYALBLUE = ManimColor("#02066F") DARKSAGE = ManimColor("#598556") DARKSALMON = ManimColor("#C85A53") DARKSAND = ManimColor("#A88F59") DARKSEAFOAM = ManimColor("#1FB57A") DARKSEAFOAMGREEN = ManimColor("#3EAF76") DARKSEAGREEN = ManimColor("#11875D") DARKSKYBLUE = ManimColor("#448EE4") DARKSLATEBLUE = ManimColor("#214761") DARKTAN = ManimColor("#AF884A") DARKTAUPE = ManimColor("#7F684E") DARKTEAL = ManimColor("#014D4E") DARKTURQUOISE = ManimColor("#045C5A") DARKVIOLET = ManimColor("#34013F") DARKYELLOW = ManimColor("#D5B60A") DARKYELLOWGREEN = ManimColor("#728F02") DEEPAQUA = ManimColor("#08787F") DEEPBLUE = ManimColor("#040273") DEEPBROWN = ManimColor("#410200") DEEPGREEN = ManimColor("#02590F") DEEPLAVENDER = ManimColor("#8D5EB7") DEEPLILAC = ManimColor("#966EBD") DEEPMAGENTA = ManimColor("#A0025C") DEEPORANGE = ManimColor("#DC4D01") DEEPPINK = ManimColor("#CB0162") DEEPPURPLE = ManimColor("#36013F") DEEPRED = ManimColor("#9A0200") DEEPROSE = ManimColor("#C74767") DEEPSEABLUE = ManimColor("#015482") DEEPSKYBLUE = ManimColor("#0D75F8") DEEPTEAL = ManimColor("#00555A") DEEPTURQUOISE = ManimColor("#017374") DEEPVIOLET = ManimColor("#490648") DENIM = ManimColor("#3B638C") DENIMBLUE = ManimColor("#3B5B92") DESERT = ManimColor("#CCAD60") DIARRHEA = ManimColor("#9F8303") DIRT = ManimColor("#8A6E45") DIRTBROWN = ManimColor("#836539") DIRTYBLUE = ManimColor("#3F829D") DIRTYGREEN = ManimColor("#667E2C") DIRTYORANGE = ManimColor("#C87606") DIRTYPINK = ManimColor("#CA7B80") DIRTYPURPLE = ManimColor("#734A65") DIRTYYELLOW = ManimColor("#CDC50A") DODGERBLUE = ManimColor("#3E82FC") DRAB = ManimColor("#828344") DRABGREEN = ManimColor("#749551") DRIEDBLOOD = ManimColor("#4B0101") DUCKEGGBLUE = ManimColor("#C3FBF4") DULLBLUE = ManimColor("#49759C") DULLBROWN = ManimColor("#876E4B") DULLGREEN = ManimColor("#74A662") DULLORANGE = ManimColor("#D8863B") DULLPINK = ManimColor("#D5869D") DULLPURPLE = ManimColor("#84597E") DULLRED = ManimColor("#BB3F3F") DULLTEAL = ManimColor("#5F9E8F") DULLYELLOW = ManimColor("#EEDC5B") DUSK = ManimColor("#4E5481") DUSKBLUE = ManimColor("#26538D") DUSKYBLUE = ManimColor("#475F94") DUSKYPINK = ManimColor("#CC7A8B") DUSKYPURPLE = ManimColor("#895B7B") DUSKYROSE = ManimColor("#BA6873") DUST = ManimColor("#B2996E") DUSTYBLUE = ManimColor("#5A86AD") DUSTYGREEN = ManimColor("#76A973") DUSTYLAVENDER = ManimColor("#AC86A8") DUSTYORANGE = ManimColor("#F0833A") DUSTYPINK = ManimColor("#D58A94") DUSTYPURPLE = ManimColor("#825F87") DUSTYRED = ManimColor("#B9484E") DUSTYROSE = ManimColor("#C0737A") DUSTYTEAL = ManimColor("#4C9085") EARTH = ManimColor("#A2653E") EASTERGREEN = ManimColor("#8CFD7E") EASTERPURPLE = ManimColor("#C071FE") ECRU = ManimColor("#FEFFCA") EGGPLANT = ManimColor("#380835") EGGPLANTPURPLE = ManimColor("#430541") EGGSHELL = ManimColor("#FFFCC4") EGGSHELLBLUE = ManimColor("#C4FFF7") ELECTRICBLUE = ManimColor("#0652FF") ELECTRICGREEN = ManimColor("#21FC0D") ELECTRICLIME = ManimColor("#A8FF04") ELECTRICPINK = ManimColor("#FF0490") ELECTRICPURPLE = ManimColor("#AA23FF") EMERALD = ManimColor("#01A049") EMERALDGREEN = ManimColor("#028F1E") EVERGREEN = ManimColor("#05472A") FADEDBLUE = ManimColor("#658CBB") FADEDGREEN = ManimColor("#7BB274") FADEDORANGE = ManimColor("#F0944D") FADEDPINK = ManimColor("#DE9DAC") FADEDPURPLE = ManimColor("#916E99") FADEDRED = ManimColor("#D3494E") FADEDYELLOW = ManimColor("#FEFF7F") FAWN = ManimColor("#CFAF7B") FERN = ManimColor("#63A950") FERNGREEN = ManimColor("#548D44") FIREENGINERED = ManimColor("#FE0002") FLATBLUE = ManimColor("#3C73A8") FLATGREEN = ManimColor("#699D4C") FLUORESCENTGREEN = ManimColor("#08FF08") FLUROGREEN = ManimColor("#0AFF02") FOAMGREEN = ManimColor("#90FDA9") FOREST = ManimColor("#0B5509") FORESTGREEN = ManimColor("#06470C") FORRESTGREEN = ManimColor("#154406") FRENCHBLUE = ManimColor("#436BAD") FRESHGREEN = ManimColor("#69D84F") FROGGREEN = ManimColor("#58BC08") FUCHSIA = ManimColor("#ED0DD9") GOLD = ManimColor("#DBB40C") GOLDEN = ManimColor("#F5BF03") GOLDENBROWN = ManimColor("#B27A01") GOLDENROD = ManimColor("#F9BC08") GOLDENYELLOW = ManimColor("#FEC615") GRAPE = ManimColor("#6C3461") GRAPEFRUIT = ManimColor("#FD5956") GRAPEPURPLE = ManimColor("#5D1451") GRASS = ManimColor("#5CAC2D") GRASSGREEN = ManimColor("#3F9B0B") GRASSYGREEN = ManimColor("#419C03") GREEN = ManimColor("#15B01A") GREENAPPLE = ManimColor("#5EDC1F") GREENBLUE = ManimColor("#01C08D") GREENBROWN = ManimColor("#544E03") GREENGREY = ManimColor("#77926F") GREENISH = ManimColor("#40A368") GREENISHBEIGE = ManimColor("#C9D179") GREENISHBLUE = ManimColor("#0B8B87") GREENISHBROWN = ManimColor("#696112") GREENISHCYAN = ManimColor("#2AFEB7") GREENISHGREY = ManimColor("#96AE8D") GREENISHTAN = ManimColor("#BCCB7A") GREENISHTEAL = ManimColor("#32BF84") GREENISHTURQUOISE = ManimColor("#00FBB0") GREENISHYELLOW = ManimColor("#CDFD02") GREENTEAL = ManimColor("#0CB577") GREENYBLUE = ManimColor("#42B395") GREENYBROWN = ManimColor("#696006") GREENYELLOW = ManimColor("#B5CE08") GREENYGREY = ManimColor("#7EA07A") GREENYYELLOW = ManimColor("#C6F808") GREY = ManimColor("#929591") GREYBLUE = ManimColor("#647D8E") GREYBROWN = ManimColor("#7F7053") GREYGREEN = ManimColor("#86A17D") GREYISH = ManimColor("#A8A495") GREYISHBLUE = ManimColor("#5E819D") GREYISHBROWN = ManimColor("#7A6A4F") GREYISHGREEN = ManimColor("#82A67D") GREYISHPINK = ManimColor("#C88D94") GREYISHPURPLE = ManimColor("#887191") GREYISHTEAL = ManimColor("#719F91") GREYPINK = ManimColor("#C3909B") GREYPURPLE = ManimColor("#826D8C") GREYTEAL = ManimColor("#5E9B8A") GROSSGREEN = ManimColor("#A0BF16") GUNMETAL = ManimColor("#536267") HAZEL = ManimColor("#8E7618") HEATHER = ManimColor("#A484AC") HELIOTROPE = ManimColor("#D94FF5") HIGHLIGHTERGREEN = ManimColor("#1BFC06") HOSPITALGREEN = ManimColor("#9BE5AA") HOTGREEN = ManimColor("#25FF29") HOTMAGENTA = ManimColor("#F504C9") HOTPINK = ManimColor("#FF028D") HOTPURPLE = ManimColor("#CB00F5") HUNTERGREEN = ManimColor("#0B4008") ICE = ManimColor("#D6FFFA") ICEBLUE = ManimColor("#D7FFFE") ICKYGREEN = ManimColor("#8FAE22") INDIANRED = ManimColor("#850E04") INDIGO = ManimColor("#380282") INDIGOBLUE = ManimColor("#3A18B1") IRIS = ManimColor("#6258C4") IRISHGREEN = ManimColor("#019529") IVORY = ManimColor("#FFFFCB") JADE = ManimColor("#1FA774") JADEGREEN = ManimColor("#2BAF6A") JUNGLEGREEN = ManimColor("#048243") KELLEYGREEN = ManimColor("#009337") KELLYGREEN = ManimColor("#02AB2E") KERMITGREEN = ManimColor("#5CB200") KEYLIME = ManimColor("#AEFF6E") KHAKI = ManimColor("#AAA662") KHAKIGREEN = ManimColor("#728639") KIWI = ManimColor("#9CEF43") KIWIGREEN = ManimColor("#8EE53F") LAVENDER = ManimColor("#C79FEF") LAVENDERBLUE = ManimColor("#8B88F8") LAVENDERPINK = ManimColor("#DD85D7") LAWNGREEN = ManimColor("#4DA409") LEAF = ManimColor("#71AA34") LEAFGREEN = ManimColor("#5CA904") LEAFYGREEN = ManimColor("#51B73B") LEATHER = ManimColor("#AC7434") LEMON = ManimColor("#FDFF52") LEMONGREEN = ManimColor("#ADF802") LEMONLIME = ManimColor("#BFFE28") LEMONYELLOW = ManimColor("#FDFF38") LICHEN = ManimColor("#8FB67B") LIGHTAQUA = ManimColor("#8CFFDB") LIGHTAQUAMARINE = ManimColor("#7BFDC7") LIGHTBEIGE = ManimColor("#FFFEB6") LIGHTBLUE = ManimColor("#7BC8F6") LIGHTBLUEGREEN = ManimColor("#7EFBB3") LIGHTBLUEGREY = ManimColor("#B7C9E2") LIGHTBLUISHGREEN = ManimColor("#76FDA8") LIGHTBRIGHTGREEN = ManimColor("#53FE5C") LIGHTBROWN = ManimColor("#AD8150") LIGHTBURGUNDY = ManimColor("#A8415B") LIGHTCYAN = ManimColor("#ACFFFC") LIGHTEGGPLANT = ManimColor("#894585") LIGHTERGREEN = ManimColor("#75FD63") LIGHTERPURPLE = ManimColor("#A55AF4") LIGHTFORESTGREEN = ManimColor("#4F9153") LIGHTGOLD = ManimColor("#FDDC5C") LIGHTGRASSGREEN = ManimColor("#9AF764") LIGHTGREEN = ManimColor("#76FF7B") LIGHTGREENBLUE = ManimColor("#56FCA2") LIGHTGREENISHBLUE = ManimColor("#63F7B4") LIGHTGREY = ManimColor("#D8DCD6") LIGHTGREYBLUE = ManimColor("#9DBCD4") LIGHTGREYGREEN = ManimColor("#B7E1A1") LIGHTINDIGO = ManimColor("#6D5ACF") LIGHTISHBLUE = ManimColor("#3D7AFD") LIGHTISHGREEN = ManimColor("#61E160") LIGHTISHPURPLE = ManimColor("#A552E6") LIGHTISHRED = ManimColor("#FE2F4A") LIGHTKHAKI = ManimColor("#E6F2A2") LIGHTLAVENDAR = ManimColor("#EFC0FE") LIGHTLAVENDER = ManimColor("#DFC5FE") LIGHTLIGHTBLUE = ManimColor("#CAFFFB") LIGHTLIGHTGREEN = ManimColor("#C8FFB0") LIGHTLILAC = ManimColor("#EDC8FF") LIGHTLIME = ManimColor("#AEFD6C") LIGHTLIMEGREEN = ManimColor("#B9FF66") LIGHTMAGENTA = ManimColor("#FA5FF7") LIGHTMAROON = ManimColor("#A24857") LIGHTMAUVE = ManimColor("#C292A1") LIGHTMINT = ManimColor("#B6FFBB") LIGHTMINTGREEN = ManimColor("#A6FBB2") LIGHTMOSSGREEN = ManimColor("#A6C875") LIGHTMUSTARD = ManimColor("#F7D560") LIGHTNAVY = ManimColor("#155084") LIGHTNAVYBLUE = ManimColor("#2E5A88") LIGHTNEONGREEN = ManimColor("#4EFD54") LIGHTOLIVE = ManimColor("#ACBF69") LIGHTOLIVEGREEN = ManimColor("#A4BE5C") LIGHTORANGE = ManimColor("#FDAA48") LIGHTPASTELGREEN = ManimColor("#B2FBA5") LIGHTPEACH = ManimColor("#FFD8B1") LIGHTPEAGREEN = ManimColor("#C4FE82") LIGHTPERIWINKLE = ManimColor("#C1C6FC") LIGHTPINK = ManimColor("#FFD1DF") LIGHTPLUM = ManimColor("#9D5783") LIGHTPURPLE = ManimColor("#BF77F6") LIGHTRED = ManimColor("#FF474C") LIGHTROSE = ManimColor("#FFC5CB") LIGHTROYALBLUE = ManimColor("#3A2EFE") LIGHTSAGE = ManimColor("#BCECAC") LIGHTSALMON = ManimColor("#FEA993") LIGHTSEAFOAM = ManimColor("#A0FEBF") LIGHTSEAFOAMGREEN = ManimColor("#a7ffb5") LIGHTSEAGREEN = ManimColor("#98F6B0") LIGHTSKYBLUE = ManimColor("#C6FCFF") LIGHTTAN = ManimColor("#FBEEAC") LIGHTTEAL = ManimColor("#90E4C1") LIGHTTURQUOISE = ManimColor("#7EF4CC") LIGHTURPLE = ManimColor("#B36FF6") LIGHTVIOLET = ManimColor("#D6B4FC") LIGHTYELLOW = ManimColor("#FFFE7A") LIGHTYELLOWGREEN = ManimColor("#CCFD7F") LIGHTYELLOWISHGREEN = ManimColor("#C2FF89") LILAC = ManimColor("#CEA2FD") LILIAC = ManimColor("#C48EFD") LIME = ManimColor("#AAFF32") LIMEGREEN = ManimColor("#89FE05") LIMEYELLOW = ManimColor("#D0FE1D") LIPSTICK = ManimColor("#D5174E") LIPSTICKRED = ManimColor("#C0022F") MACARONIANDCHEESE = ManimColor("#EFB435") MAGENTA = ManimColor("#C20078") MAHOGANY = ManimColor("#4A0100") MAIZE = ManimColor("#F4D054") MANGO = ManimColor("#FFA62B") MANILLA = ManimColor("#FFFA86") MARIGOLD = ManimColor("#FCC006") MARINE = ManimColor("#042E60") MARINEBLUE = ManimColor("#01386A") MAROON = ManimColor("#650021") MAUVE = ManimColor("#AE7181") MEDIUMBLUE = ManimColor("#2C6FBB") MEDIUMBROWN = ManimColor("#7F5112") MEDIUMGREEN = ManimColor("#39AD48") MEDIUMGREY = ManimColor("#7D7F7C") MEDIUMPINK = ManimColor("#F36196") MEDIUMPURPLE = ManimColor("#9E43A2") MELON = ManimColor("#FF7855") MERLOT = ManimColor("#730039") METALLICBLUE = ManimColor("#4F738E") MIDBLUE = ManimColor("#276AB3") MIDGREEN = ManimColor("#50A747") MIDNIGHT = ManimColor("#03012D") MIDNIGHTBLUE = ManimColor("#020035") MIDNIGHTPURPLE = ManimColor("#280137") MILITARYGREEN = ManimColor("#667C3E") MILKCHOCOLATE = ManimColor("#7F4E1E") MINT = ManimColor("#9FFEB0") MINTGREEN = ManimColor("#8FFF9F") MINTYGREEN = ManimColor("#0BF77D") MOCHA = ManimColor("#9D7651") MOSS = ManimColor("#769958") MOSSGREEN = ManimColor("#658B38") MOSSYGREEN = ManimColor("#638B27") MUD = ManimColor("#735C12") MUDBROWN = ManimColor("#60460F") MUDDYBROWN = ManimColor("#886806") MUDDYGREEN = ManimColor("#657432") MUDDYYELLOW = ManimColor("#BFAC05") MUDGREEN = ManimColor("#606602") MULBERRY = ManimColor("#920A4E") MURKYGREEN = ManimColor("#6C7A0E") MUSHROOM = ManimColor("#BA9E88") MUSTARD = ManimColor("#CEB301") MUSTARDBROWN = ManimColor("#AC7E04") MUSTARDGREEN = ManimColor("#A8B504") MUSTARDYELLOW = ManimColor("#D2BD0A") MUTEDBLUE = ManimColor("#3B719F") MUTEDGREEN = ManimColor("#5FA052") MUTEDPINK = ManimColor("#D1768F") MUTEDPURPLE = ManimColor("#805B87") NASTYGREEN = ManimColor("#70B23F") NAVY = ManimColor("#01153E") NAVYBLUE = ManimColor("#001146") NAVYGREEN = ManimColor("#35530A") NEONBLUE = ManimColor("#04D9FF") NEONGREEN = ManimColor("#0CFF0C") NEONPINK = ManimColor("#FE019A") NEONPURPLE = ManimColor("#BC13FE") NEONRED = ManimColor("#FF073A") NEONYELLOW = ManimColor("#CFFF04") NICEBLUE = ManimColor("#107AB0") NIGHTBLUE = ManimColor("#040348") OCEAN = ManimColor("#017B92") OCEANBLUE = ManimColor("#03719C") OCEANGREEN = ManimColor("#3D9973") OCHER = ManimColor("#BF9B0C") OCHRE = ManimColor("#BF9005") OCRE = ManimColor("#C69C04") OFFBLUE = ManimColor("#5684AE") OFFGREEN = ManimColor("#6BA353") OFFWHITE = ManimColor("#FFFFE4") OFFYELLOW = ManimColor("#F1F33F") OLDPINK = ManimColor("#C77986") OLDROSE = ManimColor("#C87F89") OLIVE = ManimColor("#6E750E") OLIVEBROWN = ManimColor("#645403") OLIVEDRAB = ManimColor("#6F7632") OLIVEGREEN = ManimColor("#677A04") OLIVEYELLOW = ManimColor("#C2B709") ORANGE = ManimColor("#F97306") ORANGEBROWN = ManimColor("#BE6400") ORANGEISH = ManimColor("#FD8D49") ORANGEPINK = ManimColor("#FF6F52") ORANGERED = ManimColor("#FE420F") ORANGEYBROWN = ManimColor("#B16002") ORANGEYELLOW = ManimColor("#FFAD01") ORANGEYRED = ManimColor("#FA4224") ORANGEYYELLOW = ManimColor("#FDB915") ORANGISH = ManimColor("#FC824A") ORANGISHBROWN = ManimColor("#B25F03") ORANGISHRED = ManimColor("#F43605") ORCHID = ManimColor("#C875C4") PALE = ManimColor("#FFF9D0") PALEAQUA = ManimColor("#B8FFEB") PALEBLUE = ManimColor("#D0FEFE") PALEBROWN = ManimColor("#B1916E") PALECYAN = ManimColor("#B7FFFA") PALEGOLD = ManimColor("#FDDE6C") PALEGREEN = ManimColor("#C7FDB5") PALEGREY = ManimColor("#FDFDFE") PALELAVENDER = ManimColor("#EECFFE") PALELIGHTGREEN = ManimColor("#B1FC99") PALELILAC = ManimColor("#E4CBFF") PALELIME = ManimColor("#BEFD73") PALELIMEGREEN = ManimColor("#B1FF65") PALEMAGENTA = ManimColor("#D767AD") PALEMAUVE = ManimColor("#FED0FC") PALEOLIVE = ManimColor("#B9CC81") PALEOLIVEGREEN = ManimColor("#B1D27B") PALEORANGE = ManimColor("#FFA756") PALEPEACH = ManimColor("#FFE5AD") PALEPINK = ManimColor("#FFCFDC") PALEPURPLE = ManimColor("#B790D4") PALERED = ManimColor("#D9544D") PALEROSE = ManimColor("#FDC1C5") PALESALMON = ManimColor("#FFB19A") PALESKYBLUE = ManimColor("#BDF6FE") PALETEAL = ManimColor("#82CBB2") PALETURQUOISE = ManimColor("#A5FBD5") PALEVIOLET = ManimColor("#CEAEFA") PALEYELLOW = ManimColor("#FFFF84") PARCHMENT = ManimColor("#FEFCAF") PASTELBLUE = ManimColor("#A2BFFE") PASTELGREEN = ManimColor("#B0FF9D") PASTELORANGE = ManimColor("#FF964F") PASTELPINK = ManimColor("#FFBACD") PASTELPURPLE = ManimColor("#CAA0FF") PASTELRED = ManimColor("#DB5856") PASTELYELLOW = ManimColor("#FFFE71") PEA = ManimColor("#A4BF20") PEACH = ManimColor("#FFB07C") PEACHYPINK = ManimColor("#FF9A8A") PEACOCKBLUE = ManimColor("#016795") PEAGREEN = ManimColor("#8EAB12") PEAR = ManimColor("#CBF85F") PEASOUP = ManimColor("#929901") PEASOUPGREEN = ManimColor("#94A617") PERIWINKLE = ManimColor("#8E82FE") PERIWINKLEBLUE = ManimColor("#8F99FB") PERRYWINKLE = ManimColor("#8F8CE7") PETROL = ManimColor("#005F6A") PIGPINK = ManimColor("#E78EA5") PINE = ManimColor("#2B5D34") PINEGREEN = ManimColor("#0A481E") PINK = ManimColor("#FF81C0") PINKISH = ManimColor("#D46A7E") PINKISHBROWN = ManimColor("#B17261") PINKISHGREY = ManimColor("#C8ACA9") PINKISHORANGE = ManimColor("#FF724C") PINKISHPURPLE = ManimColor("#D648D7") PINKISHRED = ManimColor("#F10C45") PINKISHTAN = ManimColor("#D99B82") PINKPURPLE = ManimColor("#EF1DE7") PINKRED = ManimColor("#F5054F") PINKY = ManimColor("#FC86AA") PINKYPURPLE = ManimColor("#C94CBE") PINKYRED = ManimColor("#FC2647") PISSYELLOW = ManimColor("#DDD618") PISTACHIO = ManimColor("#C0FA8B") PLUM = ManimColor("#580F41") PLUMPURPLE = ManimColor("#4E0550") POISONGREEN = ManimColor("#40FD14") POO = ManimColor("#8F7303") POOBROWN = ManimColor("#885F01") POOP = ManimColor("#7F5E00") POOPBROWN = ManimColor("#7A5901") POOPGREEN = ManimColor("#6F7C00") POWDERBLUE = ManimColor("#B1D1FC") POWDERPINK = ManimColor("#FFB2D0") PRIMARYBLUE = ManimColor("#0804F9") PRUSSIANBLUE = ManimColor("#004577") PUCE = ManimColor("#A57E52") PUKE = ManimColor("#A5A502") PUKEBROWN = ManimColor("#947706") PUKEGREEN = ManimColor("#9AAE07") PUKEYELLOW = ManimColor("#C2BE0E") PUMPKIN = ManimColor("#E17701") PUMPKINORANGE = ManimColor("#FB7D07") PUREBLUE = ManimColor("#0203E2") PURPLE = ManimColor("#7E1E9C") PURPLEBLUE = ManimColor("#5D21D0") PURPLEBROWN = ManimColor("#673A3F") PURPLEGREY = ManimColor("#866F85") PURPLEISH = ManimColor("#98568D") PURPLEISHBLUE = ManimColor("#6140EF") PURPLEISHPINK = ManimColor("#DF4EC8") PURPLEPINK = ManimColor("#D725DE") PURPLERED = ManimColor("#990147") PURPLEY = ManimColor("#8756E4") PURPLEYBLUE = ManimColor("#5F34E7") PURPLEYGREY = ManimColor("#947E94") PURPLEYPINK = ManimColor("#C83CB9") PURPLISH = ManimColor("#94568C") PURPLISHBLUE = ManimColor("#601EF9") PURPLISHBROWN = ManimColor("#6B4247") PURPLISHGREY = ManimColor("#7A687F") PURPLISHPINK = ManimColor("#CE5DAE") PURPLISHRED = ManimColor("#B0054B") PURPLY = ManimColor("#983FB2") PURPLYBLUE = ManimColor("#661AEE") PURPLYPINK = ManimColor("#F075E6") PUTTY = ManimColor("#BEAE8A") RACINGGREEN = ManimColor("#014600") RADIOACTIVEGREEN = ManimColor("#2CFA1F") RASPBERRY = ManimColor("#B00149") RAWSIENNA = ManimColor("#9A6200") RAWUMBER = ManimColor("#A75E09") REALLYLIGHTBLUE = ManimColor("#D4FFFF") RED = ManimColor("#E50000") REDBROWN = ManimColor("#8B2E16") REDDISH = ManimColor("#C44240") REDDISHBROWN = ManimColor("#7F2B0A") REDDISHGREY = ManimColor("#997570") REDDISHORANGE = ManimColor("#F8481C") REDDISHPINK = ManimColor("#FE2C54") REDDISHPURPLE = ManimColor("#910951") REDDYBROWN = ManimColor("#6E1005") REDORANGE = ManimColor("#FD3C06") REDPINK = ManimColor("#FA2A55") REDPURPLE = ManimColor("#820747") REDVIOLET = ManimColor("#9E0168") REDWINE = ManimColor("#8C0034") RICHBLUE = ManimColor("#021BF9") RICHPURPLE = ManimColor("#720058") ROBINEGGBLUE = ManimColor("#8AF1FE") ROBINSEGG = ManimColor("#6DEDFD") ROBINSEGGBLUE = ManimColor("#98EFF9") ROSA = ManimColor("#FE86A4") ROSE = ManimColor("#CF6275") ROSEPINK = ManimColor("#F7879A") ROSERED = ManimColor("#BE013C") ROSYPINK = ManimColor("#F6688E") ROGUE = ManimColor("#AB1239") ROYAL = ManimColor("#0C1793") ROYALBLUE = ManimColor("#0504AA") ROYALPURPLE = ManimColor("#4B006E") RUBY = ManimColor("#CA0147") RUSSET = ManimColor("#A13905") RUST = ManimColor("#A83C09") RUSTBROWN = ManimColor("#8B3103") RUSTORANGE = ManimColor("#C45508") RUSTRED = ManimColor("#AA2704") RUSTYORANGE = ManimColor("#CD5909") RUSTYRED = ManimColor("#AF2F0D") SAFFRON = ManimColor("#FEB209") SAGE = ManimColor("#87AE73") SAGEGREEN = ManimColor("#88B378") SALMON = ManimColor("#FF796C") SALMONPINK = ManimColor("#FE7B7C") SAND = ManimColor("#E2CA76") SANDBROWN = ManimColor("#CBA560") SANDSTONE = ManimColor("#C9AE74") SANDY = ManimColor("#F1DA7A") SANDYBROWN = ManimColor("#C4A661") SANDYELLOW = ManimColor("#FCE166") SANDYYELLOW = ManimColor("#FDEE73") SAPGREEN = ManimColor("#5C8B15") SAPPHIRE = ManimColor("#2138AB") SCARLET = ManimColor("#BE0119") SEA = ManimColor("#3C9992") SEABLUE = ManimColor("#047495") SEAFOAM = ManimColor("#80F9AD") SEAFOAMBLUE = ManimColor("#78D1B6") SEAFOAMGREEN = ManimColor("#7AF9AB") SEAGREEN = ManimColor("#53FCA1") SEAWEED = ManimColor("#18D17B") SEAWEEDGREEN = ManimColor("#35AD6B") SEPIA = ManimColor("#985E2B") SHAMROCK = ManimColor("#01B44C") SHAMROCKGREEN = ManimColor("#02C14D") SHIT = ManimColor("#7F5F00") SHITBROWN = ManimColor("#7B5804") SHITGREEN = ManimColor("#758000") SHOCKINGPINK = ManimColor("#FE02A2") SICKGREEN = ManimColor("#9DB92C") SICKLYGREEN = ManimColor("#94B21C") SICKLYYELLOW = ManimColor("#D0E429") SIENNA = ManimColor("#A9561E") SILVER = ManimColor("#C5C9C7") SKY = ManimColor("#82CAFC") SKYBLUE = ManimColor("#75BBFD") SLATE = ManimColor("#516572") SLATEBLUE = ManimColor("#5B7C99") SLATEGREEN = ManimColor("#658D6D") SLATEGREY = ManimColor("#59656D") SLIMEGREEN = ManimColor("#99CC04") SNOT = ManimColor("#ACBB0D") SNOTGREEN = ManimColor("#9DC100") SOFTBLUE = ManimColor("#6488EA") SOFTGREEN = ManimColor("#6FC276") SOFTPINK = ManimColor("#FDB0C0") SOFTPURPLE = ManimColor("#A66FB5") SPEARMINT = ManimColor("#1EF876") SPRINGGREEN = ManimColor("#A9F971") SPRUCE = ManimColor("#0A5F38") SQUASH = ManimColor("#F2AB15") STEEL = ManimColor("#738595") STEELBLUE = ManimColor("#5A7D9A") STEELGREY = ManimColor("#6F828A") STONE = ManimColor("#ADA587") STORMYBLUE = ManimColor("#507B9C") STRAW = ManimColor("#FCF679") STRAWBERRY = ManimColor("#FB2943") STRONGBLUE = ManimColor("#0C06F7") STRONGPINK = ManimColor("#FF0789") SUNFLOWER = ManimColor("#FFC512") SUNFLOWERYELLOW = ManimColor("#FFDA03") SUNNYYELLOW = ManimColor("#FFF917") SUNSHINEYELLOW = ManimColor("#FFFD37") SUNYELLOW = ManimColor("#FFDF22") SWAMP = ManimColor("#698339") SWAMPGREEN = ManimColor("#748500") TAN = ManimColor("#D1B26F") TANBROWN = ManimColor("#AB7E4C") TANGERINE = ManimColor("#FF9408") TANGREEN = ManimColor("#A9BE70") TAUPE = ManimColor("#B9A281") TEA = ManimColor("#65AB7C") TEAGREEN = ManimColor("#BDF8A3") TEAL = ManimColor("#029386") TEALBLUE = ManimColor("#01889F") TEALGREEN = ManimColor("#25A36F") TEALISH = ManimColor("#24BCA8") TEALISHGREEN = ManimColor("#0CDC73") TERRACOTA = ManimColor("#CB6843") TERRACOTTA = ManimColor("#C9643B") TIFFANYBLUE = ManimColor("#7BF2DA") TOMATO = ManimColor("#EF4026") TOMATORED = ManimColor("#EC2D01") TOPAZ = ManimColor("#13BBAF") TOUPE = ManimColor("#C7AC7D") TOXICGREEN = ManimColor("#61DE2A") TREEGREEN = ManimColor("#2A7E19") TRUEBLUE = ManimColor("#010FCC") TRUEGREEN = ManimColor("#089404") TURQUOISE = ManimColor("#06C2AC") TURQUOISEBLUE = ManimColor("#06B1C4") TURQUOISEGREEN = ManimColor("#04F489") TURTLEGREEN = ManimColor("#75B84F") TWILIGHT = ManimColor("#4E518B") TWILIGHTBLUE = ManimColor("#0A437A") UGLYBLUE = ManimColor("#31668A") UGLYBROWN = ManimColor("#7D7103") UGLYGREEN = ManimColor("#7A9703") UGLYPINK = ManimColor("#CD7584") UGLYPURPLE = ManimColor("#A442A0") UGLYYELLOW = ManimColor("#D0C101") ULTRAMARINE = ManimColor("#2000B1") ULTRAMARINEBLUE = ManimColor("#1805DB") UMBER = ManimColor("#B26400") VELVET = ManimColor("#750851") VERMILION = ManimColor("#F4320C") VERYDARKBLUE = ManimColor("#000133") VERYDARKBROWN = ManimColor("#1D0200") VERYDARKGREEN = ManimColor("#062E03") VERYDARKPURPLE = ManimColor("#2A0134") VERYLIGHTBLUE = ManimColor("#D5FFFF") VERYLIGHTBROWN = ManimColor("#D3B683") VERYLIGHTGREEN = ManimColor("#D1FFBD") VERYLIGHTPINK = ManimColor("#FFF4F2") VERYLIGHTPURPLE = ManimColor("#F6CEFC") VERYPALEBLUE = ManimColor("#D6FFFE") VERYPALEGREEN = ManimColor("#CFFDBC") VIBRANTBLUE = ManimColor("#0339F8") VIBRANTGREEN = ManimColor("#0ADD08") VIBRANTPURPLE = ManimColor("#AD03DE") VIOLET = ManimColor("#9A0EEA") VIOLETBLUE = ManimColor("#510AC9") VIOLETPINK = ManimColor("#FB5FFC") VIOLETRED = ManimColor("#A50055") VIRIDIAN = ManimColor("#1E9167") VIVIDBLUE = ManimColor("#152EFF") VIVIDGREEN = ManimColor("#2FEF10") VIVIDPURPLE = ManimColor("#9900FA") VOMIT = ManimColor("#A2A415") VOMITGREEN = ManimColor("#89A203") VOMITYELLOW = ManimColor("#C7C10C") WARMBLUE = ManimColor("#4B57DB") WARMBROWN = ManimColor("#964E02") WARMGREY = ManimColor("#978A84") WARMPINK = ManimColor("#FB5581") WARMPURPLE = ManimColor("#952E8F") WASHEDOUTGREEN = ManimColor("#BCF5A6") WATERBLUE = ManimColor("#0E87CC") WATERMELON = ManimColor("#FD4659") WEIRDGREEN = ManimColor("#3AE57F") WHEAT = ManimColor("#FBDD7E") WHITE = ManimColor("#FFFFFF") WINDOWSBLUE = ManimColor("#3778BF") WINE = ManimColor("#80013F") WINERED = ManimColor("#7B0323") WINTERGREEN = ManimColor("#20F986") WISTERIA = ManimColor("#A87DC2") YELLOW = ManimColor("#FFFF14") YELLOWBROWN = ManimColor("#B79400") YELLOWGREEN = ManimColor("#BBF90F") YELLOWISH = ManimColor("#FAEE66") YELLOWISHBROWN = ManimColor("#9B7A01") YELLOWISHGREEN = ManimColor("#B0DD16") YELLOWISHORANGE = ManimColor("#FFAB0F") YELLOWISHTAN = ManimColor("#FCFC81") YELLOWOCHRE = ManimColor("#CB9D06") YELLOWORANGE = ManimColor("#FCB001") YELLOWTAN = ManimColor("#FFE36E") YELLOWYBROWN = ManimColor("#AE8B0C") YELLOWYGREEN = ManimColor("#BFF128") ================================================ FILE: manim/utils/docbuild/__init__.py ================================================ """Utilities for building the Manim documentation. For more information about the Manim documentation building, see: - :doc:`/contributing/development`, specifically the ``Documentation`` bullet point under :ref:`polishing-changes-and-submitting-a-pull-request` - :doc:`/contributing/docs` .. autosummary:: :toctree: ../reference autoaliasattr_directive autocolor_directive manim_directive module_parsing """ ================================================ FILE: manim/utils/docbuild/autoaliasattr_directive.py ================================================ """A directive for documenting type aliases and other module-level attributes.""" from __future__ import annotations from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers.rst import Directive from docutils.statemachine import ViewList from manim.utils.docbuild.module_parsing import parse_module_attributes if TYPE_CHECKING: from sphinx.application import Sphinx __all__ = ["AliasAttrDocumenter"] ALIAS_DOCS_DICT, DATA_DICT, TYPEVAR_DICT = parse_module_attributes() ALIAS_LIST = [ alias_name for module_dict in ALIAS_DOCS_DICT.values() for category_dict in module_dict.values() for alias_name in category_dict ] def smart_replace(base: str, alias: str, substitution: str) -> str: """Auxiliary function for substituting type aliases into a base string, when there are overlaps between the aliases themselves. Parameters ---------- base The string in which the type aliases will be located and replaced. alias The substring to be substituted. substitution The string which will replace every occurrence of ``alias``. Returns ------- str The new string after the alias substitution. """ occurrences = [] len_alias = len(alias) len_base = len(base) def condition(char: str) -> bool: return not char.isalnum() and char != "_" start = 0 i = 0 while True: i = base.find(alias, start) if i == -1: break if (i == 0 or condition(base[i - 1])) and ( i + len_alias == len_base or condition(base[i + len_alias]) ): occurrences.append(i) start = i + len_alias for o in occurrences[::-1]: base = base[:o] + substitution + base[o + len_alias :] return base def setup(app: Sphinx) -> None: app.add_directive("autoaliasattr", AliasAttrDocumenter) class AliasAttrDocumenter(Directive): """Directive which replaces Sphinx's Autosummary for module-level attributes: instead, it manually crafts a new "Type Aliases" section, where all the module-level attributes which are explicitly annotated as :class:`TypeAlias` are considered as such, for their use all around the Manim docs. These type aliases are separated from the "regular" module-level attributes, which get their traditional "Module Attributes" section autogenerated with Sphinx's Autosummary under "Type Aliases". See ``docs/source/_templates/autosummary/module.rst`` to watch this directive in action. See :func:`~.parse_module_attributes` for more information on how the modules are parsed to obtain the :class:`TypeAlias` information and separate it from the other attributes. """ objtype = "autoaliasattr" required_arguments = 1 has_content = True def run(self) -> list[nodes.Element]: module_name = self.arguments[0] # not present in the keys of the DICTs module_name = module_name.removeprefix("manim.") module_alias_dict = ALIAS_DOCS_DICT.get(module_name, None) module_attrs_list = DATA_DICT.get(module_name, None) module_typevars = TYPEVAR_DICT.get(module_name, None) content = nodes.container() # Add "Type Aliases" section if module_alias_dict is not None: module_alias_section = nodes.section(ids=[f"{module_name}.alias"]) content += module_alias_section # Use a rubric (title-like), just like in `module.rst` module_alias_section += nodes.rubric(text="Type Aliases") # category_name: str # category_dict: AliasCategoryDict = dict[str, AliasInfo] for category_name, category_dict in module_alias_dict.items(): category_section = nodes.section( ids=[category_name.lower().replace(" ", "_")] ) module_alias_section += category_section # category_name can be possibly "" for uncategorized aliases if category_name: category_section += nodes.title(text=category_name) category_alias_container = nodes.container() category_section += category_alias_container # alias_name: str # alias_info: AliasInfo = dict[str, str] # Contains "definition": str # Can possibly contain "doc": str for alias_name, alias_info in category_dict.items(): # Replace all occurrences of type aliases in the # definition for automatic cross-referencing! alias_def = alias_info["definition"] for A in ALIAS_LIST: alias_def = smart_replace(alias_def, A, f":class:`~.{A}`") # Using the `.. class::` directive is CRUCIAL, since # function/method parameters are always annotated via # classes - therefore Sphinx expects a class unparsed = ViewList( [ f".. class:: {alias_name}", "", " .. parsed-literal::", "", f" {alias_def}", "", ] ) if "doc" in alias_info: # Replace all occurrences of type aliases in # the docs for automatic cross-referencing! alias_doc = alias_info["doc"] for A in ALIAS_LIST: alias_doc = alias_doc.replace(f"`{A}`", f":class:`~.{A}`") # also hyperlink the TypeVars from that module if module_typevars is not None: for T in module_typevars: alias_doc = alias_doc.replace(f"`{T}`", f":class:`{T}`") # Add all the lines with 4 spaces behind, to consider all the # documentation as a paragraph INSIDE the `.. class::` block doc_lines = alias_doc.split("\n") unparsed.extend(ViewList([f" {line}" for line in doc_lines])) # Parse the reST text into a fresh container # https://www.sphinx-doc.org/en/master/extdev/markupapi.html#parsing-directive-content-as-rest alias_container = nodes.container() self.state.nested_parse(unparsed, 0, alias_container) category_alias_container += alias_container # then add the module TypeVars section if module_typevars is not None: module_typevars_section = nodes.section(ids=[f"{module_name}.typevars"]) content += module_typevars_section # Use a rubric (title-like), just like in `module.rst` module_typevars_section += nodes.rubric(text="TypeVar's") # name: str # definition: TypeVarDict = dict[str, str] for name, definition in module_typevars.items(): # Using the `.. class::` directive is CRUCIAL, since # function/method parameters are always annotated via # classes - therefore Sphinx expects a class unparsed = ViewList( [ f".. class:: {name}", "", " .. parsed-literal::", "", f" {definition}", "", ] ) # Parse the reST text into a fresh container # https://www.sphinx-doc.org/en/master/extdev/markupapi.html#parsing-directive-content-as-rest typevar_container = nodes.container() self.state.nested_parse(unparsed, 0, typevar_container) module_typevars_section += typevar_container # Then, add the traditional "Module Attributes" section if module_attrs_list is not None: module_attrs_section = nodes.section(ids=[f"{module_name}.data"]) content += module_attrs_section # Use the same rubric (title-like) as in `module.rst` module_attrs_section += nodes.rubric(text="Module Attributes") # Let Sphinx Autosummary do its thing as always # Add all the attribute names with 4 spaces behind, so that # they're considered as INSIDE the `.. autosummary::` block unparsed = ViewList( [ ".. autosummary::", *(f" {attr}" for attr in module_attrs_list), ] ) # Parse the reST text into a fresh container # https://www.sphinx-doc.org/en/master/extdev/markupapi.html#parsing-directive-content-as-rest data_container = nodes.container() self.state.nested_parse(unparsed, 0, data_container) module_attrs_section += data_container return [content] ================================================ FILE: manim/utils/docbuild/autocolor_directive.py ================================================ """A directive for documenting colors in Manim.""" from __future__ import annotations import inspect from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers.rst import Directive from manim import ManimColor if TYPE_CHECKING: from sphinx.application import Sphinx __all__ = ["ManimColorModuleDocumenter"] def setup(app: Sphinx) -> None: app.add_directive("automanimcolormodule", ManimColorModuleDocumenter) class ManimColorModuleDocumenter(Directive): objtype = "automanimcolormodule" required_arguments = 1 has_content = True def add_directive_header(self, sig: str) -> None: # TODO: The Directive class has no method named # add_directive_header. super().add_directive_header(sig) # type: ignore[misc] def run(self) -> list[nodes.Element]: module_name = self.arguments[0] try: import importlib module = importlib.import_module(module_name) except ImportError: return [ nodes.error( None, # type: ignore[arg-type] nodes.paragraph(text=f"Failed to import module '{module_name}'"), ) ] # Number of Colors displayed in one row num_color_cols = 2 table = nodes.table(align="center") tgroup = nodes.tgroup(cols=num_color_cols * 2) table += tgroup for _ in range(num_color_cols * 2): tgroup += nodes.colspec(colwidth=1) # Create header rows for the table thead = nodes.thead() header_row = nodes.row() for _ in range(num_color_cols): header_col1 = nodes.paragraph(text="Color Name") header_col2 = nodes.paragraph(text="RGB Hex Code") header_row += nodes.entry("", header_col1) header_row += nodes.entry("", header_col2) thead += header_row tgroup += thead color_elements = [] for member_name, member_obj in inspect.getmembers(module): if isinstance(member_obj, ManimColor): r, g, b = member_obj.to_rgb() luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b # Choose the font color based on the background luminance font_color = "black" if luminance > 0.5 else "white" color_elements.append((member_name, member_obj.to_hex(), font_color)) tbody = nodes.tbody() for base_i in range(0, len(color_elements), num_color_cols): row = nodes.row() for idx in range(base_i, base_i + num_color_cols): if idx < len(color_elements): member_name, hex_code, font_color = color_elements[idx] col1 = nodes.literal(text=member_name) col2 = nodes.raw( "", f'
{hex_code}
', format="html", ) else: col1 = nodes.literal(text="") col2 = nodes.raw("", "", format="html") row += nodes.entry("", col1) row += nodes.entry("", col2) tbody += row tgroup += tbody return [table] ================================================ FILE: manim/utils/docbuild/manim_directive.py ================================================ r""" A directive for including Manim videos in a Sphinx document =========================================================== When rendering the HTML documentation, the ``.. manim::`` directive implemented here allows to include rendered videos. Its basic usage that allows processing **inline content** looks as follows:: .. manim:: MyScene class MyScene(Scene): def construct(self): ... It is required to pass the name of the class representing the scene to be rendered to the directive. 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 >>> from manim import Create, Dot, RED, Scene >>> dot = Dot(color=RED) >>> dot.color ManimColor('#FC6255') >>> class DirectiveDoctestExample(Scene): ... def construct(self): ... self.play(Create(dot)) Options ------- Options can be passed as follows:: .. manim:: :