364 Commits

Author SHA1 Message Date
f4737828f6 Video work (#2326)
* Only use -no-pdf for xelatex rendering

* Instead of tracking du and dv points on surface, track points off the surface in the normal direction

This means that surface shading will not necessarily work well for arbitrary transformations of the surface. But the existing solution was flimsy anyway, and caused annoying issues with singularity points.

* Have density of anchor points on arcs depend on arc length

* Allow for specifying true normals and orientation of Sphere

* Change miter threshold on stroke shader

* Add get_start_and_end to DashedLine

* Add min_total_width option to DecimalNumber

* Have BackgroundRectangle.set_style absorb (and ignore) added configuration

Note, this feels suboptimal

* Add LineBrace

* Update font_size adjustment in Tex

* Add scale_factor parameter to BulletedList.fade_all_but

* Minor import tweaks

* Add play_sound
2025-03-20 12:00:35 -07:00
7a7bf83f11 Only use -no-pdf for xelatex rendering (#2298) 2025-01-08 08:22:03 -08:00
96d44bd560 Video work (#2284)
* Comment tweak

* Directly print traceback

Since the shell.showtraceback is giving some issues

* Make InteracrtiveSceneEmbed into a class

This way it can keep track of it's internal shell; use of get_ipython has a finicky relationship with reloading.

* Move remaining checkpoint_paste logic into scene_embed.py

This involved making a few context managers for Scene: temp_record, temp_skip, temp_progress_bar, which seem useful in and of themselves.

* Change null key to be the empty string

* Ensure temporary svg paths for Text are deleted

* Remove unused dict_ops.py functions

* Remove break_into_partial_movies from file_writer configuration

* Rewrite guarantee_existence using Path

* Clean up SceneFileWriter

It had a number of vestigial functions no longer used, and some setup that could be made more organized.

* Remove --save_pngs CLI arg (which did nothing)

* Add --subdivide CLI arg

* Remove add_extension_if_not_present

* Remove get_sorted_integer_files

* Have find_file return Path

* Minor clean up

* Clean up num_tex_symbols

* Fix find_file

* Minor cleanup for extract_scene.py

* Add preview_frame_while_skipping option to scene config

* Use shell.showtraceback function

* Move keybindings to config, instead of in-place constants

* Replace DEGREES -> DEG

* Add arg to clear the cache

* Separate out full_tex_to_svg from tex_to_svg

And only cache to disk the results of full_tex_to_svg.  Otherwise, making edits to the tex_templates would not show up without clearing the cache.

* Bug fix in handling BlankScene

* Make checkpoint_states an instance variable of CheckpointManager

As per https://github.com/3b1b/manim/issues/2272

* Move resizing out of Window.focus, and into Window.init_for_scene

* Make default output directory "." instead of ""

To address https://github.com/3b1b/manim/issues/2261

* Remove input_file_path arg from SceneFileWriter

* Use Dict syntax in place of dict for config more consistently across config.py

* Simplify get_output_directory

* Swap order of preamble and additional preamble

* Minor stylistic tweak

* Have UnitInterval pass on kwargs to NumberLine

* Add simple get_dist function

* Have TracedPath always update to the stroke configuration passed in

* Have Mobject.match_points apply to all parts of data in pointlike_data_key

* Always call Mobject.update upon adding an updater

* Add Surface.uv_to_point

* Make sure Surface.set_opacity takes in a recurse option

* Update num_tex_symbols to account for \{ and \}
2024-12-26 09:35:34 -08:00
f427fc67df A few bug fixes (#2277)
* Comment tweak

* Directly print traceback

Since the shell.showtraceback is giving some issues

* Make InteracrtiveSceneEmbed into a class

This way it can keep track of it's internal shell; use of get_ipython has a finicky relationship with reloading.

* Move remaining checkpoint_paste logic into scene_embed.py

This involved making a few context managers for Scene: temp_record, temp_skip, temp_progress_bar, which seem useful in and of themselves.

* Change null key to be the empty string

* Ensure temporary svg paths for Text are deleted

* Remove unused dict_ops.py functions

* Remove break_into_partial_movies from file_writer configuration

* Rewrite guarantee_existence using Path

* Clean up SceneFileWriter

It had a number of vestigial functions no longer used, and some setup that could be made more organized.

* Remove --save_pngs CLI arg (which did nothing)

* Add --subdivide CLI arg

* Remove add_extension_if_not_present

* Remove get_sorted_integer_files

* Have find_file return Path

* Minor clean up

* Clean up num_tex_symbols

* Fix find_file

* Minor cleanup for extract_scene.py

* Add preview_frame_while_skipping option to scene config

* Use shell.showtraceback function

* Move keybindings to config, instead of in-place constants

* Replace DEGREES -> DEG

* Add arg to clear the cache

* Separate out full_tex_to_svg from tex_to_svg

And only cache to disk the results of full_tex_to_svg.  Otherwise, making edits to the tex_templates would not show up without clearing the cache.

* Bug fix in handling BlankScene

* Make checkpoint_states an instance variable of CheckpointManager

As per https://github.com/3b1b/manim/issues/2272

* Move resizing out of Window.focus, and into Window.init_for_scene

* Make default output directory "." instead of ""

To address https://github.com/3b1b/manim/issues/2261

* Remove input_file_path arg from SceneFileWriter

* Use Dict syntax in place of dict for config more consistently across config.py

* Simplify get_output_directory

* Swap order of preamble and additional preamble
2024-12-12 18:45:34 -08:00
744e695340 Misc. clean up (#2269)
* Comment tweak

* Directly print traceback

Since the shell.showtraceback is giving some issues

* Make InteracrtiveSceneEmbed into a class

This way it can keep track of it's internal shell; use of get_ipython has a finicky relationship with reloading.

* Move remaining checkpoint_paste logic into scene_embed.py

This involved making a few context managers for Scene: temp_record, temp_skip, temp_progress_bar, which seem useful in and of themselves.

* Change null key to be the empty string

* Ensure temporary svg paths for Text are deleted

* Remove unused dict_ops.py functions

* Remove break_into_partial_movies from file_writer configuration

* Rewrite guarantee_existence using Path

* Clean up SceneFileWriter

It had a number of vestigial functions no longer used, and some setup that could be made more organized.

* Remove --save_pngs CLI arg (which did nothing)

* Add --subdivide CLI arg

* Remove add_extension_if_not_present

* Remove get_sorted_integer_files

* Have find_file return Path

* Minor clean up

* Clean up num_tex_symbols

* Fix find_file

* Minor cleanup for extract_scene.py

* Add preview_frame_while_skipping option to scene config

* Use shell.showtraceback function

* Move keybindings to config, instead of in-place constants

* Replace DEGREES -> DEG
2024-12-12 08:39:54 -08:00
e2e785d6c9 Remove init_config.py
It may become a bit unwieldy to make sure this matches the structure of default_config, given the amount of code repetition involved. It seems easier for a user to just create their own custom_config.yml file directly.
2024-12-11 10:50:53 -06:00
fce92347fa Replace get_global_config() with manim_config, and make it an addict Dict 2024-12-11 09:50:17 -06:00
8246d0da5d Fix bug with xelatex rendering 2024-12-11 08:23:17 -06:00
4d7f6093b4 Update how tex configuration default is passed in 2024-12-11 07:18:30 -06:00
0e83c9c0d9 Merge branch 'master' into video-work 2024-12-05 16:50:13 -06:00
5d3f730824 Cleaning up some imports + Minor Bug fixed in VectorField (#2253)
* cleaning up imports

* sample_points -> sample_coords
2024-12-05 14:42:46 -08:00
08acfa6f1f Easier use of subdirectories in configuration 2024-12-05 15:52:39 -06:00
75527563de Update where downloads go 2024-12-05 15:27:57 -06:00
71e440be93 Get rid of (no longer used) mobject_data directory reference 2024-12-05 15:08:25 -06:00
8098149006 Remove display_during_execution 2024-12-05 15:05:37 -06:00
85f8456228 If it's worth caching to disk, then might as well do so in memory too during development 2024-12-05 14:56:35 -06:00
3b9ef57b22 Remove utils/customization.py 2024-12-05 11:59:01 -06:00
b593cde317 Make the default size for hash_string an option 2024-12-05 11:53:55 -06:00
34ad61d013 Clean up how configuration is handled
In principle, all we need here is that manim looks to the default_config.yaml file, and updates it based on any local configuration files, whether in the current working directory or as specified by a CLI argument.
2024-12-05 11:53:18 -06:00
cfb7d2fa47 Remove stray prints 2024-12-05 10:09:48 -06:00
43821ab2ba Make caching on disk a decorator, and update implementations for Tex and Text mobjects 2024-12-05 10:09:15 -06:00
89ddfadf6b Allow for a configurable cache location 2024-12-04 20:50:42 -06:00
0c385e820f Get rid of get_tex_dir and get_text_dir 2024-12-04 20:33:43 -06:00
ac01b144e8 Clean up tex_file_writing 2024-12-04 20:30:53 -06:00
129e512b0c Add caching functionality, and have Tex and Text both use it for saved svg strings 2024-12-04 19:51:01 -06:00
ed2f9f3305 Fix import of pyplot 2024-11-25 10:49:05 -07:00
e80b9d0e47 Less collision-prone file names for downloads 2024-11-25 09:31:15 -07:00
64ae1364ca Update the Vector Field interface 2024-11-12 11:21:19 -08:00
0804109301 Flatten uniform arrays 2024-09-21 12:15:37 -04:00
62a4ea5165 Update description of remove_list_redundancies 2024-09-21 12:15:29 -04:00
3e7244b90b Fix bad argument 2024-09-21 12:15:06 -04:00
df9acfb4d5 Merge pull request #2009 from Varniex/patch-1
Correction of indices
2024-09-06 10:59:04 -07:00
6d23df0497 Clean up changes associated with fixing aspect ratio issue 2024-09-06 12:50:19 -05:00
2178ec2b85 Merge branch 'master' into fix-aspect-ratio 2024-09-06 10:24:42 -07:00
a5137a05f1 Merge pull request #2134 from jkjkil4/fix-there_and_back_with_pause
fix: `there_and_back_with_pause`
2024-09-06 09:25:31 -07:00
e7c540f415 Move texture id tracking to ShaderWrapper
Rather than having a globally unique id for each texture, dynamically allocate new texure ids within each ShaderWrapper, so that there is no upper bound on how many textures can be used.
2024-09-06 11:07:38 -05:00
79ec791fc2 Move get_fill_canvas into VShaderWrapper 2024-08-21 09:02:22 -05:00
dfc5f152dd Have border width pre-multiply by alpha, and don't use a separate texture for that border width 2024-08-20 22:03:45 -05:00
5ff80ffc6c Fix matplotlib color map import 2024-08-20 08:54:06 -05:00
6223623b40 Ensure border width blends better within filled VMobject for opacity < 1 2024-08-19 21:39:53 -05:00
7217c9fca5 Reorganize VShaderWrapper.render_fill 2024-08-19 20:51:37 -05:00
3b5d63d2fa Add depth shader to handle winding fill depth test. 2024-08-19 14:09:07 -05:00
4a6e6ca646 Double the size of the fill canvas, to effectively do msaa 2024-08-16 12:04:27 -05:00
c7acbe5de6 Brighten up fill 2024-08-15 10:53:46 -05:00
e130625b9b Handle edge case of single point passed into approx_smooth_quadratic_bezier_handles 2024-08-07 12:12:29 -05:00
ab28804ae5 fix: there_and_back_with_pause 2024-05-22 16:37:07 +08:00
d3ba101ee5 Change from tracking time_based_updater and non_time_updater lists separately to just tracking one list 2024-03-07 16:39:45 -03:00
83cd5d6246 Clean up updater matters, prune unused functions 2024-03-07 16:07:39 -03:00
4d67361800 Add shuffled 2024-03-07 08:40:19 -03:00
f3571cf2cb Add random import 2024-02-08 14:37:58 -06:00