Commit graph

5,761 commits

Author SHA1 Message Date
Darylgolden
6018ebf445 Revert "Merge branch 'main' of https://github.com/ManimCommunity/manim"
This reverts commit e7f9d23aa7, reversing
changes made to afe91d02b6.
2023-07-31 15:29:39 +08:00
Darylgolden
e7f9d23aa7 Merge branch 'main' of https://github.com/ManimCommunity/manim 2023-07-31 15:28:20 +08:00
Zachary Winkeler
56bc8add61
fix: changed minor typo in OpenGLVMobject (#3302)
A conditional in interpolate() was previously checking the same triangulation twice.
2023-07-24 12:46:07 +02:00
pre-commit-ci[bot]
1c75a919fd
[pre-commit.ci] pre-commit autoupdate (#3296)
updates:
- [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-19 21:03:33 -07:00
John Lynch
658f1b4b3a
Improve Arrow Tip Showcase example in docstring of class ArrowTip (#3297) 2023-07-19 21:02:31 -07:00
Benjamin Hackl
1cd0f43982
Fixed expand animation for :class:.ManimBanner (#3298)
* fixed "a" appearing before shapes

* added animation test for ManimBanner

* added xelatex to linux pipeline

* xelatex -> xetex
2023-07-18 14:36:20 -07:00
Francisco Manríquez Novoa
e00c780b58
Optimized :meth:.Axes.coords_to_point (#3286)
* 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
2023-07-16 19:04:03 +02:00
pre-commit-ci[bot]
7c9f98c090
[pre-commit.ci] pre-commit autoupdate (#3280)
updates:
- [github.com/asottile/pyupgrade: v3.8.0 → v3.9.0](https://github.com/asottile/pyupgrade/compare/v3.8.0...v3.9.0)
- [github.com/asottile/blacken-docs: 1.14.0 → 1.15.0](https://github.com/asottile/blacken-docs/compare/1.14.0...1.15.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-16 10:22:57 +02:00
Uwe Zimmermann
8c344477ba
fixed the use of the LinearTransformationSceneExample in Jupyter notebooks (#3284)
* 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>
2023-07-16 10:22:31 +02:00
dependabot[bot]
e6632776ff
Bump cryptography from 41.0.1 to 41.0.2 (#3287)
Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.1 to 41.0.2.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/41.0.1...41.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-16 10:21:00 +02:00
Adhyyan Sekhsaria
e84547f36d
Update dependencies for apple silicon in macos.rst (#3290)
According to https://pypi.org/project/ManimPango/
manim pango also needs pkg-config
2023-07-16 10:18:01 +02:00
Uwe Zimmermann
124ed9d1a4
fix: prevent vector position array from being modified (#3273) (#3282)
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>
2023-07-13 01:38:23 +02:00
Benjamin Hackl
a3b1d9f2ff
replace mentions of Python 3.7 as the minimally required version with 3.8 (#3274) 2023-07-05 00:02:11 +09:00
Alex Kempen
0d3464cff2
Bugfix: Fix arc start angle type (#3205)
* Fixed animation misspelling in Mobject's add_animation_override

* Corrected angle types of Arc
2023-07-04 12:13:15 +09:00
pre-commit-ci[bot]
f56723a025
[pre-commit.ci] pre-commit autoupdate (#3227)
updates:
- [github.com/asottile/pyupgrade: v3.3.1 → v3.7.0](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.7.0)
- [github.com/asottile/blacken-docs: 1.13.0 → 1.14.0](https://github.com/asottile/blacken-docs/compare/1.13.0...1.14.0)
- [github.com/pre-commit/mirrors-mypy: v1.2.0 → v1.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.2.0...v1.3.0)
- [github.com/codespell-project/codespell: v2.2.4 → v2.2.5](https://github.com/codespell-project/codespell/compare/v2.2.4...v2.2.5)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-04 02:17:09 +00:00
dependabot[bot]
44ab4397a4
Bump docker/build-push-action from 3 to 4 (#3272)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 10:56:48 +09:00
Sujal Singh
96eba4ca2c
add latex installation instructions for fedora (#3251)
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-06-20 09:18:14 +02:00
Abulafia
7dd9bb6eb9
Minor fix, return self (#3236)
* 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>
2023-06-20 09:17:47 +02:00
dependabot[bot]
bc6ff341d7
Bump tornado from 6.3.1 to 6.3.2 (#3253)
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.3.1 to 6.3.2.
- [Changelog](https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst)
- [Commits](https://github.com/tornadoweb/tornado/compare/v6.3.1...v6.3.2)

---
updated-dependencies:
- dependency-name: tornado
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-06-20 09:17:24 +02:00
Naveen M K
96a83e5445
CI: fix a config error from poetry (#3257)
also, pin the version of poetry
2023-06-20 09:04:19 +02:00
Benjamin Hackl
cbf6726f89
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+
2023-05-05 10:59:20 +02:00
Abulafia
b9367a2fb7
Small fix in the code of ArcBrace (#3226)
Avoiding the creation of an Arc object at import time

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-05-05 10:58:56 +02:00
Adrien ANTON LUDWIG
05594eca5e
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>
2023-05-05 10:57:15 +02:00
Benjamin Hackl
33669643b5
Upgrade ReadTheDocs build environment to use newer image (#3232)
* 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>
2023-05-05 05:38:29 +00:00
Benjamin Hackl
820bfc7bf0
Fixed errors reported by `flake8` (#3231)
* 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>
2023-05-04 22:14:27 -07:00
JinchuLi2002
0902eef61f
Enables Use of input_to_graph_point() by CurvesAsSubmobjects Instances (#3190)
* CurvesAsSubmobjects preserve points.

* Override point_from_proportion() instead

* fixed typo

* added test

* added underscore for helper method

---------

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-04-25 12:22:27 +00:00
Naveen M K
524b27a298
DecimalNumber: Don't set stroke_width attribute directly (#3210)
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.
2023-04-25 13:43:38 +02:00
JinchuLi2002
4059bc1102
added condition for OpenGLVMobject (#3211) 2023-04-25 13:42:47 +02:00
pre-commit-ci[bot]
78d88599ea
[pre-commit.ci] pre-commit autoupdate (#3212)
updates:
- [github.com/pre-commit/mirrors-mypy: v1.1.1 → v1.2.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.1.1...v1.2.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-25 13:27:35 +02:00
Naveen M K
a7a972bf66
docs: enable social cards (#3219)
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.
2023-04-25 13:26:35 +02:00
Matt Turner
06f60f6021
Small grammar change to deep_dive doc (#3218)
In manim/docs/source/guides/deep_dive.rst line 388, changed "there is an playground" to "there is a playground".
2023-04-20 08:35:02 +02:00
Benjamin Hackl
b4bab0e336
Prepare new release: v0.17.3 (#3198) v0.17.3
* 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>
2023-04-06 18:59:43 +02:00
Benjamin Hackl
828497b0a2
Fixed docstring formatting of :meth:.Scene.replace and improved its error handling (#3204)
* 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>
2023-04-06 15:22:35 +02:00
Frédéric Crozatier
c98f3c786c
Added :class:.DiGraph, a mobject representing directed graphs (#2974)
* Directed graphs

* use type instead of isinstance

* respect object boundary

* refactor graph with GenericGraph

* update tests

* fix doc string

* custom tips override default, and more documentation

* improve docstring situation, move examples to concrete classes

* further improve docstrings

* refactor: remove graph_type, simplify handling of tip_config

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* removed superfluous import

* fixed two tests

---------

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>
2023-04-06 13:40:23 +02:00
Benjamin Hackl
a6651bee94
New tip shape :class:.StealthTip, allow specifying tip shape of :class:.NumberLine (#3201)
* 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>
2023-04-05 20:05:48 +02:00
pre-commit-ci[bot]
f247408d99
[pre-commit.ci] pre-commit autoupdate (#3203)
updates:
- [github.com/psf/black: 23.1.0 → 23.3.0](https://github.com/psf/black/compare/23.1.0...23.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-03 22:21:36 +02:00
Elyanah Aco
659f6affa6
Made :class:.ArrowTriangleTip, :class:.ArrowTriangleFilledTip available to module namespace (#3166)
* 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>
2023-04-03 11:37:04 +02:00
vahndi
c78bd8a22b
fix bug in setting self.label_constructor in NumberLine.add_labels (#3015)
* fix bug in setting self.label_constructor in NumberLine.add_labels

* fix label_constructor in NumberLine.add_labels()

* fix label_constructor in NumberLine.add_labels()

* improved docstring + type hints

---------

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
2023-03-31 22:41:54 +00:00
Tristan Schulz
84e07eaf77
fixed moderngl import issue (#3200)
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-03-31 22:19:15 +00:00
ItIsJoeyG
04e41a2e16
Changed winget install MiKTeX command (#3199)
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
2023-03-31 22:55:48 +02:00
Kevin Lubick
c62c5a3aba
Improve creation time for large Text Mobjects (#3181)
* 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>
2023-03-31 21:37:15 +02:00
Kevin Lubick
1b4049a01a
Add warning if font is not found for Text, Code, and MarkupText (#3046)
* 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>
2023-03-30 13:47:53 +02:00
Matthew Lee
117563e1f0
Added :meth:.set_opacity_by_tex method for setting the opacity of parts of Tex mobjects (#3159)
* 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>
2023-03-29 08:33:13 +02:00
icedcoffeeee
b9784a0900
store color data (#3134)
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-03-28 23:51:01 +02:00
coreyp1
80795d8361
Added support for individualized radius values in :meth:.Polygram.round_corners (#3155)
* 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>
2023-03-28 22:13:12 +02:00
Kevin Lubick
1edcd99250
Speed up width/height/depth by reducing copying (#3180)
* 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>
2023-03-28 21:03:03 +02:00
Kevin Lubick
1e8b349e00
Reduce memory allocations when building SVGMobject (#3182)
* 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>
2023-03-28 20:48:29 +02:00
Phoenix2157
f2f428f876
Corrected the hinted return type for :func:angle_between_vectors (#3189)
* Update space_ops.py

* Apply suggestions from code review

---------

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-03-28 20:45:45 +02:00
karpfediem
ca8a77d091
fix(3183): render in named threads, limit condition (#3191)
Limit condition to interactive OpenGL mode

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-03-28 20:40:52 +02:00
JinchuLi2002
479e7b62e6
scales x&y before calling ImplicitFunction() (#3195) 2023-03-28 20:19:03 +02:00