diff options
| author | Elvis Claros Castro <elvis@claros.ar> | 2026-09-26 20:50:41 -0300 |
|---|---|---|
| committer | Elvis Claros Castro <elvis@claros.ar> | 2026-09-26 20:50:41 -0300 |
| commit | fafaebb051907a848a9406f9da19669c81a83a3b (patch) | |
| tree | c30ea26e6b549e5523af2bae5c39569e9a946b12 /scenes/v4_luna.py | |
| parent | 59355909f2de9236af8168a26c70bcf6caa3b285 (diff) | |
| download | 100cia-videos-fafaebb051907a848a9406f9da19669c81a83a3b.tar.gz 100cia-videos-fafaebb051907a848a9406f9da19669c81a83a3b.zip | |
Translate code, comments and logs to English; English README; configurable paths and env varsHEADmain
Identifiers, docstrings, comments and console messages are now in English.
Narration, subtitles and on-screen text stay in Spanish (they are the video
content). The Blender <-> Godot physics protocol uses English keys and body
prefixes chosen to keep the original creation order, so cached simulations and
renders stay bit-identical. The old Spanish environment variable names are still
accepted.
Diffstat (limited to 'scenes/v4_luna.py')
| -rw-r--r-- | scenes/v4_luna.py | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/scenes/v4_luna.py b/scenes/v4_luna.py index f69f99a..ff17031 100644 --- a/scenes/v4_luna.py +++ b/scenes/v4_luna.py @@ -4,8 +4,8 @@ sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from manim import * from tiktok import * -Y0, Y1 = -3.25, 4.20 # extremos del eje logaritmico -L0, L1 = -1.0, 11.8 # log10 del espesor en mm +Y0, Y1 = -3.25, 4.20 # ends of the log axis +L0, L1 = -1.0, 11.8 # log10 of the thickness in mm BAR_X, BAR_W = -3.15, 1.0 MOON_MM = 3.844e11 @@ -15,11 +15,11 @@ def ypos(mm): return Y0 + (L - L0) / (L1 - L0) * (Y1 - Y0) -def espesor(n): +def thickness(n): return 0.1 * (2 ** n) -def humano(mm): +def human(mm): if mm < 10: return f"{mm:.1f} mm".replace(".", ",") if mm < 1e4: @@ -29,7 +29,7 @@ def humano(mm): return f"{mm/1e6:,.0f} km".replace(",", ".") -class Luna(TikTok): +class Moon(TikTok): NAME = "luna" def moon(self, r=0.62): @@ -43,7 +43,7 @@ class Luna(TikTok): def construct(self): self.prepare() - chip = self.chip("Crecimiento exponencial", CELESTE) + chip = self.chip("Crecimiento exponencial", C_SKY) # ---------- hook ---------- with self.beat(0) as b: @@ -51,28 +51,28 @@ class Luna(TikTok): fill_color="#1A2440", fill_opacity=1).move_to(LEFT * 2.3 + UP * 2.6) fold = Line(sheet.get_corner(UL) + RIGHT * 0.55, sheet.get_corner(DL) + RIGHT * 0.55, stroke_width=3, color="#5E6B87") - mo = self.moon(0.95).move_to(RIGHT * 2.4 + UP * 2.6) - ar = Arrow(sheet.get_right() + RIGHT * 0.15, mo.get_left() + LEFT * 0.15, - buff=0, color=AMBAR, stroke_width=9) + moon_m = self.moon(0.95).move_to(RIGHT * 2.4 + UP * 2.6) + ar = Arrow(sheet.get_right() + RIGHT * 0.15, moon_m.get_left() + LEFT * 0.15, + buff=0, color=AMBER, stroke_width=9) tag = self.fit(Text("42 dobleces", font=FONT, font_size=46, weight=BOLD, - color=AMBAR), 7.5).next_to(ar, UP, buff=0.3) + color=AMBER), 7.5).next_to(ar, UP, buff=0.3) b.play(FadeIn(chip, shift=DOWN * 0.3), run_time=0.45) b.play(FadeIn(sheet), Create(fold), run_time=0.5) b.play(GrowArrow(ar), FadeIn(tag), run_time=0.6) - b.play(FadeIn(mo, scale=0.6), run_time=0.6) - hook = VGroup(sheet, fold, mo, ar, tag) + b.play(FadeIn(moon_m, scale=0.6), run_time=0.6) + hook = VGroup(sheet, fold, moon_m, ar, tag) - # ---------- el eje ---------- + # ---------- the axis -------- axis = Line([BAR_X, Y0, 0], [BAR_X, Y1 + 0.3, 0], stroke_width=5, color="#3A4766") base = Line([BAR_X - 0.75, Y0, 0], [4.2, Y0, 0], stroke_width=5, color="#3A4766") - hitos = [(1e2, "10 cm"), (1e5, "100 m"), (1e8, "100 km")] + milestones = [(1e2, "10 cm"), (1e5, "100 m"), (1e8, "100 km")] marks = VGroup() - for mm, txt in hitos: + for mm, txt in milestones: y = ypos(mm) ln = DashedLine([BAR_X - 0.5, y, 0], [3.9, y, 0], stroke_width=3, color="#33405C", dash_length=0.12) - lb = Text(txt, font=FONT, font_size=30, color=GRIS) + lb = Text(txt, font=FONT, font_size=30, color=C_GRAY) lb.next_to(ln, UP, buff=0.08).align_to(ln, RIGHT) marks.add(VGroup(ln, lb)) @@ -84,15 +84,15 @@ class Luna(TikTok): moon_lb.next_to(moon_line, UP, buff=0.1).align_to(moon_line, RIGHT).shift(LEFT * 0.1) readout = VGroup( - Text("0", font=FONT, font_size=68, weight=BOLD, color=AMBAR), - Text("dobleces", font=FONT, font_size=28, color=GRIS), + Text("0", font=FONT, font_size=68, weight=BOLD, color=AMBER), + Text("dobleces", font=FONT, font_size=28, color=C_GRAY), Text("0,1 mm", font=FONT, font_size=44, weight=BOLD, color=WHITE), ) readout[0:2].arrange(RIGHT, buff=0.25, aligned_edge=DOWN) readout.arrange(RIGHT, buff=0.5, aligned_edge=DOWN).move_to(UP * 5.6) bar = Rectangle(width=BAR_W, height=0.02, stroke_width=0, - fill_color=AMBAR, fill_opacity=1) + fill_color=AMBER, fill_opacity=1) bar.move_to([BAR_X + BAR_W / 2 + 0.06, Y0, 0], DOWN + LEFT) with self.beat(1) as b: @@ -104,14 +104,14 @@ class Luna(TikTok): state = {"n": 0} def goto(bt, n, rt=0.9, extra=None): - mm = espesor(n) + mm = thickness(n) h = max(ypos(mm) - Y0, 0.02) new_bar = bar.copy().stretch_to_fit_height(h).move_to( [BAR_X + BAR_W / 2 + 0.06, Y0, 0], DOWN + LEFT) nr = VGroup( - Text(str(n), font=FONT, font_size=68, weight=BOLD, color=AMBAR), - Text("dobleces" if n != 1 else "doblez", font=FONT, font_size=28, color=GRIS), - Text(humano(mm), font=FONT, font_size=44, weight=BOLD, color=WHITE), + Text(str(n), font=FONT, font_size=68, weight=BOLD, color=AMBER), + Text("dobleces" if n != 1 else "doblez", font=FONT, font_size=28, color=C_GRAY), + Text(human(mm), font=FONT, font_size=44, weight=BOLD, color=WHITE), ) nr[0:2].arrange(RIGHT, buff=0.25, aligned_edge=DOWN) nr.arrange(RIGHT, buff=0.5, aligned_edge=DOWN).move_to(UP * 5.6) @@ -124,25 +124,25 @@ class Luna(TikTok): with self.beat(2) as b: b.play(FadeIn(readout), FadeIn(bar), run_time=0.5) - b.play(Indicate(readout[2], color=AMBAR, scale_factor=1.3), run_time=0.7) + b.play(Indicate(readout[2], color=AMBER, scale_factor=1.3), run_time=0.7) with self.beat(3) as b: goto(b, 1, 0.7) goto(b, 2, 0.7) with self.beat(4) as b: - goto(b, 10, 1.1, [Flash(marks[0][1], color=AMBAR, line_length=0.3, + goto(b, 10, 1.1, [Flash(marks[0][1], color=AMBER, line_length=0.3, num_lines=12, flash_radius=0.8)]) with self.beat(5) as b: - goto(b, 20, 1.1, [Flash(marks[1][1], color=AMBAR, line_length=0.3, + goto(b, 20, 1.1, [Flash(marks[1][1], color=AMBER, line_length=0.3, num_lines=12, flash_radius=0.8)]) with self.beat(6) as b: - goto(b, 30, 1.1, [Flash(marks[2][1], color=AMBAR, line_length=0.3, + goto(b, 30, 1.1, [Flash(marks[2][1], color=AMBER, line_length=0.3, num_lines=12, flash_radius=0.8)]) atm = Text("fuera de la atmósfera", font=FONT, font_size=32, - weight=BOLD, color=CELESTE).move_to([0.9, ypos(1e8) - 0.6, 0]) + weight=BOLD, color=C_SKY).move_to([0.9, ypos(1e8) - 0.6, 0]) b.play(FadeIn(atm, shift=UP * 0.1), run_time=0.5) with self.beat(7) as b: @@ -155,11 +155,11 @@ class Luna(TikTok): num_lines=18, flash_radius=1.1), run_time=0.8) with self.beat(9) as b: - over = Text("te pasaste de largo", font=FONT, font_size=44, weight=BOLD, color=VERDE) + over = Text("te pasaste de largo", font=FONT, font_size=44, weight=BOLD, color=C_GREEN) over.move_to([0.75, ym - 0.95, 0]) self.fit(over, 5.6) b.play(FadeIn(over, shift=UP * 0.15), run_time=0.6) - b.play(Circumscribe(over, color=VERDE, buff=0.22, stroke_width=6), run_time=0.9) + b.play(Circumscribe(over, color=C_GREEN, buff=0.22, stroke_width=6), run_time=0.9) with self.beat(10) as b: b.play(FadeOut(VGroup(axis, base, marks, moon_line, moon_ic, moon_lb, @@ -167,10 +167,10 @@ class Luna(TikTok): t1 = self.fit(Text("crecimiento", font=FONT, font_size=74, weight=BOLD, color=WHITE), 8.0) t2 = self.fit(Text("EXPONENCIAL", font=FONT, font_size=90, weight=BOLD, - color=AMBAR), 8.2) + color=AMBER), 8.2) g = VGroup(t1, t2).arrange(DOWN, buff=0.3).move_to(UP * 1.6) t3 = self.fit(Text("por eso nadie lo ve venir", font=FONT, font_size=40, - color=GRIS), 7.6).next_to(g, DOWN, buff=0.7) + color=C_GRAY), 7.6).next_to(g, DOWN, buff=0.7) b.play(FadeIn(t1, shift=UP * 0.2), run_time=0.5) b.play(FadeIn(t2, scale=0.7), run_time=0.6) b.play(FadeIn(t3), run_time=0.5) |