Textbook curves, made to share one room.
Five to seven curves from the back of a maths textbook: a torus knot, a Lissajous figure, Viviani’s curve, a trefoil, a rose, a spirograph, a rhumb line, a narrowing helix. Each one is fitted into the same ball, turned at random and nudged off the centre, so they keep passing through each other. Every formula is drawn whole as a hairline, and a heavy ribbon twists along part of it. One of them is signal orange. The label names the formulas on show.
Play it and it turns. Every so often the ribbons draw back along their curves and another set traces itself in. Switch the ground to paper to draw it in black on white.
javascript·typoi.js
// a (p, q) torus knot: p times around the axis, q times through the hole
const knot = (t) => {
const k = 1 + r * cos(q * t);
return [k * cos(p * t), k * sin(p * t), r * sin(q * t)];
};
// three sines at whole-number frequencies
const lissajous = (t) => [sin(a * t + phase), sin(b * t), sin(c * t + shift)];
// where a sphere meets a cylinder through its centre
const viviani = (t) => [1 + cos(t), sin(t), 2 * sin(t / 2)];
One room
javascript·typoi.js
// fit each formula into a unit ball, then turn it, size it and push it off the centre
const place = (t) => shift + rotate(turn, curve(t) - centre) * (size / reach);
const turn = quaternion(sqrt(1 - u1) * sin(u2), sqrt(1 - u1) * cos(u2), sqrt(u1) * sin(u3), sqrt(u1) * cos(u3));
References