3021 Commits

Author SHA1 Message Date
3362f93964 Fix three bugs(shaders/stroke/size) of Text Class (text_mobject.py) (#1030)
* fix: remove the last M tag in svg files to make Text run in shaders branch

* fix: close the svg path manually to fix the bug of wrong stroke

* fix: remove Space mobjects in Text to fix the bug of TransformText

* feat: make Text and TextMobject equal in size

* this will lead to more bugs of setting color, so I delete it
2020-05-05 00:12:22 -07:00
af65c9d5d4 Performance improvement for most scenes (#974)
tl;dr: this is a significant performance improvement for many scenes. 1.7x - 2.6x improvement in animation it/s.

This is a small change to some of the hotest paths in rendering objects. The biggest win comes from not using np.allclose() to check if two points are close enough. In general, NumPy is awesome at operating on large arrays, but overkill for very tiny questions like this. Created a small function to determine if two points are close using the same algorithm, and limited it to 2D points since that's all we need in set_cairo_context_path().

A couple of other minor tweaks to reduce or eliminate other uses of NumPy in this path.

In general, it is better to avoid wrapping lists in np.array when a real NumPy array isn't actually needed.

Added a new file for performance test scenes, with a single scene from the end of a video I've been working on.

Data:

MacBook Pro (16-inch, 2019)
macOS Catalina 10.15.4
2.4 GHz 8-Core Intel Core i9
64 GB 2667 MHz DDR4
Python 3.7.3 (default, Mar  6 2020, 22:34:30)

Profiler: yappi under Pycharm.

Using the scene Perf1 from the included perf_scenes.py, averaged over 5 runs and rendered with:
manim.py perf_scenes.py Perf1 -pl --leave_progress_bars

Before:
Animation 0: FadeInTextMobject, etc.:               8.93it/s
Animation 1: ShowCreationParametricFunction, etc.: 84.66it/s

Profiler shows 48.5% of the run spent under Camera.set_cairo_context_path()

After
Animation 0: FadeInTextMobject, etc.:               23.45it/s  -- 2.63x improvement
Animation 1: ShowCreationParametricFunction, etc.: 149.62it/s  -- 1.77x improvement

Profiler shows 19.9% of the run spent under Camera.set_cairo_context_path()

Less improvement with production-quality renders, and percent improvement varies with scene of course. This appears to be a good win for every scene I'm working on though. I hope it will be for others, too.

NB: there are more perf improvements to be had, of course, but this is the best one I currently have.
2020-04-24 21:04:08 -07:00
f0cdcd90ba Fix Text wrong display (#889) 2020-04-23 20:36:57 -07:00
19e3c97589 Revise config again (#987) 2020-04-17 02:51:25 -07:00
811ee4d26b Merge pull request #986 from 3b1b/display-help
Display help if no input file is specified
2020-04-17 02:38:53 -07:00
c847988e10 Display help if no input file is specified 2020-04-17 02:36:56 -07:00
1bb2e8c237 Merge pull request #985 from 3b1b/remove-livestream
Remove livestream
2020-04-17 00:08:17 -07:00
77ab3b8d3a Merge branch 'master' of github.com:3b1b/manim into dev 2020-04-17 00:00:36 -07:00
87d8671995 Remove livestreaming option 2020-04-16 23:59:22 -07:00
f0796055cc Update README.md 2020-04-15 20:08:02 -07:00
48f2a1ec3c Re-add documentation link 2020-03-13 03:16:59 -07:00
422e86e0da Remove dead documentation link 2020-02-21 20:28:43 -08:00
c896f58bbd Merge pull request #877 from azarzadavila/master
Typo in super() 77acc99
2020-02-12 22:38:21 -08:00
97a0a707d7 Typo in super() 77acc99 2020-02-09 11:31:54 +01:00
30728879be Merge pull request #871 from 3b1b/bayes
Bayes
2020-02-03 09:16:21 -08:00
77acc999cd Rename number_line_config to axis_config 2020-01-15 15:40:30 -08:00
1279f040da Temporarily adding input_file_path to SceneFileWrite config. Not sure why this isn't there already, or if there are problems with setting a default, but it fixed a weird bug that had arisen 2020-01-11 17:14:02 -08:00
0f71b0a408 Playing wiht logo 2020-01-11 17:13:02 -08:00
ada09f1928 Editing old name animations 2020-01-11 17:12:44 -08:00
839fb4ff58 Merge pull request #853 from 3b1b/bayes
Bayes
2020-01-06 09:43:06 -08:00
24d077fbce Change referenced directory of 3b1b content in LICENSE and README 2020-01-06 09:39:33 -08:00
16f8c025cd Small tweaks to old videos when revisiting their animations 2020-01-06 09:38:54 -08:00
6fe082a5d8 Preliminary end to Bayes project 2019-12-19 19:42:50 -08:00
0e92deddc4 Change ShowSubmobjectsOneByOne defaults 2019-12-19 19:42:28 -08:00
fa2c831ef3 Support UTF8 tex 2019-12-19 19:42:06 -08:00
2916990077 Change from old_projects to from from_3b1b.old 2019-12-17 10:07:37 -08:00
ef6716625e Rename 3b1b_projects to from_3b1b 2019-12-17 09:45:07 -08:00
a138cea3ed Pulled bayes.py into a folder for more bayes projects 2019-12-17 09:40:32 -08:00
1387d88043 Preliminary end to bayes, part 1 2019-12-17 09:39:11 -08:00
9deb2d3732 Change patron end screen 2019-12-17 09:38:18 -08:00
a95318f1ab Fix print_family 2019-12-17 09:37:59 -08:00
5ea6c0f525 Bayes scenes up to GlimpseOfNextVideo 2019-12-15 08:45:40 -08:00
c74cfa3c5d Add error message for ApplyFunction 2019-12-15 08:44:57 -08:00
5cce05fc46 Scenes up to IntroduceLynda 2019-12-12 14:40:42 -08:00
c2838d78a2 Forgot to propagate kwargs in Underline 2019-12-12 14:40:08 -08:00
ba2f2f8840 Merge pull request #829 from 3b1b/bayes
Bayes
2019-12-10 21:47:09 -08:00
ebd4fbd1d2 Halfway through CreateFormulaFromDiagram 2019-12-10 21:36:58 -08:00
b1d8d1081c Merge branch 'master' of github.com:3b1b/manim into bayes 2019-12-10 13:39:48 -08:00
c579fb521e Up to WhenDoesBayesApply in bayes 2019-12-10 13:39:42 -08:00
fc28375e42 Changed modification for tex mobjects that begin with a newline, which involved eliminating alignment when a TexMobject creates many SingleStringTexMobject to figure out how to divvy itself up 2019-12-10 13:39:25 -08:00
f89bb3e125 Added Underline 2019-12-10 13:38:30 -08:00
3628b61d75 Change default color and bubble creation for teacher student scenes 2019-12-10 13:38:18 -08:00
0bddadea35 Merge pull request #816 from fresnik/master
Documentation typo in constants.rst
2019-12-07 17:52:36 -08:00
cfc5ecc59c First couple scenes of bayes 2019-12-06 17:11:04 -08:00
72006334f5 Added a small fix to the issue of Tex inputs starting with a new line 2019-12-06 17:10:51 -08:00
94a3883880 Remove Mobject.print_family, as that is now in utils.debug 2019-12-06 17:10:26 -08:00
84e7bdb2b1 Added a couple helpful debugging functions 2019-12-06 17:10:00 -08:00
b7cb9aa938 Typo fix 2019-12-05 12:45:01 -08:00
259007954b Merge pull request #820 from 3b1b/projects-reorg
Reorganized files for 3b1b videos into a 3b1b_projects folder
2019-12-05 12:43:06 -08:00
a51a6ab489 Reorganized files for 3b1b videos into a 3b1b_projects folder 2019-12-05 12:41:00 -08:00