forked from 3b1b/manim
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull New Commits #1
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…is way it can be composed
… of some bug in Succession.
Hyperdarts
README.md fixes
Add default stroke width for the svg mobjects
… why this isn't there already, or if there are problems with setting a default, but it fixed a weird bug that had arisen
Typo in super() 77acc99
Remove livestream
Display help if no input file is specified
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.
…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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for contributing to manim!
Please ensure that your pull request works with the latest version of manim.
You should also include:
screenshots, gifs, commands, etc.) This is rather informal at the moment, but
the goal is to show us how you know the pull request works as intended.