Serie armónica
from manim import *
import numpy as np
# Configuración global de fondo blanco
config.background_color = WHITE
class DescomposicionArmonica(Scene):
def construct(self):
# Parámetros físicos de la onda (Base = 60 Hz)
f0 = 60.0
# Ventana de tiempo: 2 ciclos completos de 60 Hz (2/60 s ≈ 0.0333 s)
t_max = 2.0 / f0
# Amplitudes relativas de cada parcial (decrecientes, como en un instrumento acústico)
armonicos = [
{"n": 1, "freq": 60, "amp": 1.00, "color": "#1565C0", "texto": "60 Hz (Fundamental)"},
{"n": 2, "freq": 120, "amp": 0.55, "color": "#2E7D32", "texto": "120 Hz (2º Armónico)"},
{"n": 3, "freq": 180, "amp": 0.35, "color": "#E65100", "texto": "180 Hz (3º Armónico)"},
{"n": 4, "freq": 240, "amp": 0.20, "color": "#6A1B9A", "texto": "240 Hz (4º Armónico)"},
]
# Función matemática de la onda compleja (suma de senoidales)
def onda_compleja_func(t):
return sum(
h["amp"] * np.sin(2 * np.pi * h["freq"] * t)
for h in armonicos
)
# =====================================================================
# FASE 1: ONDA COMPLEJA EN EL CENTRO DE LA PANTALLA
# =====================================================================
ax_centro = Axes(
x_range=[0, t_max, 1.0 / f0],
y_range=[-1.7, 1.7, 1.0],
x_length=9.5,
y_length=2.8,
axis_config={
"color": GRAY_C,
"stroke_width": 2,
"include_tip": False,
"include_ticks": False,
},
).move_to(DOWN * 0.2)
onda_centro = ax_centro.plot(
onda_compleja_func,
x_range=[0, t_max],
color=BLACK,
stroke_width=4,
)
titulo_centro = Text(
"Onda Sinusoidal Compleja (Base: 60 Hz)",
font_size=30,
color=BLACK,
weight=BOLD,
).next_to(ax_centro, UP, buff=0.45)
grupo_centro = VGroup(ax_centro, onda_centro, titulo_centro)
# Animación de aparición en el centro
self.play(
FadeIn(ax_centro),
Write(titulo_centro),
run_time=0.8,
)
self.play(Create(onda_centro), run_time=2.0, rate_func=smooth)
self.wait(1.2)
# =====================================================================
# FASE 2: TRASLADO AL ENCABEZADO Y DESCOMPOSICIÓN EN FRECUENCIAS BÁSICAS
# =====================================================================
# Estado destino de la onda compleja en la parte superior
ax_top = Axes(
x_range=[0, t_max, 1.0 / f0],
y_range=[-1.7, 1.7, 1.0],
x_length=7.8,
y_length=1.35,
axis_config={
"color": GRAY_C,
"stroke_width": 1.5,
"include_tip": False,
"include_ticks": False,
},
).move_to(UP * 2.75 + RIGHT * 1.9)
onda_top = ax_top.plot(
onda_compleja_func,
x_range=[0, t_max],
color=BLACK,
stroke_width=3.5,
)
titulo_top = Text(
"Onda Compleja\n(Suma total)",
font_size=22,
color=BLACK,
weight=BOLD,
line_spacing=1.1,
).to_edge(LEFT, buff=0.6).set_y(ax_top.get_center()[1])
grupo_top = VGroup(ax_top, onda_top, titulo_top)
# Línea divisoria sutil entre la onda compleja y sus componentes
separador = DashedLine(
start=LEFT * 6.5,
end=RIGHT * 6.0,
color=GRAY_B,
stroke_width=1.5,
).move_to(UP * 1.75)
self.play(
Transform(grupo_centro, grupo_top),
Create(separador),
run_time=1.4,
rate_func=smooth,
)
# Posiciones verticales para las 4 ondas descompuestas
posiciones_y = [0.85, -0.45, -1.75, -3.05]
for h, pos_y in zip(armonicos, posiciones_y):
# Eje individual para el armónico
ax_h = Axes(
x_range=[0, t_max, 1.0 / f0],
y_range=[-1.2, 1.2, 1.0],
x_length=7.8,
y_length=1.05,
axis_config={
"color": GRAY_C,
"stroke_width": 1.2,
"include_tip": False,
"include_ticks": False,
},
).move_to(UP * pos_y + RIGHT * 1.9)
# Curva senoidal pura de este armónico
onda_h = ax_h.plot(
lambda t, freq=h["freq"], amp=h["amp"]: amp * np.sin(2 * np.pi * freq * t),
x_range=[0, t_max],
color=h["color"],
stroke_width=3,
)
# Etiqueta descriptiva alineada a la izquierda
etiqueta_h = Text(
h["texto"],
font_size=21,
color=h["color"],
weight=MEDIUM,
).to_edge(LEFT, buff=0.6).set_y(pos_y)
# La onda individual "emerge" directamente desde la onda compleja superior
self.play(
FadeIn(ax_h, shift=DOWN * 0.1),
Write(etiqueta_h),
TransformFromCopy(onda_top, onda_h),
run_time=1.1,
rate_func=smooth,
)
# Pausa final para edición en el video educativo
self.wait(3)
class CuerdaVibranteArmonicos(Scene):
def construct(self):
# Parámetros geométricos de la cuerda
L = 10.6
x_izq = -L / 2
x_der = L / 2
y_cuerda = 0.25 # Altura central de la cuerda
# Configuración de cada armónico (n = número de vientres)
armonicos_config = [
{
"n": 1,
"amp": 1.65,
"color": "#1565C0", # Azul intenso
"width": 5.0,
"etiqueta": "f (Frecuencia Fundamental o 1º Armónico)",
},
{
"n": 2,
"amp": 1.25,
"color": "#2E7D32", # Verde esmeralda
"width": 3.6,
"etiqueta": "2f",
},
{
"n": 3,
"amp": 0.95,
"color": "#E65100", # Naranja oscuro
"width": 3.2,
"etiqueta": "3f",
},
{
"n": 4,
"amp": 0.72,
"color": "#6A1B9A", # Púrpura
"width": 2.9,
"etiqueta": "4f",
},
{
"n": 5,
"amp": 0.55,
"color": "#C62828", # Rojo carmesí
"width": 2.6,
"etiqueta": "5f",
},
]
# Trackers para tiempo continuo y amplitud individual de cada modo
t_tracker = ValueTracker(0.0)
amp_trackers = [ValueTracker(0.0) for _ in armonicos_config]
# Velocidad angular base (en rad/s) para que las frecuencias 1:2:3:4:5 sean claras
omega_base = 1.15 * np.pi
# =====================================================================
# ELEMENTOS ESTRUCTURALES: EJE DE EQUILIBRIO Y ANCLAJES EXTREMOS
# =====================================================================
punto_izq = np.array([x_izq, y_cuerda, 0])
punto_der = np.array([x_der, y_cuerda, 0])
# Línea de referencia en reposo (permite visualizar los nodos)
linea_equilibrio = DashedLine(
start=punto_izq,
end=punto_der,
color=GRAY_B,
stroke_width=1.8,
dash_length=0.12,
)
# Soportes fijos en ambos extremos
soporte_izq = VGroup(
Line(UP * 0.45, DOWN * 0.45, color=BLACK, stroke_width=5).move_to(punto_izq),
Dot(punto_izq, radius=0.11, color=BLACK),
).set_z_index(10)
soporte_der = VGroup(
Line(UP * 0.45, DOWN * 0.45, color=BLACK, stroke_width=5).move_to(punto_der),
Dot(punto_der, radius=0.11, color=BLACK),
).set_z_index(10)
# Generador dinámico de cada onda estacionaria: y(x,t) = A * sin(n*pi*x/L) * cos(n*w*t)
def crear_onda_estacionaria(idx):
cfg = armonicos_config[idx]
n = cfg["n"]
tracker_a = amp_trackers[idx]
return always_redraw(
lambda: ParametricFunction(
lambda u: np.array([
x_izq + u * L,
y_cuerda
+ tracker_a.get_value()
* np.sin(n * np.pi * u)
* np.cos(n * omega_base * t_tracker.get_value()),
0,
]),
t_range=[0, 1, 0.008],
color=cfg["color"],
stroke_width=cfg["width"],
)
)
ondas = [crear_onda_estacionaria(i) for i in range(len(armonicos_config))]
# =====================================================================
# FASE 1: CUERDA RECTA EN REPOSO ANCLADA EN DOS EXTREMOS
# =====================================================================
cuerda_inicial = Line(
punto_izq,
punto_der,
color=armonicos_config[0]["color"],
stroke_width=5.0,
)
self.play(
Create(cuerda_inicial),
FadeIn(soporte_izq),
FadeIn(soporte_der),
run_time=1.0,
)
self.wait(0.6)
# Reemplazamos la línea estática por el sistema dinámico de ondas
self.add(linea_equilibrio, *ondas, soporte_izq, soporte_der)
self.remove(cuerda_inicial)
# =====================================================================
# FASE 2: VIBRACIÓN EN LA FRECUENCIA FUNDAMENTAL (1 VIENTRE)
# =====================================================================
etiqueta_f = Text(
armonicos_config[0]["etiqueta"],
font_size=28,
color=armonicos_config[0]["color"],
weight=BOLD,
).to_edge(UP, buff=0.55)
# La cuerda comienza a vibrar suavemente formando un solo arco
self.play(
t_tracker.animate(rate_func=linear).increment_value(1.5),
amp_trackers[0].animate(rate_func=smooth).set_value(armonicos_config[0]["amp"]),
Write(etiqueta_f),
run_time=1.5,
)
# Oscilación libre de la fundamental para apreciarla con claridad
self.play(
t_tracker.animate(rate_func=linear).increment_value(10.2),
run_time=10.2,
)
# =====================================================================
# FASE 3: SUBDIVISIONES SUPERPUESTAS (2f, 3f, 4f, 5f)
# =====================================================================
# Creamos las insignias de leyenda inferior para 2f, 3f, 4f y 5f
insignias = VGroup()
for idx in range(1, len(armonicos_config)):
cfg = armonicos_config[idx]
muestra_color = Line(LEFT * 0.35, RIGHT * 0.35, color=cfg["color"], stroke_width=5)
texto_etiq = Text(
cfg["etiqueta"],
font_size=26,
color=cfg["color"],
weight=BOLD,
)
insignia = VGroup(muestra_color, texto_etiq).arrange(RIGHT, buff=0.18)
insignias.add(insignia)
insignias.arrange(RIGHT, buff=1.15).to_edge(DOWN, buff=0.65)
# Aparecen progresivamente el 2º, 3º, 4º y 5º armónico sobre la cuerda principal
for idx in range(1, len(armonicos_config)):
self.play(
t_tracker.animate(rate_func=linear).increment_value(2.3),
amp_trackers[idx].animate(rate_func=smooth).set_value(armonicos_config[idx]["amp"]),
FadeIn(insignias[idx - 1], shift=UP * 0.15),
run_time=2.3,
)
# =====================================================================
# FASE 4: VIBRACIÓN SIMULTÁNEA DE TODOS LOS ARMÓNICOS
# =====================================================================
self.play(
t_tracker.animate(rate_func=linear).increment_value(13.8),
run_time=13.8,
)
class SerieArmonicaPentagrama(Scene):
def construct(self):
# Parámetros de escala musical (dy = distancia entre línea y espacio contiguo)
dy = 0.13
x_inicio = -6.25
x_fin = 6.25
x_clave = -5.65
# Posiciones verticales de ambos pentagramas (Endecagrama / Grand Staff)
y_fa = -1.65 # Centro del pentagrama en Clave de Fa (3ª línea = Re3)
y_sol = 1.15 # Centro del pentagrama en Clave de Sol (3ª línea = Si4)
# Posiciones horizontales secuenciales de los 8 armónicos
x_notas = {
1: -4.25, # Do2
2: -2.95, # Do3
3: -1.45, # Sol3
4: -0.05, # Do4
5: 1.15, # Mi4
6: 2.35, # Sol4
7: 3.80, # Sib4
8: 5.05, # Do5
}
# =====================================================================
# FUNCIONES AUXILIARES DE NOTACIÓN MUSICAL VECTORIAL
# =====================================================================
def crear_pentagrama(y_centro):
lineas = VGroup()
for i in range(-2, 3):
y = y_centro + i * (2 * dy)
lineas.add(
Line(
start=[x_inicio, y, 0],
end=[x_fin, y, 0],
color=BLACK,
stroke_width=1.8,
)
)
barra_izq = Line(
start=[x_inicio, y_centro - 4 * dy, 0],
end=[x_inicio, y_centro + 4 * dy, 0],
color=BLACK,
stroke_width=2.5,
)
barra_der = Line(
start=[x_fin, y_centro - 4 * dy, 0],
end=[x_fin, y_centro + 4 * dy, 0],
color=BLACK,
stroke_width=2.5,
)
return VGroup(lineas, barra_izq, barra_der)
def crear_clave_fa(x, y_centro):
y_linea4 = y_centro + 2 * dy # 4ª línea (Fa3)
punto_inicio = Dot([x - 0.14, y_linea4, 0], radius=0.075, color=BLACK)
curva = VMobject(color=BLACK, stroke_width=4.2)
curva.set_points_smoothly([
[x - 0.14, y_linea4, 0],
[x - 0.04, y_linea4 + 2.1 * dy, 0],
[x + 0.14, y_linea4 + 0.6 * dy, 0],
[x + 0.06, y_linea4 - 2.2 * dy, 0],
[x - 0.22, y_linea4 - 4.8 * dy, 0],
])
punto_sup = Dot([x + 0.25, y_linea4 + dy, 0], radius=0.042, color=BLACK)
punto_inf = Dot([x + 0.25, y_linea4 - dy, 0], radius=0.042, color=BLACK)
return VGroup(punto_inicio, curva, punto_sup, punto_inf)
def crear_clave_sol(x, y_centro):
y_linea2 = y_centro - 2 * dy # 2ª línea (Sol4)
curva = VMobject(color=BLACK, stroke_width=3.6)
curva.set_points_smoothly([
[x + 0.02, y_linea2 - 0.1 * dy, 0],
[x + 0.18, y_linea2 - 1.1 * dy, 0],
[x + 0.00, y_linea2 - 2.1 * dy, 0],
[x - 0.20, y_linea2 - 0.5 * dy, 0],
[x - 0.10, y_linea2 + 2.0 * dy, 0],
[x + 0.14, y_linea2 + 5.2 * dy, 0],
[x + 0.02, y_linea2 + 7.4 * dy, 0],
[x - 0.06, y_linea2 + 5.0 * dy, 0],
[x - 0.02, y_linea2 - 3.6 * dy, 0],
[x - 0.16, y_linea2 - 4.2 * dy, 0],
])
remate = Dot([x - 0.18, y_linea2 - 3.7 * dy, 0], radius=0.045, color=BLACK)
return VGroup(curva, remate)
def crear_redonda(x, y, color=BLACK, lineas_adicionales_y=None):
# Óvalo exterior + centro blanco hueco (estilo grabado musical)
exterior = Ellipse(width=0.34, height=0.22, color=color, stroke_width=0)
exterior.set_fill(color, opacity=1.0)
interior = Ellipse(width=0.17, height=0.13, color=WHITE, stroke_width=0)
interior.set_fill(WHITE, opacity=1.0).rotate(-25 * DEGREES)
cabeza = VGroup(exterior, interior).move_to([x, y, 0]).set_z_index(4)
grupo = VGroup(cabeza)
if lineas_adicionales_y:
for y_l in lineas_adicionales_y:
linea_ad = Line(
start=[x - 0.28, y_l, 0],
end=[x + 0.28, y_l, 0],
color=BLACK,
stroke_width=1.8,
).set_z_index(2)
grupo.add(linea_ad)
return grupo
def crear_bemol(x_nota, y_nota, color="#C62828"):
x_b = x_nota - 0.30
plica = Line(
start=[x_b, y_nota - 0.12, 0],
end=[x_b, y_nota + 0.34, 0],
color=color,
stroke_width=2.6,
)
panza = VMobject(color=color, stroke_width=2.6)
panza.set_points_smoothly([
[x_b, y_nota + 0.06, 0],
[x_b + 0.13, y_nota + 0.10, 0],
[x_b + 0.14, y_nota - 0.02, 0],
[x_b, y_nota - 0.12, 0],
])
return VGroup(plica, panza).set_z_index(4)
# =====================================================================
# FASE 1: PENTAGRAMA EN CLAVE DE FA Y FUNDAMENTAL Do2 (0s - 5.5s)
# =====================================================================
titulo = Text(
"La Serie Armónica en Notación Musical (Fundamental: Do)",
font_size=26,
color=BLACK,
weight=BOLD,
).to_edge(UP, buff=0.35)
penta_fa = crear_pentagrama(y_fa)
clave_fa = crear_clave_fa(x_clave, y_fa)
# Do2: 2 líneas adicionales por debajo de la 1ª línea (Sol2 = y_fa - 4*dy)
y_do2 = y_fa - 8 * dy
y_mi2 = y_fa - 6 * dy
nota_do2 = crear_redonda(
x_notas[1], y_do2, color="#1565C0", lineas_adicionales_y=[y_mi2, y_do2]
)
etiq_do2 = Text(
"Do₂\n1º Armónico (f)",
font_size=18,
color="#1565C0",
weight=BOLD,
line_spacing=1.1,
).next_to(nota_do2, DOWN, buff=0.20)
self.play(
Write(titulo),
Create(penta_fa),
FadeIn(clave_fa),
run_time=1.4,
)
self.play(
FadeIn(nota_do2, scale=0.8),
Write(etiq_do2),
run_time=1.2,
)
self.wait(2.8)
# =====================================================================
# FASE 2: 2º ARMÓNICO (Do3) Y CORCHETE DE OCTAVA JUSTA (5.5s - 11.5s)
# =====================================================================
# Do3: 2º espacio de Clave de Fa (y_fa - dy)
y_do3 = y_fa - dy
nota_do3 = crear_redonda(x_notas[2], y_do3, color="#1565C0")
etiq_do3 = Text(
"Do₃ (2º)",
font_size=19,
color="#1565C0",
weight=BOLD,
).move_to([x_notas[2], y_fa + 6.3 * dy, 0])
# Corchete que ilumina el intervalo entre Do2 y Do3
corchete_octava = BraceBetweenPoints(
[x_notas[2] + 0.30, y_do3, 0],
[x_notas[2] + 0.30, y_do2, 0],
color="#1565C0",
)
texto_octava = Text(
"Octava Justa\n(2:1)",
font_size=18,
color="#1565C0",
weight=BOLD,
line_spacing=1.1,
).next_to(corchete_octava, RIGHT, buff=0.5)
self.play(
FadeIn(nota_do3, shift=UP * 0.15),
Write(etiq_do3),
run_time=1.2,
)
self.play(
GrowFromCenter(corchete_octava),
Write(texto_octava),
run_time=1.3,
)
self.wait(3.3)
# =====================================================================
# FASE 3: 3º ARMÓNICO (Sol3) EN CLAVE DE FA (11.5s - 17.0s)
# =====================================================================
# Sol3: 4º espacio de Clave de Fa (y_fa + 3*dy)
y_sol3 = y_fa + 3 * dy
nota_sol3 = crear_redonda(x_notas[3], y_sol3, color="#2E7D32")
etiq_sol3 = Text(
"Sol₃\n3º Armónico (3:1)",
font_size=18,
color="#2E7D32",
weight=BOLD,
line_spacing=1.1,
).move_to([x_notas[3], y_fa + 6.8 * dy, 0])
self.play(
FadeIn(nota_sol3, shift=UP * 0.15),
Write(etiq_sol3),
run_time=1.3,
)
self.wait(4.0)
# =====================================================================
# FASE 4: PASO A CLAVE DE SOL Y 4º ARMÓNICO (Do4) (17.0s - 22.5s)
# =====================================================================
penta_sol = crear_pentagrama(y_sol)
clave_sol = crear_clave_sol(x_clave, y_sol)
llave_sistema = Line(
start=[x_inicio, y_fa - 4 * dy, 0],
end=[x_inicio, y_sol + 4 * dy, 0],
color=BLACK,
stroke_width=3.2,
)
# Do4: 1 línea adicional por debajo de la 1ª línea de Clave de Sol (Mi4 = y_sol - 4*dy)
y_do4 = y_sol - 6 * dy
nota_do4 = crear_redonda(
x_notas[4], y_do4, color="#E65100", lineas_adicionales_y=[y_do4]
)
etiq_do4 = Text(
"Do₄\n4º Armónico (4:1)",
font_size=18,
color="#E65100",
weight=BOLD,
line_spacing=1.1,
).next_to(nota_do4, DOWN, buff=0.20)
self.play(
Create(penta_sol),
FadeIn(clave_sol),
Create(llave_sistema),
run_time=1.3,
)
self.play(
FadeIn(nota_do4, shift=UP * 0.15),
Write(etiq_do4),
run_time=1.2,
)
self.wait(2.8)
# =====================================================================
# FASE 5: 5º (Mi4), 6º (Sol4) Y TRÍADA MAYOR NATURAL (22.5s - 30.5s)
# =====================================================================
# Mi4: 1ª línea de Clave de Sol (y_sol - 4*dy)
y_mi4 = y_sol - 4 * dy
nota_mi4 = crear_redonda(x_notas[5], y_mi4, color="#E65100")
etiq_mi4 = Text(
"Mi₄ (5º)",
font_size=18,
color="#E65100",
weight=BOLD,
).move_to([x_notas[5], y_sol - 7.3 * dy, 0])
# Sol4: 2ª línea de Clave de Sol (y_sol - 2*dy)
y_sol4 = y_sol - 2 * dy
nota_sol4 = crear_redonda(x_notas[6], y_sol4, color="#E65100")
etiq_sol4 = Text(
"Sol₄ (6º)",
font_size=18,
color="#E65100",
weight=BOLD,
).move_to([x_notas[6], y_sol - 7.3 * dy, 0])
self.play(
FadeIn(nota_mi4, shift=UP * 0.15),
Write(etiq_mi4),
run_time=1.1,
)
self.play(
FadeIn(nota_sol4, shift=UP * 0.15),
Write(etiq_sol4),
run_time=1.1,
)
# Recuadro brillante envolviendo los armónicos 4, 5 y 6 (Do4 - Mi4 - Sol4)
grupo_triada = VGroup(nota_do4, nota_mi4, nota_sol4)
recuadro_triada = SurroundingRectangle(
grupo_triada,
color="#D97706",
buff=0.18,
corner_radius=0.12,
stroke_width=3.2,
).set_fill("#FEF3C7", opacity=0.38).set_z_index(1)
texto_triada = Text(
"Tríada Mayor Natural (Do - Mi - Sol)",
font_size=21,
color="#B45309",
weight=BOLD,
).move_to([1.15, y_sol + 6.8 * dy, 0])
self.play(
Create(recuadro_triada),
Write(texto_triada),
run_time=1.4,
)
self.wait(4.2)
# =====================================================================
# FASE 6: DETALLE MICROTONAL - 7º ARMÓNICO Si♭4 (-31 CENTS) (30.5s - 38.0s)
# =====================================================================
# Sib4: 3ª línea de Clave de Sol (y_sol)
y_sib4 = y_sol
nota_sib4 = crear_redonda(x_notas[7], y_sib4, color="#C62828")
bemol_sib4 = crear_bemol(x_notas[7], y_sib4, color="#C62828")
# Flecha roja apuntando ligeramente hacia abajo junto a la nota
flecha_micro = Arrow(
start=[x_notas[7] + 0.32, y_sib4 + 0.22, 0],
end=[x_notas[7] + 0.32, y_sib4 - 0.30, 0],
color="#C62828",
buff=0,
stroke_width=4.5,
max_tip_length_to_length_ratio=0.38,
).set_z_index(5)
texto_cents = Text(
"-31 cents",
font_size=20,
color="#C62828",
weight=BOLD,
).move_to([x_notas[7] + 0.10, y_sol - 10.3 * dy, 0])
etiq_sib4 = Text(
"Si♭₄ (7º)",
font_size=19,
color="#C62828",
weight=BOLD,
).move_to([x_notas[7], y_sol - .3 * dy, 0])
self.play(
FadeIn(nota_sib4, shift=UP * 0.15),
FadeIn(bemol_sib4),
Write(etiq_sib4),
run_time=1.2,
)
self.play(
GrowArrow(flecha_micro),
Write(texto_cents),
run_time=1.2,
)
self.wait(4.8)
# =====================================================================
# FASE 7: 8º ARMÓNICO (Do5) Y PARCIALES SUPERIORES CERCANOS (38.0s - 44.0s)
# =====================================================================
# Do5: 3º espacio de Clave de Sol (y_sol + dy)
y_do5 = y_sol + dy
nota_do5 = crear_redonda(x_notas[8], y_do5, color="#6A1B9A")
etiq_do5 = Text(
"Do₅ (8º)",
font_size=19,
color="#6A1B9A",
weight=BOLD,
).move_to([x_notas[8], y_sol + 6.3 * dy, 0])
self.play(
FadeIn(nota_do5, shift=UP * 0.15),
Write(etiq_do5),
run_time=1.2,
)
# Indicación visual sutil de cómo los armónicos siguientes (9º, 10º, 11º, 12º)
# se estrechan cada vez más en el registro agudo
parciales_agudos = VGroup()
alturas_agudas = [y_sol + 2 * dy, y_sol + 3 * dy, y_sol + 3.5 * dy, y_sol + 4 * dy]
for idx, y_p in enumerate(alturas_agudas):
punto = Dot(
[x_notas[8] + 0.42 + idx * 0.20, y_p, 0],
radius=0.048,
color=GRAY_C,
)
parciales_agudos.add(punto)
self.play(
LaggedStart(*[FadeIn(p, scale=0.7) for p in parciales_agudos], lag_ratio=0.2),
run_time=1.5,
)
self.wait(3.0)
Páginas que mencionan esta página