Commit graph

1758 commits

Author SHA1 Message Date
Grant Sanderson
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
jkjkil4
be7d93cf40
Fix path arc handling for SVGMobject when a matrix transform is present in the SVG (#2322) 2025-03-20 11:59:06 -07:00
Varniex
dbfe7ac75d
Performance improved in set_color_by_rgba_func (#2316)
* removing 1 in neg axis if unit_tex is specified

* performance improved in `set_color_by_rgba_func`

* resolving imag axis number mob in ComplexPlane
2025-03-20 11:56:29 -07:00
AStarySky
7a61a13691
Fix issues in number_line.py (#2310)
Fix the issue that changes in decimal_number_config["font_size"] get rewritten by number_config
2025-03-20 11:54:59 -07:00
Grant Sanderson
db421e3981
Video work (#2318)
* 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
2025-02-26 07:52:59 -08:00
Varniex
24eefef5bf
Automatically identify the class name based on the specified line number. (#2280)
* identify the scene name based on the line number

* resolving a minor bug in string_mobject

* removing bug of string validation

* Update manimlib/default_config.yml

Co-authored-by: Splines <37160523+Splines@users.noreply.github.com>

* Update manimlib/extract_scene.py

Co-authored-by: Splines <37160523+Splines@users.noreply.github.com>

* update search scene names

---------

Co-authored-by: Splines <37160523+Splines@users.noreply.github.com>
2024-12-28 07:18:32 -08:00
Grant Sanderson
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
Grant Sanderson
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
Grant Sanderson
0b350e248b Change global_attrs back to global_config in Text 2024-12-11 10:18:05 -06:00
Grant Sanderson
fce92347fa Replace get_global_config() with manim_config, and make it an addict Dict 2024-12-11 09:50:17 -06:00
Grant Sanderson
4a6a125739 Change "style" in default config to "text"
Some checks are pending
docs / build up document and deploy (push) Waiting to run
2024-12-11 08:30:31 -06:00
Grant Sanderson
7d3758c44c Move joint_type_map out of constants to VMobject 2024-12-10 19:33:06 -06:00
Grant Sanderson
d5c36de3c5 DEFAULT_MOBJECT_TO_MOBJECT_BUFFER -> DEFAULT_MOBJECT_TO_MOBJECT_BUFF
Some checks are pending
docs / build up document and deploy (push) Waiting to run
And likewise DEFAULT_MOBJECT_TO_MOBJECT_BUFFER -> DEFAULT_MOBJECT_TO_MOBJECT_BUFF
2024-12-10 19:23:15 -06:00
Varniex
c51a84a6ee Fixing a Cairo Bug (Windows OS) 2024-12-11 00:10:06 +05:30
Grant Sanderson
7a69807ce6 Remove mobject.save_to_file
This simply didn't work, and had no resilience to changes to the library. For cases where this might be useful, it's likely much better deliberately save specific data which is time-consuming to generate on the fly.
2024-12-09 16:24:50 -06:00
Grant Sanderson
0e83c9c0d9
Merge branch 'master' into video-work 2024-12-05 16:50:13 -06:00
Iñaki Rabanillo
5a70d67b98
Update coordinate_systems.py (#2258) 2024-12-05 14:49:16 -08:00
Varniex
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
Grant Sanderson
c96734ace0 Remove get_downloads_dir reference from register_font 2024-12-05 15:14:37 -06:00
Grant Sanderson
71e440be93 Get rid of (no longer used) mobject_data directory reference 2024-12-05 15:08:25 -06:00
Grant Sanderson
4251ff436a No longer any need for custom hash_seeds in Tex and Text 2024-12-05 15:05:26 -06:00
Grant Sanderson
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
Grant Sanderson
e0031c63bc Minor clean up 2024-12-05 14:55:28 -06:00
Grant Sanderson
3b9ef57b22 Remove utils/customization.py 2024-12-05 11:59:01 -06:00
Grant Sanderson
43821ab2ba Make caching on disk a decorator, and update implementations for Tex and Text mobjects 2024-12-05 10:09:15 -06:00
Grant Sanderson
0c385e820f Get rid of get_tex_dir and get_text_dir 2024-12-04 20:33:43 -06:00
Grant Sanderson
ac01b144e8 Clean up tex_file_writing 2024-12-04 20:30:53 -06:00
Grant Sanderson
129e512b0c Add caching functionality, and have Tex and Text both use it for saved svg strings 2024-12-04 19:51:01 -06:00
Grant Sanderson
88370d4d5d Have StringMobject work with svg strings rather than necessarily writing to file
Change SVGMobject to allow taking in a string of svg code as an input
2024-12-04 19:11:21 -06:00
Grant Sanderson
85638d88dc Update parameter range for sphere 2024-11-25 12:39:41 -07:00
Grant Sanderson
54c8a9014b Add scale_stroke_with_zoom option to VMobject 2024-11-25 11:27:11 -07:00
Grant Sanderson
e19ceaaff0 Have TexMobject keep track of font_size 2024-11-25 11:02:54 -07:00
Grant Sanderson
5b88d2347c Allow for LaTeX in DecimalNumber, e.g. for units 2024-11-25 11:01:38 -07:00
Grant Sanderson
c6b9826f84 Update TimeVaryingVectorField to match new VectorField configuration 2024-11-25 10:50:12 -07:00
Grant Sanderson
90ab2f64bb Clean up style arguments on VectorField 2024-11-25 10:49:29 -07:00
Grant Sanderson
1d0deb8a33 Remove OldVectorfield 2024-11-25 10:14:23 -07:00
Grant Sanderson
753a042dbe Remove unused method 2024-11-25 10:13:44 -07:00
Grant Sanderson
55b12c902c Use density as a parameter instead of step_multiple 2024-11-25 10:13:37 -07:00
Grant Sanderson
0ad5a0e76e Further development on VectorField 2024-11-15 09:07:46 -08:00
Grant Sanderson
64ae1364ca Update the Vector Field interface 2024-11-12 11:21:19 -08:00
Grant Sanderson
b84376d6fd Add Cone 2024-11-08 14:28:17 -06:00
Grant Sanderson
9475fcd19e Have clip plane recurse through family 2024-11-08 14:27:20 -06:00
Grant Sanderson
99493fc4f7 Fix issue with Difference
https://github.com/3b1b/manim/issues/2174
2024-10-10 15:13:33 -05:00
Grant Sanderson
09e9e65ba4 Merge branch 'master' of github.com:3b1b/manim into video-work 2024-10-01 13:29:42 -05:00
Grant Sanderson
641c03a95b Change condition for updating VMobject. outer_vert_indices 2024-10-01 13:27:02 -05:00
Grant Sanderson
f737823bac Add VMobject. get_shader_vert_indices 2024-10-01 13:20:23 -05:00
Grant Sanderson
95bb67c47f Change return type for Mobject.get_shader_data 2024-10-01 13:18:40 -05:00
Grant Sanderson
512fb89726 Save VMobject. outer_vert_indices 2024-10-01 13:14:24 -05:00
Grant Sanderson
bddd9c35ea Tiny formatting 2024-10-01 13:04:50 -05:00
Grant Sanderson
f0bf50eb7f Remove use of gl_VertexID 2024-09-28 09:54:28 -05:00