Prism
GuideCookbookExamplesErrorsPlayground

Cookbook

Six pedagogical patterns, each a full runnable lesson. These are the shapes worth reaching for when authoring a slide — predict-then-reveal, build-the-thing, and so on — not just syntax reference. Edit any one right here.

Predict, then reveal

The learner sketches a guess before the real curve is shown. `reveal { ... }` hides the answer until the exercise is checked — pairs naturally with `sketch`.

Sketch what y=(x−1)2−3y = (x-1)^2 - 3y=(x−1)2−3 looks like before we draw it.
-4-2246-4-2246
Draw the parabola — vertex and both crossings roughly right.
Draw on the scene above, or tab to it and use the arrow keys.

Build the thing

The learner assembles an expression from a token bank instead of picking or typing an answer — good for factoring, simplification, and any step with a well-defined token sequence.

Assemble the factored form of x2+5x+6x^2 + 5x + 6x2+5x+6.
Factor x^2 + 5x + 6.

Fill in the definition

A `build` with a `template` turns a sentence into blanks the learner fills from a bank. Same kind as the token-bank builder above — the only difference is that the literal text around the slots is prose instead of math. Much harder to guess than the equivalent multiple choice, since the distractors sit in the bank rather than next to the answer.

Three things have to line up for a function to be continuous at a point.
Finish the definition.
fff is at aaa when f(a)f(a)f(a) exists, the limit at aaa exists, and the two are .

Step through

A `timeline` walks the learner through a scene one beat at a time — narrate, reveal, animate — instead of dumping the whole picture at once.

-4-224-4-224

Here's f(x) = x².

1/3

Explore, then formalize

Free play with sliders first, so the learner notices the pattern themselves — then a quiz/numeric slide names what they just discovered.

Drag aaa and watch the parabola change. What does it control?
-6-4-2246-6-4-2246
a1
-33

Draw your guess

Like predict-then-reveal, but the answer is a handful of tapped points (`sketch points`) rather than a whole curve — good for intercepts, roots, or landmark values.

Tap where you think y=x2−4y = x^2 - 4y=x2−4 crosses the x-axis.
-4-224-4-22468
Tap both x-intercepts.
Tap the scene above to place points, or tab to it and use the arrow keys.

Parameter hunt

A dashed target curve and a `goal` gate Continue until the learner's sliders match it — turns "adjust these three numbers" into a game with a clear win condition.

Adjust aaa, hhh, kkk until the curve matches the dashed target.
-6-4-2246-6-4-2246
a1
-33
h0
-44
k0
-44
Match the target curveTry a ≈ 0.5, h ≈ 2, k ≈ -1.

Catch the misconception

Name the specific wrong answer you expect, then `onwrong:` sends anyone who picks it to a hidden scaffold slide that re-teaches the missing idea before returning them to the question. Write one detour per misconception, not one per question. The point is to answer *why* they went wrong, which a generic explanation cannot.

The slope between two points on a curve is the average rate of change.
For f(x)=x2f(x) = x^2f(x)=x2, what is the average rate of change from x=1x = 1x=1 to x=3x = 3x=3?