Commit graph

118 commits

Author SHA1 Message Date
Henrik Skov Midtiby
357bb3fbba
Rewrite MathTex to make it more robust regarding splitting (#4515)
* 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>
2026-02-16 14:22:56 +01:00
Benjamin Hackl
1f249e45b9
Let SceneFileWriter access ffmpeg via av instead of via external process (#3501)
* 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>
2024-05-15 13:23:09 +00:00
Viicos
68bd79093e
Refactor TexTemplate (#3520)
* 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>
2024-01-15 18:39:03 +00:00
Doaa Muhammad
64a0e9db43
Reformatting the --save_sections output to have the format <Scene>_<SecNum>_<SecName><extension> (#3499)
* 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>
2023-12-10 23:17:38 +00:00
ad_chaos
bcfa9ac5ad
Fix bug introduced in Tex rendering via #2574 (#2587)
* Bugfix

* Changes to log data

* Add test

* Seperate test
2022-03-05 22:28:01 +00:00
ad_chaos
5b11a0e48b
Improved Error in :mod:.utils.tex_file_writing (#2574)
* 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>
2022-02-26 20:50:11 +01:00
Benjamin Hackl
044dcad53f
Made frames_comparsion testing utility a proper module of the library (#2346)
* 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>
2021-12-03 21:18:18 +01:00
Marcin Serwin
0757579460
Add documentation for growing animations (#2340)
* 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>
2021-12-02 13:48:38 +00:00
Filip
911d42b364
Add missing tests for AnimationGroup 'remover' field (#2318)
Co-authored-by: Filip Wolwowicz <fwolwowicz@apptension.com>
2021-11-23 22:34:43 +00:00
Lucas Ricci
2d1d70fa8e
creation of a test for add_fixed_in_frame_mobjects (#2301)
* 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>
2021-11-18 19:30:10 +00:00
Christopher Besch
24fc31633b
Optimized Tests (#2274)
* optimized some tests

* removed out.txt
2021-11-12 08:50:24 +01:00
Lucas Ricci
74f2e0b7d7
Added test for :class:~.Broadcast (#2272)
* 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
2021-11-08 09:37:45 +08:00
heitor
25b3126626
Allow setting the input file via a config file (#2151)
* allow setting the input file via a config file

* fix: removed partial_movie_files

* Removed Extraneous Dots

* added documentation

* added link to docu

* added test

* removed test.py

* reverted poetry.lock changes

Co-authored-by: christopher-besch <christopher.besch@gmx.de>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2021-11-02 00:19:01 +01:00
Benjamin Hackl
ba00602daa
Fixed :meth:.CoordinateSystem.get_area when using few plot points and a boundary graph (#2244)
* 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>
2021-11-01 19:26:46 +01:00
Laith Bahodi
7fc681d313
Change the color of :class:~.NumberLine to WHITE from LIGHT_GREY. (#2139)
* remove explicit colours from NumberLine

* rewrite tests
2021-11-01 12:30:10 -04:00
Nick
3a6329dae1
Added keyword arguments `match_center, match_width etc. to :meth:.Mobject.become` (#2128)
* 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>
2021-11-01 07:50:53 +00:00
Christopher Besch
3a8b8625c7
Added `skip_animations argument to :meth:.Scene.next_section` (#2236)
* fix: removed partial_movie_files

* added documentation

* tests broken; nothing changed?

* tests still fail

* now respecting original skip animations flag

* added basic docs

* added forgotten test

* added skip animations test

* tests broken; nothing changed?

* tests still fail

* now respecting original skip animations flag

* added basic docs

* added forgotten test

* added skip animations test

* fixed some issues

Co-authored-by: Jan-Hendrik Müller <44469195+kolibril13@users.noreply.github.com>
2021-11-01 08:44:41 +01:00
icedcoffeeee
a6d8886b91
Added :meth.PolarPlane.get_polar_graph (#2157)
* added polar graph

* documentation

* add tests

* update docs example

* port polar methods to CoordSys
2021-10-31 11:37:03 +01:00
icedcoffeeee
c8746369e6
Renamed get_graph (and the like) to plot (#2187)
* rename to plot and deprecate old methods

* tests

* documentation

* accidental change

* updated deprecation period

* deprecate method

* updated docs examples

* update docs example

* more renaming

* more replacements

Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2021-10-31 09:55:34 +00:00
Laith Bahodi
5397d38e10
Implement logarithmic scaling for :class:~.NumberLine/:class:~.Axes (#1812)
* 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>
2021-10-29 13:05:31 -04: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
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
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
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
Naveen M K
af462e83cc
Added support for Boolean Operations on VMobjects (#1998)
* 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>
2021-09-28 11:35:33 +08:00
GameDungeon
94821c10d8
Flake8 Changes + Fixing Warnings (#1968)
* Warning Removal

* Flake Stuff

* HotFix

* Docs Fix

* I'm Dumb

* Docs Fix 2

* Fixing Github Requests

* Fix

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

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

* quick fix

* Add Deprecation Warning

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

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

* Weird Pre Commit Stuff

* Quick Fix

* Quick Fix

* Fix

* Flake 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-09-03 13:45:48 -04:00
icedcoffeeee
73f87bd66a
Implementing a `Zoom parameter to :class:~.ThreeDScene` (#1929)
* add a zoom parameter

* adding zoom trackers

* implementing zoom in three_d_scene

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

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

* updated typing error

* added test

* updated test

Co-authored-by: Iced-Tea3 <83535735+Iced-Tea3@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: KingWampy <9156604+WampyCakes@users.noreply.github.com>
2021-09-01 15:47:59 +02:00
Laith Bahodi
110d89f404
Use height to determine font_size instead of the _font_size attribute. (#1985)
* fix set_value and add some docs

* improve font_size property for tex/text_mobject.py

* add tests

* add more font_size tests

* round test_set_value_size)

* scale based on self._font_size

* add changing_font_size test

* rewrite test and add test i forgot to add

* improve hacky solution that didn't work

* add change font_size test for tex_mobject.py

* improve tests

* split into separate test

* remove component of old test

* fix docs

* simplify the setter
2021-08-31 22:44:25 +00:00
Laith Bahodi
223c2f86d0
Drop redundant OpenGL files and add metaclass support for Surface (#1843)
* replace old with new

* dropped redundant files

* replace examples in example_Scenes

* replace opengl_ in test

* ammend __init__

* opengl_compatibilty for Surface

* make resolution a tuple for opengl compat

* resolution changes in opengl.py

* rework sphere and enable dual renderer for 3d shapes

* adjust res for Torus

* actually drop file

* flip cairo_sphere resolution

* changes

* render each submobject individually

* make BraceLabel appear

* remove if config.renderer==opengl from mobject.py

* rewrite tests

* properly deprecate ParametricSurface

* revert rendering each submobject individually

* initialize OpenGLRenderer in Scene if config.renderer is opengl

* fix bases when config.renderer is changed

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

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

* actually push test

* remove unused bounding_box + data from mobject.py

* overwrite tests

* use #1899 to switch renderer at runtime to make tests work

* attempt at fixing tests

* add renderer=cairo at the end of the test??

* rewrite failing test

* remove self.attr = self.attr for bracelabel

* remove accidental line in test

* remove unecessary bloat and make set_fill_by_value dual compatible

* update to remove deprecation warning

* add ParametricSurface to __all__

* deprecate ParametricSurface

* change some examples

* adjust docs

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>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
2021-08-30 20:35:25 +00:00
Raj Dandekar
a558d3751f
Fix vector_to_coords() bug in :class:~.VectorScene. (#1871)
* Update vector_space_scene.py

* switch from attribute to method

Co-authored-by: Oliver <44864613+PhotonSpheres@users.noreply.github.com>

* add test

* remove debugger comment

Co-authored-by: Oliver <44864613+PhotonSpheres@users.noreply.github.com>
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
Co-authored-by: hydrobeam <laithbahodi@gmail.com>
2021-08-30 20:28:47 +00:00
Laith Bahodi
d184d35b7b
Added examples, tests and improved documentation for coordinate_system.py. (#1941)
* add docs for get_x/y_axis_label and rename first parameter

* privatize methods that need to be private

* adjust docs for axis_labels and add buff parameter

* Add documentation and typing for ComplexPlane

* update point_to_coords docs

* add get_lines_to_point

* add example for coords_to_point

* add docs for get_line_to_point

* add example for get_vert/hori_line

* privatize create_label_tex

* add example for get_axis_labels

* add examples for get_x/y_axis_label

* add example for get_graph_label

* example for riemann rectangles

* add example for input_to_graph_point

* add example for get_area and add kwargs to method

* add doctests to slope_of_tangent + angle_of_tangent

* add example for get_secant_slope_group

* add example to get_vertical_lines_to_graph

* add Examples + touch ups

* add example and warning to get_graph

* pre-PR touchups

* revert accidental changes + fix docs error

* fix doctest

* fix doctest

* switch from dosctrings to code-blocks

* attempt at fixing obscure latex error

* Apply suggestions from code review

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

* formatting and general cleanup

* two typos and minor improvement

* add non-graphical tests

* add graphical tests and control data

* fix tests

* more test errors

* add get_z_axis_label

* deprecate get_center_point

* missing return statement on log_func

* 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

* rewrite failing 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>
2021-08-30 20:21:58 +00:00
vinnniii15
4923086fc9
Fixed passing custom arrow shapes to :class:~.CurvedArrow (#1950)
* Update geometry.py

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

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

* added test for custom tip shapes for curved arrows

* added control data

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: Benjamin Hackl <devel@benjamin-hackl.at>
2021-08-30 21:42:14 +02:00
Laith Bahodi
f7ed88008b
Add font_size parameter for Tex and Text mobjects. (#1694)
* refactor numbers.py, numbers.py now uses font_size, adjust constants in tex_mobject.py and text_mobject, remove uses of number_scale_value in favour of font_size

* adjust PolarPlane to use font_size instead of scaling

* some of the docs have been changed to use font_size, adjust constant and add font_size to markup text

* accurate scale factors

* code mobject compatibility with font_size

* number_line now takes font_size

* make tests work

* cleanup

* deprecated test raised error, fixed

* typing for NumberLine

* fix misbehaving test

* actually fix set_value

* use native font_size scaling for text_mobject.py

* add constant and adjust BraceLabel

* fix change_label

* drop scale_factor for Title

* add some supers

* maybe fixes import issues

* numberplanetest

* the merge conflict is over and the tests run

* add test for tex_size

* some changes to the docs

* properly deprecate instead of removing

* move deprecations to __init__

* drop the config

* deprecate number_Scale_value

* update version number for deprecation

* adjust test precision

* if TYPE_CHECKING check

* adjust Using Text

* add font_size parameters for numberline and fix bug with decimal_number_config

* make set_value work with opengl

* make kwarg

* fix typo

* another typo

* change dates

* add font_size property for tex_mobjects

* _font_size instead of font_size (prep for prop)

* accidental bugfix, handle separately)

* generalize text2svg

* add font_size property for text_mobject.py

* add check for greater than 0

* Attribute error in dd_labels

* str for attr in hasattr

* rewrite and fix tests

* remove debugging print

* fix error when self.height ==0

* Apply suggestions from code review

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

* revert accidental @deprecated change

* fix error in line_spacing

* slight fixes

* use private attribute when checking for font_size in add_labels()

* raise a Value error when font_size < 0 + improve docs

* Apply suggestions from code review

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

* deprecate azimuth_label_scale and use more descriptive deprecation message

* wrong number of dots for an import

* add font_size property for decimalmobject

* return to using public attribute

* remove redundant constant

* add comment

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>
2021-08-26 20:16:55 -04:00
Václav Hlaváč
02446b3e7e
Fixed the positioning of line graph that was under the graph (#1951)
* removed a part of code that positioned a new line graph behind the axes

* added a line graph graphical unit test

Co-authored-by: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com>
2021-08-23 22:54:22 +00:00
sparshg
ec081d1ef5
Fixed :class:~.Rotate for angles that are multiples of :math:2\pi (#1938)
* custom path func for rotation anim

* small fix

* alt implementation

* small fixes

* tests
2021-08-21 15:00:53 +02:00
icedcoffeeee
fba4baef65
Made arrow tips rotate up/down (#1924)
* Made arrow tips rotate up/down

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

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

* rounding the doctest

* negative zeros

* Added notes on some calculations

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

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

* Angled Tip test

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Iced-Tea3 <83535735+Iced-Tea3@users.noreply.github.com>
2021-08-21 12:03:39 +02:00
Joy Bhalla
e4de8b728f
Reduced default resolution of :class:~.Dot3D (#1841)
* added parameter to reduce resolution of Dot3D

* modified dot3d class

* removed self from super().__init__ in class dot3d

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

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

* regenerated control data for dot3d,tetra,octa,icosa,dodec

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
2021-08-12 16:34:11 +08:00
Max Stoumen
fbc8c4a282
Fix test_opengl::test_Circle (#1894)
* fix(opengl): Reinstate test_Circle

* Re-render test data opengl/Circle.npz
2021-08-11 08:54:27 +02:00
Laith Bahodi
6eed276330
Removed :class:~.GraphScene, :class:~.NumberLineOld and parameters for :class:~.ChangingDecimal (#1860)
* remove NumberLineOld and GraphScene

* delete graphscene tests, shift plotfunctions test

* rewrite tests and fix __init__.py

* remove deprecation warning

* Update manim/animation/numbers.py

Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
2021-08-04 01:04:18 -04:00
Laith Bahodi
3cd2a27780
Allow non-numerical values to be added to :class:~.NumberLine/:class:~.Axes (#1780)
* add add_labels for number_line

* fix bug in add_numbers

* change to self

* drop add_coordinate_labels

* add somed docs

* improve docs

* forgot :class:

* fix typing

* remove redundancies

* typing error

* dict --> Dict

* introduce scaling in `add_labels` 

quite annoying to manually adjust size (especially without `font_size`)

* added tests

* don't use Text in testing
2021-08-01 18:37:58 -04:00
KingWampy
3ac72fed0e
Rename Tabular to Table (#1851)
Co-authored-by: WampyCakes <WampyCakes@users.noreply.github.com>
2021-08-01 21:52:56 +02:00
Hugues Devimeux
b46b860e97
Converted all the graphical tests to the new syntax (Tests PR 3/3). (#1836)
* Added direct decoration support, and auto naming test.

* format

* Misclearnous fixes and improvements of the testing system

* Converted tests.

* Removed ununsed imports

* Added tolerance

* save frames as uint8

* regenerate control data

* migrate other tests that have been added in the meantime

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

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

* try to make pre-commit happy

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>
2021-08-01 13:41:14 +02:00
Oliver
9db9f7c448
New Mobject: Added :class:~.Tabular (#1677)
* Init

* Added_lines

* stuff

* more stuff

* Added Examples

* black,isort,falke8

* Added to __init__

* Bugfix

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

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

* Added to reference.rst

* Added docstrings

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

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

* Added examples

* Added Docstrings and outer Lines

* Added Docstrings

* Added Docstrings and Examples

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

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

* Bugfix

* Removed Dummy-Mobject

* black/isort/flake8

* Special create function

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

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

* Minor bugfix

* create() and docs

* Improved Docstrings

* Improved docstring

* -

* Bugfix in docs

* Added ability to grab specific elements

* Added ability to grab specific labels

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

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

* Fixed f- string ValueError

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

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

* bug-fix

* Improved Docstrings

* Added type hints

* bug fix

* improved typehints

* Improved Docstrings

* Added docstrings

* Added example for background

* Improved Docstrings and type hints

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

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

* black

* Improved Docstrings

* bug fix

* codespell

* Highlight cells

* codespell

* Improved Examples

* Added graphical tests

* black/isort/flake8

* Changed test

* Testing the tests

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

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

* minor changes

* minor changes

* opengl-compatibility

adjusted `OpenGLMobject`'s arrange in grid and added imports

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

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

* get_highlighted_cell to add_highlighted_cell

* added test

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

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

* removed one test

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

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

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Ideas from Hydrobeam

* Fixed Docstrings

* canged super()

* Private methods

* cleaned template, added test

* retrigger checks

* changed references.rst

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

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

* added to reference_index

* fixed test

* fixed tests

* Added docstrings

* Codespell

* spaces

* color and docs

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

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

* codespell

* add a config import

gonna do a few checks for renderer=opengl

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Hydrobeam suggestions

* Update manim/mobject/tabular.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* color to background

* typos

* added color parameter to method

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>
2021-08-01 00:39:21 -04:00
Suhail Sherif
edd7b3423d
Fixed issues concerning frame_center in ThreeDScene (#1821)
* Putting frame_center in the center of the frame

* Update the scene whenever frame_center moves.

* Make the frame_center point invisible (no stroke).

* Extending the fix for #569 to 2 similar scenarios.

* Modified CameraMoveTest, fixes to 3d cam access

* Whoops, made a mistake with a partial add

* Added docstrings, type hints

* Apply suggestions from code review

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Implementing suggestions from code review.

* Performance improvement when frame center is stationary

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
2021-07-30 05:30:40 -04:00
sparshg
bc93a2e99a
DashedVMobject reworked (#1823)
* fix dashedVMobject

* add test

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

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

* also change opengl dashed vmobject

* fix dashedline

* small fix

* remove dash_spacing

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

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

* gitignore

* remove whitespace

* undo gitignore

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-29 16:27:53 +00:00
icedcoffeeee
266e54d3c5
Added a static method to :class:~.Circle to allow it to be defined by three points (#1765)
* Added new function: perpendicular bisector

returns two points that form the perpendicular bisector of the points given

* Circle mobject may accept three points.

If the radius not specified, the three points may be given to form the circle.

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

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

* Update geometry.py

* Added docs

* perpendicular bisector can work in 3D

* add test file

* add test scene

* Update manim/mobject/geometry.py

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

* changed the circle points test scene to addt

* Added docs for perp bisector function space ops

* typing error

* Made a static method for a circle from three points

* Added new test

Co-authored-by: Iced-Tea3 <83535735+Iced-Tea3@users.noreply.github.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-07-07 22:08:55 +08:00
Alex Lembcke
c79034ea29
Added .set_fill_by_value() to :class:~.ParametricSurface (#1686)
* Added color gradient by value to parametric surfaces

* Corrected example code for documentation

* Additional adjustments to example code

* Some more adjustments to example code

* Update manim/mobject/three_dimensions.py

I'm fine with this.

Co-authored-by: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com>

* Added example to :class:`~.NumberLine` (#1681)

* Update number_line.py

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

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

* Update manim/mobject/number_line.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/number_line.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/number_line.py

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

* Update number_line.py

* Update manim/mobject/number_line.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update number_line.py

* Update manim/mobject/number_line.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: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* Updated imports in `geometry.py` and added example to :class:`~.Arrow` (#1687)

* Updated imports in `geometry.py` and added example to :class:`~.Arrow`

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

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

* Update manim/mobject/geometry.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/geometry.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/geometry.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/geometry.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/geometry.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/geometry.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/geometry.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/geometry.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update geometry.py

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

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

* Update manim/mobject/geometry.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/mobject/geometry.py

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: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* Added example and parameter description to :class:`~.AnnularSector` (#1685)

* Added example and parameter description to :class:'AnnularSector'

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

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

* Update manim/mobject/geometry.py

Co-authored-by: Nikhil Garuda <34582615+Nikhil0504@users.noreply.github.com>

* Update manim/mobject/geometry.py

Co-authored-by: Nikhil Garuda <34582615+Nikhil0504@users.noreply.github.com>

* Update manim/mobject/geometry.py

Co-authored-by: Nikhil Garuda <34582615+Nikhil0504@users.noreply.github.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Nikhil Garuda <34582615+Nikhil0504@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* Add a tutorial for using :class:`~.Text` and :class:`Tex` (#1510)

* Add a tutorial for using :class:`~.Text`

* Add gradient example

* Add disabling ligature tutorial
Move PangoMarkup to reference of MarkupText

* Add docs of using Colors, t2g and t2c
Also, fix issues issues between Color and Colour

* use save_last_frame whereever necessary

* More docs on Fonts, weights, slants

* fix docs built

* fix build

* typo

* fix build

* Try fixing the build

* Fix indent

* Fix indent

* Change class name

* Fix link

* Update examples

* Add small desc about MarkupText

* Basic LaTeX tutorials

* typo: seperately ==> separately

* add a missing `

* Update using_text.rst

* Update using_text.rst

* Update tex_mobject.py

* Update using_text.rst

* Update tex_mobject.py

* Update using_text.rst

* Update using_text.rst

* Apply suggestions from code review

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Apply suggestions from code review

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

* Apply suggestions from code review

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update docs/source/tutorials/using_text.rst

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* change title

* add ref to tutorial

* Fix small error

* Fix syntax

* Apply suggestions from code review (1st)

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

* Apply suggestions from code review

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

* Update docs/source/tutorials/using_text.rst

* try to get link syntax right

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: Benjamin Hackl <devel@benjamin-hackl.at>

* Added Example for :class:`~.CoordinateSystem` (#1690)

* Added Example for :class:`~.CoordinateSystem`

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

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

* Update coordinate_systems.py

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

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

* Update manim/mobject/coordinate_systems.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* remove accidental font_size

* maybe fixes doc error?

* \frac

* \over (??)

* double brace syntax 🤔

* explain syntax error and proper setting of label

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>

* Rewrite stroke and fill shaders (#1716)

Rewrite vectorized mobject shaders to be compatible with transformation matrices.

* Added Example to :class:`~.PMobject` (#1698)

* Added Example to :class:`~.PMobject`

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

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

* Update manim/mobject/types/point_cloud_mobject.py

Co-authored-by: Jan-Hendrik Müller <44469195+kolibril13@users.noreply.github.com>

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>

* Exit gracefully if no scene was chosen (#1713)

* Exit gracefully if no scene was choosen

* Update module_ops.py

* Use logging system instead of print statement

Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>

* Update manim/utils/module_ops.py

Co-authored-by: Naveen M K <naveen521kk@gmail.com>

Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: Naveen M K <naveen@syrusdark.website>

* Fix bug when using Text with the opengl renderer. (#1729)

* the fix

* better fix

* OpenGL compatibility via metaclass: Matrix, DecimalNumber, Variable (#1585)

* OpenGL support

* remove opengl_value_tracker

* fix flake8

* switch to relative import

* Fix inheritence graph background color (#1734)

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* docs: remove reference of `--plugins` (#1732)

`--plugins` flag isn't implemented but it was mentioned in the
documentation. I have removed it.

* [pre-commit.ci] pre-commit autoupdate (#1691)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 21.5b2 → 21.6b0](https://github.com/psf/black/compare/21.5b2...21.6b0)
- [github.com/pycqa/isort: 5.8.0 → 5.9.1](https://github.com/pycqa/isort/compare/5.8.0...5.9.1)
- [github.com/codespell-project/codespell: v2.0.0 → v2.1.0](https://github.com/codespell-project/codespell/compare/v2.0.0...v2.1.0)

* fix typos

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 pillow to <8.3.0 (#1740)

* Metaclass compatibility for `coordinate_system.py`, `Code` and `ParametricSurface` (#1735)

* code metaclass

* axes metaclass

* make 3d axes and vmob work

* make code work (still bugged though)

* drop typo

* dropped period too, oops

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

* Added color gradient by value to parametric surfaces

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

* Update manim/mobject/three_dimensions.py

* Revert "Update manim/mobject/three_dimensions.py"

This reverts commit bccdc67980.

* already imported, not necessary to import again

Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com>
Co-authored-by: MathInvariance <85428162+MathInvariance@users.noreply.github.com>
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: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Nikhil Garuda <34582615+Nikhil0504@users.noreply.github.com>
Co-authored-by: Naveen M K <naveen@syrusdark.website>
Co-authored-by: Devin Neal <devin@eulertour.com>
Co-authored-by: Jan-Hendrik Müller <44469195+kolibril13@users.noreply.github.com>
Co-authored-by: yit6 <70917928+yit6@users.noreply.github.com>
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
Co-authored-by: Mohammad Al-Fetyani <m4bh@hotmail.com>
2021-07-07 20:24:23 +08:00
Laith Bahodi
0561bebe76
Fixed accidental displacement in :class:~.Axes caused by include_numbers/numbers_to_include (#1664)
* the changes

* refactor a bit and change order of dict_merging so that it does not overwrite

* adjust test

* add docstring

* check against None

* implement the suggestion from comments + minor tweaking

* fix get_axis_labels

* adjust y_axis_label value slightly

* adjust test and refactor numberplane to remove redundant parameters

* better solution

* make .add_coordinates() file wide and nuke get_coordinate_labels

* code block

* drop uncessary assignmnets to the axes

* Apply suggestions from code review

Co-authored-by: Abhijith Muthyala <73361366+abhi3019@users.noreply.github.com>

* include_tips --> tips in the docs

Co-authored-by: Abhijith Muthyala <73361366+abhi3019@users.noreply.github.com>
2021-06-20 02:51:10 -04:00
Iced-Tea3
ed22296b04
Made the default arrowhead size for :class:~.Arrow3D smaller (#1693)
* Adjusted arrowhead size for Arrow3D

* Add files via upload

* Add files via upload

* Update three_dimensions.py

* Add files via upload

Co-authored-by: KingWampy <9156604+WampyCakes@users.noreply.github.com>
2021-06-17 12:35:52 -04:00
André
601d328799
Fixed error when processing SVG with omitted elliptical arc command (#1574)
* fixed arc implementation for omitted command

* added double elliptical arc test

* fixed incorrect startpoint when processing elliptical arcs

* added heart.svg test

* fixed elliptical arc processing error

* added elliptical arc test

* merging from elliptical_arc_fix
2021-05-31 13:15:10 +02:00