Kordor Pyrbot

I make 2D motion graphics and explainers in code.

React, TypeScript and Remotion. The numbers on screen are calculated, each piece re-renders from its inputs, and everything lives in Git.

Animated explainers

Three technical explainers, 74 to 83 seconds each, on real-world uses of algebra, calculus and trigonometry. Each one answers a single question and shows how something works rather than selling it.

Where does a thrown ball land?

A quadratic equation answers three questions about one throw: when it lands, how high it goes, and whether it can reach a 15 m ledge.

  1. Model
  2. Land
  3. Peak
  4. Reach
  • The throw becomes the graph: the ground turns into the time axis and the ball's path into the curve.
  • Every number comes from three inputs. Change the launch speed in Remotion Studio and the whole video works itself out again.
  • The discriminant is a line sliding down the graph: no crossing, one touch, then two crossings as D changes sign.
Length
1:14, 1920 × 1080
Source
src/videos/quadratic
Read the script

Throw a ball, and its height follows a quadratic equation.

Here's the model: the height h, in metres, t seconds after the throw.

Gravity pulls back with 4.9t². The launch adds 15t. It starts 2 m up.

Replay the throw: the curve tracks the ball exactly.

First question: when does it land?

Landing means the height is zero, so solve h(t) = 0.

Read off a, b and c, and use the quadratic formula.

Two answers. The landing is 3.19 s.

−0.13 s is before the throw, so we drop it.

Second question: how high does it go?

The peak sits halfway between the roots, at t = −b ÷ 2a.

That's 1.53 s in, at 13.48 m.

Last question: can it reach a 15 m ledge?

Set the height to the ledge, and check the discriminant, b² − 4ac.

It's negative: no real solution. The ball peaks 1.52 m short.

Slide the line down: at D = 0 it touches the peak; above zero, it crosses twice.

One equation, three answers: when, how high, and whether.

What does a speedometer measure?

Speed is distance over time, and an instant has no time in it. The derivative resolves that, and a car makes it visible.

  1. Distance
  2. Average
  3. Instant
  4. Tangent
  5. Rule
  • The road runs beside the distance axis, so the car's place on the road is the height of the graph.
  • The secant's gap shrinks from 4 s to 0.01 s while a table records the average settling on 14.4 m/s.
  • A tangent slides along the curve and drives a live speedometer and the speed graph at the same time.
Length
1:23, 1920 × 1080
Source
src/videos/derivative
Read the script

Your speedometer shows your speed right now, at a single instant.

But speed is distance over time, and an instant has no time in it.

Here's a car pulling away from a light. Its distance s, after t seconds:

It speeds up, then brakes for the next light: 150 m in 10 s.

Every point on the curve is where the car is at that moment.

Average speed is easy: distance ÷ time, the slope of the line joining two moments.

From 2 s to 6 s the car covers 81.6 m in 4 s: an average of 20.4 m/s.

But at 2 s the car is still slow. That average overshoots.

So shrink the gap. Keep the start at 2 s and bring the end closer.

The line swings round, and the average settles...

...on 14.4 m/s. That limit is the speed at the instant: the derivative.

On the graph, it's the slope of the tangent: the line that just grazes the curve.

Slide the tangent along, and its slope is the speedometer.

Steep means fast. Flat means stopped.

Its slope at every moment draws a new graph: speed against time.

Calculus gives that formula in one step, with the power rule.

At 2 s it gives 14.4 m/s: the same as the limit.

Top speed at 5 s: 22.5 m/s, about 81 km/h. At 10 s: zero.

Speed is the slope of distance. That's the derivative.

And the slope of speed? Acceleration: the derivative, again.

How does a game turret aim?

Two positions in, one angle out. Plain arctan gets it right on one side of the screen and backwards on the other; atan2 fixes it.

  1. Triangle
  2. Track
  3. The bug
  4. atan2
  5. In games
  • The bug is shown, not described: when the target crosses to the left, the turret turns red and aims the opposite way.
  • The code on screen changes from Math.atan to Math.atan2, the way a developer would meet the fix.
  • The homing missiles are a real steering simulation: atan2 plus a turn-rate limit, deterministic so every frame renders the same.
Length
1:23, 1920 × 1080
Source
src/videos/arctan
Read the script

A turret tracks its target every frame. How does it know which way to point?

The game knows two positions: the turret, and the target.

The gaps between them, dx and dy, make a right triangle.

Opposite over adjacent is tan θ, so the angle is its inverse: arctan(dy ÷ dx).

Here that's arctan(0.75): 36.9°.

Recompute it every frame, and the turret follows the target.

So far, so good. But watch what happens when the target goes left.

Watch the turret. The target swings round behind it...

...and the turret aims the opposite way.

(−4, −3) gives the same ratio as (4, 3): 0.75. Plain arctan can't tell them apart.

And straight above, dx is zero: the ratio divides by zero.

The fix is one function: atan2, which takes dy and dx separately.

Because it sees both signs, it knows the quadrant, and dx = 0 is fine.

Send the target all the way round: atan2 covers the full circle, −180° to 180°.

You'll find it everywhere in games: aiming, facing the player, reading a joystick...

...and homing missiles, which turn toward atan2 a little every frame.

Two positions in, one angle out: atan2(dy, dx).

Fashion in motion

Three pieces in three formats, to show range: a technical flat taken apart, a textile study, and a social reel cut to the beat. Every garment, pattern and motif is drawn in code.

Anatomy of a Shirt

A button-down drawn as a technical flat comes apart into its 11 pattern pieces, is measured, and is sewn back together seam by seam before changing cloth on the beat. The pieces are data: every move is a spring between two layouts, and every measurement is read from the geometry.

Length
0:36, 1920 × 1080
Source
src/videos/shirt-anatomy

Houndstooth

How the pattern is really made. An 8 × 8 repeat on point paper becomes a field, then a close-up of the threads: a 2/2 twill with four dark and four light ends, relaxing back into the pattern. One weave function draws every view, and the last frame loops into the first.

Length
0:24, 1080 × 1080
Source
src/videos/houndstooth

The Festive Edit

A collection-drop reel for a fictional label, cut on a 120 BPM beat: a split-flap date, three looks whose borders, mirrors and buttons draw on, a block-printed colour story and a lantern end card.

Length
0:22, 1080 × 1920
Source
src/videos/festive-drop

How it's built

The six pieces share one kit: design tokens, motion helpers and a set of components for video. A new explainer starts from parts that already look right together, and a change to the kit reaches every piece.

Motion
Eased, clamped, staggered entrances and quicker exits, all timed in seconds.
Text
Word-by-word reveals, and captions that also export as WebVTT.
Diagrams
SVG paths that draw themselves on, arrows, angles and labelled callouts.
Charts
Plots written in graph units, with axes, guides and tangents.
Maths
Equations built from spans, so one term can enter or light up on its own.
Code
Typed-in code with syntax colour and line focus.
Readouts
A gauge, counting numbers and a chapter bar for course modules.
Media
Sound placed on its frame, and Lottie files recoloured to the theme.
// Beat sheet for the quadratic explainer, in seconds. Every animation and
// caption keys off these, so retiming a chapter moves everything in it.
export const T = {
  launch: 1.3, model: 6, replay: 13.2, land: 17,
  peak: 35, reach: 46.5, sweep: 57.4, recap: 64.5, end: 74,
} as const;

// Nothing on screen is typed in by hand: it is all derived from the props.
const q = projectile(props.launchSpeed, props.startHeight);
const [before, landing] = solveQuadratic(q);
const peak = vertex(q);