manim_string_cosmo¶
Subpackages¶
Submodules¶
manim_string_cosmo.my_imports module¶
Module contents¶
- class AdS_Jc[source]¶
Represent vacuum discussions for Randall-Sundrum (RS) and Dark Bubble (DB) models.
This class visualizes the brane-vacuum system with arrows to illustrate normal orientation changes across the brane. It includes animations for demonstrating Z₂ symmetry (RS case) and normal vector behavior in both models. The arrow element is always the last (
[-1]) entry in the group.- Parameters:
vacua_type (str) – Type of vacuum configuration. Options: -
"RS": Randall-Sundrum model with Z₂ symmetry. -"DB": Dark Bubble model with asymmetric vacua. Default is"DB".arrow_color (ParsableManimColor) – Color of the normal vector arrow. Default is
WHITE.kwargs – Additional keyword arguments passed to
Vacuum_General,Brane_General, andVGroup.
Note
See
Vacuum_GeneralandBrane_Generalfor additional inherited parameters related to vacuum and brane appearance.Example usage:
from manim import * from manim_string_cosmo import AdS_Jc class Example_AdS_Jc(Scene): def construct(self): show_db = AdS_Jc(vacua_type="DB") show_rs = AdS_Jc(vacua_type="RS") show = VGroup(show_db, show_rs).arrange(RIGHT, aligned_edge=DOWN, buff=0.2) show.scale_to_fit_width(config.frame_width-2) self.play(AnimationGroup(*[x.fade_in() for x in show])) self.play(AnimationGroup(*[x.fade_in_arrow() for x in show])) self.play(show[1].show_symmetry(rt=5)) self.play(show[1].restore_symmetry()) self.play(AnimationGroup(show[0].show_n_vector_db(rt=5), show[1].show_n_vector_rs(rt=5))) self.play(show.animate.shift(2*UP)) self.play(FadeOut(show))
- fade_in(rt: float = 1, rf: float = <function linear>) Animation[source]¶
Fade in the vacuum-brane system without the arrow.
This method overrides the default
FadeInanimation to prevent scaling issues when adding elements to a group after initialization.- Parameters:
rt (float) – Run time of the animation. Default is
1.rf (function) – Rate function controlling animation timing. Default is
linear.
- Returns:
FadeIn animation of all group elements except the arrow.
- Return type:
Animation
- fade_in_arrow(rt: float = 2, rf: float = <function linear>) Animation[source]¶
Fade in the normal vector arrow.
- Parameters:
rt (float) – Run time of the animation. Default is
2.rf (function) – Rate function controlling animation timing. Default is
linear.
- Returns:
FadeIn animation of the arrow element.
- Return type:
Animation
- restore_symmetry(rt: float = 2, rf=<function linear>) Succession[source]¶
Restore the original vacuum configuration after symmetry demonstration.
- Parameters:
rt (float) – Run time of the animation. Default is
2.rf (function) – Rate function controlling animation timing. Default is
linear.
- Returns:
Animation restoring the unfolded configuration.
- Return type:
Succession
- show_n_vector_db(rt: float = 2, rf=<function linear>) Succession[source]¶
Show the behavior of the normal vector across vacua in the DB model.
Demonstrates how the normal vector maintains consistent orientation in the Dark Bubble model where vacua have distinct properties.
- Parameters:
rt (float) – Run time of the animation. Default is
2.rf (function) – Rate function controlling animation timing. Default is
linear.
- Returns:
Animation showing normal vector behavior in asymmetric vacua.
- Return type:
Succession
- show_n_vector_rs(rt: float = 2, rf=<function linear>) Succession[source]¶
Show the behavior of the normal vector across vacua in the RS model.
Demonstrates how the normal vector changes orientation when crossing the brane in the Randall-Sundrum scenario with Z₂ symmetry.
- Parameters:
rt (float) – Run time of the animation. Default is
2.rf (function) – Rate function controlling animation timing. Default is
linear.
- Returns:
Animation showing normal vector evolution across the brane.
- Return type:
Succession
- show_symmetry(rt: float = 2, rf=<function linear>) Succession[source]¶
Demonstrate Z₂ symmetry by folding the outside vacuum.
This animation removes the outside vacuum and rotates the inside vacuum about the brane to simulate the Z₂ symmetry operation.
- Parameters:
rt (float) – Run time of the animation. Default is
2.rf (function) – Rate function controlling animation timing. Default is
linear.
- Returns:
Animation showing Z₂ symmetry folding.
- Return type:
Succession
Note
This method only works with RS-type (
vacua_type="RS"). The Dark Bubble model has distinct inside and outside vacua without this symmetry.
- class Black_Hole[source]¶
Create a black hole group that can potentially emit a brane.
This class visualizes different types of black holes in string cosmology, including fragmentation scenarios (AdS fragmentation à la Maldacena) and spinning black holes. The expanding bubble is always the last (
[-1]) element of the object.- Parameters:
bh_size (float) – Size (radius) of the black hole. Default is
brane_radiusfromBrane_General(typically 1).bh_color (ParsableManimColor) – Color of the black hole. Default is
BLACK.bh_fill_opa (float) – Fill opacity of the black hole. Default is
0.8.bh_type (str) – Type of black hole visualization. Options: -
"fragmentation": Shows Q > T text, representing brane nucleation via AdS fragmentation. -"spinning": Shows theta and mu parameters for a rotating black hole. -"none": Empty black hole without text labels. Default is"none".kwargs – Additional keyword arguments passed to
Brane_GeneralandVGroup.
Note
The expanding bubble (brane) is always accessible as the last element (
[-1]) of the object. SeeBrane_Generalfor additional inherited parameters.Example usage:
from manim import * from manim_string_cosmo import Black_Hole class Example_Black_Hole(Scene): def construct(self): bh_sp = Black_Hole(bh_type="spinning") bh_frag = Black_Hole(bh_type="fragmentation") bh = Black_Hole() bh_group = VGroup(bh_sp, bh_frag, bh).arrange(RIGHT, buff=3) bh_group.scale_to_fit_width(config.frame_width-1) self.add(bh_group) self.play(AnimationGroup(*[x.nucleate() for x in bh_group])) self.play(AnimationGroup(*[x.expand() for x in bh_group]))
- expand(rt: float = 3, rf: float = <function linear>, scaling: float = 2.5) Animation[source]¶
Animate the expansion of the nucleated brane.
For spinning black holes (
bh_type="spinning"), this also animates the theta parameter moving along its circular path.- Parameters:
rt (float) – Run time of the animation. Default is
3.rf (function) – Rate function controlling animation timing. Default is
linear.scaling (float) – Scaling factor for the brane expansion. Default is
2.5.
- Returns:
Animation showing brane expansion. For spinning type, includes theta motion.
- Return type:
AnimationGroup
- nucleate(rt: float = 0.5, rf: float = <function linear>, scaling: float = 1.1) Animation[source]¶
Animate the nucleation of a brane through the black hole horizon.
- Parameters:
rt (float) – Run time of the animation. Default is
0.5.rf (function) – Rate function controlling animation timing. Default is
linear.scaling (float) – Scaling factor for the brane during nucleation. Default is
1.1.
- Returns:
Animation showing brane nucleation through the horizon.
- Return type:
AnimationGroup
- class Brane_General[source]¶
Base class providing common initialization parameters for brane objects.
This is a mock-up class to centralize all input parameters related to branes and associated objects, including color, size, opacity, and stroke properties.
- Parameters:
brane_color (ParsableManimColor) – Filling color of the brane. Default is
RED.brane_radius (float) – Initial size (radius) of the brane. Default is
1.brane_fill_opa (float) – Fill opacity of the brane. Note that fill opacity may vary when representing different AdS scales. Default is
0.1.brane_stroke_w (float) – Stroke width of the brane border. Default is
0.2.brane_text_color (ParsableManimColor) – Color of text elements associated with the brane. Default is
WHITE.kwargs – Additional keyword arguments passed to
VGroup.
Note
This class is designed to be inherited by other brane-related classes to ensure consistent parameter handling across different brane representations.
- class Bubble[source]¶
Represent Dark Bubble scenarios in 2D with various physical configurations.
This class visualizes bubble nucleation and expansion in string cosmology, supporting multiple physical scenarios including empty vacuum, radiation content, electromagnetic fields, strings, gravitational waves, and energy conservation discussions. The bubble (brane) is always the 3rd element (index
[2]) of the group.- Parameters:
bubble_type (str) – Type of bubble configuration. Options: -
"empty": Standard inside/outside configuration with AdS scales k− and k₊. -"instanton": AdS scales replaced by scalar potentials V(φ−) and V(φ₊). -"radiation": Includes matter (mass) inside the bubble. -"strings": Shows radially stretching strings from brane to bulk boundary. -"GW": Displays gravitational wave emission from the brane. -"em": Visualizes electromagnetic B-field on the brane with glow effect. -"energy_discussion": Shows energy bar for discussing energy conservation. Default is"empty".box_height (float) – Height of the vacuum background box. Default is
6.box_width (float) – Width of the vacuum background box. Default is
8.string_color (ParsableManimColor) – Color of the strings (for
bubble_type="strings"). Default isBLUE.string_stroke_w (float) – Stroke width of the strings. Default is
1.5.field_gradient (float) – Number of gradient layers for the electromagnetic field glow effect. Higher values create smoother gradients. Default is
50.field_top_color (ParsableManimColor) – Color of the electromagnetic field on the brane surface. Default is
BLUE.field_bulk_color (ParsableManimColor) – Color for bulk electromagnetic field (to be implemented). Default is
PINK.kwargs – Additional keyword arguments passed to
Brane_General,Vacuum_General, andGroup.
Note
The bubble (brane) is always the 3rd element (
[2]) in the internalbubblegroup. SeeBrane_GeneralandVacuum_Generalfor additional inherited parameters.Attention
The
"em"mode currently lacks representation of the B-field in the bulk; only the brane surface field is visualized.Example usage:
from manim import * from manim_string_cosmo import Bubble class Example_Bubble(Scene): def construct(self): bubble_types = ["empty", "radiation", "em", "strings", "GW"] bubble_group = Group(*[Bubble(bubble_type=style).scale(0.4) for style in bubble_types]) bubble_group.arrange_in_grid(2, 3) self.play(AnimationGroup(*[x.fade_in_bulk() for x in bubble_group])) self.play(AnimationGroup(*[x.create_bubble() for x in bubble_group])) self.play(AnimationGroup(*[x.expand_bubble() for x in bubble_group])) class Example_Energy_Discussion(Scene): def construct(self): bub = Bubble(bubble_type="energy_discussion").scale(0.8) self.play(bub.fade_in_bulk()) self.play(bub.fail_creation()) self.play(bub.create_bubble()) self.play(bub.expand_bubble()) self.play(FadeOut(bub))
- create_bubble(rt: float = 0.2, rf: float = <function linear>) Succession[source]¶
Animate bubble nucleation and display inside vacuum label.
The animation behavior varies by bubble type: -
"energy_discussion": Shows energy bar reaching threshold and successful nucleation. -"em": Creates brane with electromagnetic field visualization. -"strings": Creates brane and attached strings. -"radiation": Creates brane and shows interior matter. - Other types: Standard brane creation with inside text.- Parameters:
rt (float) – Run time of the animation. Default is
0.2.rf (function) – Rate function controlling animation timing. Default is
linear.
- Returns:
Animation sequence for bubble creation with type-specific elements.
- Return type:
Succession
- expand_bubble(rt: float = 6, rf: float = <function linear>, sca: float = 2.5) AnimationGroup[source]¶
Animate bubble expansion with type-specific physical effects.
The expansion animation varies by bubble type: -
"energy_discussion": Shows energy transfer from bar to expanding bubble. -"GW": Displays gravitational wave emission during expansion. -"em": Expands brane with electromagnetic field. -"strings": Stretches strings radially as brane expands. - Other types: Standard brane scaling.- Parameters:
rt (float) – Run time of the animation. Default is
6.rf (function) – Rate function controlling animation timing. Default is
linear.sca (float) – Scaling factor for bubble expansion. Default is
2.5.
- Returns:
Animation showing bubble expansion with physical effects.
- Return type:
AnimationGroup or Succession
- fade_in_bulk(rt: float = 1, rf: float = <function linear>) Animation[source]¶
Fade in the bulk vacuum and outside cosmological constant label.
For
bubble_type="energy_discussion", this also creates the energy bar visualization at the bottom of the scene.- Parameters:
rt (float) – Run time of the animation. Default is
1.rf (function) – Rate function controlling animation timing. Default is
linear.
- Returns:
Animation showing bulk box and outside text appearance.
- Return type:
Animation or Succession
- fail_creation(rt: float = 3, rf: float = <function there_and_back_with_pause>) AnimationGroup[source]¶
Demonstrate failed bubble nucleation due to insufficient energy.
The brane attempts to nucleate but fails because the energy bar shows insufficient energy available for bubble creation.
- Parameters:
rt (float) – Run time of the animation. Default is
3.rf (function) – Rate function controlling animation timing. Default is
there_and_back_with_pause.
- Returns:
Animation showing energy accumulation and failed nucleation attempt.
- Return type:
AnimationGroup
Note
This method only works with
bubble_type="energy_discussion".
- show_radius(rt: float = 1, rf: float = <function linear>) Succession[source]¶
Display the time-dependent radius label r = a(τ) for the bubble.
- Parameters:
rt (float) – Run time of the animation. Default is
1.rf (function) – Rate function controlling animation timing. Default is
linear.
- Returns:
Animation showing radius line and time-dependent label.
- Return type:
Succession
- class Plot_General[source]¶
Base class for all plot objects providing common styling and configuration parameters.
This class serves as a foundation for various plot types in the string cosmology package, centralizing visual properties such as colors, opacity, decorators, and stroke settings. All plot-specific classes inherit from this to ensure consistent appearance across different visualization types.
- Parameters:
func_main_color (ParsableManimColor, default=GREEN) – Primary function curve color.
func_2_color (ParsableManimColor, default=RED) – Secondary function curve color.
func_3_color (ParsableManimColor, default=BLUE) – Tertiary function curve color.
text_color (ParsableManimColor, default=WHITE) – Color for text labels and annotations.
axis_opacity (float, default=0.5) – Opacity level for axis lines.
axis_stroke (float, default=1) – Stroke width for axis lines.
decorator_presence (str, default="box") – Style of decorator around the plot. Options include:
"box"for a surrounding rectangle, or"no"for plain presentation.decorator_color (ParsableManimColor, default=WHITE) – Color of the decorator frame.
decorator_stroke_w (float, default=1) – Stroke width of the decorator frame.
corner_rad (float, default=0) – Base radius for rounded corners on decorators.
corner_rad_direction (list, default=[0, 0, 0, 0]) – List specifying which corners to round [UL, UR, DR, DL]. Each element is multiplied by corner_rad to determine final radius.
fill_opa (float, default=0.1) – Fill opacity for decorator backgrounds.
stroke_w (float, default=1) – General stroke width for plot elements.
stroke_opa (float, default=1) – Stroke opacity for plot elements.
tightness (float, default=0.3) – Buffer distance between plot content and decorator frame.
kwargs – Additional keyword arguments passed to
Group.
Note
To scale any graph with respect to its center, use:
graph.scale(3, about_point=graph.ax_ins.c2p(0, 0, 0))See also
Plot_Tension
Example usage:
from manim import * from manim_string_cosmo import * class PlotExample(Scene): def construct(self): # Create a custom plot with specific colors plot = Plot_General( func_main_color=BLUE, text_color=YELLOW, decorator_presence="box", corner_rad=0.1, corner_rad_direction=[1, 1, 1, 1] ) self.add(plot)
- class Plot_Induced_Potential[source]¶
This is a class to represent a 4D cosmo potential for the nucleated brane from the 10D.
See Plot_General Class for more information.
Note
Note that the axis and labels of these are the 0-th element of the group when you call it.
Example usage:
class Example_Plot_Induced_Potential(Scene): def construct(self): plot_pot = Plot_Induced_Potential() plot_pot.scale(0.3, about_point=plot_pot.ax_4D_cosmos.get_origin()) plot_pot.to_corner(LEFT) self.add(plot_pot[0]) self.play(plot_pot.show_potential()) self.play(plot_pot.show_jc()) self.play(plot_pot.nucleate_brane()) self.wait() self.play(plot_pot.accelerate()) self.play(plot_pot.bounce()) self.play(plot_pot.add_cc_and_expand()) self.play(FadeOut(plot_pot)) self.play(Wait())
- accelerate(rt: float = 0.5, rf: float = <function linear>) Animation[source]¶
Takes the brane to the minimum of the potential.
- Parameters:
rt (float) – Run time of the animation.
rf (float) – Rate function of the animation.
- Returns:
Animation object that moves the brane to potential minimum.
- Return type:
Animation
- add_cc_and_expand(rt: float = 6, rf: float = <function linear>) Succession[source]¶
Shows the modified potential to add the presence of the cosmological constant and then expand the bubble forever.
- Parameters:
rt (float) – Run time of the animation.
rf (float) – Rate function of the animation.
- Returns:
Animation sequence showing potential transition and asymptotic expansion.
- Return type:
Succession
- bounce(rt: float = 4, rf: float = <function linear>) Succession[source]¶
Makes the system bounce in the potential.
- Parameters:
rt (float) – Run time of the animation.
rf (float) – Rate function of the animation.
- Returns:
Animation sequence creating oscillatory motion in the potential well.
- Return type:
Succession
- nucleate_brane(rt: float = 0.5, rf: float = <function linear>) Succession[source]¶
Moves the position in the potential to the outer horizon.
- Parameters:
rt (float) – Run time of the animation.
rf (float) – Rate function of the animation.
- Returns:
Animation sequence that fades in the position marker and moves it to nucleation point.
- Return type:
Succession
- show_jc(rt: float = 2, rf: float = <function linear>) Animation[source]¶
Shows the potential with extra barrier of the angular momentum.
- Parameters:
rt (float) – Run time of the animation.
rf (float) – Rate function of the animation.
- Returns:
Animation object showing the junction condition potential.
- Return type:
Animation
- class Plot_Instanton[source]¶
Create a visual representation of an instanton potential with false and true minima.
This class inherits from
Plot_Generaland produces a plot showing a double-well potential landscape characteristic of instanton configurations in quantum field theory. The plot includes labeled minima (V+ and V-) and an interactive field position indicator that can be animated to demonstrate tunneling processes.- Parameters:
kwargs – Keyword arguments passed to
Plot_Generalfor styling configuration.
Note
The axis and labels are stored as the 0-th element of the group when accessed.
To scale the graph with respect to its center:
plot.scale(3, about_point=plot.ax_ins.c2p(0, 0, 0))See also
Plot_General- Base class providing styling parametersPlot_Quantum- Related quantum mechanical plot
Example usage:
from manim import * from manim_string_cosmo import * class InstantonExample(Scene): def construct(self): # Create instanton plot in bottom-left corner p_ins = Plot_Instanton().to_corner(DL) # Add the plot axes and potential self.add(p_ins[0]) # Animate field position appearing self.play(p_ins.fade_in_field_position()) # Demonstrate tunneling/decay process self.play(p_ins.decay())
- decay(rt: float = 0.5, rf: float = <function linear>) Animation[source]¶
Animate the tunneling/decay process from false vacuum to true vacuum.
This method creates an animation showing the field position transitioning from the false vacuum (V+) to the true vacuum (V-), representing quantum tunneling through the potential barrier.
- Parameters:
rt (float, default=0.5) – Animation runtime in seconds.
rf (function, default=linear) – Rate function controlling animation timing.
- Returns:
Animation describing the tunneling process in the potential.
- Return type:
Animation
Example:
plot = Plot_Instanton() # Quick decay animation self.play(plot.decay(rt=0.3, rf=rush_into)) # Smooth, slower decay self.play(plot.decay(rt=2.0, rf=smooth))
- fade_in_field_position(rt: float = 0.5, rf: float = <function linear>) Animation[source]¶
Animate the field position indicator fading into view.
This method creates a fade-in animation for the dot representing the current field position in the potential landscape.
- Parameters:
rt (float, default=0.5) – Animation runtime in seconds.
rf (function, default=linear) – Rate function controlling animation timing (e.g.,
linear,smooth).
- Returns:
Animation showing the field position indicator fading in.
- Return type:
Animation
Example:
plot = Plot_Instanton() self.play(plot.fade_in_field_position(rt=1.0, rf=smooth))
- class Plot_Lambda_Tension[source]¶
This class represents the tension of the nucleated brane with respect to the different values of the AdS scales inside and outside. See Plot_General Class.
Note
The 0-th element correspond to the axis and labels.
Example:
from manim import * from manim_string_cosmo import * class Example_Plot_Tension(Scene): def construct(self): p_tension= Plot_Lambda_Tension() p_tension.scale(0.3, about_point= p_tension.ax_tension_DB.get_origin()).to_corner(LEFT) self.play(FadeIn(p_tension[0])) self.play(p_tension.create_function())
- class Plot_Quantum[source]¶
This class returns the simplest quantum cosmology potential to discuss the two different boundary conditions of this framework.
See Plot_General Class for more information.
Note
The axis and potential are the 0-th element of the class.
Example usage:
from manim import * from manim_string_cosmo import * class Example_Plot_Q(Scene): def construct(self): gq = Plot_Quantum().scale(0.4).to_corner(DL) self.add(gq[0]) self.play(gq.create_wave_functions())
- create_wave_functions(rt: float = 2, rf: float = <function linear>) Succession[source]¶
Write both wavefunctions for the discussion and its legend.
- Parameters:
rt (float) – Run time of the animation.
rf (float) – Rate function of the animation.
- Returns:
Animation sequence writing all wavefunction elements.
- Return type:
Succession
- class Table_Bh_Embedding[source]¶
Class to represent a table of the coordinates of the embedding of the dark bubble.
See Table_General Class for more information. It can display the whole table (type=”together”) or divided (type=”split”). It has three methods (animations).
- Parameters:
type (str) – Display mode for the table. Defaults to “together”.
chosen_position (list) – The relative position of the compact dimensions with respect to uncompact dimensions. Defaults to RIGHT.
Note
Two display types are available:
“together”: Display all 9 spatial directions in the same row.
“split”: Display compact and non-compact dimensions in two different tables.
from manim import * from manim_string_cosmo import * class Example_Table_Bh_Embedding(Scene): def construct(self): together = Table_Bh_Embedding(type="together") together.scale_to_fit_width(config.frame_width - 1).shift(UP) split = Table_Bh_Embedding(type="split", chosen_position=RIGHT) split.scale_to_fit_width(config.frame_width - 1).next_to(together, DOWN, buff=0.2) self.add(together, split) self.play(AnimationGroup(together.move_all(), split.move_non_compact(), split.move_compact()))
- move_all(rt: float = 3, rf: float = <function linear>) AnimationGroup[source]¶
Move the brane through all coordinates.
- Parameters:
rt (float) – Run time of the animation.
rf (float) – Rate function of the animation.
- Returns:
Animation group moving the brane through all spatial coordinates.
- Return type:
AnimationGroup
- move_compact(rt: float = 3, rf: float = <function linear>) AnimationGroup[source]¶
Move the brane through the compact dimensions.
- Parameters:
rt (float) – Run time of the animation.
rf (float) – Rate function of the animation.
- Returns:
Animation group moving the brane through all compact dimensions.
- Return type:
AnimationGroup
- move_non_compact(rt: float = 3, rf: float = <function linear>) Animation[source]¶
Move the brane through the AdS throat.
- Parameters:
rt (float) – Run time of the animation.
rf (float) – Rate function of the animation.
- Returns:
Animation to move the brane along the AdS throat path.
- Return type:
Animation
- class Table_Energy_Scales[source]¶
Class to display the table of energy scales of the dark bubble embedding. See Table_General Class.
- class Table_General[source]¶
Base class for all table objects providing common formatting and styling parameters.
This class centralizes common input parameters for table creation in the string cosmology library, ensuring consistent styling across different table types through inheritance. It handles text colors, highlighting options, decorators, and corner styling.
- Parameters:
text_color (ParsableManimColor, default=WHITE) – Primary color for table text content.
hlight_1_color (ParsableManimColor, default=GREEN) – Primary highlight color for emphasizing specific cells.
hlight_2_color (ParsableManimColor, default=RED) – Secondary highlight color for cell emphasis.
hlight_3_color (ParsableManimColor, default=BLUE) – Tertiary highlight color for cell emphasis.
decorator_color (ParsableManimColor, default=WHITE) – Color of the table border/frame decorator.
decorator_stroke_w (float, default=1) – Stroke width of the decorator frame.
corner_rad (float, default=0) – Base radius for rounded corners on table cells and decorators.
corner_rad_direction (list, default=[0, 0, 0, 0]) – List specifying which corners to round [UL, UR, DR, DL]. Each element is multiplied by corner_rad to determine final corner radius.
stroke_w (float, default=1) – General stroke width for table lines.
stroke_opa (float, default=1) – Stroke opacity for table borders and dividers.
fill_opa (float, default=0.3) – Fill opacity for highlighted cells and backgrounds.
kwargs – Additional keyword arguments passed to
VMobject.
See also
Table_SummaryTable_BH_Embedding
Example usage:
from manim import * from manim_string_cosmo import * class TableExample(Scene): def construct(self): # Create tables and arrange them table_group = VGroup( Table_Summary_Induce(), Table_Energy_Scales() ).arrange(RIGHT) table_group.scale_to_fit_width(config.frame_width - 1) self.add(table_group)
- class Table_Summary_Induce[source]¶
Class to display a table with all relations between 4D and higher dimension fields and the papers where they are discussed. See Table_General Class.
- class Vacuum_General[source]¶
Base class providing common initialization parameters for vacuum objects.
This class centralizes all input parameters related to the color, shape, and appearance of vacuum representations in string cosmology visualizations.
- Parameters:
vacuum_color (ParsableManimColor) – Color of the vacuum representation. Default is
RED.vacuum_fill_opa (float) – Fill opacity of the vacuum. Default is
0.2.vacuum_stroke_w (float) – Stroke width of the vacuum border. Default is
0.2.vacuum_text_color (ParsableManimColor) – Color of text elements associated with the vacuum. Default is
WHITE.corner_rad (float) – Corner radius of the surrounding box. Default is
0.corner_rad_direction (list[int]) – List of four integers controlling which corners of the surrounding rectangle get rounded: [top-left, top-right, bottom-right, bottom-left]. Default is
[0, 0, 0, 0].kwargs – Additional keyword arguments passed to
VGroup.
Note
This class is designed to be inherited by other vacuum-related classes to ensure consistent parameter handling across different vacuum representations.
- import_template_string_cosmo(module_name: str)[source]¶
Import a chosen template to standardize styling for string cosmology visualizations.
This function loads a predefined color and styling template that will be applied to all subsequent string_cosmo objects created in the scene. It helps maintain visual consistency across string theory and cosmology animations.
- Parameters:
module_name (str) – Name of the template to import. Must be one of the allowed templates.
- Raises:
ModuleNotFoundError – If the specified template module cannot be found.
Note
This function should be called before defining your Scene class to ensure the template is properly loaded before any string_cosmo objects are created.
- Available templates:
"cosmic_dawn""quantum_dusk""dark_energy""green_mint""blue_ice""red_autumn""beamer_blue""beamer_green""default_template"(fallback)
Example usage:
from manim_string_cosmo import * import_template_string_cosmo('cosmic_dawn') class MyScene(Scene): def construct(self): # Your string_cosmo objects will now use the selected template pass