* 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>