# Seifert Surface — `seifert-surface@1.0.0`

A translucent shimmering band with three half-twists whose single glowing edge is a trefoil knot, pulses of light running round it. Loops perfectly.

A knot you can hold a film across. The trefoil, the simplest knot, is the single edge of a band given three half-twists, so a soap film spanning it is a ribbon that twists three times as it goes round, with one side, one edge, and that edge tied in a knot. Here the band is a translucent, shimmering surface with a glowing knotted edge along which pulses of light run while the whole thing turns. Choose the finish (shimmer, rose, gold or ink), the width of the band, the number of pulses, the laps they make per loop, the turns of the knot per loop, the seed, the backdrop colour and whether the camera sways.

- Kind: object; status: published; digest sha256:6f26abd6c80c95e20cf9ffb6f99233a486f623056d919775d6bf040604e8c521
- Role: Object (3D, three.js): a knot-theory showpiece for maths, science and design content.
- Implementation: three; entry `src/seifert-surface.js`
- Files: https://aipixelwizard.com/registry/seifert-surface/1.0.0/<path> (`LICENSE`, `asset.json`, `demo.js`, `index.html`, `src/seifert-surface.js`)
- Manifest JSON: https://aipixelwizard.com/api/v1/visuals/seifert-surface/versions/1.0.0
- Runnable demo: https://aipixelwizard.com/registry/seifert-surface/1.0.0/index.html (open over http; it imports sibling packages by relative path)
- Dependencies (exact): `three@0.185.1` (source) — Renderer, geometry and shader materials.; `chrome-material@1.1.0` (demo) — Studio environment light, backdrop and contact shadow.; `apw-runtime@1.0.0` (demo) — Demo harness.

## Exports
- `createSeifertSurface({ finish?, width?, pulses?, laps?, turns?, seed? }) => { group, setProgress(progress), dispose() }` — The twisted band, its glowing knotted edge and the pulses of light, about 7 across, centred on the origin; needs an environment map.
- `FINISHES: { shimmer, rose, gold, ink }` — Band colour, iridescence, opacity and the edge and pulse colours.

## Parameters
- `finish` (select one of shimmer | rose | gold | ink, default "shimmer") — Finish
- `width` (number 0.6–1.4, default 1) — Band width
- `pulses` (integer 0–40, default 14) — Pulses
- `laps` (integer 1–3, default 1) — Pulse laps per loop
- `turns` (integer 0–3, default 1) — Knot turns per loop
- `seed` (integer 1–999, default 18) — Seed
- `background` (color, default "#10141f") — Backdrop
- `orbit` (boolean, default true) — Camera sway

## Composition
- Inputs: Time within the loop; the finish, band width, pulses, laps, turns, seed, backdrop and camera sway.
- Outputs: A full frame rendered in 3D with a studio environment.
- Coordinates: The band's core circle has radius 2.4 and it is hung 3.3 above the floor; the band's half-width is 1.05 × the width setting; its three half-twists give a trefoil edge.
- Lighting: A warm key light with a shadow map and the studio environment on the translucent band; the edge and pulses are self-lit.
- Timing: setProgress(progress) places each pulse along the edge curve and turns the group; frames render in any order.
- Works with: chrome-material, orbit-camera, kinetic-title, number-reveal
- The edge is a single closed curve of length 4π in the band's parameter; the pulses ride it by arc length.

## Output and loop
- 1080×1080, 30 fps, 16 s, procedural
- Seamless loop: yes — The pulses make a whole number of laps of the edge per loop, the knot turns a whole number of times and its tilt is a sine of the loop, so the last frame meets the first.
- Verified 2026-10-06 in Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0 (WebGL 2 via SwiftShader (software)); deterministic: yes; loop check: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.

## Use it
New project: Create a WebGLRenderer with a studio environment, add createSeifertSurface().group and call knot.setProgress(progress) each frame.

Existing project: Copy src/seifert-surface.js; add the group to your scene with an environment map.

Reuse ideas:
- Maths explainer: Shimmer, 14 pulses.
- Soft: Rose, wide.
- Luxe: Gold, many pulses.

## Limitations
- A band with three half-twists is a spanning surface of the trefoil but is one-sided, so it is not an orientable Seifert surface; the genus-one Seifert surface needs a more complex shape.
- The band is translucent without true refraction.

## License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder.

Provenance: Adapted from the owner's threejs-sketches/geometry-math/seifert-surface (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original studio object: a three-half-twist band whose edge is a trefoil knot, drawn as a translucent iridescent surface with a glowing edge tube and pulses riding it by arc length, on an exact loop.

