Commit graph

38 commits

Author SHA1 Message Date
Grant Sanderson
596aea3bf5 Update to bezier 2022-12-28 21:06:36 -08:00
Grant Sanderson
f8b39f2ff1 Allow Scalable type to be any FloatArray 2022-12-18 09:11:16 -08:00
Grant Sanderson
6f0020950f Make Scalable a Typevar 2022-12-17 22:28:53 -08:00
Grant Sanderson
24fd6d890e Tweak type hints for bezier.py 2022-12-17 18:35:26 -08:00
YishiMichael
9ef9961d0e
Sort imports 2022-04-12 19:19:59 +08:00
Grant Sanderson
705f1a528b Separate functionality of ordinary linear interpolation from that using np.outer on arrays 2022-04-11 10:47:11 -07:00
Grant Sanderson
a9349057ad Merge branch 'master' of github.com:3b1b/manim into video-work 2022-03-22 11:30:25 -07:00
Grant Sanderson
bf2d9edfe6 Allow interpolate to work on an array of alpha values 2022-03-16 12:23:51 -07:00
TonyCrane
3744844efa
fix: fix type hint of set_array_by_interpolation 2022-02-15 11:35:22 +08:00
TonyCrane
a0ed9edb42
resolve conflict 2022-02-14 14:12:06 +08:00
Grant Sanderson
602809758e
Video work (#1739)
* Enable setting points to a null list, and adding one point at a time.

* Add refresh_locked_data

* Add presenter mode to scenes with -p option

* Allow for an embed by hitting e during interaction

* Add set_min_height, etc.

* Make sure null parametric curve has at least one point

* Account for edge case where \{ is used in Tex

* Allow for logging notes in wait calls, useful for presenter mode

* Simplify choose, and add gen_choose for fractional amounts

* Default to no top on axes

* Allow match_x, match_y, etc. to take in a point

* Allow wait calls to ignore presenter mode

* Just use math.combo, no caching with choose(n, r)

* Use generator instead of list in bezier

* Bubble init_colors should override

* Account for "px" values read in from an svg

* Stop displaying when writing is happening

* Update the way Bubble override SVG colors
2022-02-13 15:16:16 -08:00
TonyCrane
7f8216bb09
chore: replace some iterable with npt.ArrayLike 2022-02-13 15:18:04 +08:00
TonyCrane
35025631eb
chore: fix type hint of bezier 2022-02-13 12:56:03 +08:00
TonyCrane
6e292daf58
chore: add type hints to manimlib.utils 2022-02-12 23:47:23 +08:00
Michael W
0e574882b3
Refactor #1637 (#1650)
* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Update config.py

Co-authored-by: 鹤翔万里 <tonycrane@foxmail.com>
2021-10-16 13:04:52 +08:00
Grant Sanderson
4466cfe727
Merge branch 'master' into add_warnings 2021-10-15 12:12:36 -07:00
TonyCrane
7425057d9f use rich to log 2021-10-07 17:37:10 +08:00
Grant Sanderson
9a78d13212 get_smooth_quadratic_bezier_handle_points edge case for 2 points 2021-08-21 17:07:49 -07:00
slowy07
1e621e8278 fix: fix typo spelling grammar 2021-08-07 22:25:26 +07:00
Grant Sanderson
66817c4e2b Add alternate smoothing options 2021-02-05 16:29:07 -08:00
Grant Sanderson
25cd846356 Fix and simplify get_smooth_quadratic_bezier_handle_points so that VMobject.make_smooth works better 2021-02-05 15:25:17 -08:00
Grant Sanderson
9314dfd933 Reframe Mobject, VMobject and SurfaceMobject with a data map 2021-01-11 10:57:23 -10:00
Grant Sanderson
b3335c65fb Partial progress 2021-01-10 18:51:47 -08:00
Grant Sanderson
439e83f40e set_array_by_interpolation 2020-06-28 12:15:01 -07:00
Grant Sanderson
b443c9e764 Fixed bug at a = 1 for partial_bezier 2020-06-27 12:17:41 -07:00
Grant Sanderson
54bde86c7b Some small performance improvements to VMobject 2020-06-27 12:10:22 -07:00
Grant Sanderson
3e913b6649 Have make_smooth work directly from the quadratic bezier curves, without going via cubics and doubling the size of the points list 2020-06-09 16:58:16 -07:00
Grant Sanderson
c7a50ac7a5 Tried, but failed, to write a better smooth bezier function 2020-06-09 12:38:37 -07:00
Grant Sanderson
f0a36329b1 Changed get_quadratic_approximation_of_cubic 2020-06-08 20:40:39 -07:00
Grant Sanderson
eb89d45937 Have get_quadratic_approximation_of_cubic default to midpoint when there is no inflection 2020-02-12 12:53:21 -08:00
Grant Sanderson
c0a29c4c74 Have partial_bezier_points return list, not numpy array 2020-02-12 11:49:16 -08:00
Grant Sanderson
f98513dfc2 Remove unneeded import 2020-02-10 14:48:07 -08:00
Grant Sanderson
db0029c32b Fix error in get_quadratic_approximation_of_cubic 2020-02-07 09:31:06 -08:00
Grant Sanderson
cf2d8d47e6 Fixed get_quadratic_approximation_of_cubic to account for cubics with an inflection point between 0 and 1 2020-02-06 10:01:19 -08:00
Grant Sanderson
ed376e475d Added get_quadratic_approximation_of_cubic 2020-02-04 15:25:08 -08:00
Grant Sanderson
55081c75ef Fixed bugs in partial_bezier_points and integer_interpolate 2019-02-05 15:25:44 -08:00
Grant Sanderson
eaf25ff34b Changing the way VMobject handles its internal bezier curves so as to eliminate the need for sup_paths 2019-02-05 11:02:15 -08:00
Devin Neal
3543a750ba move library code into manimlib, replace relative imports with absolute imports 2018-12-26 20:57:01 -08:00
Renamed from utils/bezier.py (Browse further)