* 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>
* Optimized Axes.coords_to_point
* Changed variable name to are_coordinates_transposed and added more commentaries
* Added some commas to the tuple in the last comment in Axes.coords_to_pointC
* fix: prevent vector position array from being modified (#3273)
changed from np.asarray(point) to nd.array(point) in order
to make sure that a copy of the array is created even if func
is the identity function lambda pos: pos
* fix: using the example for LinearTransformationScene in Jupyter notebooks
The Manim magic in Jupyter notebooks adds a "renderer=" parameter to the
__init__ call of the scene, but in its current form the example scene
LinearTransformationSceneExample does not accept any **kwargs and thus creates
an exception.
Added the handling of **kwargs in the example scene.
---------
Co-authored-by: Uwe Zimmermann <C:\Users\uwezi\AppData\Roaming\The Bat! Pwd>
changed from np.asarray(point) to nd.array(point) in order
to make sure that a copy of the array is created even if func
is the identity function lambda pos: pos
Co-authored-by: Uwe Zimmermann <C:\Users\uwezi\AppData\Roaming\The Bat! Pwd>
* Small fix in the code of ArcBrace
Avoiding the creation of an Arc object at import time
* Replace last `os.path` occurrencies by `pathlib` (#3224)
This resolves [last
comment](https://github.com/ManimCommunity/manim/issues/485#issuecomment-1523016291)
of #485.
Removes one line of dead code.
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Made docbuild errors easier to debug + fixed error from changed exception class (#3229)
* Make errors during docbuild somewhat easier to debug
* fix an issue with docbuild under py3.10+
* Make set_resampling_algorithm() return self
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Adrien ANTON LUDWIG <42720099+Adrien-ANTON-LUDWIG@users.noreply.github.com>
* documentation: require urllib3<2.0 for now
* moved version requirement to main library in pyproject.toml
* constraint needed in both?
* try upgrading to docbuild with python 3.10, remove restriction on urllib3
* change image -> os
* fixed rtd config
* explicitly added graphviz
---------
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* rewrite some list comprehensions as generator expressions
* fixed flake's docstring warnings
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* one more generator expression in tests/
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Instead set it through super object init method.
For some reason, on OpenGL renderer `stroke_width` is needed
as a different type, rather than an integer as in Cairo renderer.
To avoid problems, set `stroke_width` while calling super's
init method.
This is new feature of `sphinxext-opengraph` which will automatically
generate social cards for the documentation. This is a new feature and
it is not enabled is there is a custom `ogp_image` defined, which we
do. Remove it and also make sure it adds our logo to the social cards.
* generated changelog for v0.17.3, first pass
* bump version number
* fixed python version in classifier list
* regenerated changelog, second pass
* changelog generation, final pass
* fixed docbuild warning
* [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 and improve formatting of replace docstring
* replace assert statements by ValueError
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed ValueError message
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* added new tip class: StealthTip
* let NumberLine propagate tip_shape properly
* documentation, tests
* black
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed type hint, added some more documentation.
* black
* [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>
* Make triangle arrow tips accessible
* [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>
In the docs the winget command to install MiKTeX was changed from `winget install ChristianSchenk.MiKTeX` to `winget install MiKTeX.MiKTeX`. I have changed the docs to reflect this change. Here is the link to the manifest on the winget repo. I have also attached an image that shows the original command not working and an image of the new command working.
Winget Repo Link: https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/MiKTeX/MiKTeX
New command working: https://imgur.com/D7qp6kU
Image of old command not working: https://imgur.com/k7Pvpp0
* Improve creation time for large Text Mobjects
* space
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Check before last point
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* markup text also
* handle quads for open GL
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update comments
---------
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 assertion if font is not found for Text, Code, and MarkupText
This adds tests for this behavior and makes sure that if a font is registered via register_font, the assertions work correctly.
If a font is not specified, we do not assert, as this will cause Manim to use a default font.
Some tests needed to be updated to use cross-platform font names. Monospace and Sans are found on both my Windows and Linux environment, so that seems like a reasonable thing to try.
* Reformat
* Testing register_font fails for unknown reasons on CI - remove it
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Make assertion a warning
* Fix missing warn
* Don't warn on default font
* let Code use test_mobject logic for missing font warning
* Update manim/mobject/text/code_mobject.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>
* Added MathTex.set_opacity_by_tex and MathTex.fade_all_but_tex
* Completed unittests for set_opacity_by_tex and fade_all_but_tex
* Added control_data for `fade_all_but_tex` and `set_opacity_by_tex`
* Removed ade_all_but_tex and integrated functionality into set_opacity_by_tex. Included a second parameter 'remaining_opacity' to define the opacity value of the remaining tex
* Added type hints for `set_opacity_by_tex`. Removed type information in docstring. Improved logic of `set_opacity_by_tex` to reduce redundant calls for tex parts
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* feat(Polygram.round_corners): add support for individualized radius values
* Update manim/mobject/geometry/polygram.py
Remove type hints from the docstring of round_corners()
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update rounded_corners() so that integer values are accepted
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Speed up width/height/depth by reducing copying
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix test
* fix example and improve tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* imports
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* typo
* np.max/min is 2x slower than max/min
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Reduce memory allocations when building SVGMobject
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* split two quads
* fix shape
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* assign
* Fix lines
* Add some tests and fix extra lineto
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Appease assertion CQ check
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix: BraceLabel not passing **kwargs to Brace
* create an empty dict if brace_config is None
* added typehints and included comments made
* added missing type hints in BraceLabel.__init__
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed docstring indentation
* remove superfluous import
---------
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 to use call_updater=True with a function without dt
* [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>
* fixed behavior of stop_condition in Wait
* updated documentation to reflect actual behavior of wait_until etc
* added test for Wait with stop_condition and Scene.wait_until
* [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 scene.replace() and use in ReplacementTransform
This replace method allows one mobject to take the place (that is,
the draw order) of another mobject.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Address Feedback
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update visual Replacement test and fix extract_frames.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* allow flake8 to be unhappy
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>
* Convert docstring param type to type-hint in three_dimensions.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>
* Clean-up, type-hints and documentation for three_dimensions.py
* Added length definition for Line3D.
* Update three_dimensions.py
* Add TYPE_CHECKING and replacing Colors with Color
replacing the Colors Enum with Color because both will soon be deprecated but Color can be tracked down easier
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed return for perpendicular line in Line3D.
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* added some njit
* clear points refactored
* removing numba again because no speedup present
* adding constraint back again for size in interpolate in opengl_mobject
* removed numba import
* removed logger import in bezier
* maybe let's undo that for a second
* bump version number
* generated changelog for v0.17.2
* either "a NumPy array" or "an np array", based on how "n" is pronounced
* minor language improvements
* [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>
* Fixed opengl Surface with disabling refresh of shader wrapper id in constructor
* Reordered Elements in constructor of opengl_vectorized_mobject to fix initialization dependency issues
* fix for runner version >=2.298.2
* fix for runner version >=2.298.2
* fix for runner version >=2.298.2
* fix for runner version >=2.298.2
* fix for runner version >=2.298.2
* fix for runner version >=2.298.2
* fix for runner version >=2.298.2
* fix for runner version >=2.298.2
* fix for runner version >=2.298.2
* fix for runner version >=2.298.2
* testing out texlive action
* installing basic packages add missing
* adding packages
* remove tipa
* remove amssymb
* remove MOAR packages
* add preview package
* add more packages
* add fontspec
* cache pip installs for doctests in rst files
* fix yaml issue
* add cache depency path
* CI: (test-arm) use python 3.8.16 and 3.11.1
* CI: upload coverage only on arm runners
* CI: use cache from actions/setup-python
previously we had our own method of caching, this simplifies...
* Update .github/workflows/ci.yml
* CI: install poetry first before setting up python
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* Add a test to reproduce #3060
* Always use `/` when calling LaTeX
Using `\` isn't supported by LaTeX and simply errors out
saying it can't find the file. In this commit, the path is
converted to POSIX like path (ie. use `/`) before calling
LaTeX.
Fixes https://github.com/ManimCommunity/manim/issues/3060
* bumped version number
* generated changelog, first pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* generated changelog, second pass
* changelog generation, third pass
* changelog generation, final pass
* added some changelog descriptions, final polishing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed some more PR titles (via @naveen521kk)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add support for Python 3.11
as well drop support for Python 3.7
* update lockfile
* Fix an import statement for new version of moderngl
* CI: use pipx to install poetry
should fix macos 3.11 errors
* Update poetry.lock
try a newer version of poetry, forgot to update in a long time
* update lock file
* update poetry.lock
* try downgrading pycairo
* CI: fix poetry picking up wrong python version
* CI: change poetry cache key
older wrong environments will not be used then
* re-introduce caret restriction for pycairo
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* implemented threshold for number of pixel value errors
* fix implementation, throw proper warning
* added test for pixel value error threshold
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove forgotten debug print
* introduce constants for frame_comparison tolerance
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* rename constant
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Without these packages, using `poetry install` fails on pycairo and manimpango because there is no C++ compiler nor headers to compile parts of those packages.
* Update python-opengl -> python3-opengl
https://packages.ubuntu.com/jammy/python3-opengl
The ubuntu CI flows had been failing because the python2 version does not exist past focal (20.04 LTS)
* Pin to ubuntu 22.04
* fix: return 3D points when layout_config has dims=3
When layout_config option dims was set to 3, changing or setting graph layout (via _determine_graph_layout) now returns a dictionary of tuples of length 3 to represent vertices. Previously returned a layout with tuples of length 4 instead. When the layout option dim is not 3 or unset, no change is made.
* Update manim/mobject/graph.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
This resolves the error when running mypy hook for pre-commit:
`error: Library stubs not installed for "backports.cached_property"
(or incompatible with Python 3.7) [import]`
We also prettify the pre-commit's yaml config file.
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* LineJoins added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added joint type enum, refactored proposed implementation
* added test for joint types
* added documentation
* let LineJointType.AUTO be rendered like before
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update added example in basic.py to reflect changed implementation
* fix RTD build
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* moved rendered example in 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>
* implement missing VMobject.resize_points
* ensure that VMobject.start_new_path *actually* starts a new path
* add missing imports
* doctest resize_array
* added test with weird dvisvgm generated svg
* black
* [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: Naveen M K <naveen521kk@gmail.com>
* remove unused constants
* remove deprecated --use_opengl_renderer flag
* remove unnecessary workaround with class initialization
* add OpenGLMobject.name to get rid of one renderer check
* add VMobject.n_points_per_curve property to get rid of more renderer checks
* replace renderer string checks with enum check
* added mobject.utils module with renderer-dependent class getters
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ensure that capitalization of passed renderer type is irrelevant
* remove unused entries from mobject.utils.__all__
* fixed isort ignore in manim.__init__
* fixed lower-case casting of passed renderer
* fixed doctests
* more documentation + doctests for mobject.utils
* removed incorrect paragraph about ConverToOpenGL metaclass
* added docstring for RendererType enum
* renderer compatibility section in plugin dev documentation
* added mobject.utils to reference manual
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove actual doctest (it ran the compatibility code)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* Updated docstrings for three_dimensions.
* Updated docstrings for three_dimensions.
* Moved parameters section before examples.
* removed superfluous colons
* fixed overly long line
* fixed underline lengths
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Converted types in docstrings to type annotations
* `isort .`
* `black .`
* Additional docstrings type annotation fixes
* line break in animation.py
* moved Camera.__init__ docstring to class docstring
* fixed ReST formatting error in image_mobject.py
* start of description captialization
Co-authored-by: NotWearingPants <26556598+NotWearingPants@users.noreply.github.com>
* Converted types in docstrings to type annotations
* `isort .`
* `black .`
* Additional docstrings type annotation fixes
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.37.1 → v3.2.0](https://github.com/asottile/pyupgrade/compare/v2.37.1...v3.2.0)
- [github.com/psf/black: 22.6.0 → 22.10.0](https://github.com/psf/black/compare/22.6.0...22.10.0)
- [github.com/asottile/yesqa: v1.3.0 → v1.4.0](https://github.com/asottile/yesqa/compare/v1.3.0...v1.4.0)
- [github.com/PyCQA/flake8: 4.0.1 → 5.0.4](https://github.com/PyCQA/flake8/compare/4.0.1...5.0.4)
- [github.com/pre-commit/mirrors-mypy: v0.961 → v0.982](https://github.com/pre-commit/mirrors-mypy/compare/v0.961...v0.982)
- [github.com/codespell-project/codespell: v2.1.0 → v2.2.2](https://github.com/codespell-project/codespell/compare/v2.1.0...v2.2.2)
* fixed B902
* ignore B903, B950
* fixed B902 for OpenGLMobject.affects_shader_info_id
* ignore B902 in opengl_compatibility
* fixed B902 in OpenGLVMobject.triggers_refreshed_triangulation
* fixed codespell errors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* move decorators outside of classes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added Nam to ignored words
* ignore B902 in opengl_compatibility (again)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"
This reverts commit 119e7ddb88.
* move yesqa after flake8 call
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove yesqa from pre-commit stack
* Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"
This reverts commit a5b4f70f21.
* codespell: ignore "nam"
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: Align lines correctly when passing `faded_line_ratio` property to NumberPlane (#2894)
* regenerated test data
* removed unnecessary check for empty input
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* fix `CLI.tex_template_file` config setting
* added test for tex_template_file set in .cfg
* create a new config object for testing instead of working within tempconfig
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <mail@behackl.dev>
* Migrate more `os.path` to `pathlib`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix type errors with recent pathlib code
* pathlib fixes
* more pathlib fixes
* remove unused imports introduced by pathlib migration
* convert `open()` calls to pathlib
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Migrate tex_file_writing to pathlib
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* converted more old code to pathlib, and fixed a bug in module_ops
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix test failures
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix test failures
* Apply suggestions from code review
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: Benjamin Hackl <devel@benjamin-hackl.at>
* removed text test control data
* rewrote text tests to be non-graphical
* [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>
* Migrate more `os.path` to `pathlib` in tests
* Convert test fixtures to pathlib
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix mypy errors in tests
* migrate another pathlib instance
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 answer about failed manimpango build
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update docs/source/faq/installation.md
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* ignore *opengl* glob for module doctests again
* removed custom pytest_report_header, fixes testing submodules (????)
* restore previous version of conftest, with segfault fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* handle situation of non-available readline
* Update conftest.py
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>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* run tests without xdist
* specifically run tests/opengl tests
* fix version of moderngl-window to <=2.4.1
* Revert "run tests without xdist"
This reverts commit 5d0d3e0264.
* Print info about OpenGL drivers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Revert "Revert "run tests without xdist""
This reverts commit b6d2510c52.
* test
* test
* test
* test
* Revert "Revert "Revert "run tests without xdist"""
This reverts commit 3a15beeea2.
* Revert "specifically run tests/opengl tests"
This reverts commit a19809c349.
* test-arm: prefer currently active python
* Revert "fix version of moderngl-window to <=2.4.1"
This reverts commit ef9430712c.
* regenerate lockfile
* run module doctests with -v
* fixed config-leaking doctests
* ensure that correct pytest is run
* try to investigate segfault closer
* fixed pre-commit issue
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* pytest apparently does not run testsetup/testcleanup blocks, revert
* duplicate config import
* remove debug output from pipeline
* fixed doctests
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>
* implemented fallback behavior for --show_diff
* [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>
* Formatting, capitalization, 404 reference
Re-format list element for consistency, capitalize Manim where necessary, remove reference to 404'd flowchart
* Fix incorrect grammar w.r.t. Graphviz
* is->are
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* each commit are -> is
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 broken links in README.md
- Fix the link to the description of the differences between 3b1b and community versions of manim.
- Fix the link to the list of command-line arguments.
Fixes#2934
* Narrow README.md link to exact section.
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* port SVGMobject from 3b1b/manim
* added svgelements as dependency
* revert change of default values
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* set default stroke_width of svg elements to 0 if not set
* fix handling of circles with different rx/ry
* turn more methods into staticmethods
* removed duplicated method
* set/adapt stroke-width of some test SVGs
* updated control data
* forgot some control data
* fixed init_colors in tex_mobject and text_mobject
* minor changes, added docstrings
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* module docstring, removed import
* vector_to_coords changed again
* nail sphinx version to below 5.1 to fix rtd (?)
* update test_text control data for science
* changed Brace to use VMobjectFromSVGPath
* remove unused classes and methods depending on old SVG path implementation
* remove style_utils and svg_path modules
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* change test_text to use monospace font
* restore geometry.polygram
* added get_mobject_type_class auxiliary method; changed polyline implementation to ad-hoc approach
* restore test_text to previous version
* skip Use tags as svgelements already populates them
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add animation RemoveTextLetterByLetter
* added RemoveTextLetterByLetter to __all__
* fixed static value of 0.06 -> 1/frame_rate
* minor language improvement
* [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>
* Add extract_frames utility to help visualize test control data
This will make it easier for devs to make sure their graphical unit tests are drawing what they expect.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix path separators
* Fix double python
* moved extract_frames script to scripts directory
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>
* Prevent TransformMatchingTex from crashing when there is nothing to fade
Fixes#2845 and adds tests.
I originally tried to make FadeTransformPieces not crash if it was given two Mobjects with no submobjects, but I couldn't quite get that to work. This is probably the less invasive of a change.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* use Tex arrows
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update expectations after Tex change
* Address feedback
This makes FadeTransform::ghost_to more robust to receiving an empty target. It is currently unspecified what should happen, so how about just fading in place?
* [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 conda installation docs
* MacOS -> macOS
* Add Working with Manim section
* Small fixes
* maybe the refs work now?
* why is ci stuck?
* Lets see if this works...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* Fix a few minor grammar mistakes
* Fix missing period and strange start of sentence
* [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 tex_template to keys of config dict
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added missing argument to tempconfig call
* decouple config.tex_template and config.tex_template_file, simple tex_template default
* changed template => changed file hashes
* added dedicated tempconfig reset test
* black
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* bump version number
* changelog generation, first pass
* fixed label mismatches, changelog generation second pass
* [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
* changelog generation, second pass
* changelog generation, third pass
* changelog generation, final pass
* updated i18n files
* update readyForTranslation
* cut down doc render time
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Enable filling color by value for OpenGLSurface.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added doc string and removed unused deprecated_params
* Added docstring and made method private.
* Fixed spelling error.
* Update manim/mobject/types/opengl_surface.py
Agreed.
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Fixed typings
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added None type as part of color checking
* Another attempt at fixing the color typings
* Made some of the requested modifications.
* Fixed failing tests.
* Added tests for Cairo method.
* One minor change to test plot_surface.
* Fixed typo in docstring.
* Removed passing in of axes.
* Removed axes in tests.
* Fixed typo, mixed up u and v.
* Fixed docstring typo, updated format to recommended.
* Fixed one more typo in docstring.
* One last time editing the docstring.
* Add deprecation import to opengl_surface.
* Added import for Surface and OpenGLSurface to coordinate_systems.
* Hoping this fixes the example for the docs.
* Addes colorscale_axis to plot_surface
* Forgot to update the docstring.
* added proper deprecation, made change temporarily backwards compatible
* [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>
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* Use tempconfig instead of modifying the config
* Extended the -a flag test
* Update 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>
* Add new troubleshooting guide under 'Other Errors' section
* update numpy version in pyproject.toml
* update lock file
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Fixed .py issue with manim init scene SCENE_NAME filename.py and removed necessity of main.py file to be present.
* fixed a problem when passing file name
* added interface test
* [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>
* information about imports, initial draft
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* codespell: allow medias. continue until scene.render()
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated section title
* rough sketch of rest of tutorial; actual writing still TBD
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* tutorial continued
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* continued up to initialization of orange_square
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* completed subsection on initializing mobjects
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* new subsection on Scene.add
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed typo
* fixed example
* initialization of animation object
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* start explaining Scene.play
* typo
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* put together readable overview
* everything up to actually rendering the first frame
* save_static_frame_data already assigns the frame, no need to do it twice
* rendering of static background; up to play_internal
* finished render loop, tutorial content-complete
* added deep_dive tutorial to correct index.rst
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* upgrade version of furo
* fix reference to configuration
* move deep dive from tutorial to thematic guide
* fix broken HTML produced by manim_directive
* disclaimer and tutorial -> guide
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix(get_nth_curve_function_with_length) removed code duplication with get_nth_curve_function_length_pieces
* fix(OpenGLVMobject) removed duplcate assignment of self.n_points_per_curve
* fix(OpenGLMobject): changed to total assignment in interpolate function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/mobject/opengl/opengl_vectorized_mobject.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/opengl/opengl_vectorized_mobject.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update opengl_vectorized_mobject.py
* Update opengl_vectorized_mobject.py
* use remapping instead of copying points
* added documentation
* (opengl_mobject): reverted interpolate
* cleanup
* revamping remap, now considering not only adding a single curve per triplet
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 example for Transform's path_arc
This was very handy for me when trying to swap two parts of an equation around without them getting muddled together first. Thus, I want it to be more clear how to use this feature.
* Fix reference
* Address feedback
* moved functionality over from manim new to manim init and deprecated manim new
* Updated tests to fit new functionality
* added a test for project creation using manim init project
* [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>
* start test reorganization
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* move boolean ops
* move more tests
* Move more tests
* more reorganization
* more movements
* mostly finish up reorganization
* Finish reorganization tests in parent dir
* try moving interface tests back
* Move test_commands over
* fix relative path to templates
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add configurable FFmpeg Path
* Add configurable latex and dvisvgm paths
* Ensure FFmpeg
* Revert "Add configurable latex and dvisvgm paths"
This reverts commit 566d2241b967ecd24f00c644a5a21bb86c32018b.
Looks like this is not the direction we want configurable latex
compilers to be available, hence I am reverting it.
* Address changes
- Changed the path to ffmpeg_executable
- Consistent names across config file and config dict
- Added doc for the ffmpeg_executable property
* Add exception instead of logger+exit(1)
* Refactor bar creation into a separate function
The function is _create_bar.
* Add insert methods for OpenGLMobject/Mobject
* Add self._update_colors, improve docs and fix bug
Create temporary bar, replace the previous location
in the self.bars vgroup with the new bar. Then re-initalize
the colours depending on a flag.
Also refactor out colour-setting to a method
* Apply black and isort
* [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
* Fix flake8 error, double '#' before comment.
* Refactor bar creation into a separate function
The function is _create_bar.
* Add insert methods for OpenGLMobject/Mobject
* Add self._update_colors, improve docs and fix bug
Create temporary bar, replace the previous location
in the self.bars vgroup with the new bar. Then re-initalize
the colours depending on a flag.
Also refactor out colour-setting to a method
* Apply black and isort
* [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
* Fix flake8 error, double '#' before comment.
* Implement None-initialization suggestion
Removed setting self.bars in `BarChart._add_bars`
* Change `temp` to `tmp` and use Type
* Use `type` instead of `Type`.
- Also, fix setting config.frame_width in __init__, since this causes
BarChart's `y_length` to not be re-evaluated if the dimensions of the
scene are changed.
* Force `bar_colors` to be a list via deprecation
- Also update params where `len` is taken to be a Sequence, not iterable
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix docs / some typing, remove try/except
- MutableSequence instead of Sequence for self.values, since
BarChart.change_bar_values adjusts the value of the sequence, requiring
__get_item__.
- Use try/except based on reviewer's reccomendation.
* [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>
* Update graph.py
Example scene of rendering a linear neural network using partite graph
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed variable in wrong place on example.
* Update manim/mobject/graph.py
added requested pr changes
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Apply suggestions from code review
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: Benjamin Hackl <devel@benjamin-hackl.at>
* addition(bezier.py): adding subdivide_quadratic_bezier and split_quadratic_bezier functions, change(OpenGLVMobject) get_bezier_tuples_from_points now uses reshape instead of manually creating a list
* Update manim/utils/bezier.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/utils/bezier.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/utils/bezier.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/utils/bezier.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/utils/bezier.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/utils/bezier.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/utils/bezier.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/utils/bezier.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/utils/bezier.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
* Added example and changed documentation of the code
* Added another example
* Fix raw string issue in docs
* nvm because i forgot this only works for opengl renderer
* Added image
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>
* Added speedmodifier.py
* fix bugs, stable state
* rate_func, comments
* Add docs
* add `ChangedWait`
* run_time override for AnimationGroup
* fix AnimationGroup
* change example
* [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
* fix docstrings
* small improvements
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
fix AnimationGroup
fix AnimationGroup...
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add_updater for changed speed
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* rename vars
* Remove `ChangedWait`,
Set default `rate_func` for `Wait` to `linear`
* fix `Succession`
* fix updaters
* fix docs
* rename vars
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* convert lambdas into funcs
* Add tests.
* reduced test run time and regenerated control data
* Update manim/animation/speedmodifier.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* include new module in docbuild
* added module docstring
* fixed non-rendering examples in documentation
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>
Co-authored-by: Benjamin Hackl <benjamin.hackl@aau.at>
* fix: fixed bad text slicing for Paragraph's lines
Inside Paragraph's _gen_chars method, a bad string slicing caused the text's characters to be obtained in an incorrect order. This would cause chars (and thus self.chars and self.lines in __init__) to store incorrect values.
If Paragraph's alignment parameter was None, nothing wrong seemed to happen, but if alignment was 'left', 'center or 'right', the text's lines would not display correctly.
This happened because the slicing was of the form [begin : begin + string_length + 1]. This bug was fixed by changing it to [begin : begin + char_count], where char_count is the number of characters in the corresponding string which are not " ", "\n" or "\t".
I've also cleaned __init__'s code:
- There was a redundant fragment of code which did exactly the same thing as _gen_chars, storing data in chars_lines_text_list. I deleted this code and used self.chars instead.
- lines_str joins the text strings with '\n', but then lines_str_list split lines_str again, with '\n' as delimiter. I rewrote lines_str_list as just list(text).
- self.lines is a list which essentially stores list(self.chars) as its first element. The original code used a for loop to append self.chars' lines, one by one, to self.lines[0]. I replaced this for loop with list(self.chars).
- self.lines' second element was rewritten as a repetition of [self.alignment], self.chars.__len()__ times.
- I replaced the for loop used to append the line centers to self.lines_initial_positions, and instead used [line.get_center() for line in self.lines[0]].
* revert: reverted lines_str and lines_str_list changes
* fix: added Paragraph.consider_spaces_as_chars to fix issue
* fix: changed `config` kwargs name to `kwargs`
Using `config` as a name for keyword arguments in `Paragraph.__init__` is inconsistent with the use of `kwargs` everywhere else and also shadows the `config` global variable, which is why this variable was renamed as `kwargs`.
* refactor: changed `var.__len__()` to `len(var)`
Changed 8 appearances (1 in `remove_invisible_chars`, 6 in `Paragraph` and 1 in `Text`) of magic method `__len__` (as in `var.__len__()`) to `len(var)`.
* refactor: changed docstrings and added type hints
* fix: changed space char hardcoding to isspace() string method
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* fixed style
* fixed changes
* Update group.py
* Remove extra `Path` call
Co-authored-by: ad_chaos <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* Remove unused context manager
Sorry, just committing here myself so that the PR can be reviewed and merged. This is the only thing left to alter so thought I might as well do it myself.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Use `with_suffix`
* Remove extra `Path` calls
Co-authored-by: ad_chaos <90276965+Kiran-Raj-Dev@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Raghav Goel <kilacoda@gmail.com>
Co-authored-by: Raghav Goel <raghavgd2h@gmail.com>
Co-authored-by: ad_chaos <90276965+Kiran-Raj-Dev@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* enhancement(ParametricFunction, CoordinateSystem, Axes, NumberLine): vectorized coords_to_points,plot,plot_parametric_function; added Numberline:number_to_point_array
* test(plot_log_x_axis_vectorized): added test for vectorized plotting
* extend(angle_of_vector): added test for angle_of_vector with ndarray as input
* fix(frames_comparison): fix naming of test data to be able to write and read the file name because ':' is forbidden
* test(plot): add more vectorized tests, added use_vectorized fixture to make life simpler
* fix(coordinate_system,number_line,scale): vectorizing functions and fixing bugs
* enhancement(NumberLine): vectorized number_to_point and added test
* enhancement(NumberLine): added tests for point_to_number, added example to doc
* enhancement(CoordinateSystem): added test for coords_to_point_vectorized and vectorized coords_to_point
* enhancement(Axes): vectorized point_to_coords and added tests
* Minor formatting fixes and doctests
* fixed flake hint with generator expression
* Create __init__.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update documentation for antiderivative
* Update manim/mobject/graphing/coordinate_systems.py
Co-authored-by: Raghav Goel <raghavgd2h@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/mobject/graphing/coordinate_systems.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/graphing/coordinate_systems.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/graphing/functions.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/graphing/coordinate_systems.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/graphing/coordinate_systems.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* fixed wrong indentation
* stop doctest from leaking change in global config
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* change code block type
* [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: Raghav Goel <raghavgd2h@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Clean up ghost Mobject in TransformMatchingAbstractBase
TransformMatchingAbstractBase does Fade transitions when no mismatch handling is defined, the current implementation leaves an invisible object behind when it's applied. This commit adds handling to clean it up.
Co-Authored-By: Andrew Yang <4412798+AndrewYY@users.noreply.github.com>
* Add tests for TransformMatching default mismatch behavior
* Document new interpolation behavior
* Add TransformMatching code review changes
* Revert "Add TransformMatching code review changes"
This reverts commit 6de61ecbba.
* Revert "Revert "Add TransformMatching code review changes""
Mistakes were made, we need to revert deeper.
This reverts commit 7bd9f4ebea.
Co-authored-by: Andrew Yang <4412798+AndrewYY@users.noreply.github.com>
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* Add graphical tests for Transform with paths
* Rewrite path function setting in Transform
Currently setting the path function in Transform is done unintuitively,
this commit reorders the path_func assignment to make it more clear what
it's doing.
Passes 609 tests / Skips 12 tests
* Add Parameter DocString to Transform class
* Add Transform test for conflicting path settings
* Apply suggestions from code review
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/animation/transform.py
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* fix bug #2627
* Update manim/utils/bezier.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* add test case for bug #2627
* [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>
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* removed suggestion template
* added FAQ answer regarding proposing new features
* added link to project board in contributing.rst
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
* faq: scene measurements, transparent background, available kwargs
* new FAQ section: opengl rendering
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* ReST -> markdown syntax
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>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* Replace assert with np.testing assertions
Using np.testing.assert_array_equal() gives a more readable output.
* Replace assert of np.all with assert_array_equal()
* Replace assert with np.testing assertions
for np.allclose assertions
* Fix np.testing assertion
assert_array_equal takes two argument
* changed some more asserts to np.testing.assert_*
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* CI: add a workflow to publish docker image after release
* add on push event
* fixup
* add amd64 build process
* lint
* final version
* fixup
* don't remove `v` and add it back
* reword a name
* Build and push latest tags when pushed to main
* fixed flake c417 and improved a comment
* [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>
* enhancement(vector_field): added fit_to_coordinate_system
* tmp(vector_field) decision stage for implementation
* Update vector_field.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix OpenGL segfaulting when running self.play or self.wait (#2734)
* make play run only on main thread
* prefer dict.update
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Noam Zaks <imnoamzaks@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* adding hint in the help page that the `render` command is invoked automatically
for if you call `manim`
* fixing format string
* fixed note for the epilog
* replaced the backticks with the normal (') ones
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* removing the trailing free line in constants.py
* fixing import issue
* adjusted the help-page output note
* [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>
* move tutorials -> tutorials_guide
* change title in tutorials_guides
* rename: a_deeper_look -> output_and_config
* splitting Tutorials
* reorder index (sidebar), move some top level sections elsewhere
* rename some tutorials
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* replace recommonmark with rest for rendering md files
* fixed broken references
* fixed **all** warnings and errors during docbuild
* faq: help, more structure for landing page
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix deprecation tests
* prepare some sort of skeleton for installation faq
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ensure that pip from poetry venv is used in pipeline
* added myst-parser as dev dependency
* remove fixed sphinx version from requirement.txt, don't re-install dependencies
* move and improve versions and troubleshooting content to FAQ
* resolve broken references
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* help blacken-docs
* new: navigating the docs
* make different versions question more prominent
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed order of tutorials
* added explicit references to building blocks and quickstart tutorial
* docs -> doc
* change a page-reference to a paragraph-reference
* pypi manimlib, split answer regarding chocolatey failing
* added a note on #beginner-resources
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* docs: edit note on lengths and add example for it
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/mobject/graphing/coordinate_systems.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/graphing/coordinate_systems.py
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: Benjamin Hackl <devel@benjamin-hackl.at>
* perf(bezier) added explicit definitions of quadratic and cubic in bezier.py
* perf(vectorized_mobject): replaced apply_along_axis with direct call to linalg.norm
* perf(vector_field): removed unnecessary calls to self.add and added get_vectors (multiple vectors at once)
* perf(iterables): removed duplicate calls to len(list) in make_even
* revert: removed get_vectors
* fix(get_vector): use asarray for point
* quickfix(vector_field): removed point asarray
* Added Axes Tip Resize Functionality according to Axes class documentation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Changed Default Tip Size Values to Conform with Global Defaults
* Fixed width kwarg usage on circle/square tips
* Fixed ratio-impacted default tip width for vectors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Removed Left-over Prints :)
Co-authored-by: Will Soltas <willsoltas@Wills-MacBook-Pro-2.local>
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(opengl_vectorized_mobject): removed double definition of get_nth_curve_function_with_length
* fix(opengl_vectorized_mobject): added definition of get_nth_curve_length_pieces from VMobject to OpenGLVMobject
* Update code_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>
* bumped version number, generated changelog
* regenerate changelog (second pass)
* regenerate changelog
* Add changelog to toctree
* regenerate changelog
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add this pr also to changelog
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* regenerate changelog
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* regenerate changelog
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
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: Benjamin Hackl <devel@benjamin-hackl.at>
* First draft of cloup/click update
* Added some customizability via cfg files
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed test_command epilogs
* Adjusted logic for overriding theme
* Update main help page, no_args_is_help, and documentation
* Removed help shorthand '-h'
* Apply suggestions from code review
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update poetry lock again, update DefaultGroup snippet
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>
After https://github.com/ManimCommunity/manim/pull/2696 it
caused an issue where each time rendering the order of pull
requests changes. Fix that issue by sorting it based on
the number of the pull request.
* dev_changelog: Normalize newline to `\n`
This otherwise creates issues when the changlog is rendered in windows
* Fetch Github API using threads
This would make the changelog generation faster as the requests to Github API
are made simultaneously.
* initial commit
make OpenGLImageMobject a subclass of OpenGLTexturedSurface
* added typing
* unused import
* explicit imports
* new typing style
* convert to correct type
* update file structure
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added support for Path and image_mode parameter
* remove duplicate function
* let moderngl accept PIL Images only
* allow custom resampling
* allow greyscale
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* passed run_time argument to SpiralIn in ManimBanner.create
* let SpiralIn respect rate_func
* make SpiralIn an introducer
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* fixed style
* fixed style
* fixed formatting
* Update manim/mobject/geometry/line.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/geometry/line.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/geometry/line.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/geometry/line.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
* fixed formatting comments and added tests that can visualize graphic better
* Update manim/mobject/geometry/line.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/geometry/line.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* added additional example
* Update manim/mobject/geometry/line.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/geometry/line.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* example has been changed!
* fixed name change
* reverted change to not include Vgroup
Co-authored-by: hickmott99 <71236306+hickmott99@users.noreply.github.com>
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: Darylgolden <darylgolden@gmail.com>
* Allow using `MovingCamera.auto_zoom` without animation
* added test for auto_zoom width
* type hints for MovingCamera.auto_zoom
* black
* [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>
* add poetry install -e instruction
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* make new section
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update docs/source/contributing/development.rst
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: Benjamin Hackl <devel@benjamin-hackl.at>
* 🏷️ Add types to simple_functions.py
* 💄 Neaten binary_search()
Add spacing between signature and code.
Remove and expressions and address IDE warnings
* 📝 Add docstrings for functions in simple_functions.py
* 🎨 Reorder functions alphabetically
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* 🐛 Reformat code examples
These were causing checks to fail due to missing spaces after `>>>`
I had wanted to change these to be more consistent with iterables.py anyway.
* 🎨 Change single tics to double
Change \` to \`` - this ensures that the variable names are actually
displayed as code (and not italics)
* improved docstrings, rewrote examples as doctests
* fix (???) unrelated failing doctest
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed typo
* Update manim/utils/simple_functions.py
Co-authored-by: Luca <30503695+tameTNT@users.noreply.github.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>
* Handle user-defined centers for Wiggle animation
* Add unit tests for wiggle attributes
* [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>
* Sync `set_style` arguments with base
* Minimize set_style arguments; add info log
* Remove excessive import
* more verbose logger output, added test
* [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 axis lines drawn twice in numberplane
* simplified and fixed test, added comments
* fixed background lines drawn when both x_min, x_max are negative
* regenerated control data of failing 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: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Copyedited Documentation
Changelog / Overview
Reviewed tutorials\configurations.rst. Edited simple mistakes such as Manim not being capitalized and commas.
Motivation and Explanation: Why and how do your changes improve the library?
My motivation was to start getting involved in the open source community. This improves the library as it increases readability and professionalism.
Links to added or changed documentation pages
Further Information and Comments
Closes#1401
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Luca <30503695+tameTNT@users.noreply.github.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>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Luca <30503695+tameTNT@users.noreply.github.com>
* apply all methods to original mobject after finishing _MethodBuilder animation
* added test to check whether custom attributes are changed
* [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 scene updater 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>
* 🎨 Reorder functions alphabetically
Makes it easier to reference documentation alongside source code.
* 🎨 Rename concatenate_lists to flatten_lists
This is more consistent with terminology online in terms of data science.
We're flattening a 2D list into a regular one.
* 🏷️ Add types to iterables.py
Some functions require just Iterables, others Collections (sized iterables), etc.
* 💡 Add docstrings and examples to 1st half of iterables.py
Improved the clarity of some existing explanations as well.
flatten_lists was reverted to concatenate lists on closer inspection.
* 🎨 Adjust docstring format to numpy style
Use Examples header and indent docstrings description consistent with
numpy style guide as well as Manim wiki guidance.
* 💡 Add docstrings and examples to 2nd half of iterables.py
Improved the clarity of some existing explanations as well and updated
formatting to match updated style.
* 💄 Sort __all__ in file head alphabetically
Matches order of functions in file.
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* `Uncreate()` works with `rate_func` ,fix #2469
Place the reverse of `rate_func` to become part of the process in `Uncreate()`.
The original `uncreate()` is implemented by setting a specific value to `rate_func`.
Now, if you want to set parameter`rate_func` when using `Uncreate()`, you can set the parameter `reverse_rate_func` to `Uncreate()`.
Examples
```python
.. manim:: ShowUncreate
class ShowUncreate(Scene):
def construct(self):
self.play(Uncreate(Square(), reverse_rate_func=linear))
```
But problems remains when you try to pass parameter `rate_func` to `Scene.play()`
* fix issue #2469
* Add parameter reversed to class Animation
Fix an error in the last [commit](47b5196e3f). The "remover" decided whether it would reverse. Now it correctly passes the power of decision to "reversed".
Add a bool parameter `reversed` to class `Animation`. It decides whether the animation need to be played backwards. Default to be False.
* Add unit tests for usages of `Uncreate()`
* Add control data for the new unit test
* change the implementation of `Unwrite` to the same logic as `Uncreate`
* Rename parameter `reversed`, add descriptions, style #2597
Rename `reversed` to the more explicit `reverse_rate_function`, in class Animation.
Explicitly mention in documentation that setting `reverse_rate_function` doesn't have any effect on `remover` and `introducer`.
* improve documentation of parameter `reverse_rate_function`, doc #2597
improve documentation of parameter `reverse_rate_function` in class `Animation`
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* doc: remove unnecessary comments in creation.py
The comment was added because the name of the parameter `reversed` was similar to reverse, which is a also parameter, but defined in Write().
Now the parameter has a more explicit name `reverse_rate_function`. Developers can get the main idea from its name. So we don't need the comment to tell.
Co-authored-by: Sefik-Palazoglu <sefik.palazoglu.s@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Migrated file_ops.py and scene_file_writer.py from os.path to Pathlib (github issue #45)
* Updated scene_file_writer.py to handle WindowsPaths
* Updated scene_file_writer.py to handle WindowsPaths
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated file_ops.py to handle WindowsPaths
* Updated scene_file_writer.py to handle WindowsPaths
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed Merge Conflict: Added Type Hints in file_ops.py
* Changed test_file_ops to use Pathlib in accordance with file_ops.py usage
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: Will Soltas <willsoltas@Wills-MacBook-Pro-2.local>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fixed incompatibility with black version
* [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 File logging bug
Previously, the file logger was set in manim/_config/utils.
That caused problems as python tried to enable file logging when other
variables like media_dir, scene_name and others which were required for
the naming of log_dir were not yet set.
Now, we enable log_to_file in scene_file_writer where all the required
directories are declared before we enable file logging.
Also removed a test that was based on set_file_logger's previous
behaviour where it added a suffix only when the class name was
specified when calling manim. Since, we now enable file logging
in scene_file_writer, we always have access to the class name
regardless.
* Added Typings to file_ops
* Fixed typings and some warnings in _config.utils
Fixed some typings to now explicitly importing the types we require.
Removed one of the double declarations of dry_run.
Removed an unused import and a block of commented code.
* Remove rendundant check
* Add suggested changes
Co-authored-by: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com>
* Remove WebGL renderer
Fixes https://github.com/ManimCommunity/manim/issues/2629
* Remove occurence of webgl_renderer in CI config
* Fix Dockerfile
* Remove reference to webgl renderer in config docs
* Update poetry lock file
* Remove some scripts related to webgl
* Don't use rich 12.0 version
* Ignore rich 12.0.0
* Fix dependency, it was wrong previously
* try self-hosted runners
* skip test_force_window_opengl_render_with_format on linux arm
* remove debug stuff
* pre-commit
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* Added example to examples.rst
* Minor
* Update docs/source/examples.rst
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update docs/source/examples.rst
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update docs/source/examples.rst
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Removed wait()s
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
When the angle passed to `Circle.point_at_angle` is not in the
interval [0, 2 * pi], an error is thrown.
This commit maps all angles into the interval [0, 2 * pi].
* Added a cool animation.
* Added Spiral Effect
* Added SpiralIn to logo.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Made a better example to show how to use SpiralIn.
* Added docstring
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Removed SpiralInExample.py, and moved my example into basic.py with its friends.
* Update manim/animation/creation.py
Gotcha, yeah. I like this.
Co-authored-by: GameDungeon <60719255+GameDungeon@users.noreply.github.com>
* [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
* Fixing docstring
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/animation/creation.py
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* imported TAU from constants.py.
* [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
* Got rid of redundant, weird factor of 8 multiplication which was confusing. Now default value is 8.
* Added the ability to modify the opacity effect at the beginning.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Something is still wrong with opacity in this commit, but it's a step forward...
* Fixed the opacity issues. Seems I have to re-save the mobject state immediately after restoring it every time.
* Added fade_in_fraction to basic.py so people learning how to use it can understand the usage a bit better.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: danielkwalsh <dan@crossnokaye.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: GameDungeon <60719255+GameDungeon@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* only let introducer add mobject if not yet present
* fix check for empty moving_mobjects list
* added two tests
* added control data
* black
* fixed usage of Mock in some tests
* check family members instead of mobject list
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* moved moving_mobjects / static_mobjects assignment to begin_animations
* restored correct render flow, made sure static_image is created properly
* fixed some tests
* make sure scene_finished handles frame update correctly
* improve / fix test_vector_scene
* black
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* support groups in `TransformMatchingParts`
* update example for `TransformMatchingTex`
* update example for `TransformMatchingTex` (2)
* also allow `OpenGL(V)Group` in `TransformMatchingTex`
* use :pr: directive in changelog script
* change hardcoded links to PRs + issues to extlinks
* adapt extlink formatting
* fixed warning about bullet list
* improved formatting of an admonition, tried to fix section not expected (unsuccessful)
* Add test
* Seperate test
* Better solution
* Rebasing is hard
* revert changes to get_style
* handle color lists containing None properly
* added test for match_style with gradient
* [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>
* bump version number
* update docs, citation, citation template
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* removed dependabot from contributor list
* generated changelog, second pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* generated changelog, third pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* generated changelog, fourth pass
* regenerated changelog, fifth pass
* fixed minor issues in generated changelog
* updated translations
* added one final PR to the release
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Better Error and insight
* Do not use keywords as identifiers
* add_tests
* Nasty comma
* Windows does its own thing
* Use os.path.join for windows
* Do not log path
* Include Insights
* Full stop.
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* Full stop to test data.
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* animationgroup for edge removal should not be full graph
* [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>
* Refactored docstrings in manim.mobject.geometry.arc
* Ignore opengl docs as it causes build failure
* Refactored docstrings in manim.mobject.geometry.boolean_ops
* Refactored docstrings in manim.mobject.geometry.line
* Removed unnecessary new lines
* point cannot be None.
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Revert "Ignore opengl docs as it causes build failure"
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* moved value_tracker back to mobject
* updated value_tracker module docstring
* fixed references to value_tracker
* [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>
* Improvement to the tree graph layout
* Fix errors when trying to use the tree layout with a single-vertex
graph (was caused by a division by 0)
* `scale` can now be `None` (or a tuple containing `None`). A
`None` value keeps the spacings computed by SageMath's tree layout
implementation in the corresponding dimension (useful for keeping
trees compact)
* Adds a keyword argument `scaling_type` (that can be used with the
`layout_config` argument).
* * Its default value is `"relative"`, which
keeps the original meaning of the `scale` parameter (but includes the
previously described changes).
* * If set to `"absolute"`, the `scale` parameter can either be a scalar
or a tuple. It now scales SageMath's layout by the given factor in
each dimension, allowing for a finer control on compact tree
layouts.
This improvement is especially useful for rendering large trees (deep
and/or wide) when used with the `auto_zoom` method of `MovingCamera`.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added example for the new `scaling_type` argument of the tree layout
Includes two animations that progressively build the same tree,
showcasing the motivation behind the change.
* Fix mypy failing
* Updated ``Graph`` documentation for `scaling_type` param
* changed implementation: layout_scale -> vertex_spacing
* included example in Graph documentation
* deleted tree_layouts.py file in example_scenes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* downgrade to code-only example
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>
* Refactored docstrings in manim.mobject.geometry.polygram
* Refactored docstrings in manim.mobject.geometry.shape_matchers
* Refactored docstrings for manim.mobject.geometry.tips
* group graphing and update its references
* group text and update its references
* group opengl and update its references
* group three_d and update its references
* group geometry and update (most) references
* move some chaning.py + updater files into animation
* refactor arc.py
* refactor line.py
* refactor polygram.py
* refactor tips.py
* black + isort
* import new files in __init__.py
* refactor places where geometry was used
* black + isort again
* remove unused imports
* update reference.rst
* add descriptions to files
* fix circular imports
* forgot ArrowTip
* fix tests
* fix doctests
* satisfy mypy?
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix ALL merge conflicts
* [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
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* one VMobject import slipped through
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* re-add imports to `manim/opengl/__init__.py`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix reference manual
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ignore unknown directive type
* fix arrow tip imports in docstrings
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: Added --embed option to %%manim ManimMagic.
* feat: Change to --embed and also embed Images
* Update manim/utils/ipython_magic.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Initial attempt to make media_embed a general config option
* fixed issues raised in code review
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove unused import
* actually remove unused import
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Michael McNeil Forbes <michael.forbes+python@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* allow passing vertex configuration kwargs to add_edges
* [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>
* comment out color-related things from tex_mob
* add change to svg_mobject
* MarkupText handles colour internally
* MarkupText handles colour internally
* make coordinate_system.py colour agnostic
* get_line_from_axis_to_point
* add typings for SingleStringMathTex
* add typings for MathTex
* make internal methods internal
* black + isort
* fix typo
* black + isort
* fix typo
* revert internalizing change
* Revert "Merge branch 'mathtexx' of https://github.com/hydrobeam/manim into mathtexx"
This reverts commit 6be3c39814, reversing
changes made to 2b30b446ae.
* remove accidental import
* do it in a less bad way
* WIP: Text2setting causing problems
* allow tex_mobject.py to inherit colour
* allow tex_mobject.py to inherit colour
* add tests
* remove undeedde imports + formatting
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix warnings from pre-commit hooks
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix some tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove other color_inheritance test
* [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
* fix typo
* accomodate the color->attribute PR
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix tests and doc build
add a check for None when inheriting colour in
`coordinate_systems.py`, and turn written tests
into graphical tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Comment out `Text` color inheritance test.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Set font for text_color_inheritance test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Small change to retrigger docs build
* [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>
* support pyside coordinate system
* arg use snake_case over CamelCase
* add unit test for coord translation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: kevcen <kev9821@hotmail.co.uk>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Link to wiki
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* link in sidebar
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Now `windows-latest` defaults to `windows-2022` and it has a breaking change related to MSYS2 where there are no pre-installed packages.
This would mean we don't need to manually remove `python.exe` installed through it.
See https://github.com/actions/virtual-environments/issues/4856
* Added examples for 'Rotate' & 'Rotating'
I think 'Rotating' should be changed to 'Revovling'
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* formatted code
* Update rotation.py
* Updated example
* Update rotation.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed a type hint and added parameter descriptions
* Update manim/animation/rotation.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>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* Fix axes plotting bug with logarithmic x-axis
The scaling function was not applied to the last x-value to be evaluated,
resulting in a wrong point of the function plot and a weird line from
the second-last to the last point when using a scaled x-axis.
* Add graphical unit test
Co-authored-by: icedcoffeeee <83535735+icedcoffeeee@users.noreply.github.com>
* Added examples to some transform animations
Animations - ClockwiseTransform, CounterclockwiseTransform, MoveToTarget, FadeToColor, ScaleInPlace, ShrinkToCenter, Restore, ApplyMatrix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update transform.py
* Rename ApplyMatrix example
* Rename Restore example
* Fix ShrinkToCenter example
* Fix ScaleInPlace example
* Fix FadeToColor example
* Rename MoveToTarget example
* Formatted code
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Corrected typo
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Updated quality of examples and added number plane to ApplyMatrix()
* Apply suggestions from code review
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
* Changed some code according to @behackl suggestions
* Added examples to show difference between `Transform` and `ClockwiseTransform` / `CounterclockwiseTransform`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/animation/transform.py
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* Update manim/animation/transform.py
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* Removed some examples
* Added @behackl 's examples
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/animation/transform.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
* Update manim/animation/transform.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
* Changed animation
clockwise and counterclockwise
* Update manim/animation/transform.py
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* Update manim/animation/transform.py
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* Update manim/animation/transform.py
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* Update manim/animation/transform.py
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* Update manim/animation/transform.py
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* Update manim/animation/transform.py
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* Update manim/animation/transform.py
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* Update manim/animation/transform.py
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* Removed 2 examples
* Apply suggestions from code review
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Raghav Goel <kilacoda@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* Add test for directories containing certain unicode (before fixing the issue)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Explicate UTF-8 encoding when writing partial movie file paths
* fix 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: Darylgolden <darylgolden@gmail.com>
* Allow custom naming of gifs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added tests for custom file naming for gifs and mp4s
* Had accidently deleted python versions from poetry.lock. Added them back in.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: icedcoffeeee <83535735+icedcoffeeee@users.noreply.github.com>
* Fixed `:meth:.ThreeDCamera.remove_fixed_orientation_mobjects`
* added test for adding and removing fixed mobjects
* [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>
* first rework
* use rotvec and updated transpose rot mat
* shortcut for about z_axis
* rework get_unit_normal
* rewrite center_of_mass
* rewrite find_intersection
* shoelace using trapz
* use external quaternion package
* Correct error message
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
* correct the tests
No major change, just tiny differences due to floating point error
* new test
* Update test_space_ops.py
* Revert "use external quaternion package"
This reverts commit 1fc318ca60.
* Update space_ops.py
* updated tests
* updated tests and error message
* Technically called segments
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* minor changes in wording regarding intersection (lines vs line segments)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: Kiran-Raj-Dev <90276965+Kiran-Raj-Dev@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
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>
* Cache view matrix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add backport for old versions
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix import
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Guide on performance
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update docs/source/contributing/performance.rst
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Try to get code block to render
* Update docs/source/contributing/performance.rst
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* try fix
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 a tip in `deprecation` docs
* added two apostrophes to make it look better
* changes made according @behackl
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* committed suggested change
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Added import line to every example
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changed `deprecated` to `deprecated_params`
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 an example for 'ShowCreationThenFadeOut'
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added @deprecated warning
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update indication.py
* Added deprecated function to ShowCreationThenFadeOut
* updated import location for deprecation
* Linked animations
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Made easy to read
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
* Formatted text
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
* minor corrections
* removed documentation
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* added version parameters to deprecated function
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* [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
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* add example to index_labels
* add to reference_manual
* add to using_text tutorial
* add to using_text tutorial pt_2
* fix some formatting in the rest of the tutorial
* actually add examples + parameters
* make index_labels not bad
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add r-string to beginning of doc
* fix indentation?
* don't try to be clever : fix docs
* Apply suggestions from code review
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: Benjamin Hackl <devel@benjamin-hackl.at>
* updated minimal latex installation instructions
* [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 unused imports
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Removed non pytest imports from tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove unused pytest imports
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* re-added removed pass statements
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>
* Note about contributions
* md link
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix typo
* improve phrasing
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Made set_fill_by_value() support gradients on different axes.
* Removed extra tests and made default for set_fill_by_value to the z-axis.
* Fixed test in test_threed.
* Changed the the set_fill_by_value() test in test_threed.py.
* Fixed set_fill_by_value() documentation
* removed duplicated entries in .gitignore
* Changed Example
* Changed example in set_fill_by_value
* Changed formatting in Surface.set_fill_by_value() example.
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* Improve become method
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Make match_num_points kwarg
* fix test
* typehint and kwarg
* Add tests for become
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* experiment
* Undo match_num_points
* readd return self
* test fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* undo changes to match points
* use skip point alignment
* delete accidental inclusion
* Added documentation
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Minor correction
* fix indentation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix formatting
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>
* Make color, stroke_color and fill_color properties
* Update code to properly use the stroke- fill- and color properties
* Make colors properties in OpenGL VMobject
* Initialize svg mobjects with correct style
* Pass the color to hash calculating function directly
* Remove workaround with submobjects
* Make text2svg handling of None color explicit
* Fix background_stroke_color updating
* Remove in data check
* Remove typo ?
* Remove odd spacing
* Fix issues with new text color settings
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Implement suggestions
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix-order of operations
* Use ffplay to preview gifs
* typo
* [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 issue of nested svg
* fix issue of the order of transforms
* fix bug of node which is not an element
* fix x y property in SVGMobject._handle_transforms
* adapted control data
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Replace finish with clean_up_from_scene in ShowPassingFlash
* Add introducer flag to animations
* Mark some animations as introducers
* Handle animating graph
* Update tests
* Update tests to provide mocked scene
* Make setup_scene internal
* Replace string annotation with new typehints
* [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: Darylgolden <darylgolden@gmail.com>
* Future Annotations
* Delete template_twitter_post.py
* [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
* Apply suggestions from code review
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed broken RTD
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* hide privs from text_mobject.py
* hide privs from tex_mobject.py
* hide privs from code_mobject.py
* hide privs from svg_mobject.py
* remove SVGPath and utils from __init__.py
* don't import string_to_numbers
* hide privs from geometry.py
* hide privs from matrix.py
* hide privs from numbers.py
* hide privs from three_dimensions.py
* forgot underscore under set_stroke_width_from_length
* there were more i missed
* unhidea method that was used in docs
* forgot other text2hash
* remove svg_path from docs
* rebase
* fixed None bar_names
* fixed scale issues
* fixed to accept negative bar values
* fixed some bugs
* Added docs for parameters (DRAFT)
* clean up parameters
* more clean up
* clean up __init__
* replace add_x_labels with built-in functionality
* adjust default font_size for labels
* Update docs descriptions
* Add bar_width and adjust get_bar_labels
* Add bar_width and adjust get_bar_labels
* Add docs to class and methods
* remove unecessary imports
* remove getters
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Attempt to fix duplicated parameters section
* adjust BarChart example to include title
* switch order around
* change_bar_values
* back to get_bar_values
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add docs for _update_default_config and fix method
* remove print(dicts)
* allow negative_numbers to work with bar chart
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* allow negative numbers to work with change_bar_values
* add test_probability.py
* add control data
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* change example
* update examples again
* rewrite test
* rewrite other test
* remove comma after list in example
* improve wording in docs
* add parameter/docs for label_constructor
* change create_label_tex and update methods
* update docs
* use decimal number
* switch default to Tex
* update instances of create_label_tex in coordinate_systems.py
* hardcode for add_labels
* add TODO
* use label_constructor
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix indentation in docs
* Fix minor doc typo
Co-authored-by: Led Me Explain <ledmeexplain@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update python dependency
* Update python version in the docs
* add python 3.10 to workflow
* use quotes for python version
* small mistake
* added cleo dependency
* added tomlkit
* using new installer for poetry
* updated path
* Update ci.yml
* changed path update
* added poetry to path, EVERYWHERE
* using pip now
* adding to path...again
* adding to path everywhere again
* fixed path, fingers crossed
* path only for macos
* bashrc?
* test path
* githbu path?
* github path, this time?
* updated grpcio; substituted * notation
* pre-commit update
* updated psutil
* importlib-metadata only for Python 3.7
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* remove pygments doubling
* added psutil-wheels
* removed psutil
* Update pyproject.toml
Co-authored-by: Marcin Serwin <marcin.serwin0@protonmail.com>
* ran poetry update
* Update pyproject.toml
Co-authored-by: Marcin Serwin <marcin.serwin0@protonmail.com>
* poetry upadated
* updated mypy version
Co-authored-by: Christopher Besch <christopher.besch@gmx.de>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: Marcin Serwin <marcin.serwin0@protonmail.com>
The Makefile rule for `make i18n` nows works the same way as the others
Regex rules have been made more strict, to avoid wrong cleaning as much as possible.
Now adding regex rules is simpler, or should be.
* Remove fdiv
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* actually remove fdiv
* Use lru cache and scipy's func
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* set maxsize
should be enough for how it's used
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove get_num_args
* Remove one instance of clip_in_place
* Readd clip_in_place, it has a use
* rm unnecessary line
* Properly clip color
* Revert "Properly clip color"
This reverts commit 0591c78334.
* remove clip in place
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* actually remove
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix bug
* [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>
* Typo plus a code redundancy
Sqaure → Square; ln 231: self.add(square) [removed]
* [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>
* bump version number
* changelog generation, first pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changelog generation, second pass
* changelog generation, third pass
* update i18n
* removed reference to deleted module
* changelog generation, fourth pass
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Remove various return annotations that were stifling type inference.
* [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>
* Attempt to use CI to update translations
* try again
* runs on ubuntu latest
* Try to fix
* again
* try to use PR branch
* that didn't work
* will this work?
* Revert "will this work?"
This reverts commit 1e6543a77f.
* Try a different action
* fix attempt
* another attempt
* Revert "another attempt"
This reverts commit 8965000ac3.
* try again
* automatically generate list of all flags
* remove unrelated change
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* specify dep
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update tutorial
Move CLI stuff to the top since it's the most important, slight rewrite, some copyediting
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* slight rephrasing
* make underline long enough
* Revert "Merge branch 'main' into command-output"
This reverts commit e6a9d457d3, reversing
changes made to 3f0137a690.
* Revert "Revert "Merge branch 'main' into command-output""
This reverts commit c823c6eb8f.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Clarify the docs for MObject.animate, MObject.set and Variable.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Slight reword
* Apply suggestions from code review
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: Benjamin Hackl <devel@benjamin-hackl.at>
* Trim empty curves from paths when calling align_points.
Resolves#1959
* Remove buggy optimization. Also update docs
* Restore an if statement, to be reviewed later
* Restructure FocusOn animation to work better with the align_points changes
* Copy changes into OpenGLVMobject
* Add trim_dummy test and some doc improvements
* Another doc change
* break a line in docstring
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Find indexes in stripped text, not original text
* Add regression test
* Only run the test in linux environement
* Rewrite text2settings in Text to set text color via pango
* Make gradient in Text use pango coloring
* Bump manimpango to newest version
* Update test to use new frames_comparison
* Don't remove svg file on exception
* Bump manimpango
* Fix pre-commit errors
* Fix index bug
* Deprecate no longer used functions set_color_by_t2x
* Remove old commented out code
* Update poetry.lock
* add parameter/docs for label_constructor
* change create_label_tex and update methods
* update docs
* use decimal number
* switch default to Tex
* update instances of create_label_tex in coordinate_systems.py
* hardcode for add_labels
* add TODO
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
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
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 objects as types instead of strings
wherever possible, use an object as the type instead of a string
avoid recursive types as they only have partial support
* reapply string -> object typings from merge and remove commas
This adds 'collection-basic' to the list of LaTeX packages on the Linux
installatioon documentation page:
docs/source/installation/linux.rst
Several packages provided by 'collection-basic' are required for Manim
to function, so the whole collection is specified rather than finding
the specific packages.
* Made set_fill_by_value() support gradients on different axes.
* Removed extra tests and made default for set_fill_by_value to the z-axis.
* Fixed test in test_threed.
* Changed the the set_fill_by_value() test in test_threed.py.
* Fixed set_fill_by_value() documentation
* removed duplicated entries in .gitignore
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* moved docstring of ApplyMethod from __init__ to 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>
* Added `about_point` for :class:`~ApplyMatrix`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add unit test
* Fix test
* remove unit_test because transform does not update points
* minor docstring formatting changes
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Laith Bahodi <laithbahodi@gmail.com>
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Separate path_along_circles to separate function
* Add typing to paths
* Add descriptions to paths
* Add typing to internal path functions
* Format examples with black
* Add missing parameter description in spiral_path
* Update number formatting in manim/utils/paths.py
Co-authored-by: icedcoffeeee <83535735+icedcoffeeee@users.noreply.github.com>
* Depreacte straight_path arguments
* ratate -> rotate
Co-authored-by: icedcoffeeee <83535735+icedcoffeeee@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* chnage stringly-typed annotations to objects
* `Table` methods return `"Table"` again
type recursion is only partially supported, so we have to stringify the
return type again to prevent errors
* Remove coordinate_systems.py deprecs
* Remove frame.py deprecs
* Remove opengl_mobject.py deprecs
* Remove growing.py deprec
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove from __all__
* undeeded black import too
* [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 phi updater in begin_3dillusion_camera_rotation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/scene/three_d_scene.py
My bad thought the `Optional` type hint should be used in this case (i.e. the user does not necessarily have to pass in the `rate` argument).
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/scene/three_d_scene.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/scene/three_d_scene.py
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: Benjamin Hackl <devel@benjamin-hackl.at>
* Added even_lengths option to DashedVMobject and updated example
* Added dash offset parameter to DashedVMobject
* Stupid bugfix for np.append()
* tried to update DashedVMobject control data
* modified geomtery test to use new feature and updated control data
* Update manim/mobject/types/vectorized_mobject.py
doc string improvement
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/mobject/types/vectorized_mobject.py
Small restructure around dash-overflow handling
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
* i don't know what im gitting but something with vmobjects
* renamed even_lengths to equal_lengths
* fixed equal_lengths renaming in Example
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>
* added important note
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update docs/source/contributing/internationalization.rst
Co-authored-by: Christopher Besch <christopher.besch@gmx.de>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update docs/source/contributing/internationalization.rst
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christopher Besch <christopher.besch@gmx.de>
* bump version number, generate changelog
* include bugfix release PR in changelog
* [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>
* bump version number
* something in our changelog script broke?
* generated changelog, first pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* exclude Crowdin updates from changelog
* changelog generation, second pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changelog generation, third pass
* generated changelog, fourth pass
* changelog generation, fifth pass
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* added new depependency for subcaption parsing library
* added implementation for subcaptions
* added test for subcaptions
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix typo
* added comment to explain offset
* added remark about start time of subcaption
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* clarify documentation entry
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* remove event-handling from opengl_mobject.py
* bring over docs for many functions
* add duplicate method
* port over def mobject.become
* add misc docs and docs for add/remove/add_to_back
* add __repr__ for opengl mobs
* rename instances of Mobject->OpenGLMobject
* expand functionality for OpenGLVGroup
* add override animations + docs for set default
* add typings for openglvmob
* port docs and add proportion_from_point
* remove override_animation stuff from opengl_mobject.py
* make proportion_from_point work
* add remainder of docs
* add docs for somewhat-duplicated classes
* replace VMob with OpenGLVmob
* run black
* remove unecessary imports
* minor cleanup
* run black and isort
* make add_background_rectangle consistent between cairo/opengl
* compatibility layer does not exist in opengl_mobs
* [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>
* Mention manim sideview extension
updates:
- added a brief notice for installing manim sideview
* segregate mention into a different section
* added a new section called Editors
* moved the mention into the section
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* change repetition of extension to pronoun
* word change
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update docs/source/installation.rst
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update docs/source/installation.rst
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: Benjamin Hackl <devel@benjamin-hackl.at>
* make frame_comparison a part of the library
* update frames_comparison imports; move control data
* change import in documentation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* properly split up boolean_ops tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added __init__ to utils.testing
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Make point_color a positional argument in all growing animations
* Replace arc path in SpinInFromNothing with spiral path
* Add docstring to growing animations
* Fix errors reported by sphinx
* Update tests
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* replace our own tree layout implementation with SageMath's
* [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>
Previously dotL appeared on the right and dotR appeared on the left. I have swapped the names so as dotL appears on the left and dotR -- on the right.
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* remove deprecs from threedcamera
* remove deprecs from changing.py
* remove deprecs from mobject.py
* remove some deprecs from opengl_mobject.py
* remove sample_space files
* remove deprecs from three_d_scene.py
* remove deprecs from geometry.py
* remove deprecs from opengl_geometry.py
* remove deprecs from vmob.py
* remove deprecs from opengl_vmob.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove all traces of deleted Scenes
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Changing the folder name for translations.
* Updated original translation files.
* Update Crowdin configuration file
* Added a first draft of the new internationalization file.
* Revert "Update Crowdin configuration file"
This reverts commit aa996ea032.
* Revert "Updated original translation files."
This reverts commit d8a940ad98.
* Revert "Changing the folder name for translations."
This reverts commit 1065c18d57.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Rewrite guidelines
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fixed DecimalNumber when using `set_value`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed `Flash` animation position
* Revert "Fixed DecimalNumber when using `set_value`"
This reverts commit e0bcd4126f.
* Added check to allow mobjects to be passed in
* Removed unused auto-import from VScode
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* warn that manim doesn't support python 3.10 yet added
* warning that manim does not support python 3.10 yet, was added
* changed the warning to a separate paragraph and rephrased it
* a few typo corrections, I also changed the other files that were was saying that manim supports python 3.7+, when actually is just 3.7-3.9
* Changed normal hyphens (-) to en dashes (–), and remove a space before and after a dash.
* creation of a test for add_fixed_in_frame_mobjects
* reseting the base image and changing some things in the test
* Refactoring in the add_fixed_in_frame_mobjects(), the github tests should pass now.
* fixing issue with text
Co-authored-by: Lucas Ricci <lucas@pop-os.localdomain>
Co-authored-by: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com>
* trim index and rearrange tutorial section
* [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: Darylgolden <darylgolden@gmail.com>
* fix: correct type of `discontinuities` parameter
`discontinuities` was typed as a boolean but should really be
typed as an optional iterable of floats
* fix: include `Iterable` import
* Fixed DecimalNumber when using `set_value`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added test
* [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: issue 1811, add a test for class Broadcast
* little update in test_specialized.py file
* update
* update trying to fix the test failures
* removing a spare file
* bump version number
* generated changelog, first pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changelog, second pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* regenerate changelog, third pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* regenerate changelog, fourth pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* minor improvements
* regenerated changelog, fifth pass
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix typo #2023
* Fix#1701
* add i2gc method
* updated angle_of_tangent
* updated documentation example
* Add example for input_to_graph_coords
* turn example into doctest
* change type of code-block for blacken-docs
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Aathish Sivasubrahmanian <aathish04@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Add property for submobjects
* Use property for opengl submobjects
* Update manim/mobject/opengl_mobject.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* depreciate until 0.11
* fix in text
* Update manim/mobject/number_line.py
* Update manim/mobject/svg/brace.py
* Update manim/mobject/coordinate_systems.py
* Update manim/mobject/svg/code_mobject.py
* Update manim/mobject/svg/code_mobject.py
* Update manim/mobject/vector_field.py
Co-authored-by: icedcoffeeee <83535735+icedcoffeeee@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: icedcoffeeee <83535735+icedcoffeeee@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
* azimuth_label_font_size new place
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* font_size right place
* added font size
* number_scale_value in example fix
* adjust font size properly
* adjust move things around
* fix the docs
Co-authored-by: icedcoffeeee <83535735+icedcoffeeee@users.noreply.github.com>
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: hydrobeam <laithbahodi@gmail.com>
* make sure left and right endpoint of area are vertically above a, b
* fix border when bounded_graph is passed
* added test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update get_area test, also affected by changes
* fix test data
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* explicitly specify group of custom animation group to be the graph
* added test
* also test removing vertex
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* suspend and resume updaters of the mobject of an animationgroup as well
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ryan McCauley <32387857+ryanmccauley211@users.noreply.github.com>
* Added match_center parameter to :meth:`mobject.become` (#2048)
* Added match_height and match_width parameters to :meth:`mobject.become` (#2048)
* Ensured match_center works properly and just moved it after height/width
* Added match_depth and params to docstring
* Reorder depth and center
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Added stretch parameter to :meth:`mobject.become` (#2048)
* added a test for match_width / match_height / stretch
* [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>
* feature request #1056
Added auto_zoom to moving_camera.
Fixed is_in_frame.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed indentation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Removed faulty comment
Keeps failing automated test so i removed it.
* Update manim/camera/moving_camera.py
padding vs. margin :-)
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/camera/moving_camera.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/camera/moving_camera.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/camera/moving_camera.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update manim/camera/moving_camera.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Tidied the code
snake_casing > camelCasing :-)
or > |
and > &
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/camera/moving_camera.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update tests/test_auto_zoom.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
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/camera/moving_camera.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* fixed snake_casing and removed unused imports
* Update manim/camera/moving_camera.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* remove above comment
* Update tests/test_auto_zoom.py
* Update tests/test_auto_zoom.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* docs: add a new example about bool ops
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
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: Jan-Hendrik Müller <44469195+kolibril13@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Fixed spherical coords order in cartesian_to_spherical
* Fixed space_ops 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: Oliver <44864613+PhotonSpheres@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* scaling, add differnt scalings, adjust to use x_range, adjust line movement to make it applicable
* kind of ugly solution to make coords_to_point do less pointless calculations
* refactoring and add_labels
* numberplane fix
* make functions scaling-compatible
* decimal_number scaling for the units
* docs for axes
* minor docs changes
* Pre-PR cleaning
* missing bug
* typo
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove redundant add_labels
* move import out of TYPE_CHECKING
* add scale to init.py
* missing underscores
* fix broken test
* fix numberplane line generation for log
* add scale.py to the docs and replace dict outout for custom_labels with a list
* add explanation and default for exclude_origin_tick
* custom labels using .add_coordinates()
* add test, valueerror warning and docs
* add .npz file and adjust docs
* add numberplane log test
* quick docs for ParametricFunction
* add extra condition because None becomes LinearBase too
* flip x and y
* add exclude_origin_tick business for z_axis
* adjust threed test
* improve docs for number line.
* add more docs
* more docs for number line
* pre-merge docs improvements
* fix return types
* attempt to fix weird formatting
* fix questionable doc choice
* l1 != li
* correct the index for 6
* correct the index for 6
Co-authored-by: Darylgolden <darylgolden@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>
* depreciate unused stuff
* added replacement
* small fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update verison number
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added tests for resolution flag
Added test cases to make sure the resolution flag does what its supposed
to. It queues up a handful of common 16:9 and a couple 4:3 resolutions
and tries to render all of them with all acceptable separators. Once
they render it checks to make sure that the rendered resolution matches
the requested resolution.
* Speed up resolution tests
Simplified the scene rendered for the resolution flag tests to speed up
the tests. Switched over to `NoAnimation` scene and decreased the length
of the `NoAnimation` scene from 1 to 0.1.
* Convert paths to strings in test_resolution
For older versions of python on windows it seems having a `Path` object
in the list of command parameters causes issues. This patch explicitly
converts the path to a string for this case.
* Convert paths to string in `get_video_metadata`
For older versions of python on windows it seems having a `Path` object
in the list of command parameters causes issues. This patch explicitly
converts the path to a string inside the `get_video_metadata` method.
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* let CairoRenderer.time respect skipped animations
* add simple implementation of OpenGLRenderer.time
* remove handle_play_like_call, slightly refactor OpenGLRenderer.play
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* cairo: add scene duration when animations are skipped
* added test for Scene.renderer.time
* [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>
* moved documentation of manim/mobject/types/vectorized_mobject
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vectorized_mobject.py
fixed changes as requested
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/mobject/types/vectorized_mobject.py
commit suggestion
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* Improve last frame opengl handling
* Update dry_run to use property in getter
* Add cli tests
* Remove comment
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* feat: added section class
* fix: fixed imports in scene.py
* feat: added section class
* fix: fixed imports in scene.py
* feat: scene file writer update; needs testing
* broken test
* fixed wrong partial movie files
* feat: added animation concatenation for sections
* fix: sections can contains None as partial movie file
* fix: correct section output file names
* fix: removed media folder
* feat: section output able to extract type
* feat: added guarantee_existence tests
* fix: touch file on windows
* fix: touch file on windows
* feat: automatically create control data with --set_test flag
* feat: added tests for sections output folder
* feat: added flag to enable sections
* feat: testing section metadata file
* feat: finished metadata tests; changed enums to be extendable
* fix: removed testing files
* fix: fixed section types
* fix: fixed outdated control data
* fix: fixed simple_scenes.py
* fix: fixed section type documentation example
* feat: added section video metadata to API
* fix: isort should stop destroying the import order for commands.py
* fix: fixed types of section metadata output
* fix: better comments
* ?
* feat: added elaborate test; switched name and type in next_section call
* feat: changed testing terminology: "config" got renamed to "movie metadata"
* fix: removed unicode lambda :<
* fix: fixed control data
* fix: removed test setter
* feat: added tutorial in the documentation
* fix: updated test control data
* fix: fixed double '.' in video tests
* fix: fixed some documentation
* fix: fixed missign JSON file in docs
* fix: implemented proposed changes
* fix: better --save_sections help
* fix: better docstrings
* fix: fixed last docstring...hopefully :>
* feat: custom section output supported
* fix: removed resolved todos
* fix: added debug for movie concatenation back
* fix: removed implemented TODO
* fix: removed doubled log
* fix: changed debug to info log
* fix: fixed log test data
* fix: fixed documentation --save_sections
* feat: added section class
* fix: fixed imports in scene.py
* feat: added section class
* fix: fixed imports in scene.py
* feat: scene file writer update; needs testing
* broken test
* fixed wrong partial movie files
* feat: added animation concatenation for sections
* fix: sections can contains None as partial movie file
* fix: correct section output file names
* fix: removed media folder
* feat: section output able to extract type
* feat: added guarantee_existence tests
* fix: touch file on windows
* fix: touch file on windows
* feat: automatically create control data with --set_test flag
* feat: added tests for sections output folder
* feat: added flag to enable sections
* feat: testing section metadata file
* feat: finished metadata tests; changed enums to be extendable
* fix: removed testing files
* fix: fixed section types
* fix: fixed outdated control data
* fix: fixed simple_scenes.py
* fix: fixed section type documentation example
* feat: added section video metadata to API
* fix: isort should stop destroying the import order for commands.py
* fix: fixed types of section metadata output
* fix: better comments
* ?
* feat: added elaborate test; switched name and type in next_section call
* feat: changed testing terminology: "config" got renamed to "movie metadata"
* fix: removed unicode lambda :<
* fix: fixed control data
* fix: removed test setter
* feat: added tutorial in the documentation
* fix: updated test control data
* fix: fixed double '.' in video tests
* fix: fixed some documentation
* fix: fixed missign JSON file in docs
* fix: implemented proposed changes
* fix: better --save_sections help
* fix: better docstrings
* fix: fixed last docstring...hopefully :>
* feat: custom section output supported
* fix: removed resolved todos
* fix: added debug for movie concatenation back
* fix: removed implemented TODO
* fix: removed doubled log
* fix: changed debug to info log
* fix: fixed log test data
This commit:
* Fixes a bug where if a TeX compilation error occurs on a line not in
the TeX source -- which can happen because of LaTeX post-processing --
then an `IndexOutOfBoundsError` would be raised as the logging was
formatted.
* Adds a test for the above situation
* Fixes a situation where too many unrelated lines would be shown
* Refactors the involved code
* Address some TODOs
Signed-off-by: Martmists <martmists@gmail.com>
* Fix misunderstood todo
Signed-off-by: Martmists <martmists@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Make requested changes
Signed-off-by: Martmists <martmists@gmail.com>
* [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>
* Create crowdin.yml
* try fix yml
* Move files
* Revert "Move files"
This reverts commit 8d53826ae0.
* Update crowdin.yml
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Changed to locale with underscore
* Changing folder for .pot files. And removing the useless sphinx-intl part.
* Updated .gitignore and crowdin configuration to follow the directory change.
* Renaming po to pot EFFECTIVELY
* Changed the file with the new (simpler) generation. Also added better display for `make i18n`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Change to two letters code
* Correct extension
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Mysaa <samy.avrillon@ens-lyon.fr>
Co-authored-by: Mysaa <mysaa@myssian.home>
* Fix string_to_numbers sometimes returning strings
* Added test for string_to_numbers fix
* [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>
* Make regex more readable #2163
• By removing single charecter alternation
• And keeping a charecter set instead
* [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
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* Added troubleshooting snippets from the Discord
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed linting errors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed formatting issues
* Update docs/source/installation/troubleshooting.rst
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* Added requested changes
* added reference to the stack exchange post
* fixed link displaying incorrectly
* Mentioned which aliases caused the issue
* Update docs/source/installation/troubleshooting.rst
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Update docs/source/installation/troubleshooting.rst
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Moved atributation for PATH, broke up some lines
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Removed the copied answer for PATH
* Update docs/source/installation/troubleshooting.rst
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* Update docs/source/installation/troubleshooting.rst
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* bump version number
* update version in citation.cff
* generated v0.11.0 changelog, first pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* actually added v0.11.0 changelog to list of changelogs
* generated changelog, second pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* generate v0.11.0 changelog, third pass
* generated v0.11.0 changelog, fourth pass
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Make colour aliases IDE-friendly
Fixes#2049
* [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>
* pass config options for an documentation example in a tempconfig
* Revert "Revert colour of background in docs to BLACK in `Mobject` page. (#2117)"
This reverts commit c55828f087.
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
* Rename old get_area
* Add the new get_area method
* Test file
* Revert "Test file"
This reverts commit 7588d7aba6.
* Fix the gradient coloring
* Add the bounded parameter
* Add an example and reformat the docstring
* Update get_area_with_riemann_rectangles example in the docstring
* Modify the example in the Example Gallery to use the new get_area
* Modify the test for get_area_with_riemann_rectangles and add a test for get_area
* Add the npz for the tests
* Rename bounded parameter in bounded_graph
* Make the function handle different range for graph and bounded_graph
* Use point instead of get_points()
* Make more specific tests
* Change Sequence type to Tuple
Co-authored-by: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com>
* Update an example to enhance the difference between both `get_area` methods
* Fix a bug not taking into acount x_range
* Change the opacity of the area in the example to better see the area
* Fix a bug for non-overlapping ranges
* Add the exception to the docstring
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove `get_area_with_riemann_rectangles` and fix f-strings
* Remove references to `get_riemann_rectangles`
Co-authored-by: Léo Géré <leo.gere@inrae.fr>
Co-authored-by: Léo Géré <gere@etud.insa-toulouse.fr>
Co-authored-by: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.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>
* moved inheritance graphs to reference.rst to resolve wrong link targets
* [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 PMobject.add_points docstring
Now the documentation states that rgbas shape should be Nx4 if not None.
Also change ValueError message when len(rgbas) != len(points).
* Fix OpenGLPMobject.add_points docstring
Now the documentation states that rgbas shape should be Nx4 if not None.
Also change ValueError message when len(rgbas) != len(points).
* Reformat docstrings
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* deprecated
* [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 png output support for opengl
* Handle when interactive embed should launch
* Handle when window should be created
* Remove unused import
* Remove confusing field
* Avoid creating window when any format is set
* Revert removing manim import
* Remove second log for interactive_embed
* Add force_window flag
* temp skip tests due to opengl context issue
* Fix context issue
* Try manually closing window in opengl tests
* Test disabling parallel runs
* Test disabling parallel runs
* Try clearing frame buffer on finish
* revert clear
* Skip tests that pass locally but fail windows CI
* Reenable opengl tests
* Remove stdin closed check
* Skip flakey test
* Stop window creation when save_last_frame is set
* Update config path
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
* Initial Progress
* pretty much done :)
* moved to class
* cleanup
* fix example, import and black
* Add skia-pathops dependency
* some docs
* Add Xor
* fix typo and remove stray print
* more docs
* remove stray example
* fix typo
* fix docs
* fix poetry
* fix typos
* Don't use SegmentIterator instead use RawPathIterator
* add tests
* black isort
* Minor cosmetics
* possibly fix tests
* small formatting changes
* small docs fix
* spacing
* Support more than 1 vmobject on Intersection
* Fix intersection of 3 or more Mobjects
* Add a test case for 3 mobject intersection
* black
* fix condition of undefined variable
* fix some typos
* Apply suggestions from code review
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* docs: Fix Graph.add_edges and Graph.add_vertices parameter types
* docs: Change wording for add_edges and add_vertices functions
* docs: Fix type hint on parameter of remove_edges
- [ ] 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
@ -37,7 +37,7 @@ PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR
<details><summary>System Details</summary>
- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)):
- OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)):
- RAM:
- Python version (`python/py/python3 --version`):
- Installed modules (provide output from `pip list`):
@ -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.
@ -182,7 +183,7 @@ Reports which involve higher risk or higher impact may face more severe conseque
### Propose consequences
What follows are examples of possible consequences to an incident report. This consequences list is not inclusive, and the Manim Community Code of Conduct team reserves the right to take any action it deems necessary.
What follows are examples of possible consequences of an incident report. This list of consequences is not exhaustive, and the Manim Community Code of Conduct team reserves the right to take any action it deems necessary.
Possible private responses to an incident include:
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
For local installation, please visit the [Documentation](https://docs.manim.community/en/stable/installation.html)
and follow the appropriate instructions for your operating system.
@ -75,7 +75,6 @@ You should see your native video player program pop up and play a simple scene i
[GitHub repository](example_scenes). You can also visit the [official gallery](https://docs.manim.community/en/stable/examples.html) for more advanced examples.
Manim also ships with a `%%manim` IPython magic which allows to use it conveniently in JupyterLab (as well as classic Jupyter) notebooks. See the
[corresponding documentation](https://docs.manim.community/en/stable/reference/manim.utils.ipython_magic.ManimMagic.html) for some guidance and
[try it out online](https://mybinder.org/v2/gh/ManimCommunity/jupyter_examples/HEAD?filepath=basic_example_scenes.ipynb).
@ -89,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
@ -101,56 +100,8 @@ Documentation is in progress at [ReadTheDocs](https://docs.manim.community/).
## Docker
The community also maintains a docker image (`manimcommunity/manim`), which can be found [on DockerHub](https://hub.docker.com/r/manimcommunity/manim). The following tags are supported:
- `latest` -- the most recent version corresponding to [the main branch](https://github.com/ManimCommunity/manim)
- `stable` -- the latest released version (according to [the releases page](https://github.com/ManimCommunity/manim/releases))
- `vX.Y.Z` -- any particular released version (according to [the releases page](https://github.com/ManimCommunity/manim/releases))
### Instructions for running the docker image
#### Quick Example
To render a scene `CircleToSquare` in a file `test_scenes.py` contained in your current working directory while preserving your user and group ID, use
Instead of using the "throwaway container" approach sketched above, you can also create a named container that you can also modify to your liking. First, run
```sh
docker run -it --name my-manim-container -v "$(pwd):/manim" manimcommunity/manim /bin/bash
```
to obtain an interactive shell inside your container allowing you to, e.g., install further dependencies (like texlive packages using `tlmgr`). Exit the container as soon as you are satisfied. Then, before using it, start the container by running
```sh
docker start my-manim-container
```
Then, to render a scene `CircleToSquare` in a file `test_scenes.py`, call
Another alternative is to use the docker image to spin up a local webserver running
JupyterLab in whose Python kernel manim is installed and can be accessed via the `%%manim` cell magic.
To use JupyterLab, run
```sh
docker run -it -p 8888:8888 manimcommunity/manim jupyter lab --ip=0.0.0.0
```
and then follow the instructions in the terminal.
#### Important notes
When executing `manim` within a Docker container, several command line flags (in particular `-p` (preview file) and `-f` (show output file in the file browser)) are not supported.
The community also maintains a docker image (`manimcommunity/manim`), which can be found [on DockerHub](https://hub.docker.com/r/manimcommunity/manim).
Instructions on how to install and use it can be found in our [documentation](https://docs.manim.community/en/stable/installation/docker.html).
## Help with Manim
@ -161,8 +112,14 @@ Server](https://www.manim.community/discord/) or [Reddit Community](https://www.
Contributions to Manim are always welcome. In particular, there is a dire need for tests and documentation. For contribution guidelines, please see the [documentation](https://docs.manim.community/en/stable/contributing.html).
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.
However, please note that Manim is currently undergoing a major refactor. In general,
contributions implementing new features will not be accepted in this period.
The contribution guide may become outdated quickly; we highly recommend joining our
[Discord server](https://www.manim.community/discord/) to discuss any potential
contributions and keep up to date with the latest developments.
Most developers on the project use `uv` for management. You'll want to have uv installed and available in your environment.
Learn more about `uv` at its [documentation](https://docs.astral.sh/uv/) and find out how to install manim with uv at the [manim dev-installation guide](https://docs.manim.community/en/latest/contributing/development.html) in the manim documentation.