| name | ap-precalc-manim |
| description | Use whenever the user is producing AP Precalculus Manim explainer videos in this project, including writing narration, storyboards, scenes.py, shared helpers, or reviewing renders. This skill enforces the project's 3Blue1Brown-inspired visual methodology, the six-stage production pipeline, ManimGL conventions, and the quality bar (one core idea, one anchor example, one misconception, AP-style takeaway).
|
AP Precalculus Manim Video Production
This skill governs the creation of 8–10 minute ManimGL explainer videos for AP Precalculus. It encodes the project's production pipeline, visual style, and the visual-explanation methodology extracted from 3Blue1Brown's actual production scripts.
When to use this skill
- Writing or editing a lesson's
transcript_clean.md, concept_extract.md, narration.md, storyboard.md, or scenes.py.
- Designing a new shared helper in
Manim/shared/.
- Reviewing a render, storyboard, or scene timing.
- Planning how to illustrate a precalculus concept visually.
- Refactoring existing scenes to match the project's quality bar.
Core teaching principle
Make the equation a consequence of the picture, not the starting point.
Every explanation must begin with a concrete visual object, motion, or geometric setup. Symbols arrive only after the viewer can already see what they refer to.
Six-stage production pipeline
Do not skip stages.
transcript_clean.md — clean the .srt transcript into plain prose.
concept_extract.md — identify core idea, takeaways, misconceptions, anchor example.
narration.md — write the TTS-ready script (1100–1400 words).
audio.mp3 + audio.srt — generate with mmx speech synthesize --subtitles.
storyboard.md — plan 12–16 scenes using exact .srt timings.
scenes.py — implement Manim scenes synced to narration.
- Render and review.
Narration rules (MOSHI TTS via mmx)
- Plain text only — no markdown in
narration.md.
- Short sentences, one concept per sentence.
- Spell out math: "x squared plus three x minus two", "three over four", "negative three".
- Greek letters phonetically: "pie", "theta", "alpha".
- Functions: "f of x", "sine of x", "the natural log of x".
- Use
<#0.5#> for explicit pauses.
- Use audio tags for emphasis:
(clears-throat), (chuckle).
- Generate subtitles:
mmx speech synthesize --text-file narration.md --out audio.mp3 --voice moss_audio_a1fe338b-7041-11f1-ae71-da201e9a1a2f --subtitles.
Scene architecture
- One
scenes.py per lesson.
- Multiple
Scene subclasses, one core idea each.
- Descriptive class names:
IntroHook, VisualDefinition, AnchorExample, Misconception, APTakeaway.
- Each scene: 15–60 seconds, matching
.srt cue duration.
- Use
self.wait() to pad to the next subtitle boundary.
Reveal order within a scene
- Visual object (axes, graph, circle, grid).
- Labels, one at a time, color-matched.
- Question or trouble point.
- Animated answer (motion, transform, deformation).
- Equation or formal statement last.
Animation vocabulary
Use these ManimGL techniques as the standard toolkit:
UpdateFromAlphaFunc — animate parameters of a single group in place.
LaggedStart / LaggedStartMap — stagger reveals across groups.
generate_target + MoveToTarget — pre-plan complex repositioning.
TransformMatchingTex — morph equations while keeping matching symbols.
ApplyPointwiseFunction — warp number lines or planes for transformations.
add_updater / clear_updaters — sync labels to moving points.
interpolate / interpolate_color — smooth numeric or color transitions.
Visual explanation strategies
- Color-coded quantities: assign one color per role and reuse it in graphs, labels, and equations.
- Braces as rulers: label rise/run, arc length, amplitude, period with
Brace + text.
- Zoomed insets: magnify regions for limits or local behavior.
- Input–output mappings: show functions moving points, not just as static graphs.
- Before/after comparisons: keep a faded copy of the original during transforms.
- Linked representations: tie the unit circle to the wave graph, physical motion to the graph.
- Misconception visuals: name the common error and correct it on screen.
Style rules
- Background: dark (
#1C1C1C or DARK_BLUE).
- Axes: grey/white, thin.
- Text:
Text() for English, Tex() for math. No MathTex().
- Minimum font size: 24 pt at 1080p.
- Use
set_backstroke() or set_stroke(BLACK, width, background=True) for text over busy backgrounds.
- Layout with
arrange, next_to, to_edge, shift_onto_screen. Avoid magic coordinates.
- Semantic color palette:
- Function/output: BLUE
- Input/time: YELLOW
- Slope/rate: GREEN
- Secant/comparison: YELLOW or ORANGE
- Tangent/limit/error: RED
- Highlight: TEAL
ManimGL conventions
- Import with
from manimlib import *.
- Use
Tex() for LaTeX, not MathTex().
- Use
ShowCreation, not Create.
- Use
InteractiveScene or Scene as appropriate.
- Camera:
self.frame for ManimGL.
- Render low quality first:
manimgl scenes.py SceneName -l.
- Render final:
manimgl scenes.py SceneName -ow.
- Combine scenes with ffmpeg; always re-encode audio to AAC, never
-c:a copy.
Shared library
Import reusable components from Manim/shared/:
from Manim.shared.style import *
from Manim.shared.axes import make_axes
from Manim.shared.graphing import plot_function, trace_point
from Manim.shared.graph_animations import (
get_secant_slope_group,
animate_secant_slope_group_change,
get_vertical_line_to_graph,
get_graph_label,
get_area,
animate_area_bounds,
)
from Manim.shared.transform_animations import (
warp_number_line,
warp_plane,
animate_reflect_over_y_eq_x,
)
from Manim.shared.trig_animations import (
radial_arm,
sine_length_group,
unit_circle_to_wave_updater,
)
from Manim.shared.annotations import (
point_label,
bracket,
brace_with_label,
surrounding_highlight,
cross_out,
connecting_arrow,
)
from Manim.shared.rates import secant_line, secant_slope_label
Do not duplicate shared logic in individual scenes.py files.
Quality bar
Every final video must:
- Explain one core idea clearly.
- Rely on visuals more than screen text.
- Use consistent colors and graph styling.
- Include one strong worked example.
- Address at least one common misconception.
- End with a concise AP-style takeaway.
Pitfalls to avoid
- Do not narrate what is already obvious on screen.
- Do not use one giant
construct() method.
- Do not render final quality until storyboard timing is approved.
- Do not forget to sync scene timing with
.srt cues.
- Do not show equations before the visual object they name.
- Do not use
-c:a copy when muxing audio.
Reference files
For deeper guidance, read these project documents:
docs/3b1b_methodology.md — full 3Blue1Brown-derived visual methodology.
docs/3b1b_helper_catalog.md — catalog of helpers to port or adapt.
AGENTS.md — TTS and production pipeline rules.
DESIGN.md — visual design tokens and composition rules.
measure/product.md — product definition and success metrics.
measure/product-guidelines.md — voice, tone, math content rules.
manim_video_production_plan.md — overall production plan and pilot lessons.
Typical workflow when asked to produce a lesson
- Confirm the lesson ID and locate the source transcript.
- Write
transcript_clean.md.
- Write
concept_extract.md.
- Write
narration.md following the TTS rules.
- Generate
audio.mp3 + audio.srt with mmx.
- Write
storyboard.md with 12–16 scenes timed to the .srt.
- Implement
scenes.py using Manim/shared/ helpers and the animation vocabulary above.
- Render low quality, review pacing, then render final.
Typical workflow when asked to fix a scene
- Read the scene's
storyboard.md entry and the matching .srt cues.
- Identify whether the problem is timing, clarity, visual hierarchy, or animation mechanics.
- Apply the reveal-order and pacing rules.
- Prefer motion and transformation over replacement or static text.
- Verify the scene still matches its
.srt duration.