Commit graph

5,290 commits

Author SHA1 Message Date
Ryan McCauley
a2fac4b9f0
Make projection shaders compatible with streamlines (#2160)
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
2021-10-26 23:58:31 +00:00
Ryan McCauley
9bf45c7985
Fixed opengl set_color with gradients (#2140)
* Fix opengl color gradients

* Update manim/mobject/opengl_mobject.py

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2021-10-26 15:49:36 +00:00
Benjamin Hackl
81fa93de8c
Cleanup: ensure `Scene.renderer.time` returns something that makes sense (#2220)
* 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>
2021-10-25 09:34:38 +00:00
Christopher Besch
44634bde7a
Updated Classifiers in pyproject.toml (#2222) 2021-10-24 12:12:01 +05:30
Eugene Chung
ed5d6fd2d3
Moved comments in :class:~.VMobject to documentation (#2184)
* 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>
2021-10-23 13:03:42 +08:00
Benjamin Hackl
80a988b43d
Fixed animations not respecting the specified rate function (#2211)
* let existing animations overriding interpolate_mobject respect rate function

* added note about rate function to Animation

* added missing newline
2021-10-22 12:35:38 +00:00
Ryan McCauley
7faead9c22
Improved last frame output handling for the OpenGL renderer (#2205)
* 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>
2021-10-22 11:56:31 +00:00
Christopher Besch
8b9e802706
Removed Extraneous Dots in :class:.Section Documentation (#2217)
* fix: removed partial_movie_files

* Removed Extraneous Dots

* added documentation

* added link to docu
2021-10-22 10:59:57 +00:00
icedcoffeeee
239a7b3985
Implemented :meth:.Line3D.parallel_to and :meth:.Line3D.perpendicular_to (#2196)
* implemented parallel_to and perp_to class methods

* documentation

* tests

* renamed perp_to to perpendicular_to

* simplified calculations
2021-10-22 10:44:49 +00:00
Viicos
61cddb224f
Fixed typo on get_z_axis_label docstring (#2215)
* Fixed typo on `get_z_axis_label` docstring

* Update manim/mobject/coordinate_systems.py

better this way ;)

Co-authored-by: Darylgolden <darylgolden@gmail.com>

Co-authored-by: Darylgolden <darylgolden@gmail.com>
2021-10-20 22:49:54 +00:00
Christopher Besch
c72245e19a
fix: removed partial_movie_files (#2213) 2021-10-20 17:27:12 +02:00
Christopher Besch
7d76cd459d
Fixed Documentation for Sections (#2212)
* 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
2021-10-20 11:35:09 +02:00
Christopher Besch
3ce4c133dd
Introduced API for scene sections via :meth:.Scene.next_section (#2152)
* 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
2021-10-20 10:36:24 +02:00
kieran-pringle
e3f7026d0e
Improve TeX error reporting (#2161)
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
2021-10-19 10:11:06 +00:00
icedcoffeeee
ab9a21bb71
fix arrow tip (#2148) 2021-10-19 10:08:43 +00:00
Martmists
4537b5048c
Addressed some maintenance TODOs (#2200)
* 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>
2021-10-19 09:53:40 +00:00
David Yang
911ea4bd09
Type hinting images.py (#2194)
Co-authored-by: Darylgolden <darylgolden@gmail.com>
2021-10-18 07:49:17 +08:00
Peeter Joot
0205ab1f87
Minor spell-check in docstrings (#2201)
* s/aniamtion/animation/

* revert .pot changes.

Co-authored-by: Peeter Joot <peeter.joot@lzlabs.com>
2021-10-18 07:06:26 +08:00
Darylgolden
1cd24892e5
Added Crowdin configuration and changed source files to `.pot` format (#2165)
* 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>
2021-10-15 11:51:09 +02:00
David Yang
acd4d10600
Type hinting ipython_magic.py (#2171)
Co-authored-by: Darylgolden <darylgolden@gmail.com>
2021-10-14 07:26:56 +00:00
Виктор Виктор
470491e073
Removes add-trailing-comma hook (#2190) (#2191) 2021-10-14 07:24:38 +00:00
Josiah Winslow
f91428e580
Fixed :func:.svg_path.string_to_numbers sometimes returning strings (#2192)
* 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>
2021-10-14 09:22:33 +02:00
Ryan McCauley
8c28a10674
Add flag to disable rendering for mobjects (#2172) 2021-10-13 17:33:02 +00:00
Dhananjay Goratela
fd6b1d8940
Made regex more readable (#2164)
* 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>
2021-10-13 14:01:48 +08:00
Michael Hill
17fdaf4f4a
Fixed type mismatch for height & width parameters (#2185) 2021-10-11 16:13:21 +08:00
Darylgolden
91bcf11674
Changed the default width of videos in Jupyter notebooks to `60%` (#2182)
* Change to 60vw

* 60%

* fix
2021-10-10 09:34:39 +02:00
Anima
4ff2cbec1a
Transferred troubleshooting installation related snippets from Discord to the documentation (#2130)
* 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>
2021-10-10 04:27:03 +00:00
Laith Bahodi
8600c7c4da
Modify `set_default` example to prevent leaking across the docs. (#2176)
* Modify set_default' example to prevent leaking across the docs

* actually fix the colour

Co-authored-by: Darylgolden <darylgolden@gmail.com>
2021-10-10 09:24:51 +08:00
Ryan McCauley
0ee3281584
Increased opengl testing (#2146)
* Increase opengl testing

* Add and mark remaining failing tests

* Mark test as fail
2021-10-07 17:09:36 +01:00
Benjamin Hackl
8a3d1d8ff3
Prepared new release, `v0.11.0` (#2114) v0.11.0
* 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>
2021-10-02 17:51:16 +02:00
Ryan McCauley
a93d112614
Improved setting of OpenGL colors (#2111)
* Improve setting of opengl colors

* Use keyword arguments and move tests to opengl folder
2021-10-02 10:15:05 +00:00
Tim
dd16347eb8
Make colour aliases IDE-friendly (#2050)
* 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>
2021-10-02 09:54:05 +00:00
icedcoffeeee
4f6852cd86
Renamed `distance parameter of :class:.ThreeDScene and :class:.ThreeDCamera to focal_distance` (#2123)
* deprecate distance

* updated deprecation

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2021-10-02 09:43:59 +02:00
Nicolai Weitkemper
c7199fa852
fix missing whitespace in info message (#2126)
…without breaking Manim
2021-10-02 07:01:18 +00:00
icedcoffeeee
b8d76cfa7a
Implemented :class:~.ImplicitFunction and :meth:.CoordinateSystem.get_implicit_curve for plotting implicit curves (#2094)
* dependencies

* ImplicitFunction

* coord sys typo

* implicit graph

* tests

* lower max quads

* Update ImplicitFunction.npz

* corrections

* renamed graph to curve

* use_smoothing

* return type

* depth vs quads docs

* fix docstrings

* added more clarification

* updated note admonition

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

* Add keywords

* updated isosurfaces import

* unnecessary args as kwargs

* unnecessary args as kwargs

* Revert "updated isosurfaces import"

This reverts commit 16ac042a41.

* small fix

* Update poetry.lock

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>
2021-10-02 06:58:50 +00:00
Evan Boehs
b04f0379f0
Copyedited the configuration tutorial in the documentation (#2131)
* Update configuration.rst

* 2 instances of may, one of might

Co-authored-by: Darylgolden <darylgolden@gmail.com>
2021-10-02 12:29:19 +08:00
Benjamin Hackl
b1daa32128
Changed `manim_directive to use a clean configuration via tempconfig` (#2120)
* 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>
2021-10-02 04:11:30 +02:00
leleogere
522b83cdc7
Improved the implementation of :meth:.CoordinateSystem.get_area to work without Riemann rectangles, added new :meth:.CoordinateSystem.get_area_with_riemann_rectangles (#1990)
* 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>
2021-10-02 00:00:17 +00:00
Benjamin Hackl
d9958b36a1
upgrade several dependencies (#2124)
Co-authored-by: Jan-Hendrik Müller <44469195+kolibril13@users.noreply.github.com>
2021-10-01 20:02:49 +02:00
Benjamin Hackl
4368b972af
Fixed broken links in inheritance graphs by moving them to `reference.rst` (#2122)
* 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>
2021-10-01 14:08:22 +02:00
Максим Заякин
78dff97c51
Improved docstring of :meth:.PMobject.add_points (#2115)
* 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>
2021-10-01 11:32:03 +02:00
Meredith Espinosa
b707791c13
more accurate type hinting for line_spacing (#2116) 2021-10-01 08:46:34 +00:00
icedcoffeeee
094e983d77
Added 3D support for :class:~.ArrowVectorField and :class:~.StreamLines (#2118)
* Implemented 3d to ArrowVectorField

* Implemented 3d to StreamLines

* Documentation
2021-10-01 08:38:53 +00:00
Laith Bahodi
c55828f087
Revert colour of background in docs to BLACK in Mobject page. (#2117)
* fix doc

* add colour
2021-10-01 09:13:49 +02:00
Ryan McCauley
f24e080ff3
Fixed :meth:~OpenGLRenderer.get_frame when window is created (#2070)
* Fix opengl get_frame when preview is enabled

* Flip width and height

* Fix tests
2021-09-30 18:16:41 +02:00
Ryan McCauley
1ba8bff1fd
Fix animation group opengl compatibility (#2071)
Co-authored-by: Darylgolden <darylgolden@gmail.com>
2021-09-30 16:09:30 +00:00
icedcoffeeee
8a4222e4f4
Added OpenGL compatibility to :meth:.ThreeDScene.begin_ambient_camera_rotation and :meth:.ThreeDScene.move_camera (#2113)
* updated begin_ambient_camera_rotation

* updated stop_ambient_camera_rotation

* updated move_camera
2021-09-30 17:58:33 +02:00
Benjamin Hackl
c4b96ffc80
Implemented :meth:.Mobject.set_default, a mechanism for changing default values of keyword arguments (#2075)
* implement Mobject.change_default

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

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

* fix doctest

* actually fix doctest 🙄

* Update manim/mobject/mobject.py

* allow restoring original default arguments

* added change_default implementation to OpenGLMobject

* change_default -> set_default

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>
2021-09-30 13:47:35 +02:00
Naveen M K
3f27209711
Add opengl support for Boolean Operations (#2016) 2021-09-30 16:07:33 +05:30
Ryan McCauley
ce07a50d82
Reuse cairo tests with opengl 2021-09-29 19:31:55 +01:00