Commit graph

486 commits

Author SHA1 Message Date
techdude
384304e92b Add CONFIG parameter to allow disabling smoothing 2021-01-31 18:48:48 -07:00
niedong
ba405521ce fix typo docstring in scene_file_writer.py 2020-11-29 11:51:20 +08:00
鹤翔万里
1ecbbbbcd5
Merge pull request #1251 from italosestilon/master
fix iteration through a dictionary
2020-10-10 10:45:52 +08:00
Italos Estilon de Souza
4c42083ffc fix iteration through a dictionary 2020-10-07 11:52:05 -03:00
Amogh Joshi
dec753fc26
Update scene.py 2020-10-05 17:49:40 -04:00
鹤翔万里
08c90c272b
Merge pull request #1216 from BERENGENITA/patch-1
Fixed typo in comment imports.py
2020-10-02 14:03:07 +08:00
鹤翔万里
53756ea140
Merge pull request #1112 from vivek3141/patch-1
Add dot_color to BulletedList
2020-09-30 23:27:29 +08:00
鹤翔万里
dcb608f258
Merge pull request #1072 from Tony031218/change-coord-color
Allow Axes to change the color of coordinate labels
2020-09-30 23:26:59 +08:00
鹤翔万里
05acf31e47
Merge pull request #1064 from Erik-White/numberline
Correctly return get_unit_size
2020-09-30 23:21:56 +08:00
鹤翔万里
bc5c3968d9
Merge pull request #1043 from kuk0/get_merged_array
remove superfluous code
2020-09-30 23:21:05 +08:00
鹤翔万里
11c451c2e9
Merge pull request #1038 from peninha/patch-1
Corrected a bug in stretch_to_fit_depth function
2020-09-30 23:19:26 +08:00
dummy26
37efc93e9c
Fix a typo in mobject.py (#847) 2020-09-30 23:03:57 +08:00
鹤翔万里
d63f61b903
Merge pull request #909 from Solara570/numberplane-fix
Small fix to NumberPlane construction
2020-09-30 23:01:49 +08:00
chaoxiaosu
79bf87754a
A solution to 'Latex error converting to dvi' problem (#689) 2020-09-30 22:48:29 +08:00
鹤翔万里
e336cf5ddc
Merge pull request #1217 from dor2727/patch-tobytes
fixed deprecation warning: tostring -> tobytes
2020-09-30 22:28:28 +08:00
Dor Harpaz
a42d9c6ecb fixed deprecation warning: tostring -> tobytes 2020-08-27 14:03:43 +03:00
BERENGENITA
9f945d9940
Fixed typo in comment imports.py
I have fixed a very simple typo and would like to commit it.
2020-08-27 12:17:43 +02:00
鹤翔万里
7556b99dc0
Update ctex_template.tex 2020-07-28 23:03:59 +08:00
Vivek Verma
82d6ad0ef5
Add dot_color to BulletedList 2020-05-28 11:19:08 -07:00
Devin Neal
3c1a6bb8b1
Merge pull request #1091 from applemonkey496/patch-3
Add missing import to brace.py
2020-05-20 20:24:59 -07:00
Devin Neal
00ff47855e
Merge pull request #1069 from applemonkey496/patch-1
Fix "itslef" to "itself"
2020-05-20 20:21:10 -07:00
applemonkey496
45c5ec7091
Add missing import to brace.py
Without `import copy` lines 128 to 131 will throw an error. I've tested this edit in my local version of the library and it fixes the bug.
2020-05-20 20:07:13 -07:00
Tony031218
4d78e0c63e fix changing coordinates color 2020-05-15 12:36:55 +08:00
Devin Neal
aff2d21bad
Merge pull request #734 from zombie110year/master
latex can't recognize path seperator \\ in windows
2020-05-14 21:13:02 -07:00
applemonkey496
c82b1fc2c9
Fix "itslef" to "itself"
I know this is trivial, but I had to fix it.
2020-05-14 12:42:56 -07:00
Aathish
a529a59abf
Added DocStrings for all methods in Container, Scene, GraphScene, MovingCameraScene, SceneFileWriter, ThreeDScene, SpecialThreeDScene, ZoomedScene, VectorScene, and LinearTransformationScene. (#1040)
* Added DocStrings for methods in Container and Scene.
Removed 2 unused imports from scene.py.

* Added DocStrings for all methods in GraphScene, MovingCameraScene, SceneFileWriter, ThreeDScene, SpecialThreeDScene and ZoomedScene.

* Added DocStrings for all methods in `VectorScene` and LinearTransformationScene...
...except `position_x_coordinate` and `position_y_coordinate`

Co-authored-by: Aathish Sivasubrahmanian <aathishs@Aathishs-MacBook-Air.local>
2020-05-13 22:41:22 -07:00
NavpreetDevpuri
cf656e9c21
Code() in file Code_mobject.py to display code with color highlighted added Paragraph() and "exact_spaces" parameter to Text() (#1036) 2020-05-13 22:19:09 -07:00
NavpreetDevpuri
7f1a15b6ba
Fixed ffmpeg 'Impossible to Open' and 'Protocol not found' (#1057) 2020-05-13 22:13:56 -07:00
Erik White
f3f9d0dfb7 Correctly return get_unit_size 2020-05-13 19:15:01 +03:00
Kubo Kovac
2f26a32f96 remove superfluous code 2020-05-10 14:58:01 +02:00
peninha
6a571262fd
Corrected a bug in stretch_to_fit_depth function 2020-05-10 01:40:21 -03:00
XiaoYoung
522a5b3c5f
Fix space characters problem of Text (#1035)
* Fix Text wrong display

* Fix space characters problem of Text

* Fix a potential bug using height or width in Text

* Update Text

* Fix typo in text_mobject.py
2020-05-07 01:16:39 -07:00
鹤翔万里
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
Mike Magruder
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
XiaoYoung
f0cdcd90ba
Fix Text wrong display (#889) 2020-04-23 20:36:57 -07:00
Devin Neal
19e3c97589
Revise config again (#987) 2020-04-17 02:51:25 -07:00
Devin Neal
c847988e10 Display help if no input file is specified 2020-04-17 02:36:56 -07:00
Devin Neal
87d8671995 Remove livestreaming option 2020-04-16 23:59:22 -07:00
Solara570
99519090fb Small fix to NumberPlane construction 2020-03-08 17:12:38 +08:00
azarzadavila
97a0a707d7 Typo in super() 77acc99 2020-02-09 11:31:54 +01:00
Grant Sanderson
77acc999cd Rename number_line_config to axis_config 2020-01-15 15:40:30 -08:00
Grant Sanderson
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
Grant Sanderson
0f71b0a408 Playing wiht logo 2020-01-11 17:13:02 -08:00
Grant Sanderson
24d077fbce Change referenced directory of 3b1b content in LICENSE and README 2020-01-06 09:39:33 -08:00
Grant Sanderson
0e92deddc4 Change ShowSubmobjectsOneByOne defaults 2019-12-19 19:42:28 -08:00
Grant Sanderson
fa2c831ef3 Support UTF8 tex 2019-12-19 19:42:06 -08:00
Grant Sanderson
9deb2d3732 Change patron end screen 2019-12-17 09:38:18 -08:00
Grant Sanderson
a95318f1ab Fix print_family 2019-12-17 09:37:59 -08:00
Grant Sanderson
c74cfa3c5d Add error message for ApplyFunction 2019-12-15 08:44:57 -08:00
Grant Sanderson
c2838d78a2 Forgot to propagate kwargs in Underline 2019-12-12 14:40:08 -08:00