* feat: support multiple compilations
Allow `tex_compiler` to be a `str | list[str]` instead of just
`str`. When a list is given, document will be compiled sequentially.
* fix: suppress compilation progress log when only one compiler is used
* fix: updated docstrings and variable naming
Allows accessing edges via tuple keys like g[(1, 2)] in addition to
vertex lookups like g[1]. Previously only vertex lookups were supported.
FixesManimCommunity/manim#3798
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* feat: add TypstMobject and TypstMathMobject for first-class Typst support
Implement the initial TypstMobject proposal (see agents/typst.md):
- TypstMobject: renders arbitrary Typst markup to SVG via the 'typst'
Python package (self-contained Rust binary, no system install needed),
then imports through SVGMobject.
- TypstMathMobject: convenience subclass that wraps input in Typst math
delimiters ($ ... $).
Pipeline: user string → wrap in minimal Typst document (auto-sized page,
transparent background) → write .typ file → compile to SVG via
typst.compile() → import via SVGMobject → scale/center/recolor.
Key details:
- Compilation helper in manim/utils/typst_file_writing.py with SHA-256
content-hash caching (same scheme as the LaTeX pipeline).
- font_size property mirrors SingleStringMathTex: compile at fixed 11pt,
scale after import using initial_height / SCALE_FACTOR_PER_FONT_POINT.
- init_colors() recolors black submobjects to self.color (Typst default
fill is black), preserving any explicit Typst colors.
- path_string_config enables curve subdivision for smooth animation.
- 'typst' added as optional dependency group in pyproject.toml.
- 10 tests covering creation, font_size, caching, preamble, and repr.
* feat(typst): add sub-expression selection via {{ }} groups and .select()
- Override modify_xml_tree in Typst to convert data-typst-label
attributes to id attributes before svgelements parsing (avoids
attribute inheritance issue with data-* attributes)
- Add Typst.select(key) method accepting str labels or int indices
to retrieve VGroup sub-expressions from id_to_vgroup_dict
- Implement {{ }} double-brace preprocessor on TypstMath:
- {{ content }} → manimgrp("_grp-N", content) (auto-numbered)
- {{ content : label }} → manimgrp("label", content) (named)
- Skips {{ }} inside string literals and [...] content blocks
- Uses math-mode call convention (no # prefix) to keep args in
math mode
- Auto-inject manimgrp preamble when groups are detected
- Add 12 new tests covering label mapping, nesting, select(),
error handling, and preprocessor edge cases
* Remove unneeded assert line
* Generalize some more critical hard-coded LaTeX assumptions
* Fix syntax error
* Support Typst labels in existing APIs
* Add ManimTextLabel typing alias
* Preserve Typst SVG stroke widths by default
* Calibrate Typst font sizing against TeX
* Add Typst mobject documentation
* Track Typst baseline frames
* Document Typst baseline frame tracking
* Add Typst section to text guide
* Polish Typst docs and label handling
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Improve Typst stroke scaling and docs examples
* Tune Typst SVG stroke scaling
* Restore Typst math example wording
* Fix pre-commit issues for Typst branch
* Fix number line runtime typing import
* Exclude Typst autogenerated .rst files
* Use Manim directive in docstrings and fix wrong key in Typst.select() docstring
* Fix GroupedMath comments
---------
Co-authored-by: Toon Verstraelen <Toon.Verstraelen@UGent.be>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <francisco.manriquezn@usm.cl>
GenericGraph.__getitem__ only handled vertex lookup. Passing a 2-tuple
(u, v) to retrieve an edge mobject raised a KeyError against the
vertices dict instead of looking up self.edges.
Route tuple keys of length 2 to self.edges so that g[(u, v)] returns
the edge mobject, consistent with how edges are stored internally.
Adds a test covering vertex lookup, edge lookup (Graph), and edge
lookup (DiGraph).
Fixes#3798
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Issue-4087 Add bug test
* Issue-4087 Fix bug
* Issue-4087 Fix comment and add type hint
* Issue-4087 Fix comment
* Issue-4087 Improve previous test instead of adding a new one
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update tests/module/mobject/mobject/test_mobject.py
* Enhance docstring for reduce_across_dimension method
Updated docstring for reduce_across_dimension method to clarify its purpose and parameters.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove float typehints for coords in length_over_dim
* Modify test for empty VMobject dimensions
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Allow Swap to accept Group and VGroup and add example
* Modify create_target return type to Group | VGroup
Updated create_target method to allow returning either Group or VGroup.
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Add type annotations to `transform_matching_parts.py`
* Make two type errors quiet
* Make the pytests pass
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* More specific Callable type annotations in mobject_update_utils
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add option to hide/show inner lines in Table class
* Add tests for Table class inner lines visibility
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Correct indentation
* Fix os.startfile usage to check for availability on Windows
* Add ConversationFlowScene to animate user-chatbot interactions and metadata display
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Revert "Merge remote-tracking branch 'origin/conversation' into hide_table_inner_lines"
This reverts commit c0ba5b8511, reversing
changes made to 1f71f4b0e8.
* Revert change
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Leonardo Cariaggi <leonardo.cariaggi@kbc.be>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Add regression tests for four recent fixes in vectorized_mobject.py
Adds four regression tests for fixes that landed without tests in the same PR:
* 21cf9998 (PR #4630, fixes#3569 + #4629) -- IndexError in
`get_nth_subpath` when `path_list` is empty; ensure it always returns
a NumPy array.
* f6cdb547 (PR #4219) -- `add_points_as_corners` silently dropped a
single new point when called on a VMobject whose last subpath was
complete.
* 3d029c12 (PR #4320, fixes#4255) -- `pointwise_become_partial` cleared
the target's points when the source had no cubic curves, surfacing as
`Arrow3D.get_start()` / `get_end()` returning the origin after a
`Create` animation.
* 429f25328 (PR #4694) -- `scale(scale_stroke=True)` on a compound
VMobject propagated the parent's scaled stroke width to every
submobject, overwriting submobjects with their own (e.g. zero) stroke.
Each test reproduces the original failing condition at the unit level
and asserts the post-fix behavior. Validation: every test was confirmed
to fail when the corresponding fix is reverted on the source file, and
pass when the fix is restored.
4 tests, ~0.2s runtime. Tests go in the existing files
`tests/module/mobject/types/vectorized_mobject/test_vectorized_mobject.py`
(three tests, adjacent to their topically-related siblings) and
`tests/module/mobject/types/vectorized_mobject/test_stroke.py` (one test,
next to the existing `test_stroke_scale`).
Co-authored-by: LetMarq <LetMarq@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: THE-RAF <THE-RAF@users.noreply.github.com>
Co-authored-by: LetMarq <LetMarq@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Add unit tests for module-level color helpers in manim/utils/color/core.py
Adds tests/module/utils/test_color_helpers.py covering the standalone
helper functions exported from manim.utils.color.core (color_to_rgb,
color_to_rgba, color_to_int_rgb, color_to_int_rgba, rgb_to_color,
rgba_to_color, rgb_to_hex, hex_to_rgb, invert_color, color_gradient,
interpolate_color, average_color, random_bright_color, random_color)
and the RandomColorGenerator class.
Before this PR, only the ManimColor class itself was tested
(via tests/module/utils/test_manim_color.py); the standalone helpers
had zero direct test coverage. Coverage on manim/utils/color/core.py
goes from 71% to 80% (line+branch), and 17 of the 18 testable symbols
in the file's __all__ are now exercised. The only deferred symbol is
get_shaded_rgb, which concerns lighting math rather than color
conversion and is better suited to a follow-up.
42 tests, ~0.3s runtime, no new dependencies.
Co-authored-by: LetMarq <LetMarq@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update tests/module/utils/test_color_helpers.py
Increased assertion scheme to cover all colors.
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
---------
Co-authored-by: THE-RAF <THE-RAF@users.noreply.github.com>
Co-authored-by: LetMarq <LetMarq@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* fix: preserve geometry in put_start_and_end_on for zero-vector mobjects
* fix: preserve geometry in put_start_and_end_on for zero-vector mobjects
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed asser_array_equal line
* removed commets in mobject.py and opengl_mobject.py as suggested
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added stacklevel=2 suggestion
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Includes the changes from PRs #4666, #4668, #4669, #4670, and #4671.
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* fix#3569 and #4629
* Add changes to opengl_vectorized_mobject.py
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Made the document changes
* added additional example
* Apply some suggestions from code review
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Shorten sphere examples
* Fix line breaks and remove trailing whitespace
* Add example for showing portions of spheres
* Undo accidental overwrite of ExampleSphereOverlap
* Change name of manim code block
---------
Co-authored-by: Xiuyuan <u7678992@anu.edu.au>
Co-authored-by: TahitiX <136950383+TahitiX@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <francisco.manriquezn@usm.cl>
* Add type annotations to `mobject.py`
* More work on type annotations for mobject.py
* ...
* Almost handled all mypy errors
* Add the mypy error messages to the lines that trigger them
* Use typing.cast to avoid some mypy errors, as suggested by JasonGrace2282
* Used the ruff linter
* Fixed one typing issue and added the error descriptions to the source code for the remaning 10 errors
* Set the type of the elements in a VGroup to VMobject
* Use typing.cast to handle some specific cases.
* Code cleaning
* Updates
* When started to use typing.cast it is needed to import / define certain elements during runtime and not only during type checking
* Fix bug introduced with the type annotations.
* Made it work again
* ..
* Fixed more issues.
* Code cleanup
* Code cleanup.
Replace self.lines with self.lines_chars and self.lines_alignment.
* Handle slicing when accessing elements inside a VGroup
* Fix missing issues.
* Silence the last mypy error
* Make _Updater, _NonTimeBasedUpdater and _TimeBasedUpdater private.
* Replace | with Union[...] in one location
* Move import of Union
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove comment that is no longer relevant
* Overload the auto_zoom method in MovingCamera to provide better type hinting
* Codecleanup
* Code cleanup
* Renamed lines_alignment to lines_alignments and added a TODO about a future cleanup task
* More code cleanup
* Update manim/mobject/matrix.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Addressing multiple comments from Chopan50
* Implementing more suggestions from Chopan50
* More suggestions by Chopan50
* ...
* More renaming and code cleanup, as suggested by Chopan50
* Restructure code
* anim_args
* Update typing in vector_space_scene
* Implemented a number of suggestions from chopan50
* Make a list of faces with the type list[ThreeDVMobject]
* Ensure to return a VGroup if slicing is used.
* Revert back to the original code in text_mobject.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add the propagate_colors option to Mobject as it is used by VMobject.
Replace Self with _UpdateBuilder
* Simplify code
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Added quotes to Vector3D and to Point3D to match other calls to `cast`, such has Chopan suggested
Issue #4550: https://github.com/ManimCommunity/manim/issues/4550
Co-authored-by: Colin Belhomme <colin.belhomme@telecom-paris.fr>
* Fix unintended kwargs propagation in LaggedStartMap
Ensure intended for are not forwarded to the superclass, and make explicit.
* add test for keyword propagation in LaggedStartMap
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update test_composition.py
update the test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update test_composition.py
add there_and_back
---------
Co-authored-by: Benjamin Hackl <mail@behackl.dev>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Stop ignoring manim._config erros in mypy.ini
* Aspect ratio should be a float.
* Handled more mypy issues in _config/utils.py
* Handled more mypy issues in _config/utils.py
* Removed two assert statements that triggered errors in the unittests.
* Fix last mypy issue in utils.py and activate mypy checking
* Fix type of window_size in opengl_renderer_window.py
* ...
---------
Co-authored-by: F. Muenkel <25496279+fmuenkel@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* docker: add libgl1 runtime dependency for OpenGL
* docker: tighten .dockerignore for smaller build context
* docs(docker): add runtime notes for latest image
* docs(docker): note ctex is not included by default
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Add support for negative z-index in AnimationGroup
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Refactor animation unpacking logic for clarity
* Fix unpacking logic to handle Mobject instances correctly
* Fix mypy check
* Fix tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: simplify AnimationGroup unpacking for moving mobjects
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Small touch-ups before fixing tip bugs
- fixed mutable default argument in Tipable VMobject constructor
- fixed typo in method name assign_tip_attr
- added two todo's which outline unexpected behavior in tip placement and how to solve
* refactor: align tip attr naming and remove TODO comments
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* fixing #4591
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* ci: fix publish release workflow
- Add sudo to apt-get calls (runner is non-root)
- Add contents: write permission for uploading release assets
- Drop uv sync before uv build (unnecessary)
- Replace archived upload-release-asset action and redundant
Python/requests API script with gh release upload; tag name
is available directly from the release event context
- Strip leading v from tag name to match built artifact filename
* ci: set bash shell for release asset upload step
* fix: replace double-brace splitting regex with state-machine parser
The previous re.split(r'{{|}}', ...) call split on any occurrence of
{{ or }} in the input string, which broke strings whose only }} came
from closing two nested LaTeX brace groups (e.g. ^{\frac{Mq}{M+m}}).
The new _split_double_braces() static method uses a character-level
state machine with three guards:
* Escape priority: \\ is consumed before \{ / \}, so \\}} is
correctly read as an escaped backslash followed by a real }}, not
misinterpreted as \ + \} + lone }.
* Whitespace-gated opener: {{ is only treated as a Manim group opener
at the start of the string or after whitespace. Naturally-occurring
{{ in LaTeX is usually preceded by non-whitespace (e.g. \frac{{{n}}}
or a^{{2}}), so this eliminates the most common false positives.
* Depth-tracking closer: inside a Manim group, }} only closes the
group when the inner brace depth is zero, so {{ a^{b^{c}} }} is
handled correctly and nested LaTeX }} cannot trigger an early close.
Fixes#4601.
* docs: document double-brace whitespace requirement
Add a Notes section to the MathTex docstring explaining:
- how {{ }} splits a string into submobjects
- that {{ must be at start-of-string or preceded by whitespace
- that this leaves natural LaTeX like \frac{{{n}}}{k} untouched
- the { { ... } } escape hatch when a split is not wanted
Apply the same explanation to the double-brace paragraph in
docs/source/guides/using_text.rst.
* fix: use r-string for _split_double_braces docstring, halve backslash escaping
* fix: resolve parameter shadowing bug in release script changelog command
* chore: bump version to v0.20.0, regenerate lockfile, update citation
* generate v0.20.0 changelog, first round
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* a bit of copyediting, second pass
* include newly merged PR, apply suggestions from review
* Update docs/source/changelog/0.20.0-changelog.md
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
When a single flat list or 1D numpy array was passed to
`Axes.coords_to_point()` (e.g. `ax.c2p([1, 2])` or
`ax.c2p(np.array([1, 2, 1]))`), the values were incorrectly
interpreted as multiple x-coordinates instead of a single (x, y) or
(x, y, z) point.
This happened because `np.asarray(([1, 2],))` produces a 2D array
with shape (1, N), which fell through to the code path that treats
`coords[0]` as a list of x-values. The fix detects this case
(ndim == 2, shape[0] == 1) and extracts the inner array so it is
handled identically to `c2p(1, 2)`.
Closes ManimCommunity#4073
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Add type annotations to point_cloud_mobject.py
* Make reset_points return Self instead of None
* Fix return type of get_array_attrs()
* Change return type of reset_points() to Self in image_mobject.py
* Fix 3D ImageMobject rotation
* Remove lanczos, box and hamming resampling algorithms
* Consider case where matrix A is singular (points are aligned)
* homographic_matrix -> homography_matrix
* Fix ImageInterpolationEx scene and increase height in ImageInterpolation test
* Regenerate unit test again
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ManimFloat should probably not be used as dtype
* Import ImageMobject inside TYPE_CHECKING
* Add Camera.points_to_subpixel_coords() and do not render perpendicular images
* Modify algorithm to use height from longest side
* Prevent possible zero division
* Regenerate ImageMobject.npz
* Edit Image.transform() commentary
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Extracted the method get_mob_from_shape_element
* Moved more functionality to get_mob_from_shape_element
* More cleanup
* Parse the svg file while maintaining the group structure.
* Make the svg groups available
* Handle PERF401 issue
* [pre-commit.ci] pre-commit autoupdate (#4506)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.7 → v0.14.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.7...v0.14.8)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added an example of the issue
* Experimenting with coloring elements from the latex equation
* ...
* Regular expression can now match more than one object
* Process the string by applying the substrings in the order they match
* Code refactoring and added type annotations
* ...
* Added a lot of test cases
* More examples
* More examples
* Use matched_strings_and_ids to simplify existing methods
* Remove unused code
* Update get_part_by_tex to use matched_strings_and_ids
* This is required for test_MathTable to pass
* Ensure that self.texstring is set.
* Added more examples from exising issues in the github repo
* Ensure that latex groups are maintained by adding an additional pair of curly braces around the extracted part
* ExampleScene -> Scene
* Added comment
* _break_up_by_substrings
* Refactor code
* Added comment to example
* Handle integer inputs well.
* Expose the original tex_string
* Do not treat the content of substrings_to_isolate as regular expressions.
* Updated examples
* Update examples
* Fix SVMobject caching issue.
* Remove traces from brace_notation_split_occurred
* Simplify MathTex::_break_up_by_substrings
* Fix small issue in tex that in some cases moved elements a tiny bit around
* No use of regular expressions for locate substrings.
* Updated notes to the set of test cases
* Handle issues with the center environment.
* Add example
* Fix issue with rectangles (e.g. from sqrt)
* ConvertToOpenGL
* Reduce the number of nesting levels.
* Use the specified arg_seperator
* Deal with the double curly brace markup
* Code cleanup
* Code cleanup
* Rollback a few changes
* Code cleanup
* Adjust paths the generated artefacts in tests that rely on MathTex
* Added a remark to the using text guide on enclosing snippets in curly braces for substrings_to_isolate to work
* Added space around the numerator argument to frac to avoid having double curly braces in the example.
This would otherwise trigger MathTex to split the string at that location.
* Log errors properly and display some information about the errors and their context.
* Code refactoring as suggested by Benjamin
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* sub_alphas is derived directly from to_update so they're guaranteed to be of the same length.
* self.shapes is initialised as a direct copy of the mobject, guaranteed to be of same length.
* linspace in this case guarantees both arrays are of equal size (self.n_segments).
* Any transformation already requires that each datapoint in the first tuple has a corresponding datapoint in the second (ie same length)
* Replaced arange with linspace, eliminates risk of floating point errors and forces rgbas and offset to be the same size for strict=True
* all_arc_configs is either defined specifically by length of point_pairs or strictly forced to be the same length (n). In any case they'll always be the same length so strict=True works.
* There should always be an equal amount of start and end anchors; radius_list is defined directly from the length of vertex_group; both outer_vertices and inner_vertices posess n vertices.
* boundary_times always contains has an even length so both 'slices' in the zup function are the same length.
* colors_in_gradient is defined to be the same length as p_list_complete; labels and parts are seemingly user inputs with no guarantee of equal length; val_range is defined to be same lenght as self.bar_names; however there's no authentication that self.values has a fixed length after it's been defined ie user can append to the list creating a mismatch between len(self.values) and len(self.bars)
* In most cases here, the tuples are either defined to be of same length or manipulated to be by the align_data function. In the match_points function there is currently no validation to ensure both mobjects are the same length.
* Reverting _add_x_axis_labels() zip() function back
to strict=False due to failing test cases
* Reverted strict zip usage
* color_gradient is defined to be same length as p_list_complete & within _add_x_axis_labels we define val_range to be the same length as self.bar_names
* align_data and lock_matching_data have no validation to ensure tuples in the zip() function are of the same length. Every other time zip() is used here it is generally immediately manipulating or explicitly defining the tuples to be of same length
* All tuples in zip() functions here are either clearly the same size or manipulated to be the same size using the make_even function.
* The tuples in the zip() function will clearly be of equal length, the second tuple is simply a cyclic shift of the first.
* In the ingest_submobjects function arrays is a one to one mapping of attrs so they are guaranteed to have equal lengths.
* Every usage of zip() consists of tuples that are either manipulated to be equal size or defined to be equal size.
* the zip() function in bezier_remap will always consist of equal length tuples as current_number_of_curves is read directly from the shape of bezier_tuples and is used to dictate the size of split_factors.
* The zip() function color_gradient() will always consist of equal length tuples as floors is defined directly from alphas (which also defines alphas_mod1)
* The tuples in the zip() function in adjacent_n_tuples will always be the same length so strict=True.
* The find_intersection() contains a zip() function that has been set to strict=True. While it is technically possible to pass tuples to this function that are *not* the same length, this would result in generally unexpected behaviour anyway.
* Changed zip() function to have strict=True in __init__() as custom_labels is dependent on tick_range so guaranteed to have the same length.
* Several instances of zip() set to strict=True. In add_coordinates we have axis manipulated to be the same length as tick_range. In get_riemann_rectangles() we have colors dependent on of x_range_Array forcing them to be the same length. Finally in plot_line_graph() it is clearly intended that all inputs used in the zip() function are of the same length (except possibly z which may not exist and will be made equal length to x); while it is not guaranteed they will be the same length this would cause unintended behaviour.
* zip() function bool changed to strict=True in all these test cases. Most test cases either a) hardcode two things to be the same length, b) verify things are the same length before the function or c) explicitly exist to check whether two things are the same length.
* Add py.typed to declare manim as having type hints
This tells tools like Pyright that this package has its own type hints and it should try to look for them in typeshed.
Fixes#4552
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* type annotations and docs for opengl_renderer.py
* add missing self
* Fix RTD build: move Window import to TYPE_CHECKING block
The Window import was moved to module-level in a recent type annotation
commit, but this causes opengl_renderer_window.py to be imported at
load time, triggering pyglet which fails on headless systems (RTD) when
it tries to create a shadow window. Moving the import into TYPE_CHECKING
preserves type hints for mypy while avoiding runtime display dependency.
* Fix mypy errors in opengl_renderer.py
- Cast np.linalg.inv() result to correct type
- Convert quaternion list to ndarray before passing to rotation_matrix_transpose_from_quaternion
- Cast get_center return value
- Fix return type for pixel_coords_to_space_coords (ensure float dtype)
- Add type: ignore for moderngl.create_context backend arg (incorrect stubs)
- Add type: ignore for blend_func assignment (incorrect stubs)
* Fix mypy errors and runtime import issues in opengl_renderer.py
- Import MatrixMN and Point3D at runtime (needed for typing.cast)
- Cast np.linalg.inv() result to correct MatrixMN type
- Convert quaternion list to ndarray before passing to rotation_matrix_transpose_from_quaternion
- Cast get_center and pixel_coords_to_space_coords return values to Point3D
- Ensure float dtype in np.array literals for type consistency
* Add runtime import of Window in init_scene
The Window class is imported inside TYPE_CHECKING for type hints, but
needs to be imported at runtime when actually creating a window. This
import is deferred to avoid triggering pyglet display initialization
on headless systems (RTD build).
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix: infinite recursion caused by accessing color of a highlighted Table cell.
fix: removed type: ignore[attr-defined] mypy was not a fan of
* fix: added back needed mypy type ignore
* Add regression tests for Table/BackgroundRectangle color access
Tests for infinite recursion issue fixed in PR #4435 (issue #4419).
Refs: #4419
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Refactor BackgroundRectangle color test to geometry tests
Move test_background_rectangle_color from test_table.py to
test_unit_geometry.py since BackgroundRectangle lives in
geometry/shape_matchers.py, not in tables.
Regression test for ManimCommunity/manim#4419 (infinite recursion
when accessing BackgroundRectangle.color)
* Fix: Added missing manim GREEN import needed for test_BackgroundRectangle_color_access()
---------
Co-authored-by: Henrik Skov Midtiby <hemi@mmmi.sdu.dk>
Co-authored-by: Benjamin Hackl <mail@behackl.dev>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: bhearr <None>
* fill_color --> color for MathTeX
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* feat: 'seed' option for reproducible outputs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* enh: let Scene automatically pick global random seed, use arg as override
* chore: move import slightly
* chore: add test for color generator being reproducible with global config seed
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* fix: correct Circle.point_at_angle calculation for accurate arc mapping
* chore: remove unused variable 'start_angle' to fix pre-commit CI
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test: add test for Circle.point_at_angle()
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henrik Skov Midtiby <hemi@mmmi.sdu.dk>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <mail@behackl.dev>
* chore: bump minimum supported python to 3.11
* fix: breaking changes from av upgrade
* chore: slightly bump minimum required version of av to 14.0.1
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* chore: update lockfile
* chore: update lockfile again with --upgrade
* Update pyproject.toml
* chore: CI pipeline os/version changes
* fix: indentation in ci.yml
* fix: use result.output instead of result.stdout for test_manim_cfg_subcommand
In Click 8.3.1 (pulled in by av>=14.0.1), help text output
behavior changed for no_args_is_help=True. Using result.output
instead of result.stdout makes the test robust across Click versions,
matching the pattern used in other tests like
test_manim_plugins_subcommand.
* fix: add UP to imports in get_winding_number doctest
* fix: add match_interpolate to imports in doctest
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Initial type work
* More kwargs Any
* More typing
* _get_u_values_and_v_values cleaned
* self.checkerboard_colors
* Simplify code
* colorscale
* new_colors
* Ugly hacks to make the opengl objects behave
* checkerboard_colors
* Ignored a single type error
* Ignored the last type error
* Remove entry from mypy.ini
* set_fill_by_checkerboard
* resolution
* u_range and v_range
* ThreeDAxes
* Is tuple a color?
* resolution
* Point3D and Vector3D
* More with Point3D
* resolution
* colorscale
* checkerboard_colors Iterable
* Breaking change: checkerboard_colors can now be set to None
* Revert "Breaking change: checkerboard_colors can now be set to None"
This reverts commit d5c54cf5fa.
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
## Overview: What does this pull request change?
This PR fixes the documentation for `TangentialArc`.
1. It replaces the static code block in the `TangentialArc` example with the `.. manim::` directive, allowing the example image/video to actually render in the documentation.
2. It adds a new second example scene, `TangentialArcCorners`, which visually demonstrates how the `corner` parameter (e.g., `(1,1)`, `(-1,1)`) affects the arc's orientation.
## Motivation and Explanation: Why and how do your changes improve the library?
Previously, the `TangentialArc` example was hidden inside a standard code block, so users could not see what the output looked like.
Additionally, the `corner` parameter is complex to visualize mentally. The new `TangentialArcCorners` scene provides a clear visual reference for all four possible quadrant configurations, making the class much easier to learn.
## Links to added or changed documentation pages
N/A
## Further Information and Comments
I have tested these changes locally and verified that the images generate correctly.
I am submitting this to the Codeberg mirror as per the current guidance regarding the GitHub incident.
**Visual Proof of the new example:**
I have attached the image
## Reviewer Checklist
- [ ] The PR title is descriptive enough for the changelog, and the PR is labeled correctly
- [ ] If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
- [ ] If applicable: newly added functions and classes are tested
Reviewed-on: https://codeberg.org/ManimCommunity/manim/pulls/1
Reviewed-by: Benjamin Hackl <behackl@noreply.codeberg.org>
Co-authored-by: TahaShams <01-134222-153@student.bahria.edu.pk>
Co-committed-by: TahaShams <01-134222-153@student.bahria.edu.pk>
* Add ruff rules PERF for performance
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix duplicated arrow tips in DashedVMobject and add tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Fixes
Fix type errors, add types for the transformation functions, and fix one case where the about_point and about_edge options were not correctly passed in apply_complex_function in mobject.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* More fixes
- Import a couple types that should have been imported
- Remove the redefinition of self.background_stroke_width in manim/mobject/types/vectorized_mobject.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Set the default python version to 3.13 in the uv installation guide.
* Capitalize Python
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Add regression tests for about_point view mutation issue
This adds regression tests for issue #4445 where using get_vertices()[0]
as about_point in transformation methods would cause incorrect results
due to numpy array view mutation.
Tests added:
- test_rotate_about_vertex_view
- test_scale_about_vertex_view
- test_stretch_about_vertex_view
- test_apply_matrix_about_vertex_view
- test_opengl_rotate_about_vertex_view (OpenGL was not affected by the bug)
Related to #4445
* Fix about_point view mutation in apply_points_function_about_point
When about_point parameter receives a numpy array view (e.g., from
get_vertices()[0]), the in-place operation `mob.points -= about_point`
would mutate the view, corrupting the transformation calculation.
This fix copies about_point before using it to prevent view mutation.
The OpenGL renderer was not affected by this bug because it uses
`arr - about_point` (creates temporary) instead of `arr -= about_point`
(mutates in-place).
Fixes#4445
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* added option to render all scenes by typing '*' when prompted
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add implementation for tangential arc
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add example
* Improve doc slightly
* Remove corner type
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add test for TangentialArc
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Import Line only if type checking
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add missing type hint
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add test for tangential arc
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fixed problem: default value of color in styles in CodeMobject
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added accidently removed test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update code_mobject.py
Code suggested by maejam
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henrik Skov Midtiby <hemi@mmmi.sdu.dk>
Co-authored-by: Henrik Skov Midtiby <henrikmidtiby@gmail.com>
* fixed problem with type conversions in Line3D
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed broken test and Arrow3D
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/mobject/three_d/three_dimensions.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/mobject/three_d/three_dimensions.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Delete unnecessary file
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed typo in variable nam
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* feat(manim.mobject.opengl): added type annotations for `opengl_compatibility.py`
* feat(manim.mobject.opengl): typed almost all attribute definitions in `OpenGLMobject.__init__`
* feat(manim.mobject.opengl): typed more methods for `OpenGLMobject`
* fix(manim.mobject.opengl): import `override` from `typing_extensions`
* fix(manim.mobject.opengl): import `Never` from `typing_extensions`
* feat(manim.utils.config_ops): made `_Data` descriptor generic, to allow correctly typing `OpenGLMobject`
* fix(mypy.ini): don't ignore `manim.mobject.opengl.opengl_mobject`
* fix(manim.utils.config_ops): import `TypeVar` from `typing_extensions`, because the `typing` one does not have the `default` argument.
* feat(manim.mobject.opengl.opengl_mobject): Type checked more methods in `OpenGLMobject`.
* fix(manim.mobject.opengl.opengl_mobject): Fix a typo in `OpenGLMobject.restore`.
* feat(manim.mobject.opengl.opengl_mobject): Typed more methods in `OpenGLMobject`.
* feat(manim.mobject.opengl.opengl_mobject): Moved `overload`s inside an `if TYPE_CHECKING` statement.
* feat(manim.mobject.opengl.opengl_mobject): Added type annotations for `**kwargs` in a set of related methods.
* Revert "feat(manim.mobject.opengl): added type annotations for `opengl_compatibility.py`"
This reverts commit 1cd1550dd2.
* fix(OpenGLMobject): defined `get_array_attrs` method (and typed `_original__init__` at class scope).
I followed the advice of an existing `# TODO` comment and the implementation in `Mobject`. This also resolves a mypy error in this class (missing attribute).
It's interesting because the `get_array_attrs` method is (was) only defined in three classes:
- `Mobject`
- `PMobject`
- `OpenGLPMobject`
* feat(manim.mobject.opengl.opengl_mobject): Added type annotations for the `override_animate()`.
* feat(manim.mobject.opengl.opengl_mobject): Added type annotations to `_AnimationBuilder` and some methods in `OpenGLPoint`.
* fix(manim.mobject.opengl.opengl_mobject): fix failing tests
* fix(OpenGLMobject): default implementation of `pointwise_become_partial(…)` had to return `self`!
* feat(OpenGLMobject): added `type: ignore[no-untyped-call]` for calls to `ShaderWrapper` methods (not yet annotated).
* feat(OpenGLMobject): annotated shader-related `ClassVar`s
* feat(OpenGLMobject): typed several `**kwargs` and added `type: ignore[no-any-return]`s for cases where mypy cannot understand operations on numpy arrays.
* feat(OpenGLMobject): typed more `**kwargs` and fixed `set_color` arguments
* feat(OpenGLMobject): Added more type annotations.
* feat(OpenGLMobject): Typed `OpenGLMobject.uniforms` and `OpenGLMobject.fixed_orientation_center`
* fix(OpenGLMobject): fix tests
* fix(OpenGLGroup): annotate `**kwargs`
* fix(OpenGLPoint): annotate `**kwargs`
* fix(OpenGLPoint): corrected `**kwargs` and removed two `type: ignore`s
* fix(OpenGLPoint): removed `# type: ignore[no-untyped-call]`s
* fix(ci): import `Self` from `typing_extensions` rather than `typing`.
* fix(ci): import `TypeAlias` from `typing_extensions` rather than `typing`.
* feat(OpenGLMobject): make use of PEP 728.
* fix(ci): update `typing-extensions` requirement to the first version that supports PEP 728.
* fix(OpenGLMobject): avoid variable redefinitions in the `arrange_in_grid` method.
* fix(mypy.ini): remove unused changes to `mypy` configuration.
* fix(OpenGLMobject): use different symbols for the two `updater` variables.
* Revert "fix(ci): update `typing-extensions` requirement to the first version that supports PEP 728."
This reverts commit 69b96c6420.
* fix(OpenGLMobject): remove `TypedDict`s and switch to the less precise `**kwargs: Any`.
* Handle three no-any-return issues.
* Removed the slash divider in function parameters
* Removed the slash divider in function parameters
* Keep a single slash divider - to make return types match
---------
Co-authored-by: Henrik Skov Midtiby <henrikmidtiby@gmail.com>
* edit: added the descriptions to /docs/source/index.rst
* apply suggestions from review
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Give SurroundingRectangle 2D buffer
* add test for SurroundingRectangle buff parameter
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Rename save_final_image() to save_image()
* Rename SceneFileWriter.save_final_image() to save_image() and fix
docstring
* fix some type annotations
* make docstrings consistent
* Update manim/scene/scene_file_writer.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: Francisco Manríquez <francisco.manriquezn@usm.cl>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Add type hints to scene/scene_file_write.py
* Add type hints to scene/scene_file_write.py
* Add type hints to scene/section.py
* Add type hints to scene/zoomed_scene.py
* Add type hints to scene/moving_camera_scene.py
* Fix typing of variable scene_name
* Fix typing
* Fix one more type hint
* Adding type annotations to three_d_camera.py
* Suggestions from Chopan50
* Removed a comment.
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Starting to work on type annotations for tex_mobject.py
* More work
* Finished.
* Code cleanup.
* ...
* Removed the ignore errors line in mypy for tex_mobject
* Fix typing of colors
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Add classes MethodWithArgs, SceneInteractRerun and SceneInteractExit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add missing manim.data_structures file
* Rename SceneInteractExit to SceneInteractContinue and use dataclasses
* Revert using @dataclass(slots=True), because Python 3.9 does not support it
* Change order of dataclasses
* Add references to Scene.queue in docstrings
* Include data_structures in utilities_misc.rst
* Use qualified names and mark strings as code in data_structures.py
* Add module docstring to data_structures.py
* Move Scene.interact() objects from data_structures.py into scene.py
* Use qualified name in SceneInteractAction docstring
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Improve MappingCamera, MovingCamera, Rotation, CliColors, and _init_.py readability and docstrings
* Readibility and docsstrings
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestion from @behackl
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Stop ignoring errors from manim/scene.py
Count: 307 errors
Type annotations on scene/vector_space_scene.py
Add type annotations to scene/vector_space_scene.py
Mypy count: 210
Reverting two changes that triggers an error in the automatic testing.
Further work on type hinting.
Avoid forwarding positional arguments from Arrow to Line in the constructor.
Revert "Avoid forwarding positional arguments from Arrow to Line in the constructor."
This reverts commit 80ae8576c1.
Removed several type ignore statements and addressed comments from JasonGrace2282
Revert "Activate mypy check of mobject.geometry.*"
This reverts commit d477c9a994.
Revert "Removed several type ignore statements and addressed comments from JasonGrace2282"
This reverts commit 07bbe3f220.
Added type annotations to zoomed_scene.py
Error count: 308 -> 303
Adding type annotations to all methods in vector_space_scene.py
Error count: 303 -> 272
Get rid of no-untyped-call errors from my in the vector_space_scene.py file
Error count: 272 -> 343
Handle type issues related to ManimColor in vector_space_scene.py
Handle var-annotated issues in vector_space_scene.py
Error count: 332 -> 330
Handling has-type type errors in vector_space_scene.py
Error count: 330 -> 285
Handled name-defined type issues in vector_space_scene.py
Error count: 285 -> 282
Address type issue with calling an untyped method.
Error count: 282 -> 281
Fix some typing issues in transform_mathcing_parts.py
Change stroke_width to float in vector_space_scene.py
Handled a few type errors.
Error count: 267
Handled several typing issues in three_d_scene.py
Error count: 267 -> 248
Dealing with type errors in scene_file_writer.py
Error count: 248 -> 216
Ensured that all methods in scene.py have type declarations.
Error count: 216 -> 225
Handle type issues related to interactivity by asserting that the camera is the OpenGLCamera
Error count: 225 -> 182
Handle type issues in scene.py
Error count: 182 -> 167
Asserting that the renderer or camera is of the proper type to use certain methods.
This is mainly related to interactive elements and the 3D camera used in the ThreeDScene
Error count: 167 -> 143
Avoid cyclic import of dependencies
Error count: 143 -> 143
Handling no-untyped-call type errors in manim/scene/scene.py
Error count: 143 -> 131
Handling assignment type errors in manim/scene/*.py
Error count: 131 -> 121
Handling arg-type type errors in manim/scene/*.py
Error count: 121 -> 116
Handling arg-type type errors in manim/scene/*.py
Error count: 116 -> 112
Fixing various type errors
Error count: 112 -> 102
Fixing various type errors
Error count: 102 -> 97
Fixing various type errors
Error count: 97 -> 90
Some aggressive changes to silence a significant number of type errors.
Error count: 90 -> 66
Commented out an import (IPython) that makes the CI tests fail.
Fix various type errors.
More type annotations.
Code cleanup.
Remove the property mobject_updater_lists of the Scene class as it is not used anywhere.
Handle import-untyped typing issues.
More work on type annotations in manin/scene/.*
More work on scenes/*.py looking at the dependency opengl_renderer.py
More work on types in scenes/*.py
Ignored an old bunch of type ignore statements.
More work on dependencies for scene.py
More work on dependencies for scene.py
* Stop ignoring errors from manim/scene/scene.py
mypy error count: 307
* Adding type annotations to scene.py (C1)
* Adding type annotations to scene.py (C2.1)
* Adding type annotations to scene.py (C2.2)
* Adding type annotations to scene.py (C2.3)
* Adding type annotations to scene.py (C3)
* Adding type annotations to scene.py (C4)
* Adding type annotations to scene.py (C5)
* Adding type annotations to scene.py (C6)
* Adding type annotations to scene.py (C7)
* ...
* Focus on scene.py
* Adding type annotations to vector_space_scene.py
* Added types to opengl_renderer.py
* Added types to cairo_renderer.py
* Fixed the last mypy errors in scene.py - many was ignored
* Fixed the last mypy errors in vector_space_scene.py - many was ignored
* Got rid of the last mypy errors.
* Activate mypy check of vector_space_scene.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Code cleanup.
* Update manim/gui/gui.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/renderer/opengl_renderer.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/scene/scene.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/scene/scene.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/scene/scene.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/scene/scene.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/scene/scene.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Implementing suggestions from chopan50
* Explicitly mention all files where type errors are ignored in mypy.ini
# Conflicts:
# mypy.ini
* Fix issue
* Updates based on comments from chopan50
* Updates suggested by Chopan50
* Addressed more comments from chopan50
* Addressing more comments from chopan50
* Added docstring to SceneInteractAction
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Differentiate between _AnimationBuilder from an mobject and an opengl_mobject
* Avoid a nameclash with the mobject module and variable name
* Last touches.
* Rolled back some changes related to _AnimationBuilder
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: Louis Pierre Jean Gerard <louis_global@fasoo.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Fixed mypy errors in several files with a few errors in each file.
* Fixed a few easy mypy errors.
* Fix mypy issues in animation/changing.py
* Handled mypy issues in _config/cli_colors.py
* Handled mypy issues in mobject/logo.py
* Handling mypy errors in fading.py
* Removed a default parameter (scene = None) in the method clean_up_from_scene in the class FadeOut
* Handled mypy errors in graphing/scale.py
* Handled a few mypy errors in updaters/update.py
* Handled mypy errors in three_d_utils.py
* Updated mypy.ini to check more files
* Avoid a circular import loop.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/animation/changing.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/animation/changing.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/animation/changing.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/mobject/logo.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/animation/changing.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/animation/changing.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/animation/changing.py
Cleaner way to indicate the float type
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/animation/changing.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Updated the type annotations of MoveAlongPath and ChangingDecimal
* Suggestions from review by chopan50
* Fix missing import.
* Update mypy.ini
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update mypy.ini
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update mypy.ini
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update mypy.ini
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Updated mypy.ini
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* add a random generator to hold the seed for random generation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add DOCSTRING for new class RandomColorGenerator
* fix RandomColorGenerator doctest
* introduce the sample colors param in RandomColorGenerator
* Update docstrings to include sample_colors param for RandomColorGenerator
* fix cyclic import issues
* fix indentations for code blocks
* docstring formatting changes
* removed performance warning
added class method
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: Francisco Manríquez <francisco.manriquezn@usm.cl>
* Fix polygon inside/outside logic for edge cases
* Stop using hardcoded values and improve variable naming
* Decompose inside/outside logic into smaller functions
Improves readability and maintanance.
* Improve test readability
* Fix polylabel test logic
* Fix polylabel test by adding multiple options of pole
* Improve docstring description of argument
* Stop checking type checking blocks on coverage
* Fix OpenGLMobject methods doctests
* Fix(graph) : fix Line subclass usage for Graph and DiGraph
Fix(graph): LabeledLine can now be used in _add_edge
* Test(test_graph.py): add tests for LabeledLine as edge_type in Graph and DiGraph
Fix(test_graph): Fixed test_graph_accepts_labeledline_as_edge_type() always failing.
* Add example to family_members_with_points method in Mobject
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add the word 'recursively' to clarify the method description
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Improve the sentence of method description
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Improve the method description
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Adding brackets
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add 'See also' section
* Update manim/mobject/mobject.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* chenge list to list[Mobject]
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Fix Line failing with buff and path_arc
- make copy of vmobject.points if necessary
* change self to self.copy() in Line, and remove the previous change in pointwise_become_partial()
* Revert to first approach: copy points if self is vmobject
* Add unit test for pointwise_become_partial and Line
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* In Line: simplify _account_for_buff and set default path_arc to 0.0
* In Line: add docstring
* change 0.0 to 0
* Use explicit check for path_arc == 0 in _account_for_buff
---------
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Bugfix: colorsys uses HLS (hue, luminance, saturation) ordering when converting to/from rgb. Manim says it uses HSL ordering. Fixed order of parameters in call to colorsys for ManimColor.from_hsl and ManimColor.to_hsl.
Added tests ensure correct HSL ordering.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update to fix the correct color tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: SonnyRoomex <sonny.campbell@roomex.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* fix: enable opengl compatibility for Code
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* rewrite pyproject.toml to support uv; version upgrades of several dev dependencies
* codespellrc: poetry.lock -> uv.lock
* rewrite workflows, first attempt
* change name of pre-commit-hook
* dev-dependencies -> dependency-groups.dev
* lint + format
* Update .github/workflows/ci.yml
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* convert development.rst to myst markdown
* fix (most) docbuild warnings from theme upgrade
* development instructions: switch to uv, plus minor updates
* update entrypoint config in plugin docs + tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix link formatting and clarify the distinction between Manim versions
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add example to get_family method in Mobject
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Type color and polish docstrings
* Stop ignoring manim.utils.color MyPy errors
* Remove manim.mobject.mobject from mypy.ini (put there on accident)
* Fix MyPy errors in GitHub pre-commit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Modify _construct_from_space parameter type
* Modify _construct_from_space parameter type
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: remove duplicate property definitions
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update readme to properly credit Grant Sanderson and revise dismissive language
* Adjust readme and add landing-page mention about Grant's Manim
* Apply suggestions from code review
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* add __hash__ to ManimColor
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update core.py
* add test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: correct typehint
* fix test
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Add missing changes for homotopy example
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix VMobject.add_points_as_corners() to return self and safely handle case where no points are passed
* Add test_vmobject_add_points_as_corners()
* assert np.allclose() -> np.testing.assert_allclose()
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: Francisco Manríquez <francisco.manriquezn@usm.cl>
Follow-up to #3501
This commit combines all the installation documentation onto one page, and switches to recommending the usage
of `uv` for installing Manim.
* Allow python 3.13
* Specify scipy more strictly
* try using 3rd-party audioop package
* debug: wrap context generation in try-block
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove audioop-lts, update dependencies
* add wrapt pre-release (wheels!)
* update lockfile
* CI, windows: try installing all tinytex packages at once
* tmp: verbosity of pytest
* tmp: pass -n 0 for testing
* tmp: disable pytest-xdist
* remove deprecated poetry installer option
* try running tests via uv-provided env
* tmp: run -> run --no-project
* try --full-trace
* try running tests via python -v ...
* tmp: test import of suspicious modules
* test click/cloup
* ci: back to poetry
* ci: disable pytest plugins altogether
* update lockfile
* ci: upgrade pytest
* remove all flags from pytest call
* ci: move conftest, temporarily disable test header
* fix test fixture
* try with more recent version of pytest-xdist
* loadfile -> loadscope
* explicitly test pytest for non-manim module
* some proper tests
* only keep fixtures in new conftest.py
* remove all non-necessary fixtures
* try a literal try/except in fixture file
* simplify tests further
* try and explicitly trigger non-silent errors
* Revert "try and explicitly trigger non-silent errors"
This reverts commit 35b862d483.
* more pytest debug output
* test whether manim can be imported correctly
* test with upgraded numpy
* revert all sorts of debug changes, attempt clean pytest run
* fix whitespace
* pre-commit hooks
* apply config fixture to render tests
* let config fixture ensure renderer is set to cairo
* update doctests for numpy>=2.0
* missed some
* upgrade required numpy version, revert separate treatment of numpy in ci
* upgraded moderngl-window to latest
* more delicate versioning of numpy dependency
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Allow animations with run_time=0 and implement convenience Add animation
* Modify examples so that there are less characters per line
* Docstring fixes
* Update manim/animation/animation.py
* Address comments
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* initial commit
* Update labeled.py
* general fixes
fixed added utils (i.e., Incomplete ordering and Explicit returns mixed with implicit), added :quality: high to docstrings, made ConvexHullExample determined
* typing
added typing to `qhull.py` and `polylabel.py` for debugging. simplified test cases for `ConvexHull` and `ConvexHull3D` and rewrote control data. added tip to LabeledPolygon documentation.
* response to feedback
added `label_config` and `box_config` and `frame_config` for additional configuration options and cleaner interface. added `InternalPointND` and `PointND ` and `InternalPointND_Array` and `PointND_Array` for typing. updated docstring.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* typing
* Update manim/mobject/geometry/labeled.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Update manim/mobject/geometry/labeled.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* typing, docstring, class name
* typing
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* make checks involving from/upto_animation_number more explicit
* add test for flag -n 0,0 for only rendering first animation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Implement SurroundingRectangle.multiple and BackgroundRectangle.multiple
* Integrate SurroundingRectangle constructor for multiple objects into __init__
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* SurroundingRectangle now takes multiple Mobjects as positional args
* Add tests for multiple Mobjects in SurroundingRectangle
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix example that was not using keyword args for SurroundingRectangle
* Remove duplicate code from BackgroundRectangle
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add typing to manim argument of SurroundingRecrabgle constructor
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Remove redundant argument from test_SurroundingRectangle
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Remove type check from SurroundingRectangle
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix missing line issue
* resolve merge conflict
* Fix Group import
* Move Group import into the body of SurroundingRectangle
* Return type checking to SurroundingRectangle
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* small change to error message
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix missing imports
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
* Add option to scale object outlines with objects
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Move outline scaling into VMobject.scale()
* Add unit tests for stroke width
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix docstring for VMobject.scale
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Remove tautology from VMobject.scale
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Refactored Animation run_time validation
* Rewrite error and warning messages, and add validations to wait(), pause() and wait_until()
* Undo rewriting of imports
* Reduce line cylinder height resolution to 2
Subdividing a line cylinder by its height adds no extra resolution -
since it's not checkerboarded, all new rectangles would look the same as
one long rectangle. Decreasing the default subdivision resolution to 2
reduces submobject count by 12x while sacrificing no quality.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Allow for 2 resolution values in Line3D
This prevents a breaking change where a tuple of resolution values
passed to Line3D.resolution would no longer work.
Also applies to Arrow3D.
* Assign field before init
* Add checkered line info to docstring
* Regenerate test control frame
* Regenerate missing control frames
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* ToEdgeExample's circle is added to the scene
* Made it consistent to the surrounding code
---------
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* scene_file_writer: convert frame_rate to fraction
* Set audio codec to AAC when format=mp4
* refactor: change import uv.utils.Fraction -> fractions.Fraction
* use config as single source of truth for container format
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Quoting the python library documentation:
> The subprocess module provides more powerful facilities for spawning
> new processes and retrieving their results; using that module is
> preferable to using this function.
* feat: preserve original Tex colors
* added test for preserving tex color
* fix: fixed breaking change to tex color inheritance
* updated docstring and comment
* Update manim/mobject/text/tex_mobject.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Changing the 'side_length' attribute to a property
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add tests for Square side_length property
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update tests/module/mobject/geometry/test_unit_geometry.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
A Sector is a special case of `AnnualarSector` where the inner radius is zero. As such, it does not make sense to also have a parameter for the inner radius.
* Simplify Sector Class by Removing Redundant Parameters
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
pydub will try to use `ffmpeg` for non-`.wav`/`.raw` files, which is no longer a dependency of Manim. To avoid this, we convert non `.wav`/`.raw` files into `.wav` files before passing it to pydub.
---------
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
* Add separate thread for writing frames to stream
* [pre-commit.ci] pre-commit autoupdate (#3889)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.4 → v0.5.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.4...v0.5.5)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Replace the TypeError message code in the _typecheck_input method in … (#3890)
* Replace the TypeError message code in the _typecheck_input method in the DrawBorderThenFill class.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Remove print statements used for debugging
* Remove writing process termination
- This is probably leftover from back when manim used subprocess to
write frames to FFmpeg via stdin
* Add type hints to modified methods & instance vars
* Fix inline code in docstring & type hint for queue
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Irvanal Haq <125118413+irvanalhaq9@users.noreply.github.com>
* Replace the TypeError message code in the _typecheck_input method in the DrawBorderThenFill class.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Experimenting with an HSL class
* Add some more functionality
* Adding a lot of tests and implementing fully functional conversion between color spaces over proxy rgba
* Fixing tests
* Fixing typing
* return str to normal
* Additional documentation
* Update manim/utils/color/core.py
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/utils/color/core.py
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/utils/color/core.py
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/utils/color/core.py
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Fix documentation and typing and revamp operators to respect color spaces
* Fix color operator typing and add operator tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix typeguard
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Import ManimFloat
* Update manim/utils/color/core.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/utils/color/core.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Add docstring to _internal_space
* naming of functions according to pep8
* Fix naming
* Update manim/utils/color/core.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/utils/color/core.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add colorscale to plot
* Update manim/mobject/graphing/coordinate_systems.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* updated typing and moved one line
* added test
* fix input_to_graph_point error
* Performance improvement by using cairo color drawing
* Add OpenGL support
* Add OpenGL tests and split test for x and y axis for more behavior coverage
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated gradient_line tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: MrDiver <mrdiverlp@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: chopan <francisco.manriquezn@usm.cl>
* Add config for bugbear/comprehensions
note: flake8-comprehensions has 0 changes to the files
* Safe fixes from pre-commit
* Manual changes to make pre-commit pass
* Remove deps from pyproject
* pyproject
* Autofixes from pre-commit
* use get over get(x, None)
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
---------
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
* feat: Animation.set_default
Adds set_default class method to Animation class based on existing implementation for Mobject class.
Addresses issue #3142
* test: added missing test
* fix: docstring formatting
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Add ruff config for pytest
* Fixes for pre-commit
* Changes to make pre-commit happy (Unrelated to PR)
---------
Co-authored-by: Tristan Schulz <tristanschulz1200@gmail.com>
* Fixes#3614
Setting background_transparency=0.0 should have the same effect than
setting transparent=True. The output format must be compatible
with transparency (.mov, .webm). Otherwise ffpmeg fails.
This patch ensures that background_transparency=0.0 triggers the
change of the output format. Also a WARNING is raised about
the change in the output format.
I want to thank @SirJamesClarkMaxwell for inspiring me to tackle
this issue.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test config.background_opacity < 1
* fix config behavior for config.background_opacity < 1
* fix logger messages being emitted twice
* actually cleanup usage of loggers, remove logger-imports; black
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* dry_run fixture
* remove debug print
* applied suggestion from review
* remove custom fixture from test_deprecation, use manim_caplog
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update macos.rst
As of July/2024, brew installs Manim and its dependencies.
Guideline for installing dependencies with brew, and attempt to install using pip3 will no longer work either venv or not.
Now homebrew team manages python resources as "System-wide" only with Brew installed resources.
Hence, to give first time installer just leave a single line install command would be the simplest option we have.
* Update docs/source/installation/macos.rst
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Add docstrings to `Brace` methods
* Add full NumPy format docstring for the `Brace` methods
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* feedback
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* my test is not passing, i need to add a little bit of docs. except that everything is fine. Issue is solved!
* fixed the issue #3655
* removed comments
* fix: 3706 original issue, without adding unnecessary dot
added: i added self.height parameter in Cone class
my tests passes
* Changes that way how end point of Arrow3D is calculated.
* I've improved the methods get_start and get_end for the Cone class, and get_end for the Arrow3D class to ensure they return accurate geometrical points after transformations. Additionally, I've included unit tests to verify the correctness of these methods for the Cone class.
* Finished! Replaced VMobject by VectorizedPoint as Ben suggested while ago
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Make `Line::set_points_by_ends` behavior consistent with constructor
* Use `Line::set_points_by_ends` in edge updaters
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Undo unnecessary change to Graph
* Update manim/mobject/geometry/line.py
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* docs: add manim.typing guide
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add colors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add another example for when to typehint as Vector
* Add docs for images+functions
* write Beziers
* Improve based on feedback
* type -> Type
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* fix: importing manim should not trigger pygments.styles.get_all_styles
Removed the Code.styles_list attribute.
Rewrote the documentation to say that a list of all styles can be generated by calling list(pygments.styles.get_all_styles()).
The example in the docstring of Code was rewritten to use an explicit code style name.
* fix: small change to documentation
* Added potential class method to get available code styles.
* Adding typehints to newly-added attributes.
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Removing unnecessary lines.
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
---------
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Add typings to OpenGLMobject
* Import typing_extensions
* Add explicit returns to inner functions in .arrange_in_grid()
* Add quotes to parameters in ValueError
* Add some more typings
* Address requested changes
* Type apply_over_attr_arrays with TypeVar
* Fix use of TypeVar
* Add Vector3D typing in set_x, set_y and set_z
The "insert_n_curves_to_point_list" function requires the "points" argument to be a numpy array, since it calls the "get_bezier_tuples_from_points" function, which requires "points" to be a numpy array because it has the "return points.reshape((-1, nppc, 3))" statement. Ordinary lists do not have a "reshape" method.
So we need to convert "sp1" and "sp2" to numpy arrays before calling the "insert_n_curves_to_point_list" function.
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* Add config for pyupgrade
* Fix pyupgrade errors
* Unsafe-fixes
* Nicer way of formatting
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Revert "Nicer way of formatting"
This reverts commit 48013f4a30.
---------
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add shorthand for axes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add spacing
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
* Convert CoordinateSystem example, and add to NumberLine
* Add doctest for NumberLine
* Add test
* Fix typehint for c2p
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
* pre-commit change to ruff
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixes
* astral-sh ruff bump
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Optimized AnimationGroup computation of start-end times with lag ratio
* Added extra comment for init_run_time
* Added full path to imports in composition.py
* Optimized AnimationGroup.interpolate
* Fixed final bugs
* Removed accidental print
* Final fix to AnimationGroup.interpolate
* Fixed animations being skipped unintentionally
* Fix and improve Mobject assertions when adding submobjects
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update examples in Mobject.add() and OpenGLMobject.add() docstrings
* overriden -> overridden
* Joined string in OpenGLMobject error message
* Address requested changes
* OpenGLVMObjects -> OpenGLVMobjects
* Use tuplify in VGroup.__setitem__()
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Optimized manim.utils.partial_bezier_points()
* Added split_bezier, subdivide_bezier and bezier_remap, and tests
* Use bezier_remap() in VMobject and OpenGLVMobject()
* Note that partial_bezier_points is similar to calling split_bezier twice
* Optimized manim.utils.bezier.is_closed()
* oops, that shouldn't have been there
* Slightly optimized is_closed() even more
* Added doctest for is_closed()
* Use --py39-plus in pre-commit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix indication.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* added av as a dependency
* make partial movie files use av instead of piping to external ffmpeg
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* opengl rendering: use av for movie files
* no need to check for ffmpeg executable
* refactor: *_movie_pipe -> *_partial_movie_stream
* improve (oneline) documentation
* pass more options to partial movie file rendering
* move ffmpeg verbosity settings to config; renamed option dict
* replaced call to ffmpeg in combine_files by using av
Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* there was one examples saved as a gif?
* chore(deps): re-order av
* chore(lib): simplify `write_frame` method
Reduces the overall code complexity
* chore(lib): add audio
* fix(lib): same issue for conversion
* fix(lib): webm export
* fix(lib): transparent export
Though the output video is weird
* try(lib): fix gif + TODOs
* chore(deps): lower dep crit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* feat(lib): add support for GIF
* fix(ci): rewrite tests
* fix
* chore(ci): prevent calling concat on empty list
* add missing dot
* fix(ci): update frame comparison ?
* fix(log): add handler to libav logger
* chore: add TODO
* fix(lib): concat issue
* Revert "fix(ci): update frame comparison ?"
This reverts commit 904cfb46ae.
* fix(ci): make it pass tests
* chore(lib/docs/ci): remove FFMPEG entirely
This removes any reference to FFMPEG, except in translation files
* added av as a dependency
* make partial movie files use av instead of piping to external ffmpeg
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* opengl rendering: use av for movie files
* no need to check for ffmpeg executable
* refactor: *_movie_pipe -> *_partial_movie_stream
* improve (oneline) documentation
* pass more options to partial movie file rendering
* move ffmpeg verbosity settings to config; renamed option dict
* replaced call to ffmpeg in combine_files by using av
Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* there was one examples saved as a gif?
* chore(deps): re-order av
* chore(lib): simplify `write_frame` method
Reduces the overall code complexity
* chore(lib): add audio
* fix(lib): same issue for conversion
* fix(lib): webm export
* fix(lib): transparent export
Though the output video is weird
* try(lib): fix gif + TODOs
* chore(deps): lower dep crit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* feat(lib): add support for GIF
* fix(ci): rewrite tests
* fix
* chore(ci): prevent calling concat on empty list
* add missing dot
* fix(ci): update frame comparison ?
* fix(log): add handler to libav logger
* chore: add TODO
* fix(lib): concat issue
* Revert "fix(ci): update frame comparison ?"
This reverts commit 904cfb46ae.
* fix(ci): make it pass tests
* chore(lib/docs/ci): remove FFMPEG entirely
This removes any reference to FFMPEG, except in translation files
* chore(deps): update lockfile
* chore(lib): rewrite ffprobe
* fix typo
* slightly more aggressive removal of ffmpeg in docs; minor language changes
* fix gif output stream dimensions
* minor style change
* fix encoding of (transparent) mov files
* fixed metadata / comment
* set frame rate for --format=gif in output_stream
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* more video tests for different render settings, also test pix_fmt
* improve default bitrate setting via crf
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* parametrized format/transparency rendering test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* context managers for (some) av.open
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/utils/commands.py
Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>
* fixed segfault
* update test data involving implicit functions (output improved!)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* explicity set pix_fmt for transparent webms
* special-special case extracting frame from vp9-encoded file with transparency
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix transparent gifs, more special casing in parametrized video format test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* run tests on macos-latest again
* removed old control data
* Revert "run tests on macos-latest again"
This reverts commit f50efa4b88.
* added sound to codec test; fixed issue with sound track in gif (disabled) and webm (now via opus)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* manual wav -> ogg transcoding
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed f-string
* refactored codec test, split out gif
* check for non-zero audio samples
* more cleanup
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove ffmpeg from readthedocs apt_packages
* round up run_time if positive and shorter than current frame rate
* added more run_time tests
* black
* improve implementation of test
* removed some unused imports
* improve wording of logged warning
Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>
* move run_time checks from Animation.begin to Scene.get_run_time
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove unused import
* flake: PT012
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>
* typehint iterables
* organize typing hints
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove any
* Add overloads for tuplify
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove example
* feedback
* Make TypeVars accessible at runtime
* Add hints for zip
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
* typing -> collections.abc
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
* try to make mypy happy
* zip[tuple[T, ...]] instead of zip[T]
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
* feat: Add animations that together simulate typing
AddTextLetterByLetterWithCursor
RemoveTextLetterByLetterWithCursor
Blink
* Revert "feat: Add animations that together simulate typing"
This reverts commit 5fe256880d.
* Revert "Revert "feat: Add animations that together simulate typing""
This reverts commit 6a8244a157.
* Add new animations to __all__
* Temporarily remove docs example
* Modify "Blink" and add docstring examples back in
To avoid 0-second animations, which fail docstring test
* Address requested changes
Fix imports
Remove redundant constructor arguments
Improve names
* Shorten names
* Optimized AnimationGroup computation of start-end times with lag ratio
* Added extra comment for init_run_time
* Added full path to imports in composition.py
* Optimized AnimationGroup.interpolate
* Fixed final bugs
* Removed accidental print
* Final fix to AnimationGroup.interpolate
* Fixed animations being skipped unintentionally
* Addressed requested changes
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Add preview_command cli flag
* Edit help for --preview_command
* Change back from subprocess.run
* Remove old comment
* Bug with timg stopped happening with sp.run
* Fix docstring
* Revert "Fix docstring"
This reverts commit d2c00fc24dc46586f994237f1d2758528b78d6a3.
* Actually fix docstring
* Change help for option
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* suggestions from review on #3434
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* allow user-defined layout functions for Graph
+ fixup type annotations
* only pass relevant args
* write tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* change_layout forward root_vertex and partitions
- deduplicated layout code in __init__ and change_layout
- fixed change_layout backwards compatibility
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add test for change_layout
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix copy/paste error
* fix
* fixup types for CodeQL
* static type the Layout Names
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix dynamic union type for Python 3.9
* add example scenes to LayoutFunction protocol documentation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Replace references to np.ndarray with standard Manim types
* Label NxGraph as a TypeAlias
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Set SpiralIn to use fill_opacity 1 if not set
* Create SpiralIn control data
* Create test for SpiralIn
* Fix spiralin to separate fill and stroke opacity
* resolve opacity issue
* fix test data
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* fix put_start_and_end_on() at the same point
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* refactor(mobject): fix some typehints
* Move typing_extensions import under `if TYPE_CHECKING`
* Change from using `def animate(self: T ,...) -> T` to `def
animate(self, ...) -> Self` as stated in PEP 673
* Fix incorrect usage of `T` in a method
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* move updaters type alias into TYPE_CHECKING
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update documentation and typings for ParametricFunction
* Use manim tyings
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* fix typings
* a few doc fixes
* Update manim/mobject/graphing/functions.py
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update typings
* remove extraneous line
* update example code
* add line back for comptibility
* import TYPE_CHECKING
---------
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update typing guidelines
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix formatting
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* docs: improve installation FAQ's
* I have potentially resolved the issue when in LinearTransformationScene between two animations of transforming space we invoke the self.wait()
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added another solutions in comments, added tests and removed wrong files from git
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* yeah , i forgot to save the file xd
* fixed the test, removed the comments my in changed file
* fix test and speed up test time for test_apply_matrix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed the test, removed the comments my in changed file
* fixed the test
* Revert "docs: improve installation FAQ's"
This reverts commit e53a1c8d6f.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Attempt to fix windows test
* Revert "Attempt to fix windows test"
This reverts commit e31c2077cd.
* try a different fix
* maybe both fixes together?
* try adding in CI
* Update ci.yml
* Update logger_utils.py
* maybe needs a dash?
* try utf8 again
* Remove legacy_windows
* try changing test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Try decoding after capturing bytes output
* Nicer fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix typehint of Vector
* Change from Vector to Point in typehint
In `TipableVMobject._pointify` it converts a 3D
list of the form [x, y, z] to a Vector3D. Therefore
the direction parameter can take lists, not just numpy arrays.
* Add examples to mobject+vmobject methods
* Add missing import
* Separate whitespace to point_from_proportion
* Fixes!
* Changed example of Mobject.get_color
* Remove unneccessary import
* Add in import
* Copied ndarray for rgbas when interpolating
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changing .become to copy the target mobject
* change tests and test data to reflect .become new behavior
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update tests/test_graphical_units/test_mobjects.py
* removed unused copy_submobject kwarg
* added doctests and improved documentation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Remove unused import
* More security fixes
* Remove unused global variable
* More fixes
* Revert change (actual fix would require some rewrite)
* Add exception for edge case to satisfy warning
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Stuff
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Remove call to deprecated `pkg_resources`
* Remove support for dynamic plugin imports, update plugin utilities
* fix affected tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* more fixes
* Last fix
* Fix import
* Update docs
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
The proposed fix does two things :
* If the specified font is 'sans-serif' : change it to 'sans' as this is the name used in the list of fonts
* if the font name is not in the list of fonts, automatically check if the capitalized version of the font exists in the list of fonts. If not, print a warning to the user.
* Refactor `TexTemplate`
* Add tests, refactor some things
* Fixed Some tests
* Move typing imports
* Fix remaining tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* exception add if new_rings is none
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Improve VGroup creation error message
* Use .__name__ for the type
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
---------
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
* Improve section in docs about contributing to docs
* Add note about doc build command depending on the OS
* Improve section in docs about contributing to docs
* Add note about doc build command depending on the OS
* Fix wrong toctree path in docs/source/contributing/docs.rst
* Updated manim.typing and included TypeAliases in docs.source.conf
* Added Vector2 and reorganized manim_type_aliases
* Fixed __all__ exports for __all__ of manim
* Update manim/cli/render/global_options.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Draft of new typing docs and new autotyping directive
* Changed vertical bars to Unions
* Updated poetry.lock
* Created custom file parser for manim.typing
* Got reST parser going
* Updated autotyping and parsing
* Update parsing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added code_block toggle
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added typings to directives
* Renamed Tuple to tuple in manim.typings
* Added missing docs for type aliases
* Fixed exponent typo in ManimInt
* Hyperlinks to types work - removed Module Attributes section
* Removed Unused Import
Remove ``import re``
* Added freeglut-devel to workflows for Linux
Hopefully (?) fix the GLU import error
* Fix package name
* Add support for Type Aliases section in every module - Renaming of Vector types
* Add/fix docs for directive, parser and others
* Fixed alias typo in module_parsing
* Fix decode/import bugs, fix minor details in docs
* Added missing docs for utils.docbuild and utils.testing
* Sort alphabetically entries in utilities_misc.rst
* Address review comments, add notes about Vector and hyperlinks inside definition blocks
---------
Co-authored-by: MrDiver <mrdiverlp@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
* adding the ability to pass lists and generators to .play()
* fix for _AnimationBuilder
* Changed handling of generators to accept lists of generators and normal arguments at the same time
* Animation group handles generators
* Refactored into own function for reusability
* Fix typing
* Fix typing
---------
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
* Added docstrings and example renders to Mobject.to_corner() and Mobject.to_edge
* Added docstrings and example renders to Mobject.to_corner() and Mobject.to_edge
* Update manim/mobject/mobject.py
* Update manim/mobject/mobject.py
* Update manim/mobject/mobject.py
* Update manim/mobject/mobject.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/mobject/mobject.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fixed the stroke width issue with single color in streamlines
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added test for streamlines
* Added test for streamlines
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: MrDiver <mrdiverlp@gmail.com>
* Fix animation group not erroring when instantiated with an empty list
* Move error messages into Animation.begin()
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/animation/animation.py
* Update manim/animation/composition.py
* Update manim/animation/animation.py
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
* Import for both vertical and horizontal gridlines in
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix(lib): fix
This fixes an issue where the `invert` argument would only work for `uint8` dtypes. Now the `max` value is updated according to the pixel array dtype.
Maybe we should add unit tests for that, but haven't found an obvious place to put unit tests.
* chore(ci): add basic test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix(ci): wrong attr name
* Update tests/module/mobject/test_image.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Fix formatting building blocks
* Fix formatting building blocks
---------
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
* Explained ReplacementTransform vs Transform
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added section explaining Transform vs ReplacementTransform
* Added a->b->c example
* Clarified explanation
* Fixed Typo
* Fixed missing colon
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* Worked on issue 3471, fixing rendered file names to inherit section name
* Modified file name to include section number and name
* Modified tests for file names to include number and name, in order to pass
---------
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* feat(cli): optionally hide version splash
As discussed in #3326, this PR proposes a new optional flag to hide the version splash when manim command in launched. Additionally, the splash print is now inly executed when the CLI is executed, not on module import.
After looking at the current documentation, it does not seem to change anything. I only saw that you documented a version splash for when the CLI is used, but not when the module is imported. So removing it should not break the api docs.
In the future, users can still have version information with `import manim; print(manim.__version__)`.
Closes#3326
* chore(tests): make tests pass
---------
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* Added cap_style feature to VMobject
* Added an example to `set_cap_style` method
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Unsplitted line 2501
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added graphical test for cap_style
* Added vmobject_cap_styles.npz for testing cap_styles
* Removed # noqa comments from vectorized_mobject.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* WIP: Update metadata
* Finish removing upper bounds
Drop requests dependency, use urllib instead
order depencencies
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix issues on 3.12
* Order dev dependencies
* Update most dev deps, update lint config
* Add missing import
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* trigger CI
* More deprecation fixes
* Missing argument
* Deprecation fixes, again
* Use older xdist to fix test flakyness
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added cross and optimized get_unit_normal in manim.utils.space_ops
* Added missing border case to new get_unit_normal where one vector is nonzero
* Updated test_threed.py::test_Sphere test data
* Add type hints to `_config`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix call issues
* Fix wrong value being used
* Fix test
* Fix wrong value being set
* lint
* Few type fixes
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix CSV reader adding empty files
Fixes issue #3311
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added LinearTransformationScene.ghost_vectors
* Added test and prevented empty VGroups as ghost vectors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed typo in example
* Added ability to join together multiple renders
* Revert "Added ability to join together multiple renders" (wrong branch)
This reverts commit dee29c390f.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* generated changelog and bumped version
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changed some PR descriptions in the changelog
* fix some docbuild warnings
* fixed a reference that became ambiguous
* copyedit pass of changelog
* some more changelog polishing
* bump release date
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated release date
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add option to run examples directly with binder
The minified JS is from
https://github.com/naveen521kk/manim-binder
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* slight style changes
* update the js file to fix on chrome
Signed-off-by: Naveen M K <naveen521kk@gmail.com>
* show the run button as an cursor
* make the video to be 100% of the width
* Update manim/utils/docbuild/manim_directive.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Add a "Make interactive" button instead of "Run" button
Clicking on the "Make interactive" button show the code-editor and "run" button
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update margin for run interactive button
---------
Signed-off-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Added ability to remove latex junk (default True)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed tests (hopefully), and whitelisted .tex
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* reverted weird changes from merge
* See previous commit message
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed logs-too-long test
* Fixed log output
* Fixed typo ;)
* deleted unused variable
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* moved latex deletion to tex_file_writing.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* removed changes in scene files
* Added caching based on LaTeX expression .svg
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Deleted unused function in delete_old_tex
* make if condition more readable
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* cleaned up svg file check
* changed blacklist -> whitelist for file endings
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Reverted docstring change
* Updated delete_non_svg files docstring
* Changed list to a set
* Update manim/_config/utils.py
* Update manim/cli/render/global_options.py
* added one test for the no_latex_cleanup config option
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* fix: fix an issue with ImageMobject bounding box
A missing point resulted in smaller bounding box causing issues it to be
smaller when the object is rotated. Added the missing fourth point to
ImageMobject points and altered call from camera. Filled in docstring
that used to propagate from superclass, saying that ImageMobject has no
points.
* add a test to check that rotating an image to and from doesn't change it
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Václav Blažej <vaclav.blazej@warwick.ac.uk>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* first draft of color class + starting library conversion
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changed everything to Manim color todo: figure out circular dependency in utils
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* first working draft of new color version
* resolving conflicts
* resolving conflicts
* resolving conflicts
* resolving conflicts
* resolving conflicts
* changed default internal value of ManimColor to np.ndarray[float]
* starting to fix tests
* fixed more tests and changed precision of manim color
* removed premature color conversion
* fixed some more tests
* final test changes
* fix doctests
* fix for 3.8
* fixing ManimColor string representation
* removing some unneccesary conversions
* moved community constants to manim_colors.py and added more color standards
* Added typing.py and typed bezier.py, core.py, constants.py fully
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed codeql complaints
* add type ignore for np.allclose
* fixed import in three_dimensions
* added ignore for F401 back again in flake
* added typings to coordinate_systems.py
* Few improvements to `graphing/coordinate_systems.py`
* added some typings to mobject/geometry/line.py
* updated typings for mobject/geometry/line.py
* Add missing imports to `line.py`
* added typings to three_dimensions.py
* Use `FunctionOverride` for animation overrides
Fix type signature of `set_color_by_gradient`
* Remove `TYPE_CHECKING` check
Doc is failing
* Revert "Remove `TYPE_CHECKING` check"
Fails due to circular import
* Use `Self` in `coordinate_systems.py`
* Typehinted mobject.py and updated manim.typing.py
* Typed VMobject
* Type-hinted manim.mobject.geometry
* math.cos->np.cos, etc & fixed incorrect typehints
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix missing annotations import
* TypeAlias fix in typing.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add ignore errors again to mypy because commits are not possible like this
* Fix last typing issues
* Update docs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Only type check manim
* Try fixing pre-commit
* fix merge
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix compat
* Fix compat again
* Fix imports compat
* Use union syntax
* Use union syntax
* Fix reduce_across_dimension
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Various test and merge fixes
* Doc fixes
* Last doc fix
* Revert usage of np over math
* Bump numpy version
* Remove obsolete duplicate example
* Fixed Incorrect Typehint in manim.constants
* Fix docstring typo
* More fixes
Use mypy.ini instead of .mypy.ini
Fix more docstrings
Improve types in utils and constants
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* docs fixes
* Add internal aliases
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix compat
* line lengths in .rst file, formatting, typos
* add docstring for space_ops:cross2d
* add some more arrow tip typings (in a non-circular import causing way)
* yes, this can be deleted
* fix formatting of example
* added docstring to bezier::inverse_interpolation
* added docstring + test for bezier::match_interpolate
* some improvements in coordinate_systems
* Vector -> Vector3
* replaced np.ndarray with more appropriate type hints
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply feedback
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* revert to previous (new) version
* fix doctest
* fix ReST errors
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Lembcke <alex.lembcke@gmail.com>
Co-authored-by: Viicos <65306057+Viicos@users.noreply.github.com>
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Fix None check order in _tree_layout
* add tests to test_graph.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* do not add a VectorizedPoint as a submobject if SingleStringMathTex renders to empty SVG
* test new behavior
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update tests/module/mobject/text/test_texmobject.py
* Update tests/module/mobject/text/test_texmobject.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Misc: Just a class to test out some functions
* Fix: Fixed a bug in AddTextLetterByLetter class
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix: Adjusted changes according to Ben's comments
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix: Removed imports
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Feat: Adjusted changes to AddTextLetterByLetter
* Feat: Added test_creation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Add a script to build and install cairo
* Update gui tests for cairo 1.18.0
* update script to set env vars
* Make the script run with plain python
* Prefer the recently built one in pkg-config
* Skip the built if it's windows
* CI: build and install latest cairo
* CI: only run when cache is missed
* Disable compiling tests while building cairo
* update poetry lock file
* Display the cairo version when running pytest
* fixup
* tests: skip graphical test when cairo is old
* fix the path to find the pkgconfig files on linux
* set the LD_LIBRARY_PATH too
only then it'll work on linux
* fixup
* small fixup
* Move the script inside `.github/scripts` folder
* Make the minimum cairo version a constant
* Seperate setting env vars to a sperate step
this seem to have broken when cache is hit
* Added docs for functions in mobject_update_utils
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated docstring of always_shift
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Added period to sentence.
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Updated parameter description in always_redraw
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update always_rotate description
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Finished parameters in always_redraw
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Changed comment in always_shift
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* update always_shift description
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* used normalize from manim.utils.space_ops
* fixed indentation in always_redraw
* added type-hints
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* use np.isclose for float equality in number line elongated ticks
* use offsets relative to x_min to tell if we need to elongate a tick
* forgot to subtract to create list of offsets
* add test for elongated ticks float equality
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove unused import
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Unlike similar methods on other objects .add_to_preamble and
.add_to_document do not return the TexTemplate object itself.
This does not allow for stacking these methods.
Just added the `return self` for both methods
Co-authored-by: Uwe Zimmermann <C:\Users\uwezi\AppData\Roaming\The Bat! Pwd>
* first draft of color class + starting library conversion
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changed everything to Manim color todo: figure out circular dependency in utils
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* first working draft of new color version
* resolving conflicts
* resolving conflicts
* resolving conflicts
* resolving conflicts
* resolving conflicts
* changed default internal value of ManimColor to np.ndarray[float]
* starting to fix tests
* fixed more tests and changed precision of manim color
* removed premature color conversion
* fixed some more tests
* final test changes
* fix doctests
* fix for 3.8
* fixing ManimColor string representation
* removing some unneccesary conversions
* moved community constants to manim_colors.py and added more color standards
* broke some too long lines
* added fallback: check whether passed object has get_hex method
* actually fix _internal_from_string
* added hsv support
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove dependency on colour
* fixed DARK_EARTH being assigned twice
* fixed double assignment
* remove more duplicated colour names
* raise NotImplementedError for ManimColor.gradient
* removed unused import
* remove superfluous ManimColor import
* fix circular import, remove dependency of space_ops on config
* one more Color -> ParseableManimColor
* removed one *-import
* somewhat unrelated fixed type hint
* -1 *-import
* fixed change of logic in CoordinateSystem.get_graph_label
* removed debug print; fixed type hint in mobject.py
* some fixes and improvements to text_mobject.py
* update three_dimensions
* fixes for rendered documentation of utils.color.*
* substantial improvements to documentation, including new Sphinx directive
Co-authored-by: MrDiver <mrdiverlp@gmail.com>
* Rewrite of the sphinx directive to use docutils nodes and 2 column design
* I just had to do it
* Improve the color table
* minor cleanup
* fixed ColorOverview example
* documentation improvements
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/mobject/mobject.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix flake8 errors
* Removed test in test_text_mobject
* Improved Documentation of core.py and added private members in sphinx so that internal methods can be documented
* Change color types of labeled.py
* removed some unused imports
* turned docstring into comment
* _colors -> _all_manim_colors; move to manim_color module
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed typing
* rewrite import
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* Added docstring & example for always_redraw
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* made more descriptive names for vars in example
* Change runtime 10s->3s
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
* change Create -> add
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Added typehint for always_redraw
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Changed description of :meth:`always_redraw`
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Added return type to :meth:`always_redraw`
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* added new checkhealth subcommand
* basic checkhealth tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* check -> healthcheck
* more helpful test output on checkhealth fail
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* callable -> Callable
* fix executable check for windows
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed type
* shutil already returns .exe in case it is there
* debug commit ...
* do proper debug commit for windows ...
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix failing test if executable is batch file
* added more helpful (?) recommendations on failed tests
* allow rendering ManimBanner from prerendered SVG path
* improved test scene, actually test text / latex
* added debug info on python executable
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove debug test again
* move SCALE_FACTOR_PER_FONT_POINT to constants
* access constants via module in logo.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* replaced other occurrence of 48 / 960
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fixed IPython sqlite errors/history for interactive_embed scenes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add config to instance method
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* feat: added two new classes LabeledLine and LabeledArrow
* test: added tests for new LabeledLine and LabeledArrow for the geometry module testing suite
* feat: added new class names to '__all__' module attribute
* fix: added missing import line for new classes
* fix: removed import lines causing cyclic import error
* new file containing two new classes
* modified files to correctly load new classes when manim is imported
* commented out new classes in line.py
* created control frames for LabeledLine and LabeledArrow
* removed commented out classes
* removed unused import of 'Colors'
* Update manim/mobject/geometry/labeled_shapes.py
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
* Update manim/mobject/geometry/labeled_shapes.py
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
* Update manim/mobject/geometry/labeled_shapes.py
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
* Update manim/mobject/geometry/labeled_shapes.py
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update __init__.py
will change name of labeled_shapes.py to labeled.py
* Rename labeled_shapes.py to labeled.py
* Update __init__.py
Changed name of file from labeled_shapes.py to labeled.py and updated __init__.py to import from the correct location.
* Update manim/mobject/geometry/labeled.py
Removed color import line because of redundancy.
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
* Update labeled.py
default label_color parameter is now set to `None` instead of `WHITE`.
* Update manim/mobject/geometry/labeled.py
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
* Update tests/test_graphical_units/test_geometry.py
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
* Revert changes related to WHITE and it's import
SurroundingRectangle uses label_color as well and using a default of None removes the rectangle.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-31 14:16:28 -07:00
816 changed files with 52625 additions and 21890 deletions
- [ ] I have checked the [troubleshooting page](https://docs.manim.community/en/stable/installation/troubleshooting.html) and my problem is either not mentioned there,
- [ ] I have checked the [installation FAQ](https://docs.manim.community/en/stable/faq/installation.html) and my problem is either not mentioned there,
or the solution given there does not help.
## Description of error
@ -53,14 +53,5 @@ PASTE HERE
<!-- output of `tlmgr list --only-installed` for TeX Live or a screenshot of the Packages page for MikTeX -->
</details>
<details><summary>FFMPEG</summary>
Output of `ffmpeg -version`:
```
PASTE HERE
```
</details>
## Additional comments
<!-- Add further context that you think might be relevant for this issue here. -->
<!-- Thank you for contributing to Manim! Learn more about the process in our contributing guidelines: https://docs.manim.community/en/latest/contributing.html -->
## Overview: What does this pull request change?
<!-- If there is more information than the PR title that should be added to our release changelog, add it in the following changelog section. This is optional, but recommended for larger pull requests. -->
<!--changelog-start-->
<!--changelog-end-->
## Motivation and Explanation: Why and how do your changes improve the library?
<!-- Optional for bugfixes, small enhancements, and documentation-related PRs. Otherwise, please give a short reasoning for your changes. -->
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."
@ -152,6 +152,7 @@ Examples of conflicts of interest include:
* 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.
Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as demonstrated in the videos of [3Blue1Brown](https://www.3blue1brown.com/).
> NOTE: This repository is maintained by the Manim Community and is not associated with Grant Sanderson or 3Blue1Brown in any way (although we are definitely indebted to him for providing his work to the world). If you would like to study how Grant makes his videos, head over to his repository ([3b1b/manim](https://github.com/3b1b/manim)). This fork is updated more frequently than his, and it's recommended to use this fork if you'd like to use Manim for your own projects.
> [!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](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [Docker](#docker)
- [Help with Manim](#help-with-manim)
- [Contributing](#contributing)
- [License](#license)
## Installation
> **WARNING:** 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/installation/versions.html) and decide which version you wish to install, then only follow the instructions for your desired version.
> [!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
@ -88,11 +88,11 @@ The `-p` flag in the command above is for previewing, meaning the video file wil
Some other useful flags include:
-`-s` to skip to the end and just show the final frame.
-`-n <number>` to skip ahead to the `n`'th animation of a scene.
-`-f` show the file in the file browser.
- `-s` to skip to the end and just show the final frame.
- `-n <number>` to skip ahead to the `n`'th animation of a scene.
- `-f` show the file in the file browser.
For a thorough list of command line arguments, visit the [documentation](https://docs.manim.community/en/stable/tutorials/configuration.html).
For a thorough list of command line arguments, visit the [documentation](https://docs.manim.community/en/stable/guides/configuration.html).
## Documentation
@ -118,8 +118,8 @@ The contribution guide may become outdated quickly; we highly recommend joining
[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 `poetry` for management. You'll want to have poetry installed and available in your environment.
Learn more about `poetry` at its [documentation](https://python-poetry.org/docs/) and find out how to install manim with poetry at the [manim dev-installation guide](https://docs.manim.community/en/stable/contributing/development.html) in the manim documentation.
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.
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"
msgid "Refractor the :class:`.Uncreate`. The new implementation uses a flag member ``reversed``. Set it to ``True`` and its superclass handles the reverse."
msgid "Introduce a bool parameter ``reversed`` to :class:`.Animation`. It decides whether the animation needs to be played backwards. Default to be False."
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)``."
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."
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 </guides/deep_dive>` 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 </faq/index>`"
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"
msgid ":pr:`2186`: Enabled filling color by value for :class:`.OpenGLSurface`, replaced ``colors`` keyword argument of :meth:`.Surface.set_fill_by_value` with ``colorscale``"
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"
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 a Manim Community Dev, or Moderator."
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
@ -31,31 +31,31 @@ msgid "Members of Manim Community are respectful, open, and considerate. Behavio
msgstr ""
#: ../../source/conduct.md:19
msgid "Being respectful. Respectful of others, their positions, experiences, viewpoints, skills, commitments, time, and efforts."
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."
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."
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."
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."
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."
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."
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
@ -147,19 +147,19 @@ msgid "This Code of Conduct applies to the following online spaces:"
msgstr ""
#: ../../source/conduct.md:69
msgid "The ManimCommunity GitHub Organization and all of its repositories"
msgid "The [ManimCommunity GitHub Organization](https://github.com/ManimCommunity) and all of its repositories"
msgstr ""
#: ../../source/conduct.md:71
msgid "The Manim Discord"
msgid "The Manim [Discord](https://www.manim.community/discord/)"
msgstr ""
#: ../../source/conduct.md:73
msgid "The Manim Reddit"
msgid "The Manim [Reddit](https://www.reddit.com/r/manim/)"
msgstr ""
#: ../../source/conduct.md:75
msgid "The Manim Twitter"
msgid "The Manim [Twitter](https://twitter.com/manim\\_community/)"
msgstr ""
#: ../../source/conduct.md:77
@ -211,7 +211,7 @@ 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."
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
@ -323,11 +323,11 @@ 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?"
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."
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
@ -335,15 +335,15 @@ 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."
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?"
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"
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
@ -351,15 +351,15 @@ msgid "Risk"
msgstr ""
#: ../../source/conduct.md:174
msgid "Does this incident include sexual harassment?"
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?"
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?"
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
@ -479,15 +479,15 @@ msgid "When discussing a change to the Manim Community code of conduct or enforc
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."
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."
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."
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
@ -503,7 +503,7 @@ msgid "License"
msgstr ""
#: ../../source/conduct.md:254
msgid "This Code of Conduct is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License."
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/)."
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 <https://www.manim.community/discord/>`_ to discuss any potential contributions and keep up to date with the latest developments."
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 <https://www.manim.community/discord/>`__ to discuss any potential contributions and keep up to date with the latest developments."
msgstr ""
#: ../../source/contributing.rst:12
@ -50,7 +50,11 @@ msgstr ""
msgid "Translating documentation and docstrings"
msgstr ""
#: ../../source/contributing.rst:31
#: ../../source/contributing.rst:30
msgid "To get an overview of what our community is currently working on, check out `our development project board <https://github.com/orgs/ManimCommunity/projects/7/views/1>`__."
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."
@ -75,202 +75,202 @@ msgid "If you choose to use Poetry as well, follow `Poetry's installation guidel
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:78
#: ../../source/contributing/development.rst:82
msgid "The following steps assume that you chose to install and work with Poetry."
msgstr ""
#: ../../source/contributing/development.rst:81
#: ../../source/contributing/development.rst:85
msgid "Install Pre-Commit:"
msgstr ""
#: ../../source/contributing/development.rst:87
#: ../../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:91
#: ../../source/contributing/development.rst:95
msgid "You are now ready to work on manim!"
msgstr ""
#: ../../source/contributing/development.rst:94
#: ../../source/contributing/development.rst:98
msgid "Develop your contribution"
msgstr ""
#: ../../source/contributing/development.rst:96
#: ../../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:104
#: ../../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:111
#: ../../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:114
#: ../../source/contributing/development.rst:118
msgid "Write some awesome code!"
msgstr ""
#: ../../source/contributing/development.rst:116
#: ../../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:124
#: ../../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:130
#: ../../source/contributing/development.rst:134
msgid "When crafting commit messages, it is highly recommended that you adhere to `these guidelines <https://www.conventionalcommits.org/en/v1.0.0/>`_."
msgstr ""
#: ../../source/contributing/development.rst:133
#: ../../source/contributing/development.rst:137
msgid "Add new or update existing tests."
msgstr ""
#: ../../source/contributing/development.rst:135
#: ../../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 <testing>`."
msgstr ""
#: ../../source/contributing/development.rst:140
#: ../../source/contributing/development.rst:144
msgid "Update docstrings and documentation:"
msgstr ""
#: ../../source/contributing/development.rst:142
#: ../../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 <docstrings>` 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:150
#: ../../source/contributing/development.rst:154
msgid "Use the :mod:`manim directive for Sphinx <manim.utils.docbuild.manim_directive>` to add examples to the documentation!"
msgid "A directive for including Manim videos in a Sphinx document"
msgstr ""
#: ../../source/contributing/development.rst:158
#: ../../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:162
#: ../../source/contributing/development.rst:161
msgid "Polishing Changes and Submitting a Pull Request"
msgstr ""
#: ../../source/contributing/development.rst:164
#: ../../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:172
#: ../../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:178
#: ../../source/contributing/development.rst:177
msgid "Update your fork on GitHub to reflect your local changes:"
msgstr ""
#: ../../source/contributing/development.rst:184
#: ../../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:189
#: ../../source/contributing/development.rst:188
msgid "Make a pull request (PR) on GitHub."
msgstr ""
#: ../../source/contributing/development.rst:191
#: ../../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:196
#: ../../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:199
#: ../../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:205
#: ../../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:209
#: ../../source/contributing/development.rst:208
msgid "Your changes are eligible to be merged if:"
msgstr ""
#: ../../source/contributing/development.rst:211
#: ../../source/contributing/development.rst:210
msgid "there are no merge conflicts"
msgstr ""
#: ../../source/contributing/development.rst:212
#: ../../source/contributing/development.rst:211
msgid "the tests in our pipeline pass"
msgstr ""
#: ../../source/contributing/development.rst:213
#: ../../source/contributing/development.rst:212
msgid "at least one (two for more complex changes) Community Developer approves the changes"
msgstr ""
#: ../../source/contributing/development.rst:215
#: ../../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:220
#: ../../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:224
#: ../../source/contributing/development.rst:223
msgid "**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 <file or directory>`` and ``isort <file or directory>``. To fix code style problems, run ``flake8 <file or directory>`` for a style report, and then fix the problems manually that were detected by ``flake8``."
msgstr ""
#: ../../source/contributing/development.rst:233
#: ../../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:240
#: ../../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 <https://graphviz.org/>`_ installed locally."
msgstr ""
#: ../../source/contributing/development.rst:247
#: ../../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:254
#: ../../source/contributing/development.rst:253
msgid "Further useful guidelines"
msgstr ""
#: ../../source/contributing/development.rst:256
#: ../../source/contributing/development.rst:255
msgid "When submitting a PR, please mention explicitly if it includes breaking changes."
msgstr ""
#: ../../source/contributing/development.rst:258
#: ../../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:263
#: ../../source/contributing/development.rst:262
msgid "If you are a maintainer, please label issues and PRs appropriately and frequently."
msgstr ""
#: ../../source/contributing/development.rst:266
#: ../../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:269
#: ../../source/contributing/development.rst:268
msgid "When submitting a code review, it is highly recommended that you adhere to `these general guidelines <https://conventionalcomments.org/>`_."
msgstr ""
#: ../../source/contributing/development.rst:272
#: ../../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:276
#: ../../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:280
msgid "You can find examples for the ``docs`` in several places: the :doc:`Example Gallery <../examples>`, :doc:`Tutorials <../tutorials>`, and :doc:`Reference Classes <../reference>`."
#: ../../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:284
#: ../../source/contributing/development.rst:283
msgid "In case you are contributing, please have a look at this flowchart:"
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 <different-versions>` 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 </changelog/0.2.0-changelog>` 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?"
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 </faq/index>` 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 </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 <creating-suggestions>`."
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?"
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 <version number>`. 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 <package name>` and `python -m pip uninstall <package name>` 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 </installation>` 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 </installation/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 </faq/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."
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))."
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?"
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 <file.py>,"
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."
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 <file.py> 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 <file.py> 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."
msgid "This guide reflects the state of the library as of version ``v0.16.0`` and primarily treats the Cairo renderer. The situation in the latest version of Manim might be different; in case of substantial deviations we will add a note below."
msgstr ""
#: ../../source/guides/deep_dive.rst:14
msgid "Introduction"
msgstr ""
#: ../../source/guides/deep_dive.rst:16
msgid "Manim can be a wonderful library, if it behaves the way you would like it to, and/or the way you expect it to. Unfortunately, this is not always the case (as you probably know if you have played with some manimations yourself already). To understand where things *go wrong*, digging through the library's source code is sometimes the only option -- but in order to do that, you need to know where to start digging."
msgstr ""
#: ../../source/guides/deep_dive.rst:23
msgid "This article is intended as some sort of life line through the render process. We aim to give an appropriate amount of detail describing what happens when Manim reads your scene code and produces the corresponding animation. Throughout this article, we will focus on the following toy example::"
msgstr ""
#: ../../source/guides/deep_dive.rst:43
msgid "Before we go into details or even look at the rendered output of this scene, let us first describe verbally what happens in this *manimation*. In the first three lines of the ``construct`` method, a :class:`.Square` and a :class:`.Circle` are initialized, then the square is added to the scene. The first frame of the rendered output should thus show an orange square."
msgstr ""
#: ../../source/guides/deep_dive.rst:49
msgid "Then the actual animations happen: the square first transforms into a circle, then a :class:`.Dot` is created (Where do you guess the dot is located when it is first added to the scene? Answering this already requires detailed knowledge about the render process.). The dot has an updater attached to it, and as the circle moves right, the dot moves with it. In the end, all mobjects are faded out."
msgstr ""
#: ../../source/guides/deep_dive.rst:56
msgid "Actually rendering the code yields the following video:"
msgstr ""
#: ../../source/guides/deep_dive.rst:75
msgid "For this example, the output (fortunately) coincides with our expectations."
msgstr ""
#: ../../source/guides/deep_dive.rst:78
msgid "Overview"
msgstr ""
#: ../../source/guides/deep_dive.rst:80
msgid "Because there is a lot of information in this article, here is a brief overview discussing the contents of the following chapters on a very high level."
msgstr ""
#: ../../source/guides/deep_dive.rst:83
msgid "`Preliminaries`_: In this chapter we unravel all the steps that take place to prepare a scene for rendering; right until the point where the user-overridden ``construct`` method is ran. This includes a brief discussion on using Manim's CLI versus other means of rendering (e.g., via Jupyter notebooks, or in your Python script by calling the :meth:`.Scene.render` method yourself)."
msgstr ""
#: ../../source/guides/deep_dive.rst:88
msgid "`Mobject Initialization`_: For the second chapter we dive into creating and handling Mobjects, the basic elements that should be displayed in our scene. We discuss the :class:`.Mobject` base class, how there are essentially three different types of Mobjects, and then discuss the most important of them, vectorized Mobjects. In particular, we describe the internal point data structure that governs how the mechanism responsible for drawing the vectorized Mobject to the screen sets the corresponding Bézier curves. We conclude the chapter with a tour into :meth:`.Scene.add`, the bookkeeping mechanism controlling which mobjects should be rendered."
msgstr ""
#: ../../source/guides/deep_dive.rst:97
msgid "`Animations and the Render Loop`_: And finally, in the last chapter we walk through the instantiation of :class:`.Animation` objects (the blueprints that hold information on how Mobjects should be modified when the render loop runs), followed by a investigation of the infamous :meth:`.Scene.play` call. We will see that there are three relevant parts in a :meth:`.Scene.play` call; a part in which the passed animations and keyword arguments are processed and prepared, followed by the actual \"render loop\" in which the library steps through a time line and renders frame by frame. The final part does some post-processing to save a short video segment (\"partial movie file\") and cleanup for the next call to :meth:`.Scene.play`. In the end, after all of :meth:`.Scene.construct` has been run, the library combines the partial movie files to one video."
msgstr ""
#: ../../source/guides/deep_dive.rst:110
msgid "And with that, let us get *in medias res*."
msgstr ""
#: ../../source/guides/deep_dive.rst:113
msgid "Preliminaries"
msgstr ""
#: ../../source/guides/deep_dive.rst:116
msgid "Importing the library"
msgstr ""
#: ../../source/guides/deep_dive.rst:118
msgid "Independent of how exactly you are telling your system to render the scene, i.e., whether you run ``manim -qm -p file_name.py ToyExample``, or whether you are rendering the scene directly from the Python script via a snippet like"
msgstr ""
#: ../../source/guides/deep_dive.rst:129
msgid "or whether you are rendering the code in a Jupyter notebook, you are still telling your python interpreter to import the library. The usual pattern used to do this is"
msgstr ""
#: ../../source/guides/deep_dive.rst:136
msgid "which (while being a debatable strategy in general) imports a lot of classes and functions shipped with the library and makes them available in your global name space. I explicitly avoided stating that it imports **all** classes and functions of the library, because it does not do that: Manim makes use of the practice described in `Section 6.4.1 of the Python tutorial <https://docs.python.org/3/tutorial/modules.html#importing-from-a-package>`__, and all module members that should be exposed to the user upon running the ``*``-import are explicitly declared in the ``__all__`` variable of the module."
msgstr ""
#: ../../source/guides/deep_dive.rst:144
msgid "Manim also uses this strategy internally: taking a peek at the file that is run when the import is called, ``__init__.py`` (see `here <https://github.com/ManimCommunity/manim/blob/main/manim/__init__.py>`__), you will notice that most of the code in that module is concerned with importing members from various different submodules, again using ``*``-imports."
msgstr ""
#: ../../source/guides/deep_dive.rst:152
msgid "If you would ever contribute a new submodule to Manim, the main ``__init__.py`` is where it would have to be listed in order to make its members accessible to users after importing the library."
msgstr ""
#: ../../source/guides/deep_dive.rst:156
msgid "In that file, there is one particular import at the beginning of the file however, namely::"
msgstr ""
#: ../../source/guides/deep_dive.rst:161
msgid "This initializes Manim's global configuration system, which is used in various places throughout the library. After the library runs this line, the current configuration options are set. The code in there takes care of reading the options in your ``.cfg`` files (all users have at least the global one that is shipped with the library) as well as correctly handling command line arguments (if you used the CLI to render)."
msgstr ""
#: ../../source/guides/deep_dive.rst:167
msgid "You can read more about the config system in the :doc:`corresponding thematic guide </guides/configuration>`, and if you are interested in learning more about the internals of the configuration system and how it is initialized, follow the code flow starting in `the config module's init file <https://github.com/ManimCommunity/manim/blob/main/manim/_config/__init__.py>`__."
msgstr ""
#: ../../source/guides/deep_dive.rst:173
msgid "Now that the library is imported, we can turn our attention to the next step: reading your scene code (which is not particularly exciting, Python just creates a new class ``ToyExample`` based on our code; Manim is virtually not involved in that step, with the exception that ``ToyExample`` inherits from ``Scene``)."
msgstr ""
#: ../../source/guides/deep_dive.rst:178
msgid "However, with the ``ToyExample`` class created and ready to go, there is a new excellent question to answer: how is the code in our ``construct`` method actually executed?"
msgstr ""
#: ../../source/guides/deep_dive.rst:183
msgid "Scene instantiation and rendering"
msgstr ""
#: ../../source/guides/deep_dive.rst:185
msgid "The answer to this question depends on how exactly you are running the code. To make things a bit clearer, let us first consider the case that you have created a file ``toy_example.py`` which looks like this::"
msgstr ""
#: ../../source/guides/deep_dive.rst:208
msgid "With such a file, the desired scene is rendered by simply running this Python script via ``python toy_example.py``. Then, as described above, the library is imported and Python has read and defined the ``ToyExample`` class (but, read carefully: *no instance of this class has been created yet*)."
msgstr ""
#: ../../source/guides/deep_dive.rst:213
msgid "At this point, the interpreter is about to enter the ``tempconfig`` context manager. Even if you have not seen Manim's ``tempconfig`` before, it's name already suggests what it does: it creates a copy of the current state of the configuration, applies the changes to the key-value pairs in the passed dictionary, and upon leaving the context the original version of the configuration is restored. TL;DR: it provides a fancy way of temporarily setting configuration options."
msgstr ""
#: ../../source/guides/deep_dive.rst:221
msgid "Inside the context manager, two things happen: an actual ``ToyExample``-scene object is instantiated, and the ``render`` method is called. Every way of using Manim ultimately does something along of these lines, the library always instantiates the scene object and then calls its ``render`` method. To illustrate that this really is the case, let us briefly look at the two most common ways of rendering scenes:"
msgstr ""
#: ../../source/guides/deep_dive.rst:228
msgid "**Command Line Interface.** When using the CLI and running the command ``manim -qm -p toy_example.py ToyExample`` in your terminal, the actual entry point is Manim's ``__main__.py`` file (located `here <https://github.com/ManimCommunity/manim/blob/main/manim/__main__.py>`__. Manim uses `Click <https://click.palletsprojects.com/en/8.0.x/>`__ to implement the command line interface, and the corresponding code is located in Manim's ``cli`` module (https://github.com/ManimCommunity/manim/tree/main/manim/cli). The corresponding code creating the scene class and calling its render method is located `here <https://github.com/ManimCommunity/manim/blob/ac1ee9a683ce8b92233407351c681f7d71a4f2db/manim/cli/render/commands.py#L139-L141>`__."
msgstr ""
#: ../../source/guides/deep_dive.rst:238
msgid "**Jupyter notebooks.** In Jupyter notebooks, the communication with the library is handled by the ``%%manim`` magic command, which is implemented in the ``manim.utils.ipython_magic`` module. There is :meth:`some documentation <.ManimMagic.manim>` available for the magic command, and the code creating the scene class and calling its render method is located `here <https://github.com/ManimCommunity/manim/blob/ac1ee9a683ce8b92233407351c681f7d71a4f2db/manim/utils/ipython_magic.py#L137-L138>`__."
msgstr ""
#: ../../source/guides/deep_dive.rst:246
msgid "Now that we know that either way, a :class:`.Scene` object is created, let us investigate what Manim does when that happens. When instantiating our scene object"
msgstr ""
#: ../../source/guides/deep_dive.rst:253
msgid "the ``Scene.__init__`` method is called, given that we did not implement our own initialization method. Inspecting the corresponding code (see `here <https://github.com/ManimCommunity/manim/blob/main/manim/scene/scene.py>`__) reveals that ``Scene.__init__`` first sets several attributes of the scene objects that do not depend on any configuration options set in ``config``. Then the scene inspects the value of ``config.renderer``, and based on its value, either instantiates a ``CairoRenderer`` or an ``OpenGLRenderer`` object and assigns it to its ``renderer`` attribute."
msgstr ""
#: ../../source/guides/deep_dive.rst:261
msgid "The scene then asks its renderer to initialize the scene by calling"
msgstr ""
#: ../../source/guides/deep_dive.rst:267
msgid "Inspecting both the default Cairo renderer and the OpenGL renderer shows that the ``init_scene`` method effectively makes the renderer instantiate a :class:`.SceneFileWriter` object, which basically is Manim's interface to ``ffmpeg`` and actually writes the movie file. The Cairo renderer (see the implementation `here <https://github.com/ManimCommunity/manim/blob/main/manim/renderer/cairo_renderer.py>`__) does not require any further initialization. The OpenGL renderer does some additional setup to enable the realtime rendering preview window, which we do not go into detail further here."
msgstr ""
#: ../../source/guides/deep_dive.rst:276
msgid "Currently, there is a lot of interplay between a scene and its renderer. This is a flaw in Manim's current architecture, and we are working on reducing this interdependency to achieve a less convoluted code flow."
msgstr ""
#: ../../source/guides/deep_dive.rst:280
msgid "After the renderer has been instantiated and initialized its file writer, the scene populates further initial attributes (notable mention: the ``mobjects`` attribute which keeps track of the mobjects that have been added to the scene). It is then done with its instantiation and ready to be rendered."
msgstr ""
#: ../../source/guides/deep_dive.rst:285
msgid "The rest of this article is concerned with the last line in our toy example script::"
msgstr ""
#: ../../source/guides/deep_dive.rst:289
msgid "This is where the actual magic happens."
msgstr ""
#: ../../source/guides/deep_dive.rst:291
msgid "Inspecting the `implementation of the render method <https://github.com/ManimCommunity/manim/blob/df1a60421ea1119cbbbd143ef288d294851baaac/manim/scene/scene.py#L211>`__ reveals that there are several hooks that can be used for pre- or postprocessing a scene. Unsurprisingly, :meth:`.Scene.render` describes the full *render cycle* of a scene. During this life cycle, there are three custom methods whose base implementation is empty and that can be overwritten to suit your purposes. In the order they are called, these customizable methods are:"
msgstr ""
#: ../../source/guides/deep_dive.rst:298
msgid ":meth:`.Scene.setup`, which is intended for preparing and, well, *setting up* the scene for your animation (e.g., adding initial mobjects, assigning custom attributes to your scene class, etc.),"
msgstr ""
#: ../../source/guides/deep_dive.rst:301
msgid ":meth:`.Scene.construct`, which is the *script* for your screen play and contains programmatic descriptions of your animations, and"
msgstr ""
#: ../../source/guides/deep_dive.rst:303
msgid ":meth:`.Scene.tear_down`, which is intended for any operations you might want to run on the scene after the last frame has already been rendered (for example, this could run some code that generates a custom thumbnail for the video based on the state of the objects in the scene -- this hook is more relevant for situations where Manim is used within other Python scripts)."
msgstr ""
#: ../../source/guides/deep_dive.rst:310
msgid "After these three methods are run, the animations have been fully rendered, and Manim calls :meth:`.CairoRenderer.scene_finished` to gracefully complete the rendering process. This checks whether any animations have been played -- and if so, it tells the :class:`.SceneFileWriter` to close the pipe to ``ffmpeg``. If not, Manim assumes that a static image should be output which it then renders using the same strategy by calling the render loop (see below) once."
msgstr ""
#: ../../source/guides/deep_dive.rst:318
msgid "**Back in our toy example,** the call to :meth:`.Scene.render` first triggers :meth:`.Scene.setup` (which only consists of ``pass``), followed by a call of :meth:`.Scene.construct`. At this point, our *animation script* is run, starting with the initialization of ``orange_square``."
msgstr ""
#: ../../source/guides/deep_dive.rst:325
msgid "Mobject Initialization"
msgstr ""
#: ../../source/guides/deep_dive.rst:327
msgid "Mobjects are, in a nutshell, the Python objects that represent all the *things* we want to display in our scene. Before we follow our debugger into the depths of mobject initialization code, it makes sense to discuss Manim's different types of Mobjects and their basic data structure."
msgstr ""
#: ../../source/guides/deep_dive.rst:334
msgid "What even is a Mobject?"
msgstr ""
#: ../../source/guides/deep_dive.rst:336
msgid ":class:`.Mobject` stands for *mathematical object* or *Manim object* (depends on who you ask 😄). The Python class :class:`.Mobject` is the base class for all objects that should be displayed on screen. Looking at the `initialization method <https://github.com/ManimCommunity/manim/blob/5d72d9cfa2e3dd21c844b1da807576f5a7194fda/manim/mobject/mobject.py#L94>`__ of :class:`.Mobject`, you will find that not too much happens in there:"
msgstr ""
#: ../../source/guides/deep_dive.rst:343
msgid "some initial attribute values are assigned, like ``name`` (which makes the render logs mention the name of the mobject instead of its type), ``submobjects`` (initially an empty list), ``color``, and some others."
msgstr ""
#: ../../source/guides/deep_dive.rst:346
msgid "Then, two methods related to *points* are called: ``reset_points`` followed by ``generate_points``,"
msgstr ""
#: ../../source/guides/deep_dive.rst:348
msgid "and finally, ``init_colors`` is called."
msgstr ""
#: ../../source/guides/deep_dive.rst:350
msgid "Digging deeper, you will find that :meth:`.Mobject.reset_points` simply sets the ``points`` attribute of the mobject to an empty NumPy vector, while the other two methods, :meth:`.Mobject.generate_points` and :meth:`.Mobject.init_colors` are just implemented as ``pass``."
msgstr ""
#: ../../source/guides/deep_dive.rst:355
msgid "This makes sense: :class:`.Mobject` is not supposed to be used as an *actual* object that is displayed on screen; in fact the camera (which we will discuss later in more detail; it is the class that is, for the Cairo renderer, responsible for \"taking a picture\" of the current scene) does not process \"pure\" :class:`Mobjects <.Mobject>` in any way, they *cannot* even appear in the rendered output."
msgstr ""
#: ../../source/guides/deep_dive.rst:362
msgid "This is where different types of mobjects come into play. Roughly speaking, the Cairo renderer setup knows three different types of mobjects that can be rendered:"
msgstr ""
#: ../../source/guides/deep_dive.rst:366
msgid ":class:`.ImageMobject`, which represent images that you can display in your scene,"
msgstr ""
#: ../../source/guides/deep_dive.rst:368
msgid ":class:`.PMobject`, which are very special mobjects used to represent point clouds; we will not discuss them further in this guide,"
msgstr ""
#: ../../source/guides/deep_dive.rst:370
msgid ":class:`.VMobject`, which are *vectorized mobjects*, that is, mobjects that consist of points that are connected via curves. These are pretty much everywhere, and we will discuss them in detail in the next section."
msgstr ""
#: ../../source/guides/deep_dive.rst:375
msgid "... and what are VMobjects?"
msgstr ""
#: ../../source/guides/deep_dive.rst:377
msgid "As just mentioned, :class:`VMobjects <.VMobject>` represent vectorized mobjects. To render a :class:`.VMobject`, the camera looks at the ``points`` attribute of a :class:`.VMobject` and divides it into sets of four points each. Each of these sets is then used to construct a cubic Bézier curve with the first and last entry describing the end points of the curve (\"anchors\"), and the second and third entry describing the control points in between (\"handles\")."
msgstr ""
#: ../../source/guides/deep_dive.rst:386
msgid "To learn more about Bézier curves, take a look at the excellent online textbook `A Primer on Bézier curves <https://pomax.github.io/bezierinfo/>`__ by `Pomax <https://twitter.com/TheRealPomax>`__ -- there is an playground representing cubic Bézier curves `in §1 <https://pomax.github.io/bezierinfo/#introduction>`__, the red and yellow points are \"anchors\", and the green and blue points are \"handles\"."
msgstr ""
#: ../../source/guides/deep_dive.rst:393
msgid "In contrast to :class:`.Mobject`, :class:`.VMobject` can be displayed on screen (even though, technically, it is still considered a base class). To illustrate how points are processed, consider the following short example of a :class:`.VMobject` with 8 points (and thus made out of 8/4 = 2 cubic Bézier curves). The resulting :class:`.VMobject` is drawn in green. The handles are drawn as red dots with a line to their closest anchor."
msgstr ""
#: ../../source/guides/deep_dive.rst:433
msgid "Manually setting the points of your :class:`.VMobject` is usually discouraged; there are specialized methods that can take care of that for you -- but it might be relevant when implementing your own, custom :class:`.VMobject`."
msgstr ""
#: ../../source/guides/deep_dive.rst:441
msgid "Squares and Circles: back to our Toy Example"
msgstr ""
#: ../../source/guides/deep_dive.rst:443
msgid "With a basic understanding of different types of mobjects, and an idea of how vectorized mobjects are built we can now come back to our toy example and the execution of the :meth:`.Scene.construct` method. In the first two lines of our animation script, the ``orange_square`` and the ``blue_circle`` are initialized."
msgstr ""
#: ../../source/guides/deep_dive.rst:450
msgid "When creating the orange square by running"
msgstr ""
#: ../../source/guides/deep_dive.rst:456
msgid "the initialization method of :class:`.Square`, ``Square.__init__``, is called. `Looking at the implementation <https://github.com/ManimCommunity/manim/blob/5d72d9cfa2e3dd21c844b1da807576f5a7194fda/manim/mobject/geometry/polygram.py#L607>`__, we can see that the ``side_length`` attribute of the square is set, and then"
msgstr ""
#: ../../source/guides/deep_dive.rst:466
msgid "is called. This ``super`` call is the Python way of calling the initialization function of the parent class. As :class:`.Square` inherits from :class:`.Rectangle`, the next method called is ``Rectangle.__init__``. There, only the first three lines are really relevant for us::"
msgstr ""
#: ../../source/guides/deep_dive.rst:476
msgid "First, the initialization function of the parent class of :class:`.Rectangle` -- :class:`.Polygon` -- is called. The four positional arguments passed are the four corners of the polygon: ``UR`` is up right (and equal to ``UP + RIGHT``), ``UL`` is up left (and equal to ``UP + LEFT``), and so forth. Before we follow our debugger deeper, let us observe what happens with the constructed polygon: the remaining two lines stretch the polygon to fit the specified width and height such that a rectangle with the desired measurements is created."
msgstr ""
#: ../../source/guides/deep_dive.rst:486
msgid "The initialization function of :class:`.Polygon` is particularly simple, it only calls the initialization function of its parent class, :class:`.Polygram`. There, we have almost reached the end of the chain: :class:`.Polygram` inherits from :class:`.VMobject`, whose initialization function mainly sets the values of some attributes (quite similar to ``Mobject.__init__``, but more specific to the Bézier curves that make up the mobject)."
msgstr ""
#: ../../source/guides/deep_dive.rst:494
msgid "After calling the initialization function of :class:`.VMobject`, the constructor of :class:`.Polygram` also does something somewhat odd: it sets the points (which, you might remember above, should actually be set in a corresponding ``generate_points`` method of :class:`.Polygram`)."
msgstr ""
#: ../../source/guides/deep_dive.rst:501
msgid "In several instances, the implementation of mobjects does not really stick to all aspects of Manim's interface. This is unfortunate, and increasing consistency is something that we actively work on. Help is welcome!"
msgstr ""
#: ../../source/guides/deep_dive.rst:506
msgid "Without going too much into detail, :class:`.Polygram` sets its ``points`` attribute via :meth:`.VMobject.start_new_path`, :meth:`.VMobject.add_points_as_corners`, which take care of setting the quadruples of anchors and handles appropriately. After the points are set, Python continues to process the call stack until it reaches the method that was first called; the initialization method of :class:`.Square`. After this, the square is initialized and assigned to the ``orange_square`` variable."
msgstr ""
#: ../../source/guides/deep_dive.rst:516
msgid "The initialization of ``blue_circle`` is similar to the one of ``orange_square``, with the main difference being that the inheritance chain of :class:`.Circle` is different. Let us briefly follow the trace of the debugger:"
msgstr ""
#: ../../source/guides/deep_dive.rst:521
msgid "The implementation of :meth:`.Circle.__init__` immediately calls the initialization method of :class:`.Arc`, as a circle in Manim is simply an arc with an angle of :math:`\\tau = 2\\pi`. When initializing the arc, some basic attributes are set (like ``Arc.radius``, ``Arc.arc_center``, ``Arc.start_angle``, and ``Arc.angle``), and then the initialization method of its parent class, :class:`.TipableVMobject`, is called (which is a rather abstract base class for mobjects which a arrow tip can be attached to). Note that in contrast to :class:`.Polygram`, this class does **not** preemptively generate the points of the circle."
msgstr ""
#: ../../source/guides/deep_dive.rst:532
msgid "After that, things are less exciting: :class:`.TipableVMobject` again sets some attributes relevant for adding arrow tips, and afterwards passes to the initialization method of :class:`.VMobject`. From there, :class:`.Mobject` is initialized and :meth:`.Mobject.generate_points` is called, which actually runs the method implemented in :meth:`.Arc.generate_points`."
msgstr ""
#: ../../source/guides/deep_dive.rst:539
msgid "After both our ``orange_square`` and the ``blue_circle`` are initialized, the square is actually added to the scene. The :meth:`.Scene.add` method is actually doing a few interesting things, so it is worth to dig a bit deeper in the next section."
msgstr ""
#: ../../source/guides/deep_dive.rst:546
msgid "Adding Mobjects to the Scene"
msgstr ""
#: ../../source/guides/deep_dive.rst:548
msgid "The code in our ``construct`` method that is run next is"
msgstr ""
#: ../../source/guides/deep_dive.rst:554
msgid "From a high-level point of view, :meth:`.Scene.add` adds the ``orange_square`` to the list of mobjects that should be rendered, which is stored in the ``mobjects`` attribute of the scene. However, it does so in a very careful way to avoid the situation that a mobject is being added to the scene more than once. At a first glance, this sounds like a simple task -- the problem is that ``Scene.mobjects`` is not a \"flat\" list of mobjects, but a list of mobjects which might contain mobjects themselves, and so on."
msgstr ""
#: ../../source/guides/deep_dive.rst:563
msgid "Stepping through the code in :meth:`.Scene.add`, we see that first it is checked whether we are currently using the OpenGL renderer (which we are not) -- adding mobjects to the scene works slightly different (and actually easier!) for the OpenGL renderer. Then, the code branch for the Cairo renderer is entered and the list of so-called foreground mobjects (which are rendered on top of all other mobjects) is added to the list of passed mobjects. This is to ensure that the foreground mobjects will stay above of the other mobjects, even after adding the new ones. In our case, the list of foreground mobjects is actually empty, and nothing changes."
msgstr ""
#: ../../source/guides/deep_dive.rst:574
msgid "Next, :meth:`.Scene.restructure_mobjects` is called with the list of mobjects to be added as the ``to_remove`` argument, which might sound odd at first. Practically, this ensures that mobjects are not added twice, as mentioned above: if they were present in the scene ``Scene.mobjects`` list before (even if they were contained as a child of some other mobject), they are first removed from the list. The way :meth:`.Scene.restrucutre_mobjects` works is rather aggressive: It always operates on a given list of mobjects; in the ``add`` method two different lists occur: the default one, ``Scene.mobjects`` (no extra keyword argument is passed), and ``Scene.moving_mobjects`` (which we will discuss later in more detail). It iterates through all of the members of the list, and checks whether any of the mobjects passed in ``to_remove`` are contained as children (in any nesting level). If so, **their parent mobject is deconstructed** and their siblings are inserted directly one level higher. Consider the following example::"
msgstr ""
#: ../../source/guides/deep_dive.rst:604
msgid "Note that the group is disbanded and the circle moves into the root layer of mobjects in ``test_scene.mobjects``."
msgstr ""
#: ../../source/guides/deep_dive.rst:607
msgid "After the mobject list is \"restructured\", the mobject to be added are simply appended to ``Scene.mobjects``. In our toy example, the ``Scene.mobjects`` list is actually empty, so the ``restructure_mobjects`` method does not actually do anything. The ``orange_square`` is simply added to ``Scene.mobjects``, and as the aforementioned ``Scene.moving_mobjects`` list is, at this point, also still empty, nothing happens and :meth:`.Scene.add` returns."
msgstr ""
#: ../../source/guides/deep_dive.rst:615
msgid "We will hear more about the ``moving_mobject`` list when we discuss the render loop. Before we do that, let us look at the next line of code in our toy example, which includes the initialization of an animation class, ::"
msgstr ""
#: ../../source/guides/deep_dive.rst:623
msgid "Hence it is time to talk about :class:`.Animation`."
msgstr ""
#: ../../source/guides/deep_dive.rst:627
msgid "Animations and the Render Loop"
msgstr ""
#: ../../source/guides/deep_dive.rst:630
msgid "Initializing animations"
msgstr ""
#: ../../source/guides/deep_dive.rst:632
msgid "Before we follow the trace of the debugger, let us briefly discuss the general structure of the (abstract) base class :class:`.Animation`. An animation object holds all the information necessary for the renderer to generate the corresponding frames. Animations (in the sense of animation objects) in Manim are *always* tied to a specific mobject; even in the case of :class:`.AnimationGroup` (which you should actually think of as an animation on a group of mobjects rather than a group of animations). Moreover, except for in a particular special case, the run time of animations is also fixed and known beforehand."
msgstr ""
#: ../../source/guides/deep_dive.rst:642
msgid "The initialization of animations actually is not very exciting, :meth:`.Animation.__init__` merely sets some attributes derived from the passed keyword arguments and additionally ensures that the ``Animation.starting_mobject`` and ``Animation.mobject`` attributes are populated. Once the animation is played, the ``starting_mobject`` attribute holds an unmodified copy of the mobject the animation is attached to; during the initialization it is set to a placeholder mobject. The ``mobject`` attribute is set to the mobject the animation is attached to."
msgstr ""
#: ../../source/guides/deep_dive.rst:652
msgid "Animations have a few special methods which are called during the render loop:"
msgstr ""
#: ../../source/guides/deep_dive.rst:655
msgid ":meth:`.Animation.begin`, which is called (as hinted by its name) at the beginning of every animation, so before the first frame is rendered. In it, all the required setup for the animation happens."
msgstr ""
#: ../../source/guides/deep_dive.rst:658
msgid ":meth:`.Animation.finish` is the counterpart to the ``begin`` method which is called at the end of the life cycle of the animation (after the last frame has been rendered)."
msgstr ""
#: ../../source/guides/deep_dive.rst:661
msgid ":meth:`.Animation.interpolate` is the method that updates the mobject attached to the animation to the corresponding animation completion percentage. For example, if in the render loop, ``some_animation.interpolate(0.5)`` is called, the attached mobject will be updated to the state where 50% of the animation are completed."
msgstr ""
#: ../../source/guides/deep_dive.rst:667
msgid "We will discuss details about these and some further animation methods once we walk through the actual render loop. For now, we continue with our toy example and the code that is run when initializing the :class:`.ReplacementTransform` animation."
msgstr ""
#: ../../source/guides/deep_dive.rst:672
msgid "The initialization method of :class:`.ReplacementTransform` only consists of a call to the constructor of its parent class, :class:`.Transform`, with the additional keyword argument ``replace_mobject_with_target_in_scene`` set to ``True``. :class:`.Transform` then sets attributes that control how the points of the starting mobject are deformed into the points of the target mobject, and then passes on to the initialization method of :class:`.Animation`. Other basic properties of the animation (like its ``run_time``, the ``rate_func``, etc.) are processed there -- and then the animation object is fully initialized and ready to be played."
msgstr ""
#: ../../source/guides/deep_dive.rst:685
msgid "The ``play`` call: preparing to enter Manim's render loop"
msgstr ""
#: ../../source/guides/deep_dive.rst:687
msgid "We are finally there, the render loop is in our reach. Let us walk through the code that is run when :meth:`.Scene.play` is called."
msgstr ""
#: ../../source/guides/deep_dive.rst:692
msgid "Recall that this article is specifically about the Cairo renderer. Up to here, things were more or less the same for the OpenGL renderer as well; while some base mobjects might be different, the control flow and lifecycle of mobjects is still more or less the same. There are more substantial differences when it comes to the rendering loop."
msgstr ""
#: ../../source/guides/deep_dive.rst:698
msgid "As you will see when inspecting the method, :meth:`.Scene.play` almost immediately passes over to the ``play`` method of the renderer, in our case :class:`.CairoRenderer.play`. The one thing :meth:`.Scene.play` takes care of is the management of subcaptions that you might have passed to it (see the the documentation of :meth:`.Scene.play` and :meth:`.Scene.add_subcaption` for more information)."
msgstr ""
#: ../../source/guides/deep_dive.rst:707
msgid "As has been said before, the communication between scene and renderer is not in a very clean state at this point, so the following paragraphs might be confusing if you don't run a debugger and step through the code yourself a bit."
msgstr ""
#: ../../source/guides/deep_dive.rst:712
msgid "Inside :meth:`.CairoRenderer.play`, the renderer first checks whether it may skip rendering of the current play call. This might happen, for example, when ``-s`` is passed to the CLI (i.e., only the last frame should be rendered), or when the ``-n`` flag is passed and the current play call is outside of the specified render bounds. The \"skipping status\" is updated in form of the call to :meth:`.CairoRenderer.update_skipping_status`."
msgstr ""
#: ../../source/guides/deep_dive.rst:719
msgid "Next, the renderer asks the scene to process the animations in the play call so that renderer obtains all of the information it needs. To be more concrete, :meth:`.Scene.compile_animation_data` is called, which then takes care of several things:"
msgstr ""
#: ../../source/guides/deep_dive.rst:724
msgid "The method processes all animations and the keyword arguments passed to the initial :meth:`.Scene.play` call. In particular, this means that it makes sure all arguments passed to the play call are actually animations (or ``.animate`` syntax calls, which are also assembled to be actual :class:`.Animation`-objects at that point). It also propagates any animation-related keyword arguments (like ``run_time``, or ``rate_func``) passed to :class:`.Scene.play` to each individual animation. The processed animations are then stored in the ``animations`` attribute of the scene (which the renderer later reads...)."
msgstr ""
#: ../../source/guides/deep_dive.rst:733
msgid "It adds all mobjects to which the animations that are played are bound to to the scene (provided the animation is not an mobject-introducing animation -- for these, the addition to the scene happens later)."
msgstr ""
#: ../../source/guides/deep_dive.rst:736
msgid "In case the played animation is a :class:`.Wait` animation (this is the case in a :meth:`.Scene.wait` call), the method checks whether a static image should be rendered, or whether the render loop should be processed as usual (see :meth:`.Scene.should_update_mobjects` for the exact conditions, basically it checks whether there are any time-dependent updater functions and so on)."
msgstr ""
#: ../../source/guides/deep_dive.rst:742
msgid "Finally, the method determines the total run time of the play call (which at this point is computed as the maximum of the run times of the passed animations). This is stored in the ``duration`` attribute of the scene."
msgstr ""
#: ../../source/guides/deep_dive.rst:747
msgid "After the animation data has been compiled by the scene, the renderer continues to prepare for entering the render loop. It now checks the skipping status which has been determined before. If the renderer can skip this play call, it does so: it sets the current play call hash (which we will get back to in a moment) to ``None`` and increases the time of the renderer by the determined animation run time."
msgstr ""
#: ../../source/guides/deep_dive.rst:754
msgid "Otherwise, the renderer checks whether or not Manim's caching system should be used. The idea of the caching system is simple: for every play call, a hash value is computed, which is then stored and upon re-rendering the scene, the hash is generated again and checked against the stored value. If it is the same, the cached output is reused, otherwise it is fully rerendered again. We will not go into details of the caching system here; if you would like to learn more, the :func:`.get_hash_from_play_call` function in the :mod:`.utils.hashing` module is essentially the entry point to the caching mechanism."
msgstr ""
#: ../../source/guides/deep_dive.rst:764
msgid "In the event that the animation has to be rendered, the renderer asks its :class:`.SceneFileWriter` to start a writing process. The process is started by a call to ``ffmpeg`` and opens a pipe to which rendered raw frames can be written. As long as the pipe is open, the process can be accessed via the ``writing_process`` attribute of the file writer. With the writing process in place, the renderer then asks the scene to \"begin\" the animations."
msgstr ""
#: ../../source/guides/deep_dive.rst:772
msgid "First, it literally *begins* all of the animations by calling their setup methods (:meth:`.Animation._setup_scene`, :meth:`.Animation.begin`). In doing so, the mobjects that are newly introduced by an animation (like via :class:`.Create` etc.) are added to the scene. Furthermore, the animation suspends updater functions being called on its mobject, and it sets its mobject to the state that corresponds to the first frame of the animation."
msgstr ""
#: ../../source/guides/deep_dive.rst:780
msgid "After this has happened for all animations in the current ``play`` call, the Cairo renderer determines which of the scene's mobjects can be painted statically to the background, and which ones have to be redrawn every frame. It does so by calling :meth:`.Scene.get_moving_and_static_mobjects`, and the resulting partition of mobjects is stored in the corresponding ``moving_mobjects`` and ``static_mobjects`` attributes."
msgstr ""
#: ../../source/guides/deep_dive.rst:790
msgid "The mechanism that determines static and moving mobjects is specific for the Cairo renderer, the OpenGL renderer works differently. Basically, moving mobjects are determined by checking whether they, any of their children, or any of the mobjects \"below\" them (in the sense of the order in which mobjects are processed in the scene) either have an update function attached, or whether they appear in one of the current animations. See the implementation of :meth:`.Scene.get_moving_mobjects` for more details."
msgstr ""
#: ../../source/guides/deep_dive.rst:799
msgid "Up to this very point, we did not actually render any (partial) image or movie files from the scene yet. This is, however, about to change. Before we enter the render loop, let us briefly revisit our toy example and discuss how the generic :meth:`.Scene.play` call setup looks like there."
msgstr ""
#: ../../source/guides/deep_dive.rst:805
msgid "For the call that plays the :class:`.ReplacementTransform`, there is no subcaption to be taken care of. The renderer then asks the scene to compile the animation data: the passed argument already is an animation (no additional preparations needed), there is no need for processing any keyword arguments (as we did not specify any additional ones to ``play``). The mobject bound to the animation, ``orange_square``, is already part of the scene (so again, no action taken). Finally, the run time is extracted (3 seconds long) and stored in ``Scene.duration``. The renderer then checks whether it should skip (it should not), then whether the animation is already cached (it is not). The corresponding animation hash value is determined and passed to the file writer, which then also calls ``ffmpeg`` to start the writing process which waits for rendered frames from the library."
msgstr ""
#: ../../source/guides/deep_dive.rst:821
msgid "The scene then ``begin``\\ s the animation: for the :class:`.ReplacementTransform` this means that the animation populates all of its relevant animation attributes (i.e., compatible copies of the starting and the target mobject so that it can safely interpolate between the two)."
msgstr ""
#: ../../source/guides/deep_dive.rst:827
msgid "The mechanism determining static and moving mobjects considers all of the scenes mobjects (at this point only the ``orange_square``), and determines that the ``orange_square`` is bound to an animation that is currently played. As a result, the square is classified as a \"moving mobject\"."
msgstr ""
#: ../../source/guides/deep_dive.rst:833
msgid "Time to render some frames."
msgstr ""
#: ../../source/guides/deep_dive.rst:837
msgid "The render loop (for real this time)"
msgstr ""
#: ../../source/guides/deep_dive.rst:839
msgid "As mentioned above, due to the mechanism that determines static and moving mobjects in the scene, the renderer knows which mobjects it can paint statically to the background of the scene. Practically, this means that it partially renders a scene (to produce a background image), and then when iterating through the time progression of the animation only the \"moving mobjects\" are re-painted on top of the static background."
msgstr ""
#: ../../source/guides/deep_dive.rst:846
msgid "The renderer calls :meth:`.CairoRenderer.save_static_frame_data`, which first checks whether there are currently any static mobjects, and if there are, it updates the frame (only with the static mobjects; more about how exactly this works in a moment) and then saves a NumPy array representing the rendered frame in the ``static_image`` attribute. In our toy example, there are no static mobjects, and so the ``static_image`` attribute is simply set to ``None``."
msgstr ""
#: ../../source/guides/deep_dive.rst:854
msgid "Next, the renderer asks the scene whether the current animation is a \"frozen frame\" animation, which would mean that the renderer actually does not have to repaint the moving mobjects in every frame of the time progression. It can then just take the latest static frame, and display it throughout the animation."
msgstr ""
#: ../../source/guides/deep_dive.rst:862
msgid "An animation is considered a \"frozen frame\" animation if only a static :class:`.Wait` animation is played. See the description of :meth:`.Scene.compile_animation_data` above, or the implementation of :meth:`.Scene.should_update_mobjects` for more details."
msgstr ""
#: ../../source/guides/deep_dive.rst:868
msgid "If this is not the case (just as in our toy example), the renderer then calls the :meth:`.Scene.play_internal` method, which is the integral part of the render loop (in which the library steps through the time progression of the animation and renders the corresponding frames)."
msgstr ""
#: ../../source/guides/deep_dive.rst:874
msgid "Within :meth:`.Scene.play_internal`, the following steps are performed:"
msgstr ""
#: ../../source/guides/deep_dive.rst:876
msgid "The scene determines the run time of the animations by calling :meth:`.Scene.get_run_time`. This method basically takes the maximum ``run_time`` attribute of all of the animations passed to the :meth:`.Scene.play` call."
msgstr ""
#: ../../source/guides/deep_dive.rst:880
msgid "Then the *time progression* is constructed via the (internal) :meth:`.Scene._get_animation_time_progression` method, which wraps the actual :meth:`.Scene.get_time_progression` method. The time progression is a ``tqdm`` `progress bar object <https://tqdm.github.io>`__ for an iterator over ``np.arange(0, run_time, 1 / config.frame_rate)``. In other words, the time progression holds the time stamps (relative to the current animations, so starting at 0 and ending at the total animation run time, with the step size determined by the render frame rate) of the timeline where a new animation frame should be rendered."
msgstr ""
#: ../../source/guides/deep_dive.rst:889
msgid "Then the scene iterates over the time progression: for each time stamp ``t``, :meth:`.Scene.update_to_time` is called, which ..."
msgstr ""
#: ../../source/guides/deep_dive.rst:892
msgid "... first computes the time passed since the last update (which might be 0, especially for the initial call) and references it as ``dt``,"
msgstr ""
#: ../../source/guides/deep_dive.rst:894
msgid "then (in the order in which the animations are passed to :meth:`.Scene.play`) calls :meth:`.Animation.update_mobjects` to trigger all updater functions that are attached to the respective animation except for the \"main mobject\" of the animation (that is, for example, for :class:`.Transform` the unmodified copies of start and target mobject -- see :meth:`.Animation.get_all_mobjects_to_update` for more details),"
msgstr ""
#: ../../source/guides/deep_dive.rst:900
msgid "then the relative time progression with respect to the current animation is computed (``alpha = t / animation.run_time``), which is then used to update the state of the animation with a call to :meth:`.Animation.interpolate`."
msgstr ""
#: ../../source/guides/deep_dive.rst:903
msgid "After all of the passed animations have been processed, the updater functions of all mobjects in the scene, all meshes, and finally those attached to the scene itself are run."
msgstr ""
#: ../../source/guides/deep_dive.rst:907
msgid "At this point, the internal (Python) state of all mobjects has been updated to match the currently processed timestamp. If rendering should not be skipped, then it is now time to *take a picture*!"
msgstr ""
#: ../../source/guides/deep_dive.rst:913
msgid "The update of the internal state (iteration over the time progression) happens *always* once :meth:`.Scene.play_internal` is entered. This ensures that even if frames do not need to be rendered (because, e.g., the ``-n`` CLI flag has been passed, something has been cached, or because we might be in a *Section* with skipped rendering), updater functions still run correctly, and the state of the first frame that *is* rendered is kept consistent."
msgstr ""
#: ../../source/guides/deep_dive.rst:920
msgid "To render an image, the scene calls the corresponding method of its renderer, :meth:`.CairoRenderer.render` and passes just the list of *moving mobjects* (remember, the *static mobjects* are assumed to have already been painted statically to the background of the scene). All of the hard work then happens when the renderer updates its current frame via a call to :meth:`.CairoRenderer.update_frame`:"
msgstr ""
#: ../../source/guides/deep_dive.rst:926
msgid "First, the renderer prepares its :class:`.Camera` by checking whether the renderer has a ``static_image`` different from ``None`` stored already. If so, it sets the image as the *background image* of the camera via :meth:`.Camera.set_frame_to_background`, and otherwise it just resets the camera via :meth:`.Camera.reset`. The camera is then asked to capture the scene with a call to :meth:`.Camera.camture_mobjects`."
msgstr ""
#: ../../source/guides/deep_dive.rst:932
msgid "Things get a bit technical here, and at some point it is more efficient to delve into the implementation -- but here is a summary of what happens once the camera is asked to capture the scene:"
msgstr ""
#: ../../source/guides/deep_dive.rst:936
msgid "First, a flat list of mobjects is created (so submobjects get extracted from their parents). This list is then processed in groups of the same type of mobjects (e.g., a batch of vectorized mobjects, followed by a batch of image mobjects, followed by more vectorized mobjects, etc. -- in many cases there will just be one batch of vectorized mobjects)."
msgstr ""
#: ../../source/guides/deep_dive.rst:941
msgid "Depending on the type of the currently processed batch, the camera uses dedicated *display functions* to convert the :class:`.Mobject` Python object to a NumPy array stored in the camera's ``pixel_array`` attribute. The most important example in that context is the display function for vectorized mobjects, :meth:`.Camera.display_multiple_vectorized_mobjects`, or the more particular (in case you did not add a background image to your :class:`.VMobject`), :meth:`.Camera.display_multiple_non_background_colored_vmobjects`. This method first gets the current Cairo context, and then, for every (vectorized) mobject in the batch, calls :meth:`.Camera.display_vectorized`. There, the actual background stroke, fill, and then stroke of the mobject is drawn onto the context. See :meth:`.Camera.apply_stroke` and :meth:`.Camera.set_cairo_context_color` for more details -- but it does not get much deeper than that, in the latter method the actual Bézier curves determined by the points of the mobject are drawn; this is where the low-level interaction with Cairo happens."
msgstr ""
#: ../../source/guides/deep_dive.rst:957
msgid "After all batches have been processed, the camera has an image representation of the Scene at the current time stamp in form of a NumPy array stored in its ``pixel_array`` attribute. The renderer then takes this array and passes it to its :class:`.SceneFileWriter`. This concludes one iteration of the render loop, and once the time progression has been processed completely, a final bit of cleanup is performed before the :meth:`.Scene.play_internal` call is completed."
msgstr ""
#: ../../source/guides/deep_dive.rst:964
msgid "A TL;DR for the render loop, in the context of our toy example, reads as follows:"
msgstr ""
#: ../../source/guides/deep_dive.rst:966
msgid "The scene finds that a 3 second long animation (the :class:`.ReplacementTransform` changing the orange square to the blue circle) should be played. Given the requested medium render quality, the frame rate is 30 frames per second, and so the time progression with steps ``[0, 1/30, 2/30, ..., 89/30]`` is created."
msgstr ""
#: ../../source/guides/deep_dive.rst:970
msgid "In the internal render loop, each of these time stamps is processed: there are no updater functions, so effectively the scene updates the state of the transformation animation to the desired time stamp (for example, at time stamp ``t = 45/30``, the animation is completed to a rate of ``alpha = 0.5``)."
msgstr ""
#: ../../source/guides/deep_dive.rst:975
msgid "Then the scene asks the renderer to do its job. The renderer asks its camera to capture the scene, the only mobject that needs to be processed at this point is the main mobject attached to the transformation; the camera converts the current state of the mobject to entries in a NumPy array. The renderer passes this array to the file writer."
msgstr ""
#: ../../source/guides/deep_dive.rst:980
msgid "At the end of the loop, 90 frames have been passed to the file writer."
msgstr ""
#: ../../source/guides/deep_dive.rst:983
msgid "Completing the render loop"
msgstr ""
#: ../../source/guides/deep_dive.rst:985
msgid "The last few steps in the :meth:`.Scene.play_internal` call are not too exciting: for every animation, the corresponding :meth:`.Animation.finish` and :meth:`.Animation.clean_up_from_scene` methods are called."
msgstr ""
#: ../../source/guides/deep_dive.rst:991
msgid "Note that as part of :meth:`.Animation.finish`, the :meth:`.Animation.interpolate` method is called with an argument of 1.0 -- you might have noticed already that the last frame of an animation can sometimes be a bit off or incomplete. This is by current design! The last frame rendered in the render loop (and displayed for a duration of ``1 / frame_rate`` seconds in the rendered video) corresponds to the state of the animation ``1 / frame_rate`` seconds before it ends. To display the final frame as well in the video, we would need to append another ``1 / frame_rate`` seconds to the video -- which would then mean that a 1 second rendered Manim video would be slightly longer than 1 second. We decided against this at some point."
msgstr ""
#: ../../source/guides/deep_dive.rst:1001
msgid "In the end, the time progression is closed (which completes the displayed progress bar) in the terminal. With the closing of the time progression, the :meth:`.Scene.play_internal` call is completed, and we return to the renderer, which now orders the :class:`.SceneFileWriter` to close the movie pipe that has been opened for this animation: a partial movie file is written."
msgstr ""
#: ../../source/guides/deep_dive.rst:1007
msgid "This pretty much concludes the walkthrough of a :class:`.Scene.play` call, and actually there is not too much more to say for our toy example either: at this point, a partial movie file that represents playing the :class:`.ReplacementTransform` has been written. The initialization of the :class:`.Dot` happens analogous to the initialization of ``blue_circle``, which has been discussed above. The :meth:`.Mobject.add_updater` call literally just attaches a function to the ``updaters`` attribute of the ``small_dot``. And the remaining :meth:`.Scene.play` and :meth:`.Scene.wait` calls follow the exact same procedure as discussed in the render loop section above; each such call produces a corresponding partial movie file."
msgstr ""
#: ../../source/guides/deep_dive.rst:1018
msgid "Once the :meth:`.Scene.construct` method has been fully processed (and thus all of the corresponding partial movie files have been written), the scene calls its cleanup method :meth:`.Scene.tear_down`, and then asks its renderer to finish the scene. The renderer, in turn, asks its scene file writer to wrap things up by calling :meth:`.SceneFileWriter.finish`, which triggers the combination of the partial movie files into the final product."
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 <https://realpython.com/python-strings/#string-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 <using-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."
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:16
#: ../../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 <different-versions>` to learn more!"
msgstr ""
#: ../../source/index.rst:28
msgid "The :doc:`Installation <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 <tutorials/index>` 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 <faq/index>`."
msgstr ""
#: ../../source/index.rst:50
msgid "If you are looking for information on some specific class, look for it in the :doc:`reference manual <reference>` 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 <faq/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 </examples>` 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 </installation>` section has information on installing Manim."
msgstr ""
#: ../../source/index.rst:67
msgid "In :doc:`Tutorials & Guides </tutorials_guides>` you can find learning resources: proper tutorials that guide you through the process of creating a video are in the :doc:`Tutorial </tutorials/index>` section; guides on specific topics are in the :doc:`Guides </guides/index>` section, and the answers to frequently asked questions can be found in the :doc:`FAQ </faq/index>` section."
msgstr ""
#: ../../source/index.rst:72
msgid "The :doc:`Reference Manual </reference>` 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 </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 </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 </contributing>` section."
msgstr ""
#: ../../source/index.rst:82
msgid "And finally, the :doc:`Code of Conduct </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 <https://twitter.com/manim_community>`_, `Reddit <https://www.reddit.com/r/manim/>`_, or `Discord <https://www.manim.community/discord/>`_. If you're using Manim in a scientific context, instructions on how to cite a particular release can be found `in our README <https://github.com/ManimCommunity/manim/blob/main/README.md>`_."
@ -19,7 +19,7 @@ msgid "Otherwise, if you intend to use Manim to work on an animation project, we
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 :doc:`differences between Manim versions <installation/versions>` if you are unsure which version you should install."
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 <different-versions>` if you are unsure which version you should install."
msgstr ""
#: ../../source/installation.rst:22
@ -50,47 +50,47 @@ msgstr ""
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 <https://www.manim.community/discord/>`__, or start a new Discussion `directly on GitHub <https://github.com/ManimCommunity/manim/discussions>`__."
msgstr ""
#: ../../source/installation.rst:59
#: ../../source/installation.rst:58
msgid "Once Manim is installed locally, you can proceed to our :doc:`quickstart guide <tutorials/quickstart>` which walks you through rendering a first simple scene."
msgstr ""
#: ../../source/installation.rst:63
msgid "As mentioned above, do not worry if there are errors or other problems: consult our :doc:`troubleshooting guide <installation/troubleshooting>` for help, or get in touch with the community via `GitHub discussions <https://github.com/ManimCommunity/manim/discussions>`__ or `Discord <https://www.manim.community/discord/>`__."
#: ../../source/installation.rst:62
msgid "As mentioned above, do not worry if there are errors or other problems: consult our :doc:`FAQ section </faq/index>` for help (including instructions for how to ask Manim's community for help)."
msgstr ""
#: ../../source/installation.rst:75
#: ../../source/installation.rst:71
msgid "Using Manim via Docker"
msgstr ""
#: ../../source/installation.rst:77
#: ../../source/installation.rst:73
msgid "`Docker <https://www.docker.com>`__ is a virtualization tool that allows the distribution of encapsulated software environments (containers)."
msgstr ""
#: ../../source/installation.rst:80
#: ../../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:91
#: ../../source/installation.rst:87
msgid "Interactive Jupyter notebooks for your browser"
msgstr ""
#: ../../source/installation.rst:93
#: ../../source/installation.rst:89
msgid "Manim ships with a built-in ``%%manim`` IPython magic command designed for the use within `Jupyter notebooks <https://jupyter.org>`__. Our interactive tutorial over at https://try.manim.community illustrates how Manim can be used from within a Jupyter notebook."
msgstr ""
#: ../../source/installation.rst:98
#: ../../source/installation.rst:94
msgid "The following pages explain how you can setup interactive environments like that yourself:"
msgstr ""
#: ../../source/installation.rst:108
#: ../../source/installation.rst:104
msgid "Editors"
msgstr ""
#: ../../source/installation.rst:110
#: ../../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 <https://marketplace.visualstudio.com/items?itemName=Rickaym.manim-sideview>`__."
msgid "Confusion and conflict between versions is by far the most common reason for installation failures. Some signs and errors resulting from this are as follows:"
msgid "As this is the documentation for the community version, we can only help with the installation of this library. If you would like to install other versions of manim, please refer to their documentation."
msgid "If you are a beginner, you should only attempt to run files written for your version. Files written for a different version of manim will generally not work without some modification."
msgid "The correct package for the community edition is simply ``manim``. If you do not see this package listed, please refer back to our installation guide to install it. If you see ``manimlib`` or ``manimce`` (actually an old version of the community edition), you should remove them with:"
msgid "Most likely this means that pip was not able to use our pre-built wheels of ``manimpango``. Let us know (via our `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."
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 the corresponding `GitHub repository <https://github.com/ManimCommunity/ManimPango>`_."
msgid "If the output does **not** contain ``--libgs=filename``, this means your ``dvisvgm`` does not currently support PostScript. You must get another binary."
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, probably in ``c:\\windows\\system32`` -- yes 32) or ``libgsl.dylib`` (on Mac OS, probably in ``/usr/local/lib`` or ``/opt/local/lib``). Please look carefully, as the file might be located elsewhere, e.g. in the directory where Ghostscript is installed."
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."
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."
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."
msgid "To fix this, you need to add the Python executable to your ``PATH`` environment variable. Follow the steps in `this StackExchange answer <https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path/143121#143121>`__."
msgid "If ``choco install manimce`` failed, it is likely being caused by Python not being added to your ``PATH`` variable properly. Try running the following commands in your terminal:"
msgid "Minimally, ``py --version`` and ``python --version`` should return a version. If none of these commands are recognized, this means that Python was installed on your system, but was not added to PATH. See above for directions to add it to your PATH variable."
msgid "If any of these commands opens up the Windows store, this is likely interfering with the process. This is because Chocolatey runs a command that calls python or python3, and opening up the Windows store is not the expected behavior. See below to fix aliases."
msgid "Did you install LaTeX using MiKTeX? If so, open the MiKTeX console, install the ``cm-super`` package, then delete the ``media`` directory and try to render the scene again."
msgid "We've dropped the use of CONFIG in the Community Version :doc:`version 0.2.0<../changelog/0.2.0-changelog>`, released in January 2021. This means parameters that were previously specified in the CONFIG dictionary should now be passed directly into the constructor. Practically, this means that old constructions like:"
msgid "If a python command does not work, try adding ``python -m`` in front of it. For example, if ``pip install manim`` does not work, you can try ``python -m pip install manim``."
msgid "While originally a single library, there are now three main versions of manim, each with their own advantages, disadvantages, and ideal use cases. It is important to understand these differences in order to select the best version for your use case and avoid confusion arising from version mismatches."
msgstr ""
#: ../../source/installation/versions.rst:10
msgid "A brief history of Manim"
msgstr ""
#: ../../source/installation/versions.rst:12
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/installation/versions.rst:18
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. The old version is still available as the branch ``cairo-backend``."
msgstr ""
#: ../../source/installation/versions.rst:25
msgid "The three versions of Manim"
msgstr ""
#: ../../source/installation/versions.rst:27
msgid "There are currently three main versions of manim. They are as follows:"
msgstr ""
#: ../../source/installation/versions.rst:29
msgid "**ManimCE**: The community edition of manim. This is the version documented by this website, and is named `manim <https://pypi.org/project/manim/>`_ on pip."
msgstr ""
#: ../../source/installation/versions.rst:30
msgid "`ManimGL <https://github.com/3b1b/manim>`_: The current version of manim that is used by 3blue1brown. It supports OpenGL rendering and interactivity, and is named ``manimgl`` on pip. You can find documentation for it `here <https://3b1b.github.io/manim/index.html>`_."
msgstr ""
#: ../../source/installation/versions.rst:31
msgid "`ManimCairo <https://github.com/3b1b/manim/tree/cairo-backend>`_: The old version of manim originally used by 3blue1brown. It is not available on pip."
msgstr ""
#: ../../source/installation/versions.rst:34
msgid "Which version to use"
msgstr ""
#: ../../source/installation/versions.rst:35
msgid "We recommend using the community edition for most purposes, as it has been developed to be more stable, better tested, quicker to respond to community contributions, and easier for beginners to use. It also has partial experimental OpenGL support and should have full support shortly (as of April 2021)."
msgstr ""
#: ../../source/installation/versions.rst:39
msgid "If you would like to use a version with full OpenGL support or render recent 3Blue1Brown videos (2020 onwards), you should use ManimGL."
msgstr ""
#: ../../source/installation/versions.rst:41
msgid "If you would like to render old 3Blue1Brown projects (2019 and before), you should use ManimCairo."
msgstr ""
#: ../../source/installation/versions.rst:44
msgid "Notes on installation, documentation, and use"
msgid "Efforts to document the internal structure of Manim is ongoing on our `wiki <https://github.com/ManimCommunity/manim/wiki/Developer-documentation-(WIP)>`_."
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`. For a list of changes since the last release, see the :doc:`changelog`."
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`."
#: ../../../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:34
#: ../../../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:37
#: ../../../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:48
#: ../../../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:52
#: ../../../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:60
#: ../../../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:69
#: ../../../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:75
#: ../../../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:78
#: ../../../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:85
#: ../../../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:88
#: ../../../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:101
#: ../../../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 ""
@ -196,6 +200,11 @@ msgstr ""
msgid "Enable wireframe debugging mode in opengl."
msgstr ""
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1:<autosummary>: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:<autosummary>:1
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.ffmpeg_loglevel:1
msgid "Verbosity level of ffmpeg (no flag)."
@ -348,7 +357,7 @@ msgstr ""
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1:<autosummary>:1
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.renderer:1
msgid "\"cairo\", \"opengl\", \"webgl"
msgid "\"cairo\", \"opengl"
msgstr ""
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1:<autosummary>:1
@ -435,11 +444,6 @@ msgstr ""
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:<autosummary>:1
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.use_webgl_renderer:1
msgid "Whether or not to use WebGL renderer."
msgstr ""
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1:<autosummary>:1
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.verbosity:1
msgid "Logger verbosity; \"DEBUG\", \"INFO\", \"WARNING\", \"ERROR\", or \"CRITICAL\" (-v)."
@ -449,11 +453,6 @@ msgstr ""
msgid "Directory to place videos (no flag)."
msgstr ""
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1:<autosummary>:1
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.webgl_renderer_path:1
msgid "Path to WebGL renderer."
msgstr ""
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.aspect_ratio:1:<autosummary>:1
#: ../../../manim/_config/utils.py:docstring of manim._config.utils.ManimConfig.window_monitor:1
msgid "The monitor on which the scene will be rendered"
@ -597,23 +596,23 @@ msgstr ""
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:40
#: ../../../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:49
#: ../../../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:64
#: ../../../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:67
#: ../../../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:83
#: ../../../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``."
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:17
msgid "The name of the animation. This gets displayed while rendering the animation. Defaults to <class-name>(<Mobject-name>)."
#: ../../../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 "Whether the given mobject should be removed from the scene after this animation."
msgstr ""
#: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:20
msgid "Whether updaters of the mobject should be suspended during the animation."
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 <class-name>(<Mobject-name>)."
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:33
#: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation:43
msgid "Examples"
msgstr ""
@ -149,11 +169,14 @@ msgstr ""
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:<autosummary>:1
#: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1:<autosummary>: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:<autosummary>:1
#: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.is_remover:1
msgid "Test if a the animation is a remover."
msgid "Test if the animation is a remover."
msgstr ""
#: ../../../manim/animation/animation.py:docstring of manim.animation.animation.Animation.begin:1:<autosummary>:1
@ -278,6 +301,9 @@ msgid "A float between 0 and 1 expressing the ratio to which the animation is co
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."
msgid "Updates things like starting_mobject, and (for Transforms) target_mobject."
msgstr ""
#: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup: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.interpolate:0
#: ../../../manim/animation/composition.py:docstring of manim.animation.composition.AnimationGroup.update_mobjects:0
msgid "Parameters"
#: ../../../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:0
#: ../../../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
@ -74,14 +70,16 @@ msgstr ""
msgid "Return type"
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.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."
msgid "Updates things like starting_mobject, and (for Transforms) target_mobject."
msgstr ""
#: ../../../manim/animation/composition.py:docstring of manim.animation.composition.Succession: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 "Parameters"
#: ../../../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:0
#: ../../../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
@ -55,10 +52,6 @@ msgstr ""
msgid "Return type"
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.finish:3
msgid "This method gets called when the animation is over."
msgstr ""
@ -67,6 +60,11 @@ msgstr ""
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."
msgid "Get all mobjects involved in the animation."
msgstr ""
#: ../../../manim/animation/creation.py:docstring of manim.animation.creation.DrawBorderThenFill:0
msgid "Parameters"
#: ../../../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:0
#: ../../../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.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.get_all_mobjects:3
msgid "Ordering must match the ordering of arguments to interpolate_submobject"
msgid "Interpolates the mobject of the :class:`Animation` based on alpha value."
msgstr ""
#: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowIncreasingSubsets:0
#: ../../../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:0
#: ../../../manim/animation/creation.py:docstring of manim.animation.creation.ShowIncreasingSubsets.interpolate_mobject:0
msgid "Return type"
#: ../../../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."
#: ../../../manim/animation/creation.py:docstring of manim.animation.creation.SpiralIn.interpolate_mobject:1:<autosummary>: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."
#: ../../../manim/animation/creation.py:docstring of manim.animation.creation.Write:0
msgid "Parameters"
#: ../../../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:0
#: ../../../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 ""
#: ../../../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."
#: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowCreationThenFadeOut:1
msgid "Deprecated"
msgstr ""
#: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowCreationThenFadeOut:4
msgid "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."
#: ../../../manim/animation/indication.py:docstring of manim.animation.indication.ShowCreationThenFadeOut:0
msgid "Parameters"
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."
#: ../../../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."
msgid "Interpolates the mobject of the :class:`Animation` based on alpha value."
msgstr ""
#: ../../../manim/animation/movement.py:docstring of manim.animation.movement.MoveAlongPath:0
#: ../../../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:0
#: ../../../manim/animation/movement.py:docstring of manim.animation.movement.MoveAlongPath.interpolate_mobject:0
msgid "Return type"
#: ../../../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."
msgid "Interpolates the mobject of the :class:`Animation` based on alpha value."
msgstr ""
#: ../../../manim/animation/movement.py:docstring of manim.animation.movement.PhaseFlow:0
#: ../../../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:0
#: ../../../manim/animation/movement.py:docstring of manim.animation.movement.PhaseFlow.interpolate_mobject:0
msgid "Return type"
#: ../../../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."
msgid "Interpolates the mobject of the :class:`Animation` based on alpha value."
msgstr ""
#: ../../../manim/animation/numbers.py:docstring of manim.animation.numbers.ChangingDecimal:0
#: ../../../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:0
#: ../../../manim/animation/numbers.py:docstring of manim.animation.numbers.ChangingDecimal.interpolate_mobject:0
msgid "Return type"
#: ../../../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 ""
Some files were not shown because too many files have changed in this diff
Show more