manim-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -0
- package/dist/demo.mp4 +0 -0
- package/dist/index.js +65 -0
- package/dist/mcp-app.html +142 -0
- package/dist/server.js +1492 -0
- package/package.json +67 -0
- package/references/composer/SKILL.md +154 -0
- package/references/composer/references/3b1b-series-patterns.md +217 -0
- package/references/composer/references/domain-planning-guides/calculus-planning.md +188 -0
- package/references/composer/references/domain-planning-guides/linear-algebra-planning.md +169 -0
- package/references/composer/references/domain-planning-guides/ml-planning.md +286 -0
- package/references/composer/references/domain-planning-guides/number-theory-planning.md +187 -0
- package/references/composer/references/domain-planning-guides/physics-planning.md +249 -0
- package/references/composer/references/domain-planning-guides/probability-planning.md +200 -0
- package/references/composer/references/mathematical-storytelling.md +359 -0
- package/references/composer/references/narrative-patterns.md +221 -0
- package/references/composer/references/opening-patterns.md +284 -0
- package/references/composer/references/pacing-guide.md +289 -0
- package/references/composer/references/scene-archetypes.md +534 -0
- package/references/composer/references/scene-examples.md +379 -0
- package/references/composer/references/visual-techniques.md +480 -0
- package/references/composer/templates/scenes-template.md +147 -0
- package/references/manimce/SKILL.md +166 -0
- package/references/manimce/examples/3d_visualization.py +373 -0
- package/references/manimce/examples/basic_animations.py +212 -0
- package/references/manimce/examples/graph_plotting.py +401 -0
- package/references/manimce/examples/lorenz_attractor.py +172 -0
- package/references/manimce/examples/math_visualization.py +315 -0
- package/references/manimce/examples/updater_patterns.py +369 -0
- package/references/manimce/rules/3b1b-translation.md +594 -0
- package/references/manimce/rules/3d.md +254 -0
- package/references/manimce/rules/advanced-animations.md +594 -0
- package/references/manimce/rules/animation-groups.md +212 -0
- package/references/manimce/rules/animations.md +128 -0
- package/references/manimce/rules/api-pitfalls.md +89 -0
- package/references/manimce/rules/axes.md +214 -0
- package/references/manimce/rules/camera.md +208 -0
- package/references/manimce/rules/cli.md +232 -0
- package/references/manimce/rules/color-conventions.md +444 -0
- package/references/manimce/rules/colors.md +199 -0
- package/references/manimce/rules/config.md +264 -0
- package/references/manimce/rules/creation-animations.md +158 -0
- package/references/manimce/rules/graphing.md +233 -0
- package/references/manimce/rules/grouping.md +220 -0
- package/references/manimce/rules/latex.md +202 -0
- package/references/manimce/rules/lines.md +241 -0
- package/references/manimce/rules/long-form-video.md +552 -0
- package/references/manimce/rules/mathematical-domains.md +689 -0
- package/references/manimce/rules/mobjects.md +116 -0
- package/references/manimce/rules/multi-scene-composition.md +112 -0
- package/references/manimce/rules/pedagogy.md +532 -0
- package/references/manimce/rules/physics-simulations.md +610 -0
- package/references/manimce/rules/positioning.md +211 -0
- package/references/manimce/rules/scenes.md +121 -0
- package/references/manimce/rules/shapes.md +300 -0
- package/references/manimce/rules/styling.md +177 -0
- package/references/manimce/rules/text-animations.md +222 -0
- package/references/manimce/rules/text.md +189 -0
- package/references/manimce/rules/timing.md +227 -0
- package/references/manimce/rules/transform-animations.md +157 -0
- package/references/manimce/rules/updaters.md +226 -0
- package/references/manimce/templates/basic_scene.py +64 -0
- package/references/manimce/templates/camera_scene.py +100 -0
- package/references/manimce/templates/threed_scene.py +138 -0
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
# Visual Techniques for Math Animation
|
|
2
|
+
|
|
3
|
+
Effective visualization patterns for explaining mathematical concepts, derived from 400+ 3b1b video source files (2015-2026).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Core Principles
|
|
8
|
+
|
|
9
|
+
### 1. Progressive Disclosure
|
|
10
|
+
Never show everything at once. Build complexity gradually.
|
|
11
|
+
|
|
12
|
+
**Bad:** Show complete equation immediately
|
|
13
|
+
**Good:** Build equation term by term, explaining each part
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Scene flow:
|
|
17
|
+
1. Show simple case: f(x) = x^2
|
|
18
|
+
2. Add complexity: f(x) = ax^2
|
|
19
|
+
3. Full form: f(x) = ax^2 + bx + c
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Real example -- CLT `BuildUpGaussian`** (`_2023/clt/main.py`):
|
|
23
|
+
1. Start with e^(-x^2)
|
|
24
|
+
2. Add the 1/sqrt(2*pi) normalization
|
|
25
|
+
3. Add the sigma parameter
|
|
26
|
+
4. Full Gaussian formula
|
|
27
|
+
|
|
28
|
+
### 2. Transform, Don't Replace
|
|
29
|
+
When possible, morph objects into new forms rather than fading out/in.
|
|
30
|
+
|
|
31
|
+
**Bad:** `FadeOut(equation1)`, `FadeIn(equation2)`
|
|
32
|
+
**Good:** `TransformMatchingTex(equation1, equation2)`
|
|
33
|
+
|
|
34
|
+
This maintains visual continuity and shows the relationship between forms.
|
|
35
|
+
|
|
36
|
+
**From `_2023/clt_proof/main.py`:**
|
|
37
|
+
```python
|
|
38
|
+
self.play(TransformMatchingTex(eq1, eq2, matched_keys=[R"e^{tx}"]))
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**The `matched_keys` parameter** explicitly tells which substrings to match, ensuring smooth morphing of the right terms.
|
|
42
|
+
|
|
43
|
+
### 3. Color as Meaning
|
|
44
|
+
Use color consistently to encode meaning throughout the video.
|
|
45
|
+
|
|
46
|
+
**3b1b Default Palette:**
|
|
47
|
+
- Background: #1C1C1C (dark grey) -- `GREY_E` or darker
|
|
48
|
+
- Primary: #58C4DD (blue) -- `BLUE` or `BLUE_C`
|
|
49
|
+
- Secondary: #83C167 (green) -- `GREEN`
|
|
50
|
+
- Accent: #FFFF00 (yellow) -- `YELLOW`
|
|
51
|
+
- Warning: #FF6666 (red) -- `RED`
|
|
52
|
+
|
|
53
|
+
**Domain-specific color conventions:**
|
|
54
|
+
|
|
55
|
+
| Domain | Convention | Source |
|
|
56
|
+
|--------|-----------|--------|
|
|
57
|
+
| Linear algebra | i-hat=GREEN, j-hat=RED, vector v=YELLOW | EoLA (2016) |
|
|
58
|
+
| Calculus | Input=BLUE, output=GREEN, nudge dx=GREEN, df=YELLOW | EoC (2017) |
|
|
59
|
+
| Probability | Favorable=GREEN, unfavorable=RED, Gaussian=YELLOW | CLT (2023) |
|
|
60
|
+
| Laplace | Time t=BLUE, frequency s=YELLOW | Laplace (2025) |
|
|
61
|
+
| Number theory | Primes=YELLOW | Zeta (2016, 2022) |
|
|
62
|
+
| Epidemiology | Susceptible=BLUE, Infected=RED, Recovered=GREEN | SIR (2020) |
|
|
63
|
+
| ML/Transformers | Positive weights=BLUE gradient, negative=RED gradient | Transformers (2024) |
|
|
64
|
+
|
|
65
|
+
**Implementation via `t2c`:**
|
|
66
|
+
```python
|
|
67
|
+
formula = Tex(
|
|
68
|
+
R"f({t}) = \int e^{-{s}t} dt",
|
|
69
|
+
t2c={"{t}": BLUE, "{s}": YELLOW}
|
|
70
|
+
)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 4. Spatial Relationships
|
|
74
|
+
Position encodes relationships:
|
|
75
|
+
- Left-to-right: transformation, time, causation
|
|
76
|
+
- Top-to-bottom: hierarchy, derivation
|
|
77
|
+
- Center: focus of attention
|
|
78
|
+
- Periphery: context, reference
|
|
79
|
+
|
|
80
|
+
**Commutative diagram layout** (`_2025/laplace/derivatives.py`):
|
|
81
|
+
```python
|
|
82
|
+
terms.arrange_in_grid(h_buff=2.0, v_buff=3.0, fill_rows_first=False)
|
|
83
|
+
# Top-left: f(t) Top-right: F(s)
|
|
84
|
+
# Bottom-left: f'(t) Bottom-right: sF(s) - f(0)
|
|
85
|
+
# Horizontal arrows: Laplace transform
|
|
86
|
+
# Vertical arrows: differentiation / multiplication by s
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Animation Techniques
|
|
92
|
+
|
|
93
|
+
### Highlighting & Focus
|
|
94
|
+
|
|
95
|
+
**`Indicate`** -- Brief flash to draw attention
|
|
96
|
+
```python
|
|
97
|
+
self.play(Indicate(term))
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**`Circumscribe`** -- Circle around important element
|
|
101
|
+
```python
|
|
102
|
+
self.play(Circumscribe(equation, color=YELLOW))
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**`FlashAround`** -- Dramatic attention on revelation (the "aha" animation)
|
|
106
|
+
```python
|
|
107
|
+
self.play(FlashAround(result))
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**`SurroundingRectangle`** -- Box that stays (useful for quiz-style reveals)
|
|
111
|
+
```python
|
|
112
|
+
rect = SurroundingRectangle(term, color=YELLOW, buff=0.1)
|
|
113
|
+
self.play(ShowCreation(rect))
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**`Brace`** -- Point to a sub-expression with label
|
|
117
|
+
```python
|
|
118
|
+
brace = Brace(expression[3:7], DOWN)
|
|
119
|
+
label = brace.get_text("this part")
|
|
120
|
+
self.play(GrowFromCenter(brace), Write(label))
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Equation Manipulation
|
|
124
|
+
|
|
125
|
+
**Isolate terms** -- Color or move specific parts
|
|
126
|
+
```python
|
|
127
|
+
equation.set_color_by_tex("x", BLUE)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Step-by-step derivation** -- Show each algebraic step
|
|
131
|
+
```python
|
|
132
|
+
step1 = Tex(R"2x + 4 = 10")
|
|
133
|
+
step2 = Tex(R"2x = 6")
|
|
134
|
+
step3 = Tex(R"x = 3")
|
|
135
|
+
self.play(TransformMatchingTex(step1, step2))
|
|
136
|
+
self.wait(2)
|
|
137
|
+
self.play(TransformMatchingTex(step2, step3))
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Substitution** -- Show value being plugged in
|
|
141
|
+
```python
|
|
142
|
+
# Animate the number moving into the variable's position
|
|
143
|
+
value = Tex("3", color=BLUE)
|
|
144
|
+
value.move_to(variable)
|
|
145
|
+
self.play(FadeTransform(variable, value))
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Dynamic number labels** (`make_number_changeable`):
|
|
149
|
+
```python
|
|
150
|
+
label = Tex(R"\mu = 0.00")
|
|
151
|
+
decimal = label.make_number_changeable("0.00")
|
|
152
|
+
decimal.add_updater(lambda m: m.set_value(get_mean()))
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Geometric Intuition
|
|
156
|
+
|
|
157
|
+
**Coordinate systems** -- Always label axes
|
|
158
|
+
```python
|
|
159
|
+
axes = Axes(x_range=[-3, 3], y_range=[-2, 2])
|
|
160
|
+
labels = axes.get_axis_labels(x_label="x", y_label="f(x)")
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Trace paths** -- Show how points move
|
|
164
|
+
```python
|
|
165
|
+
trace = TracedPath(dot.get_center, stroke_color=YELLOW)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Area visualization** -- For integrals, sums
|
|
169
|
+
```python
|
|
170
|
+
area = axes.get_area(graph, x_range=[a, b], color=BLUE, opacity=0.5)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Riemann rectangles with progressive refinement:**
|
|
174
|
+
```python
|
|
175
|
+
rects = axes.get_riemann_rectangles(graph, dx=0.1)
|
|
176
|
+
for new_dx in [0.05, 0.01]:
|
|
177
|
+
new_rects = axes.get_riemann_rectangles(graph, dx=new_dx)
|
|
178
|
+
self.play(Transform(rects, new_rects))
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**ValueTracker for interactive parameters:**
|
|
182
|
+
```python
|
|
183
|
+
tracker = ValueTracker(0.5)
|
|
184
|
+
graph = always_redraw(lambda: axes.get_graph(
|
|
185
|
+
lambda x: func(x, tracker.get_value())
|
|
186
|
+
))
|
|
187
|
+
self.play(tracker.animate.set_value(2.0), run_time=3)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### 3D Techniques
|
|
191
|
+
|
|
192
|
+
**Camera orbiting** -- Reveal 3D structure
|
|
193
|
+
```python
|
|
194
|
+
frame = self.frame
|
|
195
|
+
frame.reorient(-40, 70, 0) # theta, phi, gamma
|
|
196
|
+
self.play(frame.animate.reorient(60, 50, 0), run_time=5)
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Field of view** for depth perception:
|
|
200
|
+
```python
|
|
201
|
+
frame.set_field_of_view(20 * DEGREES)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Ambient rotation** for continuous motion:
|
|
205
|
+
```python
|
|
206
|
+
frame.add_updater(lambda m, dt: m.increment_theta(-0.1 * dt))
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Textured surfaces** for realistic objects:
|
|
210
|
+
```python
|
|
211
|
+
earth = TexturedSurface(Sphere(radius=r), "EarthTextureMap", "NightEarthTextureMap")
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Surface mesh** for mathematical surfaces:
|
|
215
|
+
```python
|
|
216
|
+
surface = ParametricSurface(
|
|
217
|
+
lambda u, v: [u, v, func(u, v)],
|
|
218
|
+
u_range=(-3, 3), v_range=(-3, 3), resolution=(101, 101)
|
|
219
|
+
)
|
|
220
|
+
surface.set_shading(0.1, 0.1, 0.1)
|
|
221
|
+
mesh = SurfaceMesh(surface, resolution=(21, 21))
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Clip planes** for cross-sections:
|
|
225
|
+
```python
|
|
226
|
+
surface.set_clip_plane(IN, 0)
|
|
227
|
+
self.play(surface.animate.set_clip_plane(IN, radius))
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Depth sorting:**
|
|
231
|
+
```python
|
|
232
|
+
body.sort(lambda p: np.dot(p, [-1, 1, 1]))
|
|
233
|
+
sphere.always_sort_to_camera(self.camera)
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Floor plane for grounding 3D scenes:**
|
|
237
|
+
```python
|
|
238
|
+
self.set_floor_plane("xz")
|
|
239
|
+
self.camera.light_source.move_to([-5, 5, 10])
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Composite Animations
|
|
243
|
+
|
|
244
|
+
**LaggedStartMap** -- Sequential group reveal (the workhorse):
|
|
245
|
+
```python
|
|
246
|
+
self.play(LaggedStartMap(FadeIn, group, lag_ratio=0.1))
|
|
247
|
+
self.play(LaggedStartMap(ShowCreation, arrows, lag_ratio=0.5))
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**LaggedStart** -- Staggered individual animations:
|
|
251
|
+
```python
|
|
252
|
+
self.play(LaggedStart(
|
|
253
|
+
stds[1].says("But why?", mode="sassy"),
|
|
254
|
+
stds[0].change('confused'),
|
|
255
|
+
morty.change("guilty"),
|
|
256
|
+
lag_ratio=0.3
|
|
257
|
+
))
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**AnimationGroup** -- Simultaneous with different timings:
|
|
261
|
+
```python
|
|
262
|
+
self.play(AnimationGroup(
|
|
263
|
+
ShowCreation(arrow),
|
|
264
|
+
MoveToTarget(dot, rate_func=rush_into),
|
|
265
|
+
numberline.numbers[n].animate.set_color(YELLOW),
|
|
266
|
+
))
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**`time_span` for staggered timing within one play() call:**
|
|
270
|
+
```python
|
|
271
|
+
# From _2022/zeta/part1.py
|
|
272
|
+
anims.append(self.get_prime_animation(
|
|
273
|
+
numberline, n,
|
|
274
|
+
run_time=11,
|
|
275
|
+
time_span=(t, t + 1) # Each prime appears at a different time
|
|
276
|
+
))
|
|
277
|
+
self.play(*anims)
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**VShowPassingFlash** -- Flowing attention:
|
|
281
|
+
```python
|
|
282
|
+
self.play(VShowPassingFlash(arc, time_width=2))
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**VFadeInThenOut** -- Temporary element:
|
|
286
|
+
```python
|
|
287
|
+
self.play(VFadeInThenOut(arrow))
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## Common Visual Metaphors
|
|
293
|
+
|
|
294
|
+
### Vectors as Arrows
|
|
295
|
+
- Position vectors: arrows from origin (GREEN for i-hat, RED for j-hat)
|
|
296
|
+
- Addition: tip-to-tail
|
|
297
|
+
- Scaling: stretching/shrinking
|
|
298
|
+
|
|
299
|
+
### Functions as Machines
|
|
300
|
+
- MachineWithDials from Transformers series
|
|
301
|
+
- Input goes in one side, output comes out
|
|
302
|
+
- Dials represent tunable parameters
|
|
303
|
+
|
|
304
|
+
### Matrices as Transformations
|
|
305
|
+
- Show grid being transformed (NumberPlane + apply_matrix)
|
|
306
|
+
- Track where basis vectors go
|
|
307
|
+
- Emphasize determinant as area scaling
|
|
308
|
+
|
|
309
|
+
### Derivatives as Slopes / Nudges
|
|
310
|
+
- Tangent line touching curve
|
|
311
|
+
- Zoom in to show local linearity
|
|
312
|
+
- "Nudge" dx creates resulting df
|
|
313
|
+
|
|
314
|
+
### Integrals as Accumulation
|
|
315
|
+
- Riemann sums with rectangles
|
|
316
|
+
- Width -> 0 animation
|
|
317
|
+
- Area filling under curve
|
|
318
|
+
- Slider for moving upper bound
|
|
319
|
+
|
|
320
|
+
### Probability as Population Frequency
|
|
321
|
+
- Grid of dots/people
|
|
322
|
+
- Color subsets by property
|
|
323
|
+
- Count directly: no formulas needed
|
|
324
|
+
|
|
325
|
+
### Attention as Arcs Between Tokens
|
|
326
|
+
- From `_2024/transformers/`:
|
|
327
|
+
- Curved arcs connecting token positions
|
|
328
|
+
- Width/color encode attention weight
|
|
329
|
+
- Flow animation with VShowPassingFlash
|
|
330
|
+
|
|
331
|
+
### Optimization as Landscape
|
|
332
|
+
- Function as 3D surface
|
|
333
|
+
- Gradient descent as ball rolling downhill
|
|
334
|
+
- Local minima as valleys
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Scene Composition Layouts
|
|
339
|
+
|
|
340
|
+
### The Golden Layout (Default)
|
|
341
|
+
```
|
|
342
|
+
+------------------------------------+
|
|
343
|
+
| TITLE/CONTEXT | (top edge, small)
|
|
344
|
+
+------------------------------------+
|
|
345
|
+
| |
|
|
346
|
+
| MAIN VISUALIZATION | (center, largest area)
|
|
347
|
+
| |
|
|
348
|
+
+------------------------------------+
|
|
349
|
+
| EQUATION / FORMULA | (bottom third)
|
|
350
|
+
+------------------------------------+
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Side-by-Side Comparison
|
|
354
|
+
```
|
|
355
|
+
+----------------+----------------+
|
|
356
|
+
| CONCEPT A / | CONCEPT B / |
|
|
357
|
+
| BEFORE / | AFTER / |
|
|
358
|
+
| TIME DOMAIN | FREQ DOMAIN |
|
|
359
|
+
+----------------+----------------+
|
|
360
|
+
```
|
|
361
|
+
Use `FullScreenRectangle().stretch(0.5, 0)` with tinted fill for domain coloring.
|
|
362
|
+
|
|
363
|
+
### Phase Space Dual View
|
|
364
|
+
```
|
|
365
|
+
+------------------------------------+
|
|
366
|
+
| PHYSICAL SYSTEM | PHASE SPACE |
|
|
367
|
+
| (simulation) | (portrait) |
|
|
368
|
+
+------------------------------------+
|
|
369
|
+
```
|
|
370
|
+
Linked via updaters.
|
|
371
|
+
|
|
372
|
+
### Zoomed Detail
|
|
373
|
+
```
|
|
374
|
+
+------------------------------------+
|
|
375
|
+
| +--------+ |
|
|
376
|
+
| | ZOOM | <-- magnified detail |
|
|
377
|
+
| +--------+ |
|
|
378
|
+
| Main context |
|
|
379
|
+
+------------------------------------+
|
|
380
|
+
```
|
|
381
|
+
Use `frame.animate.set_height(smaller)` + `frame.animate.move_to(target)`.
|
|
382
|
+
|
|
383
|
+
### Stacked Derivation
|
|
384
|
+
```
|
|
385
|
+
+------------------------------------+
|
|
386
|
+
| Step 1: equation |
|
|
387
|
+
| || |
|
|
388
|
+
| Step 2: equation |
|
|
389
|
+
| || |
|
|
390
|
+
| Step 3: equation (highlight!) |
|
|
391
|
+
+------------------------------------+
|
|
392
|
+
```
|
|
393
|
+
Use `TransformMatchingTex` between steps, `SurroundingRectangle` on final result.
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Timing Guidelines
|
|
398
|
+
|
|
399
|
+
| Action | Typical Duration |
|
|
400
|
+
|--------|------------------|
|
|
401
|
+
| Simple shape creation (FadeIn) | 0.5-1s |
|
|
402
|
+
| Text/equation writing (Write) | 1-2s |
|
|
403
|
+
| Shape transformation (Transform) | 1-2s |
|
|
404
|
+
| Equation morphing (TransformMatchingTex) | 1-2s |
|
|
405
|
+
| Grid transformation (apply_matrix) | 2-3s |
|
|
406
|
+
| Camera movement (3D reorient) | 3-5s |
|
|
407
|
+
| Camera zoom (set_height) | 2-3s |
|
|
408
|
+
| Pause for absorption | 1-3s |
|
|
409
|
+
| Complex animation (LaggedStartMap) | 3-5s |
|
|
410
|
+
| Opening quote author write | 4-5s |
|
|
411
|
+
| FlashAround (aha moment) | 0.5-1s |
|
|
412
|
+
|
|
413
|
+
### Rhythm Pattern
|
|
414
|
+
Fast-fast-SLOW-fast-fast-SLOW
|
|
415
|
+
|
|
416
|
+
Quick animations for setup, slow down for key insights. The longest waits come after the most significant reveals.
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## Readability Techniques
|
|
421
|
+
|
|
422
|
+
### Backstroke for Text Over Complex Backgrounds
|
|
423
|
+
```python
|
|
424
|
+
text.set_backstroke(BLACK, 5)
|
|
425
|
+
```
|
|
426
|
+
Essential when text overlays a colorful scene.
|
|
427
|
+
|
|
428
|
+
### GlowDot for Points of Interest
|
|
429
|
+
```python
|
|
430
|
+
dot = GlowDot(point, color=YELLOW, radius=0.2)
|
|
431
|
+
```
|
|
432
|
+
Creates a soft glow around a point, drawing attention without harsh edges.
|
|
433
|
+
|
|
434
|
+
### Gradient Coloring for Ordered Sets
|
|
435
|
+
```python
|
|
436
|
+
bars.set_submobject_colors_by_gradient(BLUE, GREEN)
|
|
437
|
+
# or
|
|
438
|
+
bars.set_submobject_colors_by_gradient(TEAL, YELLOW)
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### HSL Interpolation for Smooth Color Transitions
|
|
442
|
+
```python
|
|
443
|
+
color = interpolate_color_by_hsl(TEAL, RED, alpha)
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## Color Palettes
|
|
449
|
+
|
|
450
|
+
### Classic 3b1b
|
|
451
|
+
- Background: #1C1C1C (dark grey)
|
|
452
|
+
- Primary: #58C4DD (blue)
|
|
453
|
+
- Secondary: #83C167 (green)
|
|
454
|
+
- Accent: #FFFF00 (yellow)
|
|
455
|
+
- Warning: #FF6666 (red)
|
|
456
|
+
- Text: #FFFFFF (white)
|
|
457
|
+
|
|
458
|
+
### Laplace Transform
|
|
459
|
+
- Time domain: BLUE
|
|
460
|
+
- Frequency domain: YELLOW
|
|
461
|
+
- Background: standard dark
|
|
462
|
+
|
|
463
|
+
### Transformers / ML
|
|
464
|
+
- Positive values: BLUE gradient (BLUE_E to BLUE_B)
|
|
465
|
+
- Negative values: RED gradient (RED_E to RED_B)
|
|
466
|
+
- Highlighted/selected: TEAL or YELLOW
|
|
467
|
+
- Token rectangles: pastel variants
|
|
468
|
+
|
|
469
|
+
### Fourier / Signal Processing
|
|
470
|
+
- Time domain: standard colors
|
|
471
|
+
- Frequency domain ("Fourier Land"): TEAL-tinted background
|
|
472
|
+
- Individual frequencies: spectral rainbow
|
|
473
|
+
|
|
474
|
+
### Phase-Based (Complex Analysis)
|
|
475
|
+
```python
|
|
476
|
+
def z_to_color(z, sat=0.5, lum=0.5):
|
|
477
|
+
angle = math.atan2(z.imag, z.real)
|
|
478
|
+
return Color(hsl=(angle / TAU, sat, lum))
|
|
479
|
+
```
|
|
480
|
+
Maps complex phase angle to hue, creating rainbow-colored complex function plots.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# [Video Title]
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
- **Topic**: [Core mathematical/scientific concept]
|
|
5
|
+
- **Hook**: [Opening question or mystery that draws viewers in]
|
|
6
|
+
- **Target Audience**: [Prerequisites - what math/science background is assumed]
|
|
7
|
+
- **Estimated Length**: [X minutes]
|
|
8
|
+
- **Key Insight**: [The central "aha moment" - the one thing viewers should remember]
|
|
9
|
+
|
|
10
|
+
## Narrative Arc
|
|
11
|
+
[2-3 sentences describing the emotional and intellectual journey. Example: "We start with a puzzling observation, investigate why it's true, and discover a beautiful underlying principle that connects seemingly different ideas."]
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Scene 1: [Scene Name]
|
|
16
|
+
**Duration**: ~X seconds
|
|
17
|
+
**Purpose**: [What this scene accomplishes in the overall narrative]
|
|
18
|
+
|
|
19
|
+
### Visual Elements
|
|
20
|
+
- [Mobject 1: description, color, position]
|
|
21
|
+
- [Mobject 2: description, color, position]
|
|
22
|
+
- [Animation sequence]
|
|
23
|
+
- [Camera movements if any]
|
|
24
|
+
|
|
25
|
+
### Content
|
|
26
|
+
[Detailed description of what happens visually and conceptually. Be specific enough that someone could implement this scene.]
|
|
27
|
+
|
|
28
|
+
### Narration Notes
|
|
29
|
+
[Key points to convey, suggested tone, pacing. Not a full script, but guidance.]
|
|
30
|
+
|
|
31
|
+
### Technical Notes
|
|
32
|
+
- [Specific Manim classes to use]
|
|
33
|
+
- [Tricky implementations or gotchas]
|
|
34
|
+
- [Dependencies on previous scenes]
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Scene 2: [Scene Name]
|
|
39
|
+
**Duration**: ~X seconds
|
|
40
|
+
**Purpose**: [Purpose]
|
|
41
|
+
|
|
42
|
+
### Visual Elements
|
|
43
|
+
- [List elements]
|
|
44
|
+
|
|
45
|
+
### Content
|
|
46
|
+
[Description]
|
|
47
|
+
|
|
48
|
+
### Narration Notes
|
|
49
|
+
[Notes]
|
|
50
|
+
|
|
51
|
+
### Technical Notes
|
|
52
|
+
- [Notes]
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Scene 3: [Scene Name]
|
|
57
|
+
**Duration**: ~X seconds
|
|
58
|
+
**Purpose**: [Purpose]
|
|
59
|
+
|
|
60
|
+
### Visual Elements
|
|
61
|
+
- [List elements]
|
|
62
|
+
|
|
63
|
+
### Content
|
|
64
|
+
[Description]
|
|
65
|
+
|
|
66
|
+
### Narration Notes
|
|
67
|
+
[Notes]
|
|
68
|
+
|
|
69
|
+
### Technical Notes
|
|
70
|
+
- [Notes]
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
[Add more scenes as needed]
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Transitions & Flow
|
|
79
|
+
|
|
80
|
+
### Scene Connections
|
|
81
|
+
- Scene 1 → Scene 2: [How they connect, what carries over visually]
|
|
82
|
+
- Scene 2 → Scene 3: [Connection]
|
|
83
|
+
- [Continue for all transitions]
|
|
84
|
+
|
|
85
|
+
### Recurring Visual Motifs
|
|
86
|
+
- [Element that appears throughout, providing continuity]
|
|
87
|
+
- [Color or shape that reinforces key concept]
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Color Palette
|
|
92
|
+
|
|
93
|
+
| Role | Color | Hex | Usage |
|
|
94
|
+
|------|-------|-----|-------|
|
|
95
|
+
| Primary | [e.g., Blue] | #58C4DD | [Main objects, key terms] |
|
|
96
|
+
| Secondary | [e.g., Green] | #83C167 | [Results, outputs] |
|
|
97
|
+
| Accent | [e.g., Yellow] | #FFFF00 | [Highlights, emphasis] |
|
|
98
|
+
| Warning | [e.g., Red] | #FF6666 | [Errors, negatives] |
|
|
99
|
+
| Background | [e.g., Dark grey] | #1C1C1C | [Scene background] |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Mathematical Content
|
|
104
|
+
|
|
105
|
+
### Equations to Render
|
|
106
|
+
1. `[LaTeX equation 1]` - used in Scene X
|
|
107
|
+
2. `[LaTeX equation 2]` - used in Scene Y
|
|
108
|
+
3. [Continue...]
|
|
109
|
+
|
|
110
|
+
### Graphs/Plots
|
|
111
|
+
1. [Function 1]: domain, key features
|
|
112
|
+
2. [Function 2]: domain, key features
|
|
113
|
+
|
|
114
|
+
### Geometric Objects
|
|
115
|
+
1. [Object]: properties, how it transforms
|
|
116
|
+
2. [Continue...]
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Implementation Order
|
|
121
|
+
|
|
122
|
+
Suggested order for building scenes (accounting for dependencies):
|
|
123
|
+
|
|
124
|
+
1. **[Scene name]** - [Why first: standalone, establishes base objects]
|
|
125
|
+
2. **[Scene name]** - [Dependency notes]
|
|
126
|
+
3. **[Scene name]** - [Dependency notes]
|
|
127
|
+
4. [Continue...]
|
|
128
|
+
|
|
129
|
+
### Shared Components
|
|
130
|
+
Objects or code that should be defined once and reused:
|
|
131
|
+
- [Component 1]: used in Scenes X, Y, Z
|
|
132
|
+
- [Component 2]: used in Scenes A, B
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Open Questions / Decisions Needed
|
|
137
|
+
|
|
138
|
+
- [ ] [Question about scope, implementation, or creative direction]
|
|
139
|
+
- [ ] [Another decision point]
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Reference Material
|
|
144
|
+
|
|
145
|
+
- [Link or citation to source material]
|
|
146
|
+
- [Inspiration videos or images]
|
|
147
|
+
- [Academic papers if relevant]
|