# Influences & attribution

Ollin borrows ideas from many frameworks, papers, and published techniques, and reimplements them independently. This file is the full record of those debts: the framework influences, the bundled third-party source, the engineering references, the technique behind each helper, and the history the Guide tells. The short version lives in the [README](about.md#influences-attribution); the license text for every bundled component is collected in [`THIRD-PARTY-NOTICES.md`](third-party-notices.md).

## Frameworks

Ollin builds on the ideas of three creative-coding frameworks and reimplements them in Swift. Because it does not copy their source code, none of their licenses attach to Ollin, which stays MIT:

| Project | License | What Ollin takes (influence only) |
|---|---|---|
| [p5.js](https://p5js.org) | LGPL-2.1 | Friendly, learn-it-in-an-afternoon API names and the `setup()` / `draw()` lifecycle |
| [OPENRNDR](https://openrndr.org) | BSD-2-Clause | The typed `Program` / `Drawer` core and composable geometry |
| [openFrameworks](https://openframeworks.cc) | MIT | Simple project structure and the per-example folder layout |

That `setup()` / `draw()` vocabulary started in [Processing](https://processing.org), the Java project p5.js grew out of. Ollin follows p5's spelling because that's the version most people coming to it already know.

"Inspired by" means borrowing ideas and API vocabulary, which is different from copying code; Ollin's implementation is written independently. Individual example sketches that are ported from a published source name that source, its author, and its license in the file header. Only sources whose licenses permit redistribution under MIT are used.

## Bundled third-party code

Ollin bundles a small amount of third-party source in the repo. This is different from the projects above: it ships as actual code and keeps its own license. Right now that's:

- **[libtess2](https://github.com/memononen/libtess2)** (SGI Free Software License B): the polygon triangulator behind concave and holed `Shape` fills, vendored under `External/CLibtess2/`.
- **[Box2D](https://github.com/erincatto/box2d)** by Erin Catto (MIT): the 2D rigid-body engine behind `OllinPhysics`' rigid `Body` side (rotation, polygon colliders, joints, stacking), vendored under `External/CBox2D/` and wrapped behind Ollin's own `World`/`Body` API.
- **[Jolt Physics](https://github.com/jrouwe/JoltPhysics)** by Jorrit Rouwe (MIT): the 3D rigid-body engine behind `OllinPhysics`' `World3D`/`Body3D` side (full 3D rotation, box/sphere/capsule/cylinder/hull/mesh colliders, joints, stacking, grabbing), vendored under `External/CJolt/` and wrapped behind Ollin's own API. Its soft-body solver stands behind `SoftBody3D` and `Rope3D`; the rope tier is Jolt's implementation of the discrete Cosserat rods of [Tobias Kugelstadt and Elmar Schoemer, "Position and Orientation Based Cosserat Rods" (SIGGRAPH/SCA 2016)](https://www.researchgate.net/publication/325597548_Position_and_Orientation_Based_Cosserat_Rods), which is what gives every segment of a rope an orientation of its own.
- **[Clipper2](https://github.com/AngusJohnson/Clipper2)** by Angus Johnson (Boost Software License 1.0): the polygon clipping and offsetting engine behind `Shape`'s boolean set operations and `offset(by:join:)`, vendored under `External/CClipper2/` and wrapped behind Ollin's own `Shape` API.
- **[Syphon Framework](https://github.com/Syphon/Syphon-Framework)** by Tom Butterworth, Anton Marini, Maxime Touroute & Philippe Chaurand (BSD 2-Clause): the IOSurface-backed GPU frame-sharing engine behind `OllinSyphon`, vendored (Metal portion only) under `External/CSyphon/` and wrapped behind Ollin's own `SyphonServer`/`SyphonClient` API.
- **[Hosek-Wilkie sky model](https://cgg.mff.cuni.cz/projects/SkylightModelling/)** by Lukas Hosek and Alexander Wilkie (3-Clause BSD): the analytic sky-dome model behind the procedural-sky environment (`environment(.sky(...))`), and its solar radiance function behind the sky's sun. Its RGB coefficient dataset, configuration code, and solar radiance function with its solar and limb-darkening datasets are vendored under `External/CHosekWilkie/` (trimmed to the RGB path and the sun) and wrapped behind Ollin's own API; Ollin's own Metal shader evaluates the sky radiance from them, and Ollin's own code integrates the sun over its disc and the CIE observer.
- **[MikkTSpace](https://github.com/mmikk/MikkTSpace)** by Morten S. Mikkelsen (zlib-style notice): the tangent-space generator behind `Mesh.tangents` for normal-mapped meshes without authored tangents, vendored under `External/CMikkTSpace/` and wrapped behind Ollin's own API. It's the standard the glTF 2.0 spec names for that case and the basis normal-map bakers target, which is why it's bundled rather than reimplemented: matching its exact basis is the point.
- **[Spectral primaries data](https://github.com/geometrian/simple-spectral)** from the reference implementation of Agatha Mallett and Cem Yuksel's *Spectral Primary Decomposition for Rendering with sRGB Reflectance* (EGSR 2019), by the paper's first author (MIT): the three BT.709 reflectance basis spectra behind `Spectrum`, plus the CIE 1931 observer and D65 illuminant tables it ships, vendored as data arrays under `External/CSpectralData/` and wrapped behind Ollin's own API. Bundled rather than reimplemented because the basis is the *result* of the paper's constrained optimization: matching its exact curves is the point.
- **[Cozette](https://github.com/the-moonwitch/Cozette)** by Ines (MIT): the bundled bitmap font for `drawText` (`BitmapFont.builtin`), vendored as a BDF under `Sources/Ollin/Resources/`.
- **[Hershey fonts](https://paulbourke.net/dataformats/hershey/)** (public domain): "Hershey Sans" (`futural`), the bundled default stroke (single-line / plotter) font for `drawText`, vendored as a `.jhf` under `Sources/Ollin/Resources/`. Drawn by Allen V. Hershey at the U.S. Naval Weapons Laboratory in Dahlgren, Virginia, around 1967 ([*Calligraphy for Computers*](https://apps.dtic.mil/sti/pdfs/AD0662398.pdf), NWL Report 2101), and published by the U.S. National Bureau of Standards in 1976. The `.jhf` form is James Hurt's, of Cognition, Inc., and the distribution's two required acknowledgments are carried in the notices file.
- **[Blender studiolights](https://projects.blender.org/blender/blender/src/branch/main/release/datafiles/studiolights) and [Poly Haven](https://polyhaven.com)** (CC0 / public domain): the bundled matcap sphere textures (`matcap(_:)`) under `Sources/Ollin/Resources/`, and the HDRI environments for image-based lighting (`environment(_:)`, by Greg Zaal and contributors): eight bundled at 1K, with a curated dozen more (and `highRes(_:)` 2K/4K/8K upgrades) downloaded on demand from Poly Haven and cached locally. CC0 needs no attribution; the credit is given freely. See [`THIRD-PARTY-NOTICES.md`](third-party-notices.md).
- **[LTC lookup tables](https://github.com/selfshadow/ltc_code)** by Eric Heitz, Jonathan Dupuy, Stephen Hill, and David Neubelt (BSD 3-Clause): the fitted linearly-transformed-cosine tables behind area-light shading (`rectLight` / `diskLight` / `tubeLight`), bundled as a small binary under `Sources/Ollin/Resources/LTC/` with the license and conversion provenance beside it. The tables are data from the paper's reference release; the shading code that samples them is Ollin's own (credited under *Techniques*).
- **[Marble Madness](https://github.com/idleberg/playdate-arcade-fonts)** (CC0 / public domain): a sample Playdate `.fnt` font used only by the `PlaydateFont` example to demonstrate the loader, bundled beside that sketch, not in the framework. Ollin ships the `.fnt` loader, not a library of fonts.
- **[El Fandanguito](https://commons.wikimedia.org/wiki/File:Viol%C3%ADn_SonHuasteco_ELFandanguito.ogg)** (CC BY-SA 4.0): a recording of a traditional Mexican *son huasteco* for violin (performed by Cynthia Molina), used by the `FilePlayer` example to demonstrate `AudioPlayer` and by the `Tuner` example to demonstrate pitch tracking, bundled beside each sketch, not in the framework. Ollin bundles no audio of its own. As a ShareAlike work the clip stays under CC BY-SA; that applies to the audio file, not to Ollin's code.
- **[Voladores de Papantla México](https://commons.wikimedia.org/wiki/File:Voladores_de_Papantla_M%C3%A9xico.webm)** by José Millán (CC BY-SA 4.0): a recording of the *Danza de los Voladores*, the Totonac pole-flying ritual dance, used by three examples and not by the framework: `VideoPlayback`, which draws it through `VideoPlayer`; `FootageDepth`, which reads its depth whole; and `SoundReactive`, a shorter excerpt paired with the *El Fandanguito* recording below. Each bundles its own trimmed, re-encoded copy beside the sketch. Apart from this clip and the sample film below, Ollin bundles no video. As a ShareAlike work the clip stays under CC BY-SA; that applies to the video file, not to Ollin's code.
- **Twenty sample pictures and one film** (Unsplash License, Pexels License): the pictures under the image techniques, the filters, and the body-pose examples and figures, bundled as the `OllinSamplePhotos` library rather than in the framework, each credited in code as `SamplePhoto.credit`. Four faces: *portrait* by [Jhovani Morales](https://www.pexels.com/photo/13402074/) (Oaxaca de Juárez), *scarf* by [Matthew Stephenson](https://unsplash.com/photos/j6OYgSMVuiI) (Oaxaca), *profile* by [Jessica Felicio](https://unsplash.com/photos/QS9ZX5UnS14) (Berrien County), *marigolds* by [Fernando Paleta](https://www.pexels.com/photo/29302608/) (Mexico City). Four figures: *reaching* by [Los Muertos Crew](https://www.pexels.com/photo/8854016/), *wrestler* by [Juan TM](https://www.pexels.com/photo/30098566/) (Santiago de Querétaro), *dancer* by [Gustavo Fring](https://www.pexels.com/photo/7447230/), *handstand* by [Gabriel Jiménez](https://www.pexels.com/photo/26870547/). Two tables: *breakfast* by [Jorge Acre](https://www.pexels.com/photo/17061842/) (Oaxaca de Juárez), *desk* by [Ben Kolde](https://unsplash.com/photos/H29h6a8j8QM) (Oxford). Four streets: *alley* by [Emanuel Estrada](https://www.pexels.com/photo/33880220/) (Guanajuato), *street* by [Jorge Acre](https://www.pexels.com/photo/16625366/) (San Miguel de Allende), *textiles* by [analuisa gamboa](https://unsplash.com/photos/0ohjyDUIUq0) (Teotitlán del Valle), *city* by [Gerardo Martin Fernandez Vallejo](https://unsplash.com/photos/ukIew--AEOc) (Guanajuato). Two landscapes at dusk: *headland* by [Joe Leineweber](https://www.pexels.com/photo/12848727/) (Loreto), *boats* by [Elesban Landero Berriozábal](https://unsplash.com/photos/ACQmpRYafPg) (Cozumel). A page and two surfaces: *page* by [Saliha Öner](https://www.pexels.com/photo/8466090/), *hands* by [Luis Quintero](https://www.pexels.com/photo/2258247/), *talavera* by [rotekirsche 20](https://www.pexels.com/photo/5438689/), *stone* by [Memet Öz](https://www.pexels.com/photo/36023243/). One film: *dance* by [Antoni Shkraba](https://www.pexels.com/video/video-of-a-man-dancing-7571381/). Resized and re-encoded, most of them cropped; the terms are summarized in the notices file.

Everything bundled is listed in [`THIRD-PARTY-NOTICES.md`](third-party-notices.md), with each component's license kept next to its source. Ollin's own code stays MIT; bundling a separately-licensed font, library, or example asset doesn't change that: each keeps its own license and the root [`LICENSE`](https://github.com/eaviles/Ollin/blob/main/LICENSE) stays pure MIT.

## Swift + Metal references

The frameworks above shaped Ollin's API and ideas. Two more, written for the same Swift and Metal stack, are references for how the rendering layer is built:

| Project | License | What Ollin studies it for |
|---|---|---|
| [swifty-creatives](https://github.com/yukiny0811/swifty-creatives) | Apache-2.0 | A Processing-style, immediate-mode framework on the same stack; a reference for cross-platform view setup and snapshot-testing of rendered output |
| [AsyncGraphics](https://github.com/heestand-xyz/AsyncGraphics) | MIT | GPU image and video compositing; a reference for shader-library structure and a layered-effects model |

As with the others, this is reading for ideas and engineering approach, which is different from copying code; Ollin's implementation is its own. Thanks to their authors, [@yukiny0811](https://github.com/yukiny0811) and [@heestand-xyz](https://github.com/heestand-xyz), for building in the open.

One more library, on another stack, was read for what a *programmable* GPU field should offer a sketch: [gpu-io](https://github.com/amandaghassaei/gpu-io) by Amanda Ghassaei (MIT), a WebGL library of layers with a chosen type and wrap mode, programs of the user's own stepped over them (or over a circle, a rectangle, a segment), drawn as points or as a vector field, and read back. Its six examples were already in Ollin's catalog; what it taught is the library shape behind `Sim.shader`, a field's `edge` and `precision`, `Filter.arrows`, and `SimField.snapshot()`, which are Ollin's own implementation of those ideas on Metal, never a port. Thanks to [@amandaghassaei](https://github.com/amandaghassaei).

The Ollin Camera virtual camera follows the same rule. Three projects were studied for the companion-app mechanism, where a system extension owns the camera device and a client app feeds it frames: [SinkCam](https://github.com/Halle/SinkCam) by Halle Winkler ([@Halle](https://github.com/Halle)), the reference for feeding a CMIO camera extension through its sink stream, along with her [write-ups on The Offcuts](https://theoffcuts.org/); [Celluloid](https://github.com/whyisjake/Celluloid) by Jake Spurlock ([@whyisjake](https://github.com/whyisjake)), a shipping virtual-camera app pushing Metal-processed frames the same way; and [ofxGL2Webcam](https://github.com/daitomanabe/ofxGL2Webcam) by Daito Manabe ([@daitomanabe](https://github.com/daitomanabe)), which published an openFrameworks texture to a virtual webcam in the earlier DAL era. Ollin Camera's implementation is its own. The idle test card is an original design in the genre of the classic broadcast test cards (the Philips PM5544 family by Finn Hendil), drawn from scratch rather than reproduced.

## Techniques

Ollin's helpers reimplement well-known published techniques, written from the paper, article, or formula and credited here, grouped by area. They lean toward OPENRNDR-style ergonomics.

### Rendering & anti-aliasing

- The signed-distance fields behind Ollin's analytic shapes (circles, ellipses, rectangles, including the rounded box that picks a radius per corner, lines, arcs, triangles, n-gons and stars, quadratic Bézier curves, point markers, and the rest of the catalog) come from [Inigo Quilez's 2D distance functions](https://iquilezles.org/articles/distfunctions2d/), including the onion operator behind rings and the `hollow`/`solid` band mode. SVG export traces these same functions on the CPU (marching squares) to turn each curved shape into a vector outline.
- The SDF combinators behind `drawSDF` and the `smoothUnion { }` block (smooth-minimum union, subtraction, and intersection, the `round`/`onion` modifiers, morph, and the per-axis `stretched` elongation) reimplement [Inigo Quilez's distance-function operators](https://iquilezles.org/articles/distfunctions/): the polynomial smooth-minimum (whose blend factor also melts the two operands' colors across the seam), the boolean operators, and the `opElongate` stretch, with the domain operators (mirror, tiled and radial repetition) and the joint and detailing operators (the chamfer, stairs, and columns trios plus engrave, groove, tongue, and pipe) after [hg_sdf](https://mercury.sexy/hg_sdf/) (used under its MIT option). The conservative non-uniform `scaled(x:y:)` multiplies the distance by the smallest scale factor (the Lipschitz bound that keeps sphere tracing safe). Cross-read against [LYGIA](https://lygia.xyz)'s `sdf` set, then written independently.
- The raymarched 3D SDF combinators behind `drawSDF3D` sphere-trace the merged field (the method formalized by John C. Hart, ["Sphere Tracing: A Geometric Method for the Antialiased Ray Tracing of Implicit Surfaces"](https://doi.org/10.1007/s003710050084), *The Visual Computer* 12, 1996) with [Inigo Quilez's raymarching of distance fields](https://iquilezles.org/articles/raymarchingdf/) (the step fudge factor that keeps a smooth-minimum or scaled field, which return distance *bounds*, from overshooting), [his 3D distance functions](https://iquilezles.org/articles/distfunctions/) for the primitives (sphere, box, rounded box, torus, capsule, cylinder, cone, octahedron, ellipsoid, infinite plane), and the four-tap tetrahedron gradient for the surface normal. The self-shadowing is [his soft-shadow penumbra march](https://iquilezles.org/articles/rmshadows/), the silhouette anti-aliasing the same closest-approach / pixel-cone measure applied to the camera ray, and the mirror, tiled, and radial (`pModPolar`) domain operators plus the joint and detailing operators (the chamfer, stairs, and columns trios, engrave, groove, tongue, and pipe) follow [hg_sdf](https://mercury.sexy/hg_sdf/) (used under its MIT option). The sculpting tier is his too: the `line`/`hexPrism`/`pyramid`/`cappedTorus`/`link` leaves are more of [his 3D distance functions](https://iquilezles.org/articles/distfunctions/), and `twisted`/`bent`/`displaced` reimplement his `opTwist`/`opCheapBend`/`opDisplace` distortions (with a conservative distance rescale, sized from the distortion's strength, keeping the sphere trace safe). The value-type and scoped API shape was studied from [ShaderPark](https://github.com/shader-park/shader-park-core) (MIT). Written independently.
- The fractal leaves of the raymarched field (`SDF3D.mandelbulb` / `.mengerSponge` / `.mandelbox`) reimplement three published distance estimates. The **Mandelbulb** is Daniel White and Paul Nylander's triplex power-n map ([White, *The Unravelling of the Real 3D Mandelbulb*, 2009](https://www.skytopia.com/project/fractal/mandelbulb.md)), with the running-derivative distance estimate [Inigo Quilez describes](https://iquilezles.org/articles/mandelbulb/); both descend from John C. Hart, Daniel J. Sandin, and Louis H. Kauffman, [*Ray Tracing Deterministic 3-D Fractals*](https://doi.org/10.1145/74333.74363) (SIGGRAPH 1989), the paper that first traced a fractal by its distance estimate. The **Menger sponge** follows [his construction by folded cross cuts](https://iquilezles.org/articles/menger/). The **Mandelbox** is Tom Lowe's box-fold, sphere-fold, and scale iteration ([Lowe, 2010](https://sites.google.com/site/mandelbox/)), with its distance estimate in the form Mikael Hvidtfeldt Christensen documents in his [*Distance Estimated 3D Fractals*](http://blog.hvidtfeldts.net/index.php/2011/06/distance-estimated-3d-fractals-part-i/) series. Written independently.
- Stroked lines and curves (`drawLine`/`drawBezier`/`drawPolyline` and shape outlines) anti-alias by expanding each stroke into triangles with a feathered ~1px coverage fringe carried in the geometry, the edge-expansion approach of [Antigrain Geometry](https://agg.sourceforge.net/antigrain.com/index.md) (Maxim Shemanarev) and [NanoVG](https://github.com/memononen/nanovg) (Mikko Mononen), reimplemented independently. Consecutive segments end on their shared inner miter point rather than each on its own perpendicular, so a turn is drawn once and translucent ink lays down one coat, with a fallback to square ends where that point would fall outside a neighboring segment; that is NanoVG's inner-join model (`nvg__chooseBevel` and the inner-bevel test in `nvg__calculateJoins`), also written from the technique, and shared with the tessellated path that strokes outline-font glyphs.
- The SDF glyph atlas behind `textMode(.atlas)` follows Chris Green's signed-distance-field text method (Valve, ["Improved Alpha-Tested Magnification for Vector Textures and Special Effects"](https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf), SIGGRAPH 2007), with the distance fields generated by the exact separable Euclidean distance transform of [Felzenszwalb and Huttenlocher](https://cs.brown.edu/people/pfelzens/dt/) ("Distance Transforms of Sampled Functions", 2012).
- The post-process anti-aliasing filter (`Filter.antialias`), which smooths a layer written per pixel by a fragment shader, reimplements **FXAA** (Timothy Lottes, NVIDIA, [*FXAA*](https://developer.download.nvidia.com/assets/gamedev/files/sdk/11/FXAA_WhitePaper.pdf), 2009): a luminance range test that leaves a flat neighborhood alone, a second-difference test that decides whether the edge through a pixel runs across or down, a walk along that edge with a growing stride to find both of its ends, the sub-pixel offset the nearer end implies, and the low-pass term that catches a lone pixel with no span to walk. Written from the published description rather than from its source. Two things depart from it deliberately, both measured: the orientation test is tie-broken by the plain brightness difference across the pixel, since a shader writes hard two-value edges that tie the published test far more often than photographic content does; and the brightness the walk compares against is read from the layer at the half-pixel tap rather than averaged from the two neighbors already in hand, because the layer is linear-light while the technique assumes display-encoded input, where the sampler averages the same numbers the code does.
- Specular anti-aliasing (`specularAntialiasing()`), which widens the shading roughness of a lit mesh by the spread of surface normals one pixel covers so a highlight narrower than that pixel stops flickering, implements the normal-distribution filtering of Anton S. Kaplanyan, Stephen Hill, Anjul Patney and Aaron Lefohn (["Filtering Distributions of Normals for Shading Antialiasing"](https://research.nvidia.com/publication/2016-06_filtering-distributions-normals-shading-antialiasing), HPG 2016) as refined by Yusuke Tokuyoshi and Anton S. Kaplanyan (["Improved Geometric Specular Antialiasing"](https://yusuketokuyoshi.com/papers/2019/ImprovedGeometricSpecularAA.pdf), I3D 2019): the screen-space derivatives of the world-space shading normal as the filter kernel, added to the squared GGX roughness and clamped by their threshold. Ollin takes their *less conservative* isotropic kernel (the average of the covariance eigenvalues, their Equation 5) at strength 1, so a chosen finish survives, with the conservative one (their Equation 4) reached by doubling the strength. Written from the paper.
- Rendering happens in linear light (blending and MSAA resolve in linear space, into sRGB-encoded targets) with a small triangular-PDF dither on the 8-bit output to ease gradient banding; the per-pixel dither value comes from Dave Hoskins' [Hash without Sine](https://www.shadertoy.com/view/4djSRW).
- The present pass's tone-map modes reimplement published curves: `.reinhard` is the global operator from Erik Reinhard, Michael Stark, Peter Shirley, and James Ferwerda, *Photographic Tone Reproduction for Digital Images* (SIGGRAPH 2002), `.aces` is the Academy Color Encoding System's filmic response in [Krzysztof Narkowicz's fitted approximation](https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/), and `.neutral` is the [Khronos PBR Neutral tone mapper](https://github.com/KhronosGroup/ToneMapping) (the Khronos Group's 3D Formats working group, 2024; its reference is Apache-2.0), written from the published description of its three steps: the black offset, the hue-preserving peak compression, and the desaturation toward white. Source-over compositing follows Thomas Porter and Tom Duff, *Compositing Digital Images* (SIGGRAPH 1984); the wider `blendMode` vocabulary (multiply, screen, lightest, darkest) is the image-editor tradition, expressed as fixed-function blend states.
- Wide-gamut and high-dynamic-range output (`colorOutput`) is built on published standards rather than any implementation. The gamut conversions are changes of primaries between D65 spaces, computed from the chromaticities in IEC 61966-2-1 (sRGB), SMPTE EG 432-1 / RP 431-2 (the DCI-P3 primaries Display P3 uses with the sRGB transfer curve), and ITU-R BT.2020; the perceptual-quantizer transfer function is SMPTE ST 2084 (also ITU-R BT.2100), implemented from its published equations. That an exported HDR file's diffuse white sits at 203 cd/m² is the reference level of ITU-R BT.2408. The extended-sRGB convention for components outside 0…1, which is what lets a Display P3 color pass through the ordinary pipeline, follows the same treatment in Apple's extended color spaces and the CSS Color 4 predefined-space model.
- The corner-pin warp behind `Installation.Projection` and the `Filter.cornerPin` filter is the projective mapping of a square onto a quadrilateral. It comes from Paul Heckbert's *Fundamentals of Texture Mapping and Image Warping* (master's thesis, UC Berkeley, 1989). The present pass and the filter run it backwards, per fragment. Written from the equations.
- The `Filter.lensDistortion` filter is the radial part of the Brown-Conrady lens model, the polynomial in even powers of the distance from the optical axis that photogrammetry fits to a real lens: A. E. Conrady, "Decentred Lens-Systems" (*Monthly Notices of the Royal Astronomical Society* 79, 1919), and Duane C. Brown, "Decentering Distortion of Lenses" (*Photogrammetric Engineering* 32(3), 1966). The filter keeps the two radial coefficients and drops the decentering terms; reading the distance as a fraction of the far corner and the scale that keeps the frame full are Ollin's own. Written from the equations.
- The edge fades that let two projectors share one wall follow Paul Bourke's ["Edge blending using commodity projectors"](https://paulbourke.net/miscellaneous/edgeblend/) (2004). His blending function is half at the middle of the shared band and flat at either end. Ollin applies the weight to linear light rather than to a code value. Written from the paper.
- The ground-grid viewport floor (`groundGrid()`) draws its level-of-detail, infinitely-receding grid with the anti-aliased screen-space-derivative method from [Ben Golus, "The Best Darn Grid Shader (Yet)"](https://bgolus.medium.com/the-best-darn-grid-shader-yet-727f9278b9d8): decade-spaced scales cross-faded by on-screen density, the base-uv derivative computed once and divided per scale so lines stay stable across the level boundaries. Written from the article.
- The `Shaders/BlackHole` example traces light backward past a Schwarzschild black hole with the orbit equation for light, u'' + u = (3/2) r_s u² (the null-geodesic equation of any general-relativity text, for instance Charles W. Misner, Kip S. Thorne and John A. Wheeler, *Gravitation*, 1973), integrated by fourth-order Runge-Kutta in the angle the ray sweeps. The thin disk's image, the brightness of its two sides and its frequency shift follow Jean-Pierre Luminet, ["Image of a spherical black hole with thin accretion disk"](https://ui.adsabs.harvard.edu/abs/1979A&A....75..228L/abstract) (*Astronomy and Astrophysics* 75, 1979). The disk's flux is Don N. Page and Kip S. Thorne's ("Disk-Accretion onto a Black Hole. Time-Averaged Structure of Accretion Disk", *The Astrophysical Journal* 191, 1974), in the form Thomas Müller and Jörg Frauendiener give it in ["Interactive visualization of a thin disc around a Schwarzschild black hole"](https://arxiv.org/abs/1206.4259) (*European Journal of Physics* 33, 2012). The shadow's edge its tests hold it to is J. L. Synge's ("The Escape of Photons from Gravitationally Intense Stars", *Monthly Notices of the Royal Astronomical Society* 131, 1966). A black body's color goes through the CIE 1931 observer in the multi-lobe fit of Chris Wyman, Peter-Pike Sloan and Peter Shirley, ["Simple Analytic Approximations to the CIE XYZ Color Matching Functions"](https://jcgt.org/published/0002/02/01/) (*Journal of Computer Graphics Techniques* 2(2), 2013). The disk's texture is carried along its own orbits in two phases that take turns, the flow-map scheme of Alex Vlachos's ["Water Flow in Portal 2"](https://advances.realtimerendering.com/s2010/index.md) (SIGGRAPH 2010 Advances in Real-Time Rendering course), blended to keep its contrast as in Qizhi Yu, Fabrice Neyret, Eric Bruneton and Nicolas Holzschuch, ["Lagrangian Texture Advection: Preserving both Spectrum and Velocity Field"](https://doi.org/10.1109/TVCG.2010.263) (*IEEE TVCG* 17(11), 2011). All written from the papers.

### Color

- The cosine-gradient `CosinePalette` uses [Inigo Quilez's palette formula](https://iquilezles.org/articles/palettes/).
- Spectral color (`Spectrum`, the `.paint` mixing space, and the `.thinFilm` / `.diffraction` / `.paintMix` GPU trio) is written from published techniques over one bundled dataset. A color becomes a reflectance curve by the spectral primary decomposition of [Agatha Mallett and Cem Yuksel, "Spectral Primary Decomposition for Rendering with sRGB Reflectance"](http://www.cemyuksel.com/research/papers/spectral_primary_decomposition.pdf) (EGSR 2019), whose precomputed basis is bundled with the CIE observer and D65 tables (see [Bundled third-party code](#bundled-third-party-code)); conversion back to display color integrates against the CIE 1931 observer under D65, inverted from the same tables so the round trip is exact. Paint mixing implements Kubelka-Munk layer optics (Paul Kubelka and Franz Munk, *Ein Beitrag zur Optik der Farbanstriche*, 1931) in the standard single-constant mixing form, the same model the watercolor wash below carries in its full layered form. The thin-film filter evaluates the classic two-beam interference reflectance of a symmetric lossless film, and the diffraction filter the grating equation (both standard optics), per wavelength tap.
- The built-in `Palette` sets carry the eight ColorBrewer qualitative palettes ([colorbrewer2.org](https://colorbrewer2.org), Cynthia Brewer, Mark Harrower, and The Pennsylvania State University; Apache-2.0), as data.
- The `Colormap` ramps carry the canonical public colormap data: `viridis`/`magma`/`inferno`/`plasma`/`cividis` from [matplotlib](https://matplotlib.org) (CC0), `turbo` from Google (Apache-2.0), and `rocket`/`mako` from [seaborn](https://seaborn.pydata.org) (BSD-3).
- `Color(kelvin:)` maps a blackbody color temperature to sRGB with [Tanner Helland's approximation of the Planckian locus](https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.md), written from the published formula.
- The perceptual color spaces (`OKLab`/`OKLCH`/`OKHSL`, and the gamut mapping behind `Color.mix`) implement [Björn Ottosson's Oklab](https://bottosson.github.io/posts/oklab/) and its [Okhsl picker space](https://bottosson.github.io/posts/colorpicker/), with out-of-gamut colors brought back by chroma reduction at constant lightness and hue following his [sRGB gamut-clipping method](https://bottosson.github.io/posts/gamutclipping/) (reference code public domain/MIT), written from the published math.
- The Adobe Swatch Exchange (`.ase`) reader is written from the community-documented description of the format at [selapa.net](http://www.selapa.net/swatches/colors/fileformats.php) and the [cyotek write-up](https://www.cyotek.com/blog/reading-adobe-swatch-exchange-ase-files-using-csharp). No code was taken from either. Its LAB swatches decode through CIELAB on the D50 white point using the standard inverse transfer and [Bruce Lindbloom's](http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.md) chromatically-adapted XYZ-to-sRGB matrix.
- Extracting a palette from an image clusters its pixels with Lloyd's algorithm ([Stuart Lloyd, "Least squares quantization in PCM"](https://doi.org/10.1109/TIT.1982.1056489)) seeded by k-means++ ([David Arthur and Sergei Vassilvitskii, "k-means++: The Advantages of Careful Seeding"](https://theory.stanford.edu/~sergei/papers/kMeansPP-soda.pdf)), run in Oklab so cluster distance tracks perceived difference. Written from the papers.
- Dithering an image down to a palette (`Image.dithered`) implements published methods, each written from the technique. The error-diffusion kernels are Floyd and Steinberg's ("An Adaptive Algorithm for Spatial Greyscale", *Proc. SID* 17/2, 1976), Jarvis, Judice and Ninke's ("A Survey of Techniques for the Display of Continuous Tone Pictures on Bilevel Displays", *Computer Graphics and Image Processing*, 1976), Peter Stucki's (*MECCA: A Multiple-Error Correcting Computation Algorithm*, IBM Research, 1981), Bill Atkinson's (the early Macintosh variant, which propagates only three quarters of the error), Daniel Burkes' (1988), and Frankie Sierra's three kernels (1989 to 1990); the coefficient tables were checked against [Tanner Helland's survey](https://tannerhelland.com/2012/12/28/dithering-eleven-algorithms-source-code.md) and Wikipedia's [error diffusion](https://en.wikipedia.org/wiki/Error_diffusion) article. Ordered dithering uses Bryce Bayer's index matrix (*An Optimum Method for Two-Level Rendition of Continuous-Tone Pictures*, ICC 1973), built by the standard recurrence. The blue-noise threshold tile is generated by the void-and-cluster method ([Robert Ulichney, "The void-and-cluster method for dither array generation", *Proc. SPIE* 1913, 1993](https://cv.ulichney.com/papers/1993-void-cluster.pdf)), whose implementation shape was cross-read against [Alan Wolfe's write-up](https://blog.demofox.org/2019/06/25/generating-blue-noise-textures-with-void-and-cluster/). That the error must be accumulated in linear light rather than in sRGB, and that the quantizer should therefore choose in that same space, follows [Nayuki's "Gamma-aware image dithering"](https://www.nayuki.io/page/gamma-aware-image-dithering) and Surma's [Ditherpunk](https://surma.dev/things/ditherpunk/), which also notes the brightness bias of the naive Bayer threshold. The threshold maps choose each pixel's two-color mix by Joel Yliluoma's arbitrary-palette pair search ([Arbitrary-palette positional dithering algorithm](https://bisqwit.iki.fi/story/howto/dither/jy/)): every palette pair scored by how close its reachable mix looks, with his closed-form mixing ratio taken in linear light and his pair-noisiness penalty, here weighted by the mix's variance (his flat weighting suits the dense palettes he wrote for; on a sparse palette it trades the light end of a ramp for a solid band).
- The color-vision simulation (`ColorVision`, `Color.simulated(_:)`, `Filter.colorVision`) implements the dichromat projection of Hans Brettel, Françoise Viénot and John D. Mollon, [*Computerized simulation of color appearance for dichromats*](https://doi.org/10.1364/JOSAA.14.002647) (JOSA A 14(10), 1997): two half-planes through the neutral axis and the lights each kind of dichromat sees unchanged. Their later single-plane form, Viénot, Brettel and Mollon's [*Digital video colourmaps for checking the legibility of displays by dichromats*](https://doi.org/10.1002/(SICI)1520-6378(199908)24:4%3C243::AID-COL5%3E3.0.CO;2-3) (Color Research & Application 24(4), 1999), was built and compared for the red-green kinds. The cone space is Vivianne C. Smith and Joel Pokorny's fundamentals (*Vision Research* 15(2), 1975) over the Judd-Vos corrected tristimulus space, with the sRGB primaries carried into it by J. J. Vos's chromaticity correction (*Color Research & Application* 3(3), 1978) and the anchor wavelengths read from the [Colour & Vision Research Laboratory's](http://www.cvrl.org/) Judd-Vos color matching functions. Nicolas Burrus's [review of the open-source simulations](https://daltonlens.org/opensource-cvd-simulation/) and its reference implementations, [DaltonLens-Python](https://github.com/DaltonLens/DaltonLens-Python) (MIT) and [libDaltonLens](https://github.com/DaltonLens/libDaltonLens) (public domain), were studied for three choices: the display's white as the neutral axis, a straight line in linear light toward the dichromat for the severities between, and a per-channel clamp for a result past the display's range. The code derives its own matrices from the published measurements, and the tests check them against the matrices those implementations print.
- `Palette.colorblindSafe` carries the eight-color qualitative set published by Masataka Okabe and Kei Ito for [color universal design](https://jfly.uni-koeln.de/color/), chosen so its members stay apart under every kind of color vision.
- `CIELab` follows the CIE 1976 L\*a\*b\* definition against a D50 white, with sRGB's own white carried there by the Bradford chromatic adaptation (K. M. Lam, *Metamerism and Colour Constancy*, PhD thesis, University of Bradford, 1985); the matrices are derived from the published chromaticities. `Color.distance(to:measure:)` with `.ciede2000` implements the CIE's 2000 color-difference formula of M. Ronnier Luo, Guihua Cui and Bryan Rigg, ["The development of the CIE 2000 colour-difference formula: CIEDE2000"](https://doi.org/10.1002/col.1049) (*Color Research & Application* 26(5), 2001), written from Gaurav Sharma, Wencheng Wu and Edul N. Dalal's ["The CIEDE2000 Color-Difference Formula: Implementation Notes, Supplementary Test Data, and Mathematical Observations"](https://doi.org/10.1002/col.20070) (*Color Research & Application* 30(1), 2005), whose 34 [test pairs](https://hajim.rochester.edu/ece/sites/gsharma/ciede2000/) the tests read against.
- `Ramp.shades` and `Palette.shades` follow the pixel-art practice of hue shifting, the lights warmed toward yellow and the shadows cooled toward blue or purple with saturation eased at both ends, as Raymond Schlitter sets it out in [Pixelblog 1: Color Palettes](https://www.slynyrd.com/blog/2018/1/10/pixelblog-1-color-palettes) (2018). The walk in OKLCH and the turn toward and away from yellow are Ollin's own reading of it.
- Print separations (`Image.separated(into:paper:)`, the `Ink` catalog, and `--export-separations`) are written from the standard prepress model for translucent spot inks: each ink acts as a transmittance filter (its color at full coverage on white stock), fractional coverage mixes the filter linearly in linear light (the single-ink collapse of the [Neugebauer halftone model](https://en.wikipedia.org/wiki/Neugebauer_equations)), and layers screened at different angles multiply independently, which is also what makes the overprint preview honest. The per-color coverage search (nearest lattice seed refined by coordinate descent, judged in OKLab) follows the same linear-light/perceptual split as the dithering entry above. The per-layer halftone screens threshold against the covered-area function of a growing round dot (the classic clustered-dot spot-function screening of PostScript RIPs), rotated to the conventional prepress angles (45 degrees for the darkest ink, then 15, 75, and 0), with the standard minimum-dot highlight/shadow cutoff. The built-in ink catalog carries the community-measured screen values of the standard risograph ink line from [stencil.wiki's color list](https://www.stencil.wiki/colors), taken via Matt DesLauriers' [riso-colors](https://github.com/mattdesl/riso-colors) dataset (MIT). The workflow shape (one grayscale master per drum, black meaning full ink, a multiply-style overprint preview, per-ink screen angles) is the risograph community's standard practice, studied in [p5.riso](https://github.com/antiboredom/p5.riso) (Sam Lavigne and Tega Brain) and [Spectrolite](https://spectrolite.app) (Amelia Greenhall) as workflow references; no code was taken from either.
- The `.cube` reader and writer behind `ColorLUT` follow Adobe's *Cube LUT Specification 1.0* (2013) and DaVinci Resolve's input-range extension of it, written from the format description. The cube's tetrahedral read is the interpolation of Sakamoto and Itooka's [US patent 4,275,413](https://patents.google.com/patent/US4275413A/en) (1981), as analyzed by James M. Kasson, Sigfredo I. Nin, Wil Plouffe, and James L. Hafner in ["Performing color space conversions with three-dimensional linear interpolation"](https://doi.org/10.1117/12.208689) (*Journal of Electronic Imaging* 4(3), 1995), with the six-tetrahedron case table as JD Vandenberg sets it out in [*3D LUT interpolation*](https://community.acescentral.com/uploads/default/original/2X/5/518c5ede1ca11c4a7e13f9c7350e2228bb8762c7.pdf) (ACESCentral, 2019); written from the formulas. The bundled `WarmPrint.cube` is Ollin's own.
- `Filter.filmGrain` reimplements the stochastic film grain model of Alasdair Newson, Julie Delon, and Bruno Galerne, ["A Stochastic Film Grain Model for Resolution-Independent Rendering"](https://doi.org/10.1111/cgf.13159) (*Computer Graphics Forum* 36(8), 2017), in its Gaussian limit: a developed frame as a Boolean scatter of grains whose coverage has the picture's own tone as its mean, so the noise at a tone goes as the square root of that tone times what is left to white, spread over the grain's size. The lattice draw, its per-cell spread normalization, and the encoded-domain residual apply are Ollin's own, and no code was taken from the paper's reference implementation.
- `Filter.halation` is written from the physics of halation as described in T. H. James (ed.), *The Theory of the Photographic Process*, 4th ed. (Macmillan, 1977): light that passes through the emulsion is reflected at the base and re-exposes the layers around its point of entry, reddest in a color stock because the red-sensitive layer lies nearest the base, and an anti-halation backing absorbs it only in part. The digital form (a bright pass, a Gaussian spread, a tint, and an add-back weighted by the room each channel has left below white) is Ollin's own.

### 3D lighting & materials

- The 3D material finishes reimplement published shading techniques: the Blinn-Phong specular highlight (Jim Blinn, *Models of Light Reflection for Computer Synthesized Pictures*, SIGGRAPH 1977); the warm-to-cool **Gooch** model (Amy and Bruce Gooch, Peter Shirley, and Elaine Cohen, *A Non-Photorealistic Lighting Model for Automatic Technical Illustration*, SIGGRAPH 1998); and the Fresnel falloff behind the **rim** glow and the **iridescent** sheen (Christophe Schlick's approximation, *An Inexpensive BRDF Model for Physically-Based Rendering*, 1994), with the iridescent rainbow read from the same Inigo Quilez cosine palette above. The **sparkle** (metallic-flake) finish follows the sparkle term of the layered car-paint shader (Chris Oat, Natalya Tatarchuk, and John Isidoro, ["Layered Car Paint Shader"](https://www.chrisoat.com/papers/Oat-Tatarchuk-Isidoro-Layered_Car_Paint_Shader_Print.pdf), *ShaderX²*, 2003): a per-cell hash-jittered flake normal whose view alignment is sharply powered, realized procedurally (a world-space hash grid in place of the paper's microflake normal map) and written from the published equations. The cel (toon) shading is a common real-time idiom. The fake **subsurface** glow follows the cheap translucency approximation of [Colin Barré-Brisebois and Marc Bouchard, "Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look"](https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/) (GDC 2011): a view-against-light transmittance lobe distorted toward the surface normal, plus an ambient floor, both weighted by a local-thickness stand-in (here a silhouette-thinness term, since the closed built-in forms carry no thickness map). Written from the talk's published equations.
- **Tile-based forward lighting** (the per-tile light grid behind `Light.reach` and a frame of many lights) reimplements the published Forward+ approach: keep shading forward, but cull the light list once per screen tile so a lit pixel shades against the lights that can reach it rather than every light in the scene ([Takahiro Harada, Jay McKee, and Jason C. Yang, *Forward+: Bringing Deferred Lighting to the Next Level*, Eurographics 2012 Short Papers](https://diglib.eg.org/handle/10.2312/conf.EG2012.short.005)). The tile frusta come out of the view-projection by the row-combination plane extraction ([Gil Gribb and Klaus Hartmann, *Fast Extraction of Viewing Frustum Planes from the World-View-Projection Matrix*, 2001](https://www.gamedevs.org/uploads/fast-extraction-viewing-frustum-planes-from-world-view-projection-matrix.pdf)), which Ollin's mesh-field cull already uses. The windowed distance falloff a `reach` applies, the bounding volumes each light kind is culled by, and the whole implementation are Ollin's own.
- Triplanar projection (`Mesh.triplanarTextured`, texture for meshes with no uvs) implements the standard three-axis world projection blended by the surface normal, as described in [Ryan Geiss, "Generating Complex Procedural Terrains Using the GPU"](https://developer.nvidia.com/gpugems/gpugems3/part-i-geometry/chapter-1-generating-complex-procedural-terrains-using-gpu) (*GPU Gems 3*, ch. 1, 2007), with the sharpened, renormalized blend weights of common real-time practice as surveyed in [Ben Golus's "Normal Mapping for a Triplanar Shader"](https://bgolus.medium.com/normal-mapping-for-a-triplanar-shader-10bf39dca05a) (2017), which is also the reference for projecting a tangent-space normal map per axis with a facing-sign flip; the per-plane normal combine (tangent offsets added, height components multiplied) is the "whiteout" blend of [Colin Barré-Brisebois and Stephen Hill, "Blending in Detail"](https://blog.selfshadow.com/publications/blending-in-detail/) (2012), applied per projection plane. The per-axis frames were re-derived in Ollin's own image conventions rather than transliterated, and the code is Ollin's own.
- Detail maps (`Mesh.detailMapped`, a finer texture pair tiled across the base one) blend the detail normal onto the base with **Reoriented Normal Mapping**, the quaternion-rotation blend of the same [Barré-Brisebois and Hill, "Blending in Detail"](https://blog.selfshadow.com/publications/blending-in-detail/) (2012), written from the paper's derivation; the gray-centered detail-color multiply is the long-standing detail-texturing idiom of the real-time engines. The code is Ollin's own.
- Projected decals (`decal(_:at:...)`, pictures stamped through an oriented box onto the surfaces inside it) implement the standard box-projection construction: transform the fragment's world position into the box's unit space, clip, and sample, with the surface-facing fade that keeps an edge-on receiver from smearing. The construction is described across the deferred/clustered decal literature, notably [Tiago Sousa and Jean Geffroy's "The Devil is in the Details: idTech 666"](https://advances.realtimerendering.com/s2016/Siggraph2016_idTech6.pdf) (SIGGRAPH 2016), read as an engineering reference for the forward-rendered arrangement; Ollin's small bounded list is passed in its own uniform beside the light-cookie machinery, and the code is Ollin's own.
- The physically-based **metallic-roughness** material (`Material.physicallyBased`) reimplements the standard Cook-Torrance microfacet model from the published math: the metallic-roughness parameterization (with α = roughness²) from [Brent Burley's *Physically-Based Shading at Disney*](https://blog.selfshadow.com/publications/s2012-shading-course/burley/s2012_pbs_disney_brdf_slides_v2.pdf) (SIGGRAPH 2012), the reference BRDF written out in the [glTF 2.0 specification's Appendix B](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.md), and the practical real-time forms (the fp16-safe GGX distribution and the height-correlated Smith visibility) from [Google's *Filament* documentation](https://google.github.io/filament/Filament.md.md). The Fresnel term is Schlick's approximation, cited above. Written independently from those references.
- The layered material lobes (`Material.clearcoat` / `Material.sheen`) reimplement the standard real-time constructions from the published references. The **clear coat** is the second Cook-Torrance lobe of [Google's *Filament* documentation](https://google.github.io/filament/Filament.md.md) and the [glTF `KHR_materials_clearcoat` extension](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_clearcoat): GGX at the coat's own roughness with the [Kelemen-Szirmay-Kalos visibility](https://diglib.eg.org/handle/10.2312/egs20011003) (Eurographics 2001), a fixed 0.04 Schlick Fresnel, the base attenuated by the coat's reflectance, and Filament's coat-interface F0 remapping. The **sheen** lobe is the "Charlie" inverted-alpha sine distribution from [Alejandro Conty Estevez and Christopher Kulla, *Production Friendly Microfacet Sheen BRDF*](https://fpsunflower.github.io/ckulla/data/s2017_pbs_imageworks_sheen.pdf) (SIGGRAPH 2017) with the visibility term of [David Neubelt and Matt Pettineo, *Crafting a Next-Gen Material Pipeline for The Order: 1886*](https://blog.selfshadow.com/publications/s2013-shading-course/rad/s2013_pbs_rad_notes.pdf) (SIGGRAPH 2013), layered by the directional-albedo energy scaling the [glTF `KHR_materials_sheen` extension](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_sheen) and the [Enterprise PBR Shading Model](https://dassaultsystemes-technology.github.io/EnterprisePBRShadingModel/) specify (the albedo table baked at runtime by numerical integration, Filament's approach). Written independently from those references.
- The anisotropic specular finish (`Material.anisotropy`) reimplements the standard real-time anisotropic microfacet construction from the published references: the single-parameter split of one roughness into the two directional α values from [Christopher Kulla and Alejandro Conty, *Revisiting Physically Based Shading at Imageworks*](https://fpsunflower.github.io/ckulla/data/s2017_pbs_imageworks_slides_v2.pdf) (SIGGRAPH 2017), the anisotropic GGX distribution from Brent Burley's *Physically-Based Shading at Disney* (SIGGRAPH 2012, cited above), the height-correlated anisotropic Smith visibility from [Eric Heitz, *Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs*](https://jcgt.org/published/0003/02/03/) (*JCGT* 3(2), 2014), the practical fp16-safe forms from [Google's *Filament* documentation](https://google.github.io/filament/Filament.md.md), and the bent-reflection-vector approximation for the environment gather from Stephen McAuley's *Rendering the World of Far Cry 4* (GDC 2015). Written independently from those references.
- Image-based lighting (`environment(_:)`) reimplements the **split-sum approximation** from [Brian Karis, "Real Shading in Unreal Engine 4"](https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf) (SIGGRAPH 2013): a diffuse irradiance cubemap, a GGX-prefiltered specular mip-cube via importance sampling, and the environment-BRDF integration LUT, recombined at shade time. The GGX importance sampling uses the Hammersley sequence (van der Corput radical inverse). Written independently from the paper's listings.
- The **multiple-scattering energy compensation** on the physically-based specular lobe (what keeps rough metal from darkening) reimplements the published constructions. The observation that a single-scatter microfacet lobe drops the light that bounces across more than one facet, and the compensation factor 1 + F0 * (1/E - 1) built on the lobe's directional albedo E, are from [Christopher Kulla and Alejandro Conty, *Revisiting Physically Based Shading at Imageworks*](https://fpsunflower.github.io/ckulla/data/s2017_pbs_imageworks_slides_v2.pdf) (SIGGRAPH 2017), in the practical per-pixel multiplier form of [Google's *Filament* documentation](https://google.github.io/filament/Filament.md.md). The image-based form, which returns the dropped share through the cosine-weighted irradiance with the average-Fresnel weighting F_avg = F0 + (1 - F0) / 21, is from [Carmelo J. Fdez-Aguera, *A Multiple-Scattering Microfacet Model for Real-Time Image-based Lighting*](https://jcgt.org/published/0008/01/03/) (*JCGT* 8(1), 2019), as is the matte body's weight beneath the lobe, one minus the lobe's directional albedo at the view. The lights weight the body the same way, the albedo-scaling layering of the [OpenPBR Surface specification](https://academysoftwarefoundation.github.io/OpenPBR/) (Academy Software Foundation), which writes a glossy-diffuse base as the dielectric lobe plus one minus that lobe's directional albedo at the view times the diffuse, a practical non-reciprocal form that keeps a white surface in the furnace. The directional albedo is read from the renderer's own split-sum LUT, baked with the height-correlated Smith visibility so the table prices the same lobe the shading draws. Written independently from those references.
- The live-feed environment (`Environment.feed(_:)`, a camera or video frame as the image-based-lighting source) follows the standard camera-feed lighting approach of augmented-reality practice: remap the captured frame onto the environment sphere, extrapolate the unseen part (here the frame's mirror image, pinched to its center column at the poles), and run the normal environment filtering over the result. The approach is what AR runtimes and web-AR engines do with camera imagery; cross-read against public write-ups such as [Zappar's *Approaching photorealistic AR on the web*](https://www.zappar.com/blog/approaching-photorealistic-ar-web/). The wrap mapping and the arrangement over the split-sum bake above are Ollin's own.
- The **soft shadows** (`shadowSoftness`, contact-hardening penumbrae for the directional and spot casters) use **Percentage-Closer Soft Shadows** (a blocker search over the shadow map, a penumbra width estimated from the receiver-to-blocker separation, then a variable-radius PCF kernel sized by it) from [Randima Fernando's *Percentage-Closer Soft Shadows*](https://developer.download.nvidia.com/shaderlibrary/docs/shadow_PCSS.pdf) (NVIDIA), with the perspective shadow map's depth linearized for the spot caster so the separation ratio stays meaningful; the technique was cross-read against openFrameworks' `shadow.glsl`. A panel's ray-traced shadow (`rectangleLight` / `diskLight` under `castShadows()` on a ray-tracing GPU) weights each visibility ray by what its point of the panel sends the receiver and divides the visible weight by the whole, so the analytic area light is dimmed by the illumination-weighted share that arrives: the ratio estimator of [Eric Heitz, Stephen Hill, and Morgan McGuire, *Combining Analytic Direct Illumination and Stochastic Shadows*](https://research.nvidia.com/publication/2018-05_Combining-Analytic-Direct) (I3D 2018), with the form factor's integrand as the weight. Written independently.
- The **contact shadows** (`contactShadows`, the short screen-space ray toward the casting light that seats resting objects) implement the screen-space shadow ray march as production renderers ship it, cross-read against three public references: [Unity's HDRP contact-shadow kernel](https://github.com/Unity-Technologies/Graphics/blob/master/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/ContactShadows.compute) (the camera-ward ray-start bias, the projected-segment march, and the slope-aware acceptance band derived from a view-axis ray's own depth span), [Panos Karabelas' screen-space shadows write-up](https://panoskarabelas.com/blog/posts/screen_space_shadows/) (MIT), and [Tomasz Stachowiak's depth-buffer raymarching gist](https://gist.github.com/h3r2tic/9c8356bdaefbe80b1a22ae0aaee192db) (Apache-2.0/MIT); the per-pixel start dither is Jorge Jimenez's interleaved gradient noise (*Next Generation Post Processing in Call of Duty: Advanced Warfare*, SIGGRAPH 2014 course), static here so exports reproduce. Written independently from the published methods.
- The ray-traced reflections (`rayTracedReflections()`, a physically-based metal reflecting the actual scene, off-screen geometry included, by tracing a reflection ray per reflective pixel against the scene's acceleration structure and shading the hit) follow the **hybrid rendering** approach (rasterize the primary surfaces, trace the reflection ray, shade the hit, fall back to the environment on a miss) from Apple's ["Explore hybrid rendering with Metal ray tracing"](https://developer.apple.com/videos/play/wwdc2021/10150/) (WWDC21) and the ["Rendering reflections in real time using ray tracing"](https://developer.apple.com/documentation/metal/metal_sample_code_library/rendering_reflections_in_real_time_using_ray_tracing) Metal sample, over Metal's inline `intersection_query` acceleration-structure tracing (the same native ray tracing behind the point-light shadows). Written from the technique, independently.
- The glossy reflection lobe (`glossyReflections()`, a rough surface's reflection traced as a spread lobe rather than one mirror ray) draws each ray from the **GGX distribution of visible normals** by the exact sampling routine of Eric Heitz, ["Sampling the GGX Distribution of Visible Normals"](https://jcgt.org/published/0007/04/01/) (*Journal of Computer Graphics Techniques* 7(4), 2018), and gathers the neighbors' rays back into one integral by the **ratio estimator** of the stochastic screen-space-reflection resolve (Tomasz Stachowiak, "Stochastic Screen-Space Reflections", *Advances in Real-Time Rendering*, SIGGRAPH 2015: reuse a neighbor's hit weighted by the local BRDF over the density that neighbor's ray was drawn with, and normalize by the summed weights). The speckle a stochastic reflection is otherwise known for is answered by **path-space roughness regularization** (widening every surface a ray reaches to the cone it arrived in, the real-time form of the regularization Anton Kaplanyan and Carsten Dachsbacher describe in ["Path Space Regularization for Holistic and Robust Light Transport"](https://cg.ivd.kit.edu/publications/p2013/PSR_Kaplanyan_2013/PSR_Kaplanyan_2013.pdf), *Eurographics* 2013). Written from the papers and the technique, independently; the talk's own lobe-truncation bias was measured here and rejected.
- The glass material (`Material.glass`, transmission and refraction) reimplements the ratified glTF material extensions [`KHR_materials_transmission`](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_transmission/README.md) (the transmitted lobe replacing the diffuse one, tinted by the base color and blurred by the microfacet roughness), [`KHR_materials_volume`](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md) (thickness turning a thin wall volumetric, with Beer-Lambert attenuation parameterized as the color white light becomes after a given distance), and [`KHR_materials_ior`](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_ior/README.md) (normal-incidence Fresnel from the index of refraction). The environment-refraction base path (refract at entry, march the analytic interior span, approximate the exit interface with a curvature-blended normal, sample the prefiltered environment at a roughness-mapped mip, with the blur fading as the IOR nears 1) studies [Filament's refraction model](https://google.github.io/filament/Filament.md) (Google, Apache-2.0) as the engineering reference for those approximations; the ray-traced upgrade (tracing the refracted ray through the scene's acceleration structure, finding the solid's real exit interface at its back face) extends the same hybrid-rendering approach as the ray-traced reflections above. The screen-space path every GPU gets (`sceneThroughGlass()`: draw the frame again without the transmissive surfaces, project the refracted exit point into it, read the pixel there through a mip chosen by roughness) is the screen-space transmission the same Filament reference describes, taken from that published technique rather than its code. A solid body's read goes one step further than that model: it refracts again at the exit and marches the exiting ray across the pre-pass's own resolved depth (in screen space toward the ray's vanishing point, with 1/depth linear along the path, bisecting the first crossing) to the point where the ray meets the scene, which is the image-space refraction of nearby geometry of [Chris Wyman, *An Approximate Image-Space Approach for Interactive Refraction*](https://doi.org/10.1145/1073204.1073310) (*ACM Transactions on Graphics* 24(3), SIGGRAPH 2005), with the refusal of a read that lands on something nearer than the glass following the standard screen-space-refraction rejection rule. The pre-pass that keeps a body out of its own layer, the coverage fade back into the environment at the frame's border, the march's exact form (its continuity test at a crossing and the hidden ray's read of the visible side), and the traced-path handover are Ollin's own. Dispersion (`Material.dispersion`) is the standard three-channel approximation of chromatic dispersion in real-time rendering (one transmitted read per channel, each at its own index of refraction), with the index spread taken from the caustics pass's own wavelength model above so the two agree, and in the path tracer the same per-path spectral sampling that pass uses; the parameter is Ollin's own 0…1 scale rather than the Abbe-number form of [`KHR_materials_dispersion`](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_dispersion/README.md), which was read for the shape of the feature. Written from the specifications and the techniques, independently.
- Caustics (`caustics()`, the focused light glass and polished metal throw) reimplements **adaptive anisotropic photon scattering** from [Xueqing Yang and Yaobin Ouyang, *Real-Time Ray Traced Caustics*](https://link.springer.com/chapter/10.1007/978-1-4842-7185-8_30) (*Ray Tracing Gems II*, ch. 30, Apress 2021, open access): photon emission guided by a light-space ray-density map expanded into a cumulative quadtree task buffer, photon differentials tracked through every reflection and refraction to give each deposited photon an anisotropic elliptical footprint, additive screen-space splatting shaded with the receiver's G-buffer attributes, the negative-feedback density loop (projected footprint area against a target, plus back-projected temporal variance), and the perturbation-based dispersion approximation. The differentials follow [Homan Igehy, *Tracing Ray Differentials*](https://doi.org/10.1145/311535.311555) (SIGGRAPH 1999) and their photon form [Lars Schjøth, Jeppe Revall Frisvad, Kenny Erleben, and Jon Sporring, *Photon Differentials*](https://doi.org/10.1145/1321261.1321293) (GRAPHITE 2007); photon mapping itself is Henrik Wann Jensen's (*Realistic Image Synthesis Using Photon Mapping*, A K Peters, 2001). Written from the chapter's text, independently, over the same inline `intersection_query` tracing as the shadows, reflections, and global illumination; the chapter's separate water-surface technique is not implemented.
- Real-time global illumination (`globalIllumination()`) reimplements **dynamic diffuse global illumination** from [Zander Majercik, Jean-Philippe Guertin, Derek Nowrouzezahrai, and Morgan McGuire, *Dynamic Diffuse Global Illumination with Ray-Traced Irradiance Fields*](https://jcgt.org/published/0008/02/01/) (*Journal of Computer Graphics Techniques* 8(2), 2019): a uniform grid of irradiance probes, each storing octahedrally-mapped irradiance beside mean-distance/mean-squared-distance visibility moments, re-traced every frame with a rotated spherical-Fibonacci ray fan and sampled through the paper's visibility-aware weights (trilinear cage, soft backface, Chebyshev variance test). The production refinements come from the follow-up, [Majercik, Adam Marrs, Josef Spjut, and McGuire, *Scaling Probe-Based Real-Time Dynamic Global Illumination for Production*](https://jcgt.org/published/0010/02/01/) (*JCGT* 10(2), 2021): the unified self-shadow bias, the perception-based exponential irradiance encoding, the per-texel convergence heuristics, the zero-radiance/shortened-depth backface rule, and the probe-position relocation optimizer. The relocation's shipped form (statistics from a fixed, never-rotated ray subset; the backface-escape / frontface-backoff / drift-home branch set under an ellipsoid offset bound) and the irradiance blend's asymmetric per-texel response (a darkening lowers hysteresis, a large brightening is rate-limited) follow the production implementation of those papers, studied through NVIDIA's public RTXGI SDK documentation and shader sources; so does the vast-scene cascade tier's **infinite scrolling volume** (a camera-anchored probe window that moves in whole probe planes, wrapping each probe's storage index by a scroll phase so stationary probes keep their texels, and invalidating exactly the planes that scroll in: the SDK's `DDGIGetScrollingProbeIndex` / scrolled-plane-clear model, with Ollin folding the clear and the zeroed-hysteresis re-blend into one per-probe validity step). The nested doubling-spacing cascade arrangement follows the multi-volume practice that documentation describes; the ladder derivation from the camera's working distance, the slab-clamped axis counts, and the Metal implementation with its scale-free parameterization are Ollin's own. The octahedral mapping is from [Zina Cigolle, Sam Donow, Daniel Evangelakos, Michael Mara, McGuire, and Quirin Meyer, *A Survey of Efficient Representations for Independent Unit Vectors*](https://jcgt.org/published/0003/02/01/) (*JCGT* 3(2), 2014); the spherical Fibonacci ray fan follows [Ricardo Marques, Christian Bouville, Mickaël Ribardière, Luís Paulo Santos, and Kadi Bouatouch, *Spherical Fibonacci Point Sets for Illumination Integrals*](https://doi.org/10.1111/cgf.12190) (*Computer Graphics Forum* 32(8), 2013); and the per-update random rotation is built by Ken Shoemake's uniform-quaternion construction (*Uniform Random Rotations*, Graphics Gems III, 1992). Written from the papers, independently, over the same inline `intersection_query` tracing as the shadows and reflections.
- The path-traced export (`--path-traced`) is a unidirectional Monte Carlo path tracer written from the published techniques: the light-transport formulation is [James T. Kajiya, *The Rendering Equation*](https://doi.org/10.1145/15922.15902) (SIGGRAPH 1986), with the practical estimator construction (next-event estimation against the light list, cosine-weighted diffuse sampling, and the environment's two-level luminance-CDF importance tables over the equirect's latitude-weighted rows) after the treatment in [*Physically Based Rendering*](https://pbr-book.org) (Matt Pharr, Wenzel Jakob, and Greg Humphreys). Specular directions sample the GGX distribution of visible normals per [Eric Heitz, *Sampling the GGX Distribution of Visible Normals*](https://jcgt.org/published/0007/04/01/) (*JCGT* 7(4), 2018); the environment and lobe strategies combine through the power heuristic of [Eric Veach and Leonidas J. Guibas, *Optimally Combining Sampling Techniques for Monte Carlo Rendering*](https://doi.org/10.1145/218380.218498) (SIGGRAPH 1995); lobe-side environment reads filter by the sampled probability's solid angle after [Mark Colbert and Jaroslav Křivánek, *GPU-Based Importance Sampling*](https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-20-gpu-based-importance-sampling) (*GPU Gems 3*, 2007), and by the footprint a pixel's bundle of rays fans over on a curved surface, which travels with the path as a ray cone (a width and a spread angle) after the texture-LOD chapter cited below, with the curvature read from the triangle's vertex normals and the spread it adds at a reflection after [Tomas Akenine-Möller, Cyril Crassin, Jakub Boksansky, Laurent Belcour, Alexey Panteleev, and Oli Wright, *Improved Shader and Texture Level of Detail Using Ray Cones*](https://jcgt.org/published/0010/01/01/) (*JCGT* 10(1), 2021), the per-edge curvature being Nathan Reed's [answer on computing a triangle's curvature from its vertex normals](https://computergraphics.stackexchange.com/questions/1718/what-is-the-simplest-way-to-compute-principal-curvature-for-a-mesh-triangle) (2014); the thin lens's part in that cone, the sampled lobe's footprint folded into it at each scatter, and the tracer's own copy of the environment whose mip chain is weighted by latitude so a coarse level keeps the base level's mean over directions, are Ollin's own, and the light list's lobe widens under the footprint's normal spread by the normal-distribution filtering credited above for the raster's specular anti-aliasing; next-event evaluation at indirectly-seen polished surfaces widens its lobe per the path-space regularization of [Anton S. Kaplanyan and Carsten Dachsbacher, *Path Space Regularization for Holistic and Robust Light Transport*](https://doi.org/10.1111/cgf.12026) (*Computer Graphics Forum* 32(2), 2013); unbiased termination is Russian roulette after [James Arvo and David Kirk, *Particle Transport and Image Synthesis*](https://doi.org/10.1145/97880.97886) (SIGGRAPH 1990); and the deterministic sample stream is the pcg4d counter-based hash from [Mark Jarzynski and Marc Olano, *Hash Functions for GPU Rendering*](https://jcgt.org/published/0009/03/02/) (*JCGT* 9(3), 2020). Transmission through the trace follows the rough-dielectric microfacet model of [Bruce Walter, Stephen R. Marschner, Hongsong Li, and Kenneth E. Torrance, *Microfacet Models for Refraction through Rough Surfaces*](https://www.graphics.cornell.edu/~bjw/microfacetbsdf.pdf) (EGSR 2007), sampled through the visible-normal distribution with stochastic Fresnel selection (Heitz, cited above), with the solid-interior absorption in the `attenuationColor` / `attenuationDistance` parameterization of the [glTF `KHR_materials_volume` extension](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_volume); mesh-light next-event estimation (the power-proportional triangle CDF, uniform barycentric point sampling, and the area-to-solid-angle pdf) follows the *Physically Based Rendering* treatment cited above; and texture reads at hits pick their mip by the ray-cone method of [Tomas Akenine-Möller, Jim Nilsson, Magnus Andersson, Colin Barré-Brisebois, Robert Toth, and Tero Karras, *Texture Level of Detail Strategies for Real-Time Ray Tracing*](https://link.springer.com/chapter/10.1007/978-1-4842-4427-2_20) (*Ray Tracing Gems*, 2019). The grain filter that runs over the finished render is the edge-avoiding a-trous wavelet of [Holger Dammertz, Daniel Sewtz, Johannes Hanika, and Hendrik P. A. Lensch, *Edge-Avoiding À-Trous Wavelet Transform for fast Global Illumination Filtering*](https://jo.dreggn.org/home/2010_atrous.pdf) (HPG 2010), with the albedo demodulation and the variance-driven luminance weight (including the small blur of the variance itself before it is used) from [Christoph Schied, Anton Kaplanyan, Chris Wyman, Anjul Patney, Chakravarty R. Alla Chaitanya, John Burgess, Shiqiu Liu, Carsten Dachsbacher, Aaron Lefohn, and Marco Salvi, *Spatiotemporal Variance-Guided Filtering: Real-Time Reconstruction for Path-Traced Global Illumination*](https://research.nvidia.com/publication/2017-07_spatiotemporal-variance-guided-filtering-real-time-reconstruction-path-traced) (HPG 2017); on a still the variance is measured across each pixel's own samples, since a still has no previous frame. Reuse across a sequence (`--pt-reuse`, `PathTracing.reusedFrames`) is that method's temporal half written for an offline sequence: each pixel is followed back through the frame's motion vectors (the raster's own velocity pass for declared movers, the camera's reprojection through the depth elsewhere), the previous frame's samples are read there through a bilinear footprint whose texels must pass a depth and a normal test with tolerances opened by the local gradient, and the carried count is capped at a history length, all after the same Schied and colleagues paper; the carried light is then pulled to within a few standard errors of the frame's own estimate, the history clamp of temporal anti-aliasing after [Brian Karis, *High Quality Temporal Supersampling*](https://advances.realtimerendering.com/s2014/) (SIGGRAPH 2014, *Advances in Real-Time Rendering* course) and the variance clipping of [Marco Salvi, *An Excursion in Temporal Supersampling*](https://www.gdcvault.com/play/1023521/From-the-Lab-Bench-Real) (GDC 2016), with the spread read from each pixel's own samples across both frames rather than from a spatial neighborhood, which is Ollin's own, as are the first frame tracing the history's worth itself and the facing test on the interpolated history whose tolerance is each pixel's own sampling error read off its normal sum, so a surface that turns drops a history its surface motion would have fetched from the wrong place. The per-pixel stop (`--pt-noise`, `PathTracing.noiseThreshold`) descends from the contrast-driven refinement of [Don P. Mitchell, *Generating Antialiased Images at Low Sampling Densities*](https://doi.org/10.1145/37401.37410) (SIGGRAPH 1987), which judges a pixel's remaining noise against the eye's sensitivity rather than in absolute terms, and takes its error measure from [Holger Dammertz, Johannes Hanika, Alexander Keller, and Hendrik P. A. Lensch, *A Hierarchical Automatic Stopping Condition for Monte Carlo Global Illumination*](https://otik.uk.zcu.cz/handle/11025/10849) (WSCG 2010): the pixel's error divided by the square root of its brightness, the square root standing in for the eye's near-logarithmic response. Two of that measure's refinements come from the adaptive sampler of [Blender's Cycles](https://projects.blender.org/blender/blender/src/branch/main/intern/cycles/kernel/film/adaptive_sampling.h) (Stefan Werner and Lukas Stockner, Apache-2.0), read for its shape and not its code: dividing by the brightness itself above 1 so a region brighter than white is held to a share of its own value, and keeping a pixel's eight neighbors sampling while it samples, so a feature one pixel has found pulls its neighbors along. Where Dammertz and colleagues and Cycles estimate the error as the difference between two half-sets of samples, Ollin reads it as the standard error of each pixel's own samples, the spread the tracer already records for the grain filter, since its sample stream is pseudo-random (the hash above) rather than a low-discrepancy sequence, which is the case where that spread is an honest estimate and the two-set difference is a single noisy draw of the same quantity. The minimum count a pixel takes before it may stop, the square root of the maximum unless named, is the default of [Per Christensen, Julian Fong, Jonathan Shade, Wayne Wooten, Brenden Schubert, Andrew Kensler, Stephen Friedman, Charlie Kilpatrick, Cliff Ramshaw, Marc Bannister, Brenton Rayner, Jonathan Brouillat, and Max Liani, *RenderMan: An Advanced Path Tracing Architecture for Movie Rendering*](https://doi.org/10.1145/3182162) (*ACM Transactions on Graphics* 37(3), 2018), whose adaptive pixel sampler is also where the neighbor rule's rationale (rare but important samples, such as from bokeh) is spelled out. The bound on what twice-bounced light may add to a sample (`--pt-clamp`, `PathTracing.maxBounceLight`) is the control production tracers call an indirect clamp, read for its shape from [Cycles' *Clamp Indirect*](https://docs.blender.org/manual/en/latest/render/cycles/render_settings/sampling.md) and [Arnold's indirect sample clamp](https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_user_guide_ac_render_settings_ac_sampling_html): light that has scattered twice or more on its way to the eye is held to a ceiling in its brightest channel, scaled down whole so its color holds, while what one bounce shows is direct light and is never touched; Ollin adds the accounting, summing per pixel what the bound takes so the frame's recipe states the share of its light the bias cost. The time budget on a frame (`--pt-seconds`, `PathTracing.secondsPerFrame`) is the time limit production tracers offer beside a sample count, read for its shape from [Cycles' *Time Limit*](https://docs.blender.org/manual/en/latest/render/cycles/render_settings/sampling.md); Ollin's own are the dispatch sized to the time left from the last one's cost per sample, so a frame lands within a sample of its budget, the floor the clock may not cut under, the history's worth of time on the first frame of a reusing run, and the recorded count that makes the frame a fixed render reproduces. Written from the papers, independently, over the same inline `intersection_query` tracing as the shadows, reflections, global illumination, and caustics.
- The area lights (`rectLight` / `diskLight` / `tubeLight`) reimplement **linearly transformed cosines**: the rect panel's horizon-clipped polygon integral from [Eric Heitz, Jonathan Dupuy, Stephen Hill, and David Neubelt, *Real-Time Polygonal-Light Shading with Linearly Transformed Cosines*](https://eheitzresearch.wordpress.com/415-2/) (SIGGRAPH 2016); the disk's transformed-ellipse evaluation (eigendecomposition, a cubic solve for the horizon, and the tabulated horizon-clipped sphere) from [Heitz and Dupuy's sphere- and disk-light extension](https://eheitzresearch.wordpress.com/757-2/); and the tube's analytic line integral from [Eric Heitz and Stephen Hill, *Real-Time Line- and Disk-Light Shading with Linearly Transformed Cosines*](https://eheitzresearch.wordpress.com/757-2/). The disk path's cubic roots use the numerically robust split form from [Christoph Peters, "How to solve a cubic equation, revisited"](http://momentsingraphics.de/?p=105). The shaders are written from the papers and the technique's published evaluation; the *fitted tables* are bundled from the authors' BSD-licensed reference release (see *Bundled third-party code* below).
- Spatial video (`--export-spatial`) shoots its stereo pairs on the **parallel-axis off-axis rig** that is standard stereographic practice: two cameras a fixed distance apart looking parallel, with each frustum sheared so the two views coincide at the convergence distance, rather than toed in at the subject, which tilts the frames against each other and leaves vertical parallax at the corners (Lenny Lipton, *Foundations of the Stereoscopic Cinema*, Van Nostrand Reinhold, 1982, the standard reference for both the rig and the reason). The derived eye spacing follows the published comfort guidance rather than a chosen constant: the [International Stereoscopic Union's golden rules](https://isu3d.org/goldenrules/) put the deviation across a picture at no more than about a thirtieth of its width and hold that no viewer should ever be made to diverge their eyes, and cinema practice tightens the far-field figure to around one percent of screen width, which is the criterion Ollin's default is written to. The file format is Apple's documented [MV-HEVC spatial video](https://developer.apple.com/documentation/avfoundation/converting-side-by-side-3d-video-to-multiview-hevc-and-spatial-video), written against the published AVFoundation and VideoToolbox surfaces. The geometry, the derivation, and the writer are Ollin's own.
- Light shaping reads **IES photometric files** per the published [IESNA LM-63 / ANSI/IES LM-63 standard](https://blog.ansi.org/ansi/standard-file-photometric-data-ies-lm-63-19/) (the Type C angle conventions, the lateral-symmetry rules keyed to the last horizontal angle, and TILT handling), with [Sébastien Lagarde's format walkthrough](https://seblagarde.wordpress.com/2014/11/05/ies-light-format-specification-and-reader/) and Ian Ashdown's public parser notes studied for the spec's real-world ambiguities (the parser is Ollin's own). Baking a normalized profile into a small angular texture that scales a light's intensity is the standard real-time treatment described in [*Moving Frostbite to PBR*](https://seblagarde.wordpress.com/2015/07/14/siggraph-2014-moving-frostbite-to-physically-based-rendering/) (Lagarde and de Rousiers, SIGGRAPH 2014 course) and [Unreal Engine's IES light profiles](https://dev.epicgames.com/documentation/en-us/unreal-engine/using-ies-light-profiles-in-unreal-engine); the bundled example `.ies` files are authored for Ollin, not manufacturer data. **Light cookies** (`LightCookie` on a spot) are classic projective texture mapping, the gobo/light-function idea every real-time engine ships; the cone-footprint mapping and the code are Ollin's own.
- Real subsurface scattering (`Material.scattering` / `.skin` / `.marble`) reimplements **separable subsurface scattering** from [Jorge Jimenez, Károly Zsolnai, Adrián Jarabo, Christian Freude, Thomas Auzinger, Xian-Chun Wu, Javier von der Pahlen, Michael Wimmer, and Diego Gutierrez, *Separable Subsurface Scattering*](http://www.iryoku.com/separable-sss/) (*Computer Graphics Forum* 34(6), 2015): a screen-space diffusion as two 1D convolutions over the linear pre-tonemap frame, the taps importance-distributed and weighted by a diffusion profile, with a depth-aware step scale and a depth-gap guard at silhouettes. The profile is the sum-of-Gaussians fit of measured skin reflectance from [Eugene d'Eon and David Luebke, *Advanced Techniques for Realistic Real-Time Skin Rendering*](https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-14-advanced-techniques-realistic-real-time-skin) (*GPU Gems 3*, ch. 14, 2007), one channel's curve stretched per channel by the material's falloff color as the separable-SSS work does. The authors' BSD-licensed reference implementation was studied for the kernel construction and integration details; the code (the CPU kernel build, the mask pass, and the Metal blur) is Ollin's own, and the depth-gap guard is re-derived scale-invariant (measured against the scattering radius rather than the reference's screen-space constant, which saturates when the radius is a visible fraction of the object). The transmittance term (light through thin backlit geometry, under a shadow-casting light) reimplements the shadow-map translucency of [Jorge Jimenez, David Whelan, Veronica Sundstedt, and Diego Gutierrez, *Real-Time Realistic Skin Translucency*](https://www.iryoku.com/translucency/) (*IEEE Computer Graphics and Applications* 30(4), 2010): thickness estimated as the gap between the receiver and the caster's stored depth (the receiver shrunk along its normal, their silhouette fix), a transmittance profile derived by integrating the diffusion profile over a slab, and the reversed-normal irradiance with the paper's 0.3 wrap; here the profile is the closed-form slab integral of the same Gaussian sum the diffusion kernel uses, so the two halves share one material description. On the directional/spot (2D-map) path the thickness read gathers over a lateral neighborhood of entry points sized by the scattering radius, the same diffusion profile evaluated over each tap's through-body path, which is the light-space gathering idea of [Carsten Dachsbacher and Marc Stamminger, *Translucent Shadow Maps*](https://doi.org/10.2312/EGWR/EGWR03/197-201) (*Eurographics Workshop on Rendering*, 2003), expressed over the Gaussian sum above and normalized so a constant-thickness slab reduces exactly to the slab form. Written from the papers and the technique.
- Thin-film interference (`Material.thinFilm`, and the `thinFilm` helper in the shader library) reimplements the practical microfacet extension of [Laurent Belcour and Pascal Barla, *A Practical Extension to Microfacet Theory for the Modeling of Varying Iridescence*](https://belcour.github.io/blog/research/publication/2017/05/01/brdf-thin-film.md) (*ACM Transactions on Graphics* 36(4), SIGGRAPH 2017): the summation of the light reflecting between the two faces of a dielectric film, with the eye's XYZ response evaluated in the frequency domain as fitted Gaussians, so an integral over every wavelength collapses into a few instructions. The surface parameters it is driven by here (a strength, a thickness in nanometers, and the film's index of refraction) and the way the film's reflectance stands in for the surface's own Fresnel term follow the glTF [`KHR_materials_iridescence`](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_iridescence) extension's formulation of the same model, whose specification was read for the parameterization and the degenerate cases (a vanishing thickness, total internal reflection, a base reflectance at 1). Written from the paper and the specification; the Metal implementation, its two substitution forms (the reflectance replacing a traced ray's Fresnel, and the straight-on stand-in feeding a term that integrates a whole lobe), and the test that checks it against an independent reading of the model are Ollin's own.
- The volumetric cloudscape over the procedural sky (`Environment.clouds(_:)`) reimplements the published real-time cloud rendering technique: Andrew Schneider and Nathan Vos, [*The Real-Time Volumetric Cloudscapes of Horizon Zero Dawn*](https://www.guerrilla-games.com/read/the-real-time-volumetric-cloudscapes-of-horizon-zero-dawn) (SIGGRAPH 2015 Advances in Real-Time Rendering course) and Schneider's follow-up [*Nubis: Authoring Real-Time Volumetric Cloudscapes with the Decima Engine*](https://www.guerrilla-games.com/read/nubis-authoring-real-time-volumetric-cloudscapes-with-the-decima-engine) (SIGGRAPH 2017): the tiling Perlin-Worley base and Worley erosion volumes, the weather-map coverage remap, the height-shaping pair, and the Beer-law march with its silver-lining phase and edge-darkening terms. The parameterization was cross-read against Fredrik Häggström, [*Real-time rendering of volumetric clouds*](http://umu.diva-portal.org/smash/record.jsf?pid=diva2:1223894) (Umeå University, 2018), whose write-up states the recipe's equations explicitly. Written independently from the published methods; the weather map is generated procedurally rather than authored.
- The atmosphere (`fog` / `aerialPerspective` / `volumetricLight`) reimplements published techniques. The distance and height fog use [Inigo Quilez's closed-form fog integrals](https://iquilezles.org/articles/fog/) (the exponential-height density whose line integral has an exact solution, applied per fragment). The aerial perspective follows [Naty Hoffman and Arcot J. Preetham, *Rendering Outdoor Light Scattering in Real Time*](https://renderwonk.com/publications/gdc-2002/hoffman.pdf) (GDC 2002): the single-scattering solution's two factors, a wavelength-dependent extinction (Rayleigh RGB coefficients in their measured sea-level ratios plus a gray aerosol term) and a closed-form sun in-scatter mixing the Rayleigh phase with Henyey-Greenstein, applied over the same closed-form optical depth as the fog. The volumetric light march follows [Balázs Tóth and Tamás Umenhoffer, *Real-time Volumetric Lighting in Participating Media*](https://diglib.eg.org/handle/10.2312/egs.20091048.057-060) (Eurographics 2009 Short Papers): single scattering accumulated along the view ray with a shadow-map visibility test per step, here bounded per spot light to the ray's analytic cone crossing so thin beams stay resolvable. The angular distribution is the [Henyey-Greenstein phase function](https://articles.adsabs.harvard.edu/pdf/1941ApJ....93...70H) (1941), and the march's deterministic per-pixel jitter is Jorge Jimenez's interleaved gradient noise (*Next Generation Post Processing in Call of Duty: Advanced Warfare*, SIGGRAPH 2014 course). Written independently from the published methods.
- Volumes (`Volume` / `drawVolume` / `Medium`) reimplement published techniques. The optical model is Nelson Max, [*Optical Models for Direct Volume Rendering*](https://doi.org/10.1109/2945.468400) (IEEE Transactions on Visualization and Computer Graphics, 1995): emission and absorption along each view ray with single scattering of external light, and the volume's own transmittance toward each light. Each march step is integrated exactly under its sample's values, the energy-conserving form in Sébastien Hillaire, *Physically Based and Unified Volumetric Rendering in Frostbite* ([SIGGRAPH 2015 Advances in Real-Time Rendering course](https://advances.realtimerendering.com/s2015/index.md)). The self-shadow reads a light-transmittance grid computed once per light, the light attenuation volume of Uwe Behrens and Ralf Ratering, *Adding Shadows to a Texture-Based Volume Renderer* (IEEE Symposium on Volume Visualization, 1998). The phase function and the per-pixel jitter are the atmosphere's (Henyey-Greenstein, and Jorge Jimenez's interleaved gradient noise). Written independently from the published methods.

### Effects, compute & simulation

- The image-`Filter` catalog (color, tone, blur, stylize, retro, and distortion passes) reimplements well-known image-processing techniques, each written from the published method: the **oil-paint** abstraction is the Kuwahara region filter (Kyprianidis et al., ["Anisotropic Kuwahara Filtering on the GPU", *GPU Pro*](https://www.kyprianidis.com/)); the **3×3 median** uses Morgan McGuire's [min/max sorting-network median](https://casual-effects.com/research/McGuire2008Median/); **vibrance** follows CeeJayDK's [SweetFX](https://github.com/CeeJayDK/SweetFX) formulation; **bilateral** smoothing, **emboss**, **Sobel** edges/**normalMap**, **CMYK halftone**, **solarize**, **levels**, **scanlines**/**glitch**/**CRT**, and the **kaleidoscope**/**swirl**/**bulge**/**wave**/**ripple**/**polar**/**perturb** uv warps are standard real-time idioms (the radial-lens warps after Inigo Quilez and the [LYGIA](https://lygia.xyz) `distort` catalog, read for technique). The ordered **dither** (both the channel-quantizing and two-tone forms) uses Bryce Bayer's index matrix (*An Optimum Method for Two-Level Rendition of Continuous-Tone Pictures*, ICC 1973); **relight** combines the Sobel normal-from-height above with the Blinn-Phong specular model (Jim Blinn, SIGGRAPH 1977, credited in full under the 3D materials), each finish a tuned diffuse/specular/rim recipe over that shared surface. The branchless RGB↔HSV behind `colorama` is Sam Hocevar's. The full menu was cross-read against LYGIA, [ofxFX](https://github.com/patriciogonzalezvivo/ofxFX), OPENRNDR's [orx-fx](https://github.com/openrndr/orx), [AsyncGraphics](https://github.com/heestand-xyz/AsyncGraphics) (which set the effect-object/compositing shape), and [fluid](https://github.com/enonforetsam/fluid) (MIT; the relight-with-finishes, cursor-centered-warp, and two-tone-dither ideas) for which effects exist and how they're approached, then written independently.
- The **`.xdog` ink filter** reimplements the flow-based **extended difference of Gaussians** of Holger Winnemöller, Jan Eric Kyprianidis, and Sven C. Olsen, ["XDoG: An eXtended difference-of-Gaussians compendium including advanced image stylization"](https://doi.org/10.1016/j.cag.2012.03.004) (*Computers & Graphics* 36(6), 2012): the sharpened difference `(1+p)·G_σ − p·G_kσ` with k = 1.6, cut through the `1 + tanh(φ(u − ε))` ramp. The flow it follows is the **flow-based difference of Gaussians** of Henry Kang, Seungyong Lee, and Charles K. Chui, ["Coherent Line Drawing"](https://doi.org/10.1145/1274871.1274878) (NPAR 2007), with the edge tangent field read from the smoothed **structure tensor** as in Jan Eric Kyprianidis and Jürgen Döllner, ["Image Abstraction by Structure Adaptive Filtering"](https://doi.org/10.2312/LocalChapterEvents/TPCG/TPCG08/051-058) (TPCG 2008); the 1.6 ratio between the two Gaussians is David Marr and Ellen Hildreth's, ["Theory of Edge Detection"](https://doi.org/10.1098/rspb.1980.0020) (*Proceedings of the Royal Society B* 207, 1980). Reading the picture as its display brightness over the paper, the eigenvector spelling that survives an axis-aligned edge, and the cut averaged over each pixel's footprint are our own.
- The **`.brushwork` painterly filter** reimplements the **anisotropic Kuwahara filter** of Jan Eric Kyprianidis, Henry Kang, and Jürgen Döllner, ["Image and Video Abstraction by Anisotropic Kuwahara Filtering"](https://doi.org/10.1111/j.1467-8659.2009.01574.x) (*Computer Graphics Forum* 28(7), Pacific Graphics 2009): the smoothed structure tensor's eigenvalues as local orientation and anisotropy, the elliptical brush `a = r(α+A)/α`, `b = rα/(α+A)`, eight overlapping sectors, and the sector means blended by `1/(1 + ‖s‖^q)`. The sector weights are the closed-form polynomials of Jan Eric Kyprianidis, Amir Semmo, Henry Kang, and Jürgen Döllner, ["Anisotropic Kuwahara Filtering with Polynomial Weighting Functions"](https://doi.org/10.2312/LocalChapterEvents/TPCG/TPCG10/025-030) (TPCG 2010): `[(x + ζ) − ηy²]₊²` under a Gaussian, with ζ = 2/r and η from the zero crossing at 3π/2N. The anisotropy measure `(λ1 − λ2)/(λ1 + λ2)` is that of G. Z. Yang, P. Burger, D. N. Firmin, and S. R. Underwood, "Structure adaptive anisotropic image filtering" (*Image and Vision Computing* 14(2), 1996). Reading the picture as its display color over white paper, the means kept in premultiplied linear light with the variance on the paper's 8-bit scale, and the stretch parameter as the brush's aspect ratio are our own.
- The **`.shock` coherence filter** reimplements the **coherence-enhancing filtering** of Jan Eric Kyprianidis and Henry Kang, ["Image and Video Abstraction by Coherence-Enhancing Filtering"](https://doi.org/10.1111/j.1467-8659.2011.01882.x) (*Computer Graphics Forum* 30(2), Eurographics 2011): the smoothed structure tensor as the flow field, the line integral convolution along its minor eigenvector in second-order Runge-Kutta steps under a Gaussian whose sigma adapts to the anisotropy as `¼σ(1+A)²`, the gradient-directed shock filter whose sign is a scale-normalized one-dimensional Laplacian of Gaussian along the major eigenvector and whose step is the minimum or maximum on a line segment along it, the structure tensor carried forward where the gradient falls under a relaxation threshold, and the final edge smoothing. The shock filter itself is Stanley Osher and Leonid I. Rudin, ["Feature-Oriented Image Enhancement Using Shock Filters"](https://doi.org/10.1137/0727053) (*SIAM Journal on Numerical Analysis* 27(4), 1990), and the convolution along a flow is Brian Cabral and Leith Casey Leedom, ["Imaging vector fields using line integral convolution"](https://doi.org/10.1145/166117.166151) (SIGGRAPH 1993). Written from the papers, independently; the multigrid relaxation of the first estimate is left out, the carried-forward tensor standing in for it.
- The **`.hatching` pen filter** draws a layer as strokes along its own flow, written from the published techniques rather than any one implementation: the stroke texture is a **line integral convolution** of value noise along the smoothed structure tensor's minor eigenvector, after Brian Cabral and Leith Casey Leedom, ["Imaging vector fields using line integral convolution"](https://doi.org/10.1145/166117.166151) (SIGGRAPH 1993), walked in second-order Runge-Kutta steps the way the coherence filter above walks its flow; the tone comes from the **stroke density as tone** rule of computer-generated pen-and-ink illustration, Georges Winkenbach and David H. Salesin, ["Computer-Generated Pen-and-Ink Illustration"](https://doi.org/10.1145/192161.192184) (SIGGRAPH 1994), with the layered directions of Michael P. Salisbury, Michael T. Wong, John F. Hughes, and David H. Salesin, ["Orientable Textures for Image-Based Pen-and-Ink Illustration"](https://doi.org/10.1145/258734.258890) (SIGGRAPH 1997), which is where a direction field over a picture and strokes that follow it come from. The structure tensor as that direction field is the lineage credited above (Kyprianidis, Kang, Döllner). Turning the convolution into a rank through the noise's own measured spread and the count of independent draws the walk took, so that inking every mark under the pixel's darkness covers exactly that share of the paper, and the cap that hands the tone a direction cannot reach on to the next one, are our own.
- The **embroidery export** writes the **Tajima DST** stitch format, the industry's de facto standard, from its published description: the 512-byte header with its labeled fields, the three-byte records whose bits carry the displacement as the steps 81, 27, 9, 3, and 1 on a tenth-millimeter grid with the jump and color-change flags in the third byte, and the end record, as documented on the [EduTech Wiki page on the DST format](https://edutechwiki.unige.ch/en/Embroidery_format_DST). The planner over it (a running stitch at a pitch with every corner a penetration, fills as connected rows, colors as threads in draw order) is our own, built on Ollin's plotter planner.
- The GPU **Fourier transform** over a layer (`Filter.fourier` / `.inverseFourier` / `.spectrum`) is the radix-2 fast transform of James W. Cooley and John W. Tukey, ["An Algorithm for the Machine Calculation of Complex Fourier Series"](https://doi.org/10.1090/S0025-5718-1965-0178586-1) (Mathematics of Computation, 1965), in the self-sorting arrangement attributed to T. G. Stockham, ["High-speed convolution and correlation"](https://doi.org/10.1145/1464291.1464339) (AFIPS 1966), which needs no bit-reversal pass and so suits a fragment shader that can only gather. Written from the published algorithm, independently.
- The **ocean** (`Ocean` / `oceanField` / `drawOcean`) builds its sea from the Phillips spectrum for a wind-driven surface (O. M. Phillips, ["On the generation of waves by turbulent wind"](https://doi.org/10.1017/S0022112057000233), Journal of Fluid Mechanics, 1957) as presented for rendering by Jerry Tessendorf, ["Simulating Ocean Water"](https://people.computing.clemson.edu/~jtessen/reports/papers_files/coursenotes2004.pdf) (SIGGRAPH course notes), including the deep-water dispersion that moves it, the conjugate pairing that keeps the height real, the horizontal displacement that points the crests, and the Jacobian of that displacement as the measure of where a crest is folding over. The amplitude that turns `waveHeight` into a measurement rather than a dial (the variance of the surface as the sum of its spectrum) is the standard reading of the same statistics. Written from those, independently.
- The **Hopf fibration** (`hopfFibers`) is the map Heinz Hopf described in ["Über die Abbildungen der dreidimensionalen Sphäre auf die Kugelfläche"](https://doi.org/10.1007/BF01457962) (Mathematische Annalen, 1931): every point of a two-sphere lifting to a great circle of the three-sphere, no two of which meet and every two of which are linked exactly once. The explicit parameterization of each circle, and the stereographic projection that brings it into space, follow the presentation in David W. Lyons, ["An Elementary Introduction to the Hopf Fibration"](https://doi.org/10.2307/3219300) (Mathematics Magazine, 2003). Written from those, independently.
- **`RadialBasis`** puts a smooth field through scattered values by the method Rolland L. Hardy introduced as multiquadric interpolation, ["Multiquadric equations of topography and other irregular surfaces"](https://doi.org/10.1029/JB076i008p01905) (Journal of Geophysical Research, 1971). Its default kernel is the thin-plate spline of Jean Duchon, ["Splines minimizing rotation-invariant semi-norms in Sobolev spaces"](https://doi.org/10.1007/BFb0086566) (1977), the surface through the data with the least bending energy; the degree-one polynomial fitted alongside the bumps is the standard augmentation that makes a conditionally positive definite kernel uniquely solvable. **`Fit.minimize`** walks its parameters by the adaptive per-parameter step of Diederik P. Kingma and Jimmy Ba, ["Adam: A Method for Stochastic Optimization"](https://arxiv.org/abs/1412.6980) (ICLR 2015), over slopes measured by central differences rather than derived, since the cost is a closure the sketch writes. Written from the papers, independently.
- The **local averages** (`Filter.boxBlur`, `Filter.adaptiveThreshold`) stand on the **summed-area table** of Franklin C. Crow, ["Summed-Area Tables for Texture Mapping"](https://doi.org/10.1145/800031.808600) (SIGGRAPH 1984): every texel holding the sum of everything above and to the left of it, so the sum over any rectangle is four lookups. It is built by the recursive-doubling scan of Justin Hensley, Thorsten Scheuermann, Greg Coombe, Montek Singh and Anselmo Lastra, ["Fast Summed-Area Table Generation and its Applications"](https://doi.org/10.1111/j.1467-8659.2005.00880.x) (Eurographics 2005), whose recommendation to bias each element by -0.5 before accumulating is followed here for the precision it buys back. The local cut is the method of Derek Bradley and Gerhard Roth, ["Adaptive Thresholding Using the Integral Image"](https://doi.org/10.1080/2151237X.2007.10129236) (Journal of Graphics Tools, 2007): each pixel compared against the mean of its own neighborhood, a fraction below which it goes dark. Ollin makes that comparison in linear light rather than on gamma-encoded bytes, since illumination multiplies what a surface returns and only a linear space makes that a plain scale. Written from the papers, independently.
- The **measured distance field** (`Filter.distanceField`) is the jump-flooding algorithm of Guodong Rong and Tiow-Seng Tan, ["Jump Flooding in GPU with Applications to Voronoi Diagram and Distance Transform"](https://doi.org/10.1145/1111411.1111431) (I3D 2006): a seed's position passed outward over a ladder of halving step sizes, so the whole layer is flooded in a number of passes that grows with the logarithm of its size. The extra opening pass with a step of one is their [1+JFA variant](https://www.comp.nus.edu.sg/~tants/jfa-variants/jfa-variants.pdf) ("Variants of Jump Flooding Algorithm for Computing Discrete Voronoi Diagrams", ISVD 2007), which costs the same as the JFA+1 variant and makes far fewer errors. Placing each seed at the sub-pixel crossing found between two pixels, rather than at the pixel that holds it, is the standard practice for measuring an antialiased edge. Written from the papers, independently.
- The **layer styles** (`Filter.outline`, `.outerGlow`, `.innerGlow`, `.dropShadow`, `.innerShadow`, `.bevel`) take their outline and glow from Chris Green, ["Improved Alpha-Tested Magnification for Vector Textures and Special Effects"](https://cdn.akamai.steamstatic.com/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf) (SIGGRAPH 2007 course notes, Valve): an outline as the band between two distance values and a glow as a falloff over the distance outside the edge, both read from a distance field. Ollin reads the field it measures off the layer, and the shadows blur the alpha rather than reading a second offset field. A bevel that reads a distance transform as a height and lights its slope from an angle and an elevation is the long-standing layer-style convention of image editors. The square falloff, the ink kept equal to a band's width below a pixel, and the bevel's direction taken by a Sobel stencil two pixels wide (the field's own direction turns by up to a pixel's width over the distance and draws streaks once lit) are Ollin's own. Written from the paper, independently.
- **Light in a flat sketch** (`Combine.light`) reimplements **radiance cascades**, the radiance-field structure of [Alexander Sannikov, *Radiance Cascades: A Novel Approach to Calculating Global Illumination*](https://github.com/Raikiri/RadianceCascadesPaper) (2024): the field split into rings of distance, each stored with fewer probes and more directions than the ring below it, so that probe count and direction count trade off exactly and every ring costs the same, and each ring merged into the one below by matching directions across the four nearest probes and gating on whether the near ray was stopped. The per-probe merge rays (the "bilinear fix", where each ring's ray ends where the ray of the ring above it begins rather than where its own probe's would, removing the rings of light that otherwise appear at every hand-over distance) are the correction described in the follow-up literature, including [Rouli Freeman, Alexander Sannikov, and Adrian Margel, *Holographic Radiance Cascades for 2D Global Illumination*](https://arxiv.org/abs/2505.02041) (arXiv:2505.02041, 2025), whose own method is not used here. Written from the published descriptions rather than from anyone's shader; the arrangement over Ollin's effect substrate (the ladder run through pooled render targets, the march against the measured distance field above, and the bounce that reads the light standing just off a surface's own face) is Ollin's own. The thin cone each ray widens into, reading a surface it passes by the share of the cone's width that surface covers, taken from the field's distance across the ray, is the soft-shadow construction for signed-distance fields described by [Inigo Quilez, *Penumbra shadows in raymarched SDFs*](https://iquilezles.org/articles/rmshadows/), turned from an occlusion term into the share of a lamp a ray sees; the walk inside an entered surface that tells a wall crossed from a lamp's limb grazed is Ollin's own.
- The **iridescence** filter colors its rainbow sheen by thin-film interference (per-channel reflectance at one representative wavelength per primary, the standard optics of a [soap film / oil slick](https://en.wikipedia.org/wiki/Thin-film_interference), cross-read against Alan Zucconi's [thin-film car-paint series](https://www.alanzucconi.com/2017/10/27/carpaint-shader-thin-film-interference/), read for technique) over a film-thickness field built with [Inigo Quilez's domain warping](https://iquilezles.org/articles/warp/) (fbm fed its own noise). The **glitter** filter's hash-cell sparkle construction (a jittered fleck per cell with a random twinkle phase, sharp `pow(sin)` flicker, and the `|x·y|` hyperbola cross flare scanned over the 3×3 neighbor cells) is the starfield/sparkle idiom canonicalized by Martijn Steinrucken's ["Shader Coding: Making a starfield"](https://www.youtube.com/watch?v=rvDo9LvfoVE) (The Art of Code; his tutorial shader is CC BY-NC-SA, read for the technique only), with the sub-pixel fade-by-footprint after the glint LOD idea in Zirr & Kaplanyan's ["Real-time Rendering of Procedural Multiscale Materials"](https://research.nvidia.com/sites/default/files/pubs/2016-02_Real-time-Rendering-of/ZirrKaplanyan_MultiscaleI3D2016.pdf) (I3D 2016). Both written from the techniques, independently.
- The depth-of-field effect filter (`.defocus`, blurring a layer by a depth map) runs the canvas depth of field's gather, credited below, over a layer: the same discs of light and the same layers by distance, fed by the map's own ramp. Its **near/far split** (a foreground composited over the background by its coverage, so a blurry foreground hides an in-focus subject behind it) came from Catlike Coding's [Depth of Field](https://catlikecoding.com/unity/tutorials/advanced-rendering/depth-of-field/) tutorial, and its first gather was the per-field **running-average golden-angle gather** of Dennis Gustafsson's [Bokeh depth of field in a single pass](http://blog.tuxedolabs.com/2018/05/04/bokeh-depth-of-field-in-single-pass.md) (Tuxedo Labs), studied through its expression in [LYGIA](https://lygia.xyz)'s `sample/dof` (Prosperity-licensed, read for the technique, reimplemented), which the shared gather replaced once it measured better on the same scenes. James George's openFrameworks `ofxDOF` is further prior art (no license, concept only). Written independently.
- The depth-of-field accumulation (sandpainting) rendering (bokeh that *emerges* from scattering many faint additive samples by their distance from a focal plane, with chromatic fringes from shifting the color channels apart) follows Anders Hoff's ([inconvergent](https://inconvergent.net/2019/depth-of-field/)) depth-of-field and color-shift technique, written from the essays. [Blurry](https://github.com/Domenicobrz/Blurry) (Domenico Bruzzese, *Domenicobrz*, MIT) is the reference implementation, read for approach and written independently: `LineSpray`, `Bokeh`, and `Accumulator` follow its shape (lines sampled as points whose light is each line's share, a random spot in a ball scaled by the distance from the focal plane along the view axis with a linear or three-halves power and an exponential falloff, the passes summed in float and divided by their count), and `Filter.develop` is its print pass (exposure, the Reinhard curve, the ground added after the curve as a display value), read from the published approach and written from it. Bruzzese's Codrops article, [*Simulating Depth of Field with Particles using the Blurry Library*](https://tympanus.net/codrops/2019/10/01/simulating-depth-of-field-with-particles-using-the-blurry-library/) (2019), is the guided tour of both. The `Rendering/LineSpray` example draws the live demo's scene, built from its description, not ported from the source. The uniform ball scatter (`ballSample`) is the standard cube-root radius with a uniform direction; the one-texel light deposit and the area-continuous coverage across the one-pixel boundary are Ollin's own.
- The ambient-occlusion combine (`.ambientOcclusion`, darkening a layer's crevices by a depth map) reconstructs view-space position and normal from the depth (the normal via the best-of-paired-neighbors method from [Wicked Engine](https://turanszkij.wordpress.com/2019/09/22/improved-normal-reconstruction-from-depth/)'s "improved normal reconstruction from depth"), then estimates occlusion with a view-space hemisphere kernel (the canonical SSAO recipe: Crytek's original; [john-chapman](https://john-chapman-graphics.blogspot.com/2013/01/ssao-tutorial.md) / [LearnOpenGL](https://learnopengl.com/Advanced-Lighting/SSAO), with the standard depth range-check), using a **dense low-discrepancy (Fibonacci) kernel** so it needs no per-pixel rotation and stays temporally stable, finished with a depth-aware blur. Written from the techniques, independently.
- The screen-space-reflections combine (`.screenSpaceReflections`, reflecting the scene off its own surfaces by a depth map) reflects each pixel's eye ray about its surface normal and traces the reflection through the depth buffer as a screen-space DDA (adaptive stride covering the whole ray in a fixed step budget, perspective-correct depth, a binary-refined hit), accepting a hit where the ray's depth interval crosses a surface and the surface faces the ray, then composites the scene color back with Fresnel, edge, and distance falloff. The screen-space ray trace follows McGuire & Mara's ["Efficient GPU Screen-Space Ray Tracing"](https://jcgt.org/published/0003/04/04/) (the canonical DDA), [Sugu Lee's SSR write-up](https://sugulee.wordpress.com/2021/01/16/performance-optimizations-for-screen-space-reflections-technique-part-1-linear-tracing-method/), the [3D Game Shaders For Beginners](https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.md) tutorial, and Patricio Gonzalez Vivo's [LYGIA](https://lygia.xyz) `lighting/ssr` (read for the line-distance hit test and back-face rejection). Written from the techniques, independently.
- The SSR temporal resolve (reprojecting the previous frame's reflection by the camera's motion and accumulating it across frames, with a neighborhood variance clamp on the history to reject ghosting) follows Brian Karis's "High-Quality Temporal Supersampling" (SIGGRAPH 2014) and the temporal reprojection of Lasse Jon Fuglsang Pedersen / Playdead ("Temporal Reprojection Anti-Aliasing in INSIDE", GDC 2016). Written from the technique, independently.
- The SSR spatial resolve (a depth-aware despeckle and a variance-aware gloss blur over the reflection) follows the stochastic screen-space reflection denoise of Frostbite (Tomasz Stachowiak, "Stochastic Screen-Space Reflections", SIGGRAPH 2015) and AMD's FidelityFX SSSR. Written from the technique, independently.
- Temporal anti-aliasing (`temporalAntialiasing()`: sub-pixel projection jitter accumulated across frames with history reprojection and neighborhood rectification) is written from the published treatments: Brian Karis's "High-Quality Temporal Supersampling" (SIGGRAPH 2014; the Halton (2,3) jitter, the remove-the-jitter velocity rule, the YCoCg neighborhood box, the luminance-compressed blend, and the Blackman-Harris-fit current-frame reconstruction filter), Marco Salvi's moment-based variance clipping ("An Excursion in Temporal Supersampling", GDC 2016), Lasse Jon Fuglsang Pedersen / Playdead's closest-depth velocity dilation ("Temporal Reprojection Anti-Aliasing in INSIDE", GDC 2016), and Lei Yang, Shiqiu Liu & Marco Salvi's survey ("A Survey of Temporal Antialiasing Techniques", *Computer Graphics Forum* 39(2), Eurographics 2020 STAR; the Catmull-Rom history resampling and the motion-adaptive clip width follow its recommendations and the production practice it catalogs). The camera-only reprojection first stage follows the lineage the survey records (Tiago Sousa's CryENGINE 3 treatment, SIGGRAPH 2011). The mover-velocity buffer (`withMotion`: a per-object velocity pass whose stored convention, previous minus current in render-resolution pixels with the jitter excluded, matches the motion-texture contract of Apple's MetalFX temporal scaler as documented in ["Boost performance with MetalFX Upscaling"](https://developer.apple.com/videos/play/wwdc2022/10103/), WWDC22) follows the same Karis velocity rules and Pedersen closest-depth dilation; the sparse movers-plus-camera-fallback population pattern was cross-read against production practice (Unreal's movable-only velocity buffer, Unity's per-renderer motion-vector modes, Playdead's camera-baseline pass) as engineering references. Written from the techniques, independently; the deterministic export path (N jittered renders averaged within one frame) and the call-site mover identity are Ollin's own arrangements.
- Lens flare (`lensFlare()`: the ghosts a lens throws when light reflects off two of its own interfaces and reaches the sensor anyway) is written from the matrix formulation of Sungkil Lee & Elmar Eisemann, ["Practical Real-Time Lens-Flare Rendering"](https://doi.org/10.1111/cgf.12145) (*Computer Graphics Forum* 32(4), EGSR 2013): the first-order (paraxial) ray transfer matrices for travel, refraction at a spherical interface, and reflection, composed along each two-reflection path so that a ghost maps the entrance pupil to the sensor and to the iris plane by a linear map, with both bounces kept on one side of the aperture. The `Lens.heliar` prescription is the Heliar Tronnier table that paper tabulates from the patent literature (USP 2645156, long expired); a lens prescription is factual data, not code. That work builds on Matthias Hullin, Elmar Eisemann, Hans-Peter Seidel & Sungkil Lee, ["Physically-Based Real-Time Lens Flare Rendering"](https://doi.org/10.1145/2010324.1965003) (*SIGGRAPH* 2011), whose supplemental material is also the source for the anti-reflective coating reflectance: a quarter-wave layer at the geometric mean index, with the two faces' Fresnel amplitudes interfered per polarization over the path-difference phase, which is what colors a ghost. (Their patent application on the ray-traced method was abandoned in the US and withdrawn in Europe; nothing in that family is in force.) Both are written from the papers, independently. The star on the source is the same pair of papers' other half: far-field (Fraunhofer) diffraction at the iris, where the pattern reaching the sensor is the power spectrum of the opening's own image, sampled per wavelength at a scale going as 1/lambda so the arms fan into color. Each wavelength's color comes from the analytic fit to the CIE 1931 color matching functions of Chris Wyman, Peter-Pike Sloan & Peter Shirley, ["Simple Analytic Approximations to the CIE XYZ Color Matching Functions"](https://jcgt.org/published/0002/02/01/) (*JCGT* 2(2), 2013), converted to linear sRGB by the standard matrix. The ghosts themselves are drawn by the 2011 paper's method, written from the paper and its supplement: a uniform grid of rays across the front opening, each carried through the real spherical surfaces in the strict order the ghost's path names them (a sphere carried past its own rim by its equation, so rays outside the glass still serve the interpolation), each recording where it crossed the iris and the furthest it strayed toward any element's rim, the barrel's clip and the iris's shape both read per pixel between the rays, the light a cell carried in spread over the area it lands on (which is what draws a caustic), the coating evaluated per ray at its true angle, what crosses each surface taken as what does not reflect there (so the rays beside a lost one are already dark), multisampling for the fold silhouettes, and three wavelengths for most ghosts with seven for the few that need them. The matrix paper supplies what first order is good for: the enumeration of ghosts, their level, which are bright enough to draw (its intensity-based culling), and its wavelength-dependent flare matrices for the one kind of ghost still drawn to first order. Each glass's index is carried across the spectrum by the first two terms of Cauchy's dispersion series fitted through the index and the Abbe number a prescription prints (see [Wikipedia, "Cauchy's equation"](https://en.wikipedia.org/wiki/Cauchy%27s_equation) and ["Abbe number"](https://en.wikipedia.org/wiki/Abbe_number)); the Heliar's Abbe numbers are the ones its patent prints. The ringing inside a crisp ghost's edge stands in for the 2011 paper's fractional-Fourier aperture texture with the pattern it approximates at an edge: Fresnel diffraction at a straight edge ([Wikipedia, "Fresnel diffraction"](https://en.wikipedia.org/wiki/Fresnel_diffraction); Eugene Hecht, *Optics*), its scale taken from the generalized (Collins) diffraction integral for the stretch of lens between the iris and the sensor, and the Fresnel integrals' two auxiliary functions from the rational fits in Milton Abramowitz and Irene Stegun, *Handbook of Mathematical Functions* (7.3.32 and 7.3.33). The wear on the star's opening (uneven and bowed blades, specks, hairline scratches) is the 2011 paper's procedural dirt added to the aperture before the transform. The dirt on the front of the lens (`LensFlare.dirt`) is the scattering term of the image formation model in Jinwei Gu, Ravi Ramamoorthi, Peter Belhumeur & Shree Nayar, ["Removing Image Artifacts Due to Dirty Camera Lenses and Thin Occluders"](https://www.cs.columbia.edu/CAVE/publications/pdfs/Gu_SIGGRAPH_Asia_09.pdf) (*SIGGRAPH Asia* 2009): a layer too near the lens to focus both dims the scene and adds scattered light, each through the defocus kernel of that layer, which is the iris's own shape; the specks here are that kernel, lit by the flare's sources with a forward-peaked falloff. The streak (`LensFlare.streak`) models what cylindrical glass does to a light, fanning it across itself into one line through the source: the front group of an anamorphic lens throws it, and a streak filter is ruled with fine cylindrical grooves to throw the same line on any lens (see [Lindsey Optics, "What is a Streak Filter?"](https://www.lindseyoptics.com/blog/what-is-a-streak-filter-how-to-get-anamorphic-lens-flare/)). That an anamorphic lens also stretches the rest of its flare two to one, the star's arms and any ring with it, follows Bart Wronski's ["Anamorphic lens flares and visual effects"](https://bartwronski.com/2015/03/09/anamorphic-lens-flares-and-visual-effects/) and Masaki Kawase's ["Subtle Anamorphic Lens Effects"](https://www.siliconstudio.co.jp/rd/presentations/files/siggraph2015/08_SubtleAnamorphicLensEffects_S2015_Kawase_EN.pdf) (in the *SIGGRAPH* 2015 course "Real-time Rendering of Physically Based Optical Effects in Theory and Practice"), which draws the flare on a narrowed canvas and lets the stretch do the rest. Keeping the source round through that stretch (an ellipse on the sensor, so a ghost's edge is as soft across as up and a near-focus ghost is a round picture of a round lamp) is Ollin's own, from the geometry. The halo (`LensFlare.halo`) is a look and not optics, in the tradition of the screen-space flares of real-time graphics (Masaki Kawase's frame-buffer post-processing talk, *GDC* 2003, is the usual root); corona diffraction from fine particles was worked through as its physical basis and set aside, since it puts a central glow some fifty times brighter than its ring. The `Lens.doubleGauss` prescription and its Abbe numbers are the numerical example of Albrecht Wilhelm Tronnier's USP 2673491 (filed 1951, long expired), and its clear openings are the ones Craig Kolb, Don Mitchell & Pat Hanrahan tabulate for the same lens in ["A Realistic Camera Model for Computer Graphics"](https://doi.org/10.1145/218380.218463) (*SIGGRAPH* 1995); a lens prescription is factual data, not code. Later work on the same problem is named here for the reader; it was surveyed, not read in full, and nothing is drawn from it: Matthias Hullin, Johannes Hanika & Wolfgang Heidrich, ["Polynomial Optics"](https://doi.org/10.1111/j.1467-8659.2012.03132.x) (*EGSR* 2012), and Andrea Bodonyi, István Csoba & Roland Kunkli, "Real-time ray transfer for lens flare rendering using sparse polynomials" (*The Visual Computer*, 2025), both of which make ray transfer cheap for lenses with hundreds of ghosts, where following the rays directly is affordable for a lens with a few dozen. The per-surface coating wavelengths (`Lens.multicoated`) and their golden-ratio ordering, the blend from the coated formula to bare Fresnel as an angle approaches total internal reflection, the treatment of a cemented junction as uncoated, the source-visibility term read from the scene's own depth, the backwards per-pixel evaluation in place of rasterized flare quads, the treatment of the source as a disc (the soft edge on the barrel's clip and the iris's, a cubic ramp standing in for the area two circles share, the near-focus ghost as a picture of the source, the cap that keeps its light the same, and the floor it puts under how far a bundle of rays can be squeezed), the cross-fade between followed and first-order ghosts, the ghosts worked out at half the frame's size with the star kept at full size, the level set once per lens under a peak and a veil ceiling, the rule that closing the iris gathers a ghost's light by as much as it shrinks the ghost and adds none (which for the star is the 2011 paper's intensity scaling under a held exposure), the check of every ghost's matrices against real rays, and the mean-normalized bake with its edge window are Ollin's own.
- The shape an out-of-focus highlight takes in the screen-space depth of field (`.defocus(blades:irisAngle:catsEye:)`) follows two published ideas, each written from the technique. That a post-process gathering depth-of-field shader can carry a polygonal rather than a round opening, and that the opening is what a highlight is a picture of, is the subject of Lawrence McIntosh, Bernhard E. Riecke & Steve DiPaola, ["Efficiently Simulating the Bokeh of Polygonal Apertures in a Post-Process Depth of Field Shader"](https://doi.org/10.1111/j.1467-8659.2012.02097.x) (*Computer Graphics Forum* 31(6), 2012). Their own method is a separable low-rank filter, which Ollin does not use: the shipped gather already visits taps in an expanding spiral, so the opening enters as the reach its own boundary allows in each direction, and a polygon is taken at the area of the round opening it replaces so a blade count changes the shape of a highlight without changing how large it reads. The clipping toward the corners is optical vignetting, whose geometry (the pupil an off-axis image point actually sees is what is left of the aperture after the barrel's own openings are projected onto it) is the effect Craig Kolb, Don Mitchell & Pat Hanrahan's ["A Realistic Camera Model for Computer Graphics"](https://doi.org/10.1145/218380.218463) (*SIGGRAPH* 1995) reproduces by tracing rays through a whole lens system. Ollin reproduces the shape rather than the system: the opening is intersected with two discs pushed apart along the line to the middle of the frame, which is the symmetric lemon a real barrel leaves. Reading the blade count off the camera the depth layer was drawn with, so the live blur, the flare ghosts, and the path-traced export cannot disagree about one lens, is Ollin's own.
- The depth of field on the main canvas (`depthOfField()`) blurs the 3D frame through a thin lens. The size of each point's blur is the circle of confusion of [Michael Potmesil & Indranil Chakravarty, *A Lens and Aperture Camera Model for Synthetic Image Generation*](https://doi.org/10.1145/965161.806818) (*SIGGRAPH* 1981), worked out per pixel from the depth buffer. The gather is written as a scatter, each sample landing as a disc of light whose density is one over its own area, with the samples in front of a pixel kept apart from those behind it; that is the scatter-as-gather formulation Jorge Jimenez presented in *Next Generation Post Processing in Call of Duty: Advanced Warfare* (SIGGRAPH 2014 course), written here from the technique. The widest blur per tile and over its neighbors bounds how far each pixel gathers, the tile-max and neighbor-max reduction of the motion-blur filter credited below. The samples follow Helmut Vogel's equal-area sunflower spiral (*A better way to construct the sunflower head*, *Mathematical Biosciences* 44, 1979). Moving the whole spiral by a fixed function of each pixel's position, Jimenez's interleaved gradient noise, and taking a 3x3 median of the result afterwards are the same course's two measures against undersampling; the median is the nine-input exchange network that course cites (John L. Smith, *Implementing Median Filters in XC4000E FPGAs*, Xilinx, 1996). Splitting the layers against each pixel's own distance rather than the focal plane alone, the surface's own cover counted as its share of the disc nothing in front takes, the test that a farther sample is another surface only when its blur differs too, the quarter-weight stand-in for what a blurred foreground hides where no second layer is known, the two sampling zones, the per-pixel reach from its own blur and the blur in front of the focus, the pass over a flat neighborhood, and the place in the chain after temporal anti-aliasing and before motion blur are Ollin's own. What a blurred foreground hides is read from the hidden image of [Sungkil Lee, Gerard Jounghyun Kim, and Seungmoon Choi, *Real-Time Depth-of-Field Rendering Using Point Splatting on Per-Pixel Layers*](https://doi.org/10.1111/j.1467-8659.2008.01344.x) (*Computer Graphics Forum* 27(7), Pacific Graphics 2008): the scene rendered once more keeping only the fragments behind the visible surface, which their per-pixel layers then splat beside the visible image. Here it is drawn as a depth peel against the frame's resolved depth and read by the gather under a near-field pixel; the peel's tolerance from a fragment's own slope, the rule that a face turned away stays out, the gate and the extent from the frame's mesh bounds, the continuity test that keeps a plane's taps one surface along its line in inverse depth, and the choice between the layer and the holes' own content by which stands in front are Ollin's own. A small bright source is taken out of the gather's input and drawn afterwards as a disc of the opening's shape, sized by its own circle of confusion and added over the gathered blur: that is the sprite-based bokeh of Martin Mittring & Bryan Dudash, *The Technology Behind the DirectX 11 Unreal Engine "Samaritan" Demo* (GDC 2011), where every bright pixel scatters a sprite, written here from the technique and kept to the sources the gather would miss. The rule that finds those sources (a pixel brighter than the ring four pixels around it with at most two bright samples side by side on it, which passes a dot and fails a line), the split of each source's light between the gather and its sprite, one sprite slot per block in block order, the softening of a disc's edge by the width of the source it came from, and the cover a nearer surface takes from a disc are Ollin's own. Written independently.
- Motion blur (`motionBlur()`: a full-screen velocity field reduced to a per-tile dominant velocity, then a per-pixel gather along it with continuous depth-and-blurriness classification) reimplements the plausible-motion-blur reconstruction filter of Morgan McGuire, Padraic Hennessy, Michael Bukowski & Brian Osman, ["A Reconstruction Filter for Plausible Motion Blur"](https://casual-effects.com/research/McGuire2012Blur/McGuire12Blur.pdf) (*I3D* 2012): the half-spread velocity clamped to [0.5 px, k], and the TileMax/NeighborMax dominant-velocity pyramid. The velocity field itself is the mover-velocity buffer above with a depth-reprojected camera baseline filled in per pixel (the same fill the MetalFX motion contract expects full-screen). The gather along the dominant velocity is the scatter-as-you-gather sample contribution Jorge Jimenez presented in *Next Generation Post Processing in Call of Duty: Advanced Warfare* (SIGGRAPH 2014 course), which replaced the paper's three-case gather in 2026 after the subframe export below measured that gather keeping a mover's interior at full value: a depth compare whose two halves sum to one, a spread compare from each side, taps in pairs either side of the pixel, and the weights left unnormalized so their mean is the streak's share of the pixel and the pixel's own color fills the rest. The course's mirrored background reconstruction was measured against the subframe export and left out. Written from the paper and the course, independently; the resolution-relative tile size, the scene-scaled soft-depth extent, and the deterministic export arrangement (frame k reading frame k-1's camera and movers through the headless drive) are Ollin's own.
- The subframe export (`--subframes`: each exported frame drawn at moments spread across the shutter and averaged in linear light) is the accumulation buffer of Paul Haeberli & Kurt Akeley, ["The Accumulation Buffer: Hardware Support for High-Quality Rendering"](https://doi.org/10.1145/97880.97913) (*SIGGRAPH* 1990), which renders motion blur as the average of the scene at several moments while the shutter is open. The shutter centered on the frame's instant, the moments at the middles of equal shares of the opening, and the rule that every moment is a draw are Ollin's own. Written from the paper, independently.
- Temporal upscaling (`temporalUpscaling()`) drives **Apple's MetalFX temporal scaler**, a platform framework used as-is rather than a technique reimplemented: Ollin supplies the jittered reduced-resolution render, the depth resolve, and its own full-screen raw velocity fill (the mover-velocity buffer with the camera baseline filled in), following the contracts documented in ["Boost performance with MetalFX Upscaling"](https://developer.apple.com/videos/play/wwdc2022/10103/) (WWDC22) and the framework headers. The deterministic export arrangement (an upscaling sketch exporting as the full-resolution temporal-AA supersample) is Ollin's own.
- The texture simulation (`Simulation`, a rule written once per cell that the GPU steps across a field) follows Mark J. Harris, Greg Coombe, Thorsten Scheuermann & Anselmo Lastra, ["Physically-Based Visual Simulation on Graphics Hardware"](https://diglib.eg.org/handle/10.2312/EGGH.EGGH02.109-118) (*Graphics Hardware* 2002), written from the paper: the lattice's state kept in a texture, each next state worked out by a small per-pixel program that reads the cell and its neighbors, and the two textures swapped each step so one is read while the other is written. Their rules are coupled map lattices, continuous values on a discrete grid, and their examples are convection, reaction-diffusion, and boiling.
- The simulation fields (`SimField`/`Sim`, a layer that evolves on the GPU each frame) reimplement classic cellular models, written from the technique: **reaction-diffusion** is the Gray-Scott model (John E. Pearson, ["Complex Patterns in a Simple System"](https://www.science.org/doi/10.1126/science.261.5118.189), *Science* 1993), with the GPU discretization and the default feed and kill (0.055 and 0.062, which grow coral) following Karl Sims' [reaction-diffusion tutorial](https://www.karlsims.com/rd.md); **Game of Life** is John Conway's cellular automaton (B3/S23); **Lenia** is Bert Wang-Chak Chan's continuous cellular automaton (["Lenia - Biology of Artificial Life"](https://doi.org/10.25088/ComplexSystems.28.3.251), *Complex Systems* 28.3, 2019), implemented from the paper's definitions (the exponential kernel core copied into concentric rings, the sum-normalized convolution, the exponential growth mapping, and the clipped dt integration), with the Orbium parameters as defaults. All run as fragment passes over the persistent ping-pong layer, written independently.
- **SmoothLife** (`.smoothLife`) reimplements Stephan Rafler's generalization of the Game of Life to a continuous field, written from his paper ["Generalization of Conway's \"Game of Life\" to a continuous domain - SmoothLife"](https://arxiv.org/abs/1111.1567) (arXiv, 2011): the disc-and-ring neighborhood with its anti-aliasing ramps, the sigmoid transition function over the birth and death intervals, and the discrete time-stepping, with the parameters of the paper's smooth glider as the defaults.
- The **predator-prey** field (`.predatorPrey`) reimplements the Lotka-Volterra model (Alfred J. Lotka, *Elements of Physical Biology*, 1925; Vito Volterra, ["Fluctuations in the Abundance of a Species considered Mathematically"](https://doi.org/10.1038/118558a0), *Nature* 118, 1926) in the form of Michael L. Rosenzweig and Robert H. MacArthur, ["Graphical Representation and Stability Conditions of Predator-Prey Interactions"](https://doi.org/10.1086/282272) (*The American Naturalist* 97, 1963), with the saturating functional response of C. S. Holling, ["Some Characteristics of Simple Types of Predation and Parasitism"](https://doi.org/10.4039/Ent91385-7) (*The Canadian Entomologist* 91, 1959); the spiral waves the spatial form winds up behind an invasion follow Jonathan A. Sherratt, Mark A. Lewis & Andrew C. Fowler, ["Ecological chaos in the wake of invasion"](https://doi.org/10.1073/pnas.92.7.2524) (*PNAS* 92, 1995) and Alexander B. Medvinsky, Sergei V. Petrovskii, Irene A. Tikhonova, Horst Malchow & Bai-Lian Li, ["Spatiotemporal Complexity of Plankton and Fish Dynamics"](https://doi.org/10.1137/S0036144502404442) (*SIAM Review* 44, 2002). The GPU discretization (the shared 9-point diffusion and the fixed explicit step) is our own.
- The **multi-scale Turing patterns** (`.multiScaleTuring`) reimplement Jonathan McCabe's elaboration of Turing morphogenesis, written from his paper ["Cyclic Symmetric Multi-Scale Turing Patterns"](https://archive.bridgesmathart.org/2010/bridges2010-387.pdf) (*Proceedings of Bridges 2010: Mathematics, Music, Art, Architecture, Culture*), itself derived from Alan Turing's ["The Chemical Basis of Morphogenesis"](https://doi.org/10.1098/rstb.1952.0012) (*Philosophical Transactions of the Royal Society B* 237, 1952): a single substance whose activator and inhibitor are averages over a small and a large area, several such scales run at once, and at each pixel and step the scale with the least variation firing, with cyclic symmetry imposed by averaging each point's averages with its counterparts around the circle. Jason Rampe's ["Multi-Scale Turing Patterns"](https://softologyblog.wordpress.com/2011/07/05/multi-scale-turing-patterns/) (Softology, 2011) was read for the per-scale variation radius the paper leaves implicit. The GPU realization is our own: a Gaussian (Burt-Adelson) blur pyramid serving every radius, gathered as a disc two rungs finer than the radius so the pattern does not lock to the pyramid's lattice, and a min/max reduction chain driving the per-step renormalization. Ricky Reusser's [FFT-based WebGPU implementation](https://rreusser.github.io/notebooks/multiscale-turing-patterns/) and [janivanecky's](https://github.com/janivanecky/multiscale-turing-patterns) were noted as prior GPU treatments, not read for code.
- The **watercolor wash** (`.watercolor` / `WatercolorField` / `WatercolorPigment`) reimplements the classic three-layer watercolor simulation of Cassidy J. Curtis, Sean E. Anderson, Joshua E. Seims, Kurt W. Fleischer & David H. Salesin, ["Computer-Generated Watercolor"](https://grail.cs.washington.edu/projects/watercolor/) (*SIGGRAPH* 1997), written from the paper: the shallow-water layer on a staggered grid (whose equations follow the liquid-animation work the paper itself cites, "Realistic Animation of Liquids", *Graphical Models and Image Processing* 58, 1996, including the iterative divergence relaxation), the pigment-deposition layer with per-pigment density, staining, and granulation, the capillary layer whose saturation diffusion and wet-area-mask expansion produce backruns, the blurred-mask edge darkening, the dry-brush height threshold, and the Kubelka-Munk optical layer model (after Paul Kubelka's layer equations; the paper's forms) with the paper's inversion that derives absorption and scattering from a pigment's color over white and over black. The measured coefficients behind the twelve pigment presets are the paper's published Figure 5 table. Deliberate implementation decisions of ours, documented in `ARCHITECTURE.md`: the viscosity term follows the paper's continuous equations (+μ∇²u; the printed pseudocode's sign reads inverted, and anti-diffusion is unstable), the relaxation is implemented in the divergence-reducing direction, the adaptive time step becomes fixed CFL substeps with clamped velocities (the ripples precedent), the unspecified capillary constants are calibrated and exposed as parameters, and the paper's authored damp-region initial conditions surface as `blot()`. The GPU realization (gather-form fragments over persistent ping-pong pairs, the dried-glaze reflectance/transmittance stack) is our own.
- The **Abelian sandpile** (`.sandpile`) reimplements the Bak-Tang-Wiesenfeld model, written from the papers: Per Bak, Chao Tang & Kurt Wiesenfeld, ["Self-organized criticality: An explanation of the 1/f noise"](https://doi.org/10.1103/PhysRevLett.59.381) (*Physical Review Letters* 59, 1987) defines the threshold-4 toppling automaton, and Deepak Dhar's ["Self-organized critical state of sandpile automaton models"](https://doi.org/10.1103/PhysRevLett.64.1613) (*Physical Review Letters* 64, 1990) proves the abelian property (topplings commute) that makes the GPU's parallel update, every unstable cell toppling as many times as it can per pass, settle into the same configuration as any sequential order. The GPU realization (a gather fragment over the persistent ping-pong layer, grain counts stored in quarters for exact half-float arithmetic, an open dissipative boundary) is our own.
- The **falling sand** sim (`.fallingSand`, `SandMaterial`) reimplements the block-cellular sand rule of Tommaso Toffoli and Norman Margolus, written from their book [*Cellular Automata Machines: A New Environment for Modeling*](https://openlibrary.org/isbn/0262200600) (MIT Press, 1987), which introduces the 2x2 block neighborhood and its alternating tiling as the way to move particles with no ordering and no conservation errors. The probabilistic roll (a grain stays put with probability `friction`) follows Jonathan Devlin and Micah D. Schuster, ["Probabilistic Cellular Automata for Granular Media in Video Games"](https://arxiv.org/abs/2008.06341) (arXiv, 2020), and the material palette (sand that sinks through water, water that spreads sideways, walls that never move) is the shared vocabulary of the falling-sand game genre. The GPU realization (one gather fragment settling its whole block from the same four reads and writing back its own corner, the origin walking the block's four corners over four passes, an age-seeded coin per block, a closed box, the material encoded as one of four gray levels) is our own.
- The **state automata** sims reimplement seven classic published rules, each written from the paper or its canonical popularization: the **cyclic cellular automaton** (`.cyclic`) is David Griffeath's rule, with the threshold-range generalization from Robert Fisch, Janko Gravner & David Griffeath, ["Threshold-range scaling of excitable cellular automata"](https://doi.org/10.1007/BF01890834) (*Statistics and Computing* 1, 1991); the **excitable medium** (`.excitable`) is the Greenberg-Hastings model (James M. Greenberg & Stuart P. Hastings, "Spatial patterns for discrete models of diffusion in excitable media", *SIAM Journal on Applied Mathematics* 34/3, 1978), in the same threshold-range form; **Brian's Brain** (`.briansBrain`) is Brian Silverman's three-state rule; the **forest fire** (`.forestFire`) is Barbara Drossel & Franz Schwabl's self-organized critical model (["Self-organized critical forest-fire model"](https://doi.org/10.1103/PhysRevLett.69.1629), *Physical Review Letters* 69, 1992), whose lightning probability, added to the earlier forest-fire model of Per Bak, Kan Chen and Chao Tang, is what puts the field at criticality; and the **hodgepodge machine** (`.hodgepodge`) is Martin Gerhardt & Heike Schuster's model of a catalytic oscillating reaction ("A cellular automaton describing the formation of spatially ordered structures in chemical systems", *Physica D* 36, 1989), implemented in the formulation A. K. Dewdney spelled out in "The hodgepodge machine makes waves" (*Scientific American* 259/2, Computer Recreations, August 1988): the healthy cell's ⌊A/k1⌋ + ⌊B/k2⌋ catch, the infected cell's neighborhood-average climb plus g, and the instant recovery at the top state; **Wireworld** (`.wireworld`) is Brian Silverman's four-state rule from his 1987 Phantom Fish Tank, as A. K. Dewdney described it in "Computer Recreations" (*Scientific American* 262/1, January 1990); and the **Schelling board** (`.schelling`) is Thomas C. Schelling's spatial proximity model from ["Dynamic Models of Segregation"](https://doi.org/10.1080/0022250X.1971.9989794) (*Journal of Mathematical Sociology* 1/2, 1971), its move to the nearest satisfactory empty square carried out as hops into nearby empties, run as a block automaton in the Toffoli-Margolus manner so the parallel moves never collide. All of them run as fragment passes over the persistent ping-pong layer, written independently.
- The **Ising model** sim (`.ising`, `IsingSpin`) is the model Wilhelm Lenz proposed in 1920 and Ernst Ising solved in one dimension in his thesis (["Beitrag zur Theorie des Ferromagnetismus"](https://doi.org/10.1007/BF02980577), *Zeitschrift für Physik* 31, 1925), with the critical temperature of the square lattice from Lars Onsager's exact solution (["Crystal Statistics. I. A Two-Dimensional Model with an Order-Disorder Transition"](https://doi.org/10.1103/PhysRev.65.117), *Physical Review* 65, 1944). It runs by the Metropolis algorithm of Nicholas Metropolis, Arianna W. Rosenbluth, Marshall N. Rosenbluth, Augusta H. Teller, and Edward Teller (["Equation of State Calculations by Fast Computing Machines"](https://doi.org/10.1063/1.1699114), *The Journal of Chemical Physics* 21, 1953), in the checkerboard form every parallel implementation uses, where the two sublattices update in turn so no spin reads a neighbor being written. The GPU realization (a fragment per pass over the persistent ping-pong layer, the coin hashed from the cell, the pass count, and the seed so a run replays) is our own.

- **Hidden-line drawing** (`LineDrawing`, `lineDrawing(of:)`) reimplements the oldest problem in the field: writing a solid down as the lines a draughtsman would draw, first solved by Lawrence G. Roberts, ["Machine Perception of Three-Dimensional Solids"](https://dspace.mit.edu/handle/1721.1/11589) (MIT Lincoln Laboratory Technical Report 315, 1963), and given its classic form by Arthur Appel, ["The Notion of Quantitative Invisibility and the Machine Rendering of Solids"](https://doi.org/10.1145/800196.806007) (ACM National Conference, 1967). Which edges are worth drawing at all is the feature-edge set of technical illustration, silhouette, crease, and boundary, as set out by Lee Markosian, Michael A. Kowalski, Samuel J. Trychin, Lubomir D. Bourdev, Daniel Goldstein, and John F. Hughes, ["Real-Time Nonphotorealistic Rendering"](https://doi.org/10.1145/258734.258894) (SIGGRAPH 1997). Neither published visibility algorithm is used: the edges here are walked and tested against a grid of the projected faces, with each change of visibility found by halving, which is our own, as are the welding pass, reading a face's turn on screen as its facing, and keeping the covered stretches for a dashed line. Written from the descriptions.
- **Hidden-line solids** (`featureEdges(creaseAngle:)`) draw the same feature-edge set on the GPU, after Morgan McGuire and John F. Hughes, ["Hardware-Determined Feature Edges"](https://cs.brown.edu/people/jhughes/papers/McGuire-HDE-2004/main.htm) (NPAR 2004): the edges of a mesh found once into an edge mesh that carries each edge's two face normals, and the vertex shader deciding per edge and per copy whether it is a crease, a boundary, or the silhouette, and laying a drawn one out as a quad on the screen. The per-pixel coverage, the depth pulled toward the eye, setting a smooth silhouette just outside the contour, and skipping a crease that turns away on a closed mesh are Ollin's own. Written from the paper.
- **Line integral convolution** (`Combine.lineIntegralConvolution`, `streaked(along:)`) reimplements the vector-field visualization of Brian Cabral and Leith Casey Leedom, ["Imaging Vector Fields Using Line Integral Convolution"](https://doi.org/10.1145/166117.166151) (SIGGRAPH '93): each pixel is the average of the input along the streamline through it, walked both ways, so a noise texture comes out brushed along the field. The three field readings (a vector layer, a luminance read as an angle, the perpendicular of the luminance gradient for contour streaks) and the heading rule that carries a walk through an unoriented field are our own.
- The **fluid** simulation (`.fluid`, a real-time incompressible flow that carries color) reimplements the stable-fluids method, written from the technique: semi-Lagrangian advection and the Jacobi pressure-projection that keeps the flow divergence-free are Jos Stam's ["Stable Fluids"](https://www.dgp.toronto.edu/people/stam/reality/Research/pdf/ns.pdf) (1999), realized on the GPU after Mark Harris' ["Fast Fluid Dynamics Simulation on the GPU"](https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-triangles/chapter-38-fast-fluid-dynamics-simulation-gpu) (*GPU Gems* 38); the **vorticity confinement** that restores swirling detail is from Fedkiw, Stam & Jensen's ["Visual Simulation of Smoke"](https://web.stanford.edu/class/cs237d/smoke.pdf) (2001). The splat-driven real-time arrangement and parameter feel were studied from Pavel Dobryakov's [WebGL-Fluid-Simulation](https://github.com/PavelDoGreat/WebGL-Fluid-Simulation) (MIT). Written independently.
- The **self-warp** motion feedback (`.selfWarp`, the picture's history carried along its own measured motion) estimates that motion with the classic windowed least-squares optical flow of [Bruce D. Lucas and Takeo Kanade, "An Iterative Image Registration Technique with an Application to Stereo Vision"](https://www.ri.cmu.edu/pub_files/pub3/lucas_bruce_d_1981_2/lucas_bruce_d_1981_2.pdf) (*IJCAI* 1981), arranged coarse-to-fine over reduced-resolution grids in the manner of [Jean-Yves Bouguet, "Pyramidal Implementation of the Affine Lucas Kanade Feature Tracker"](http://robots.stanford.edu/cs223b04/algo_tracking.pdf) (Intel, 2000); the history is then carried by the same semi-Lagrangian advection the fluid above uses (Stam). Written from the technique.
- The **artificial-life** systems (`ParticleLife`, `PPS`, `Physarum`) and the GPU neighbor search under them each reimplement a published technique, written from the paper or article. **Particle Life** (a few particle kinds and a per-ordered-pair attraction/repulsion matrix, from which membranes, cells, and chasers emerge) is Jeffrey Ventrella's *Clusters*, popularized as "particle life"; its short-range-repulsion-then-attraction force follows [Tom Mohr's particle-life](https://github.com/tom-mohr/particle-life) parameterization, cross-read against [lisyarus' WebGPU write-up](https://lisyarus.github.io/blog/posts/particle-life-simulation-in-browser-using-webgpu.md). The **Primordial Particle System** (one turning rule, `Δφ = α + β·N·sign(R − L)`, that grows dividing cells) is Thomas Schmickl, Martin Stefanec and Karl Crailsheim's ["How a life-like system emerges from a simplistic particle motion law"](https://www.nature.com/articles/srep37969) (*Scientific Reports* 6, 37969, 2016), with the paper's canonical `⟨r = 5, α = 180°, β = 17°, v = 0.67⟩`. **Physarum** transport networks (agents that sense three points ahead, steer toward the strongest, deposit a trail, and let it diffuse and decay) are Jeff Jones' agent model, ["Characteristics of Pattern Formation and Evolution in Approximations of Physarum Transport Networks"](https://doi.org/10.1162/artl.2010.16.2.16202) (*Artificial Life* 16(2), 2010). **Particle Lenia** (particles that walk down the gradient of an energy field `E = R − G(U)`, where a ring-shaped kernel summed over neighbors gives the field `U`, a growth function scores it, and a repulsion term keeps particles off each other) is Alexander Mordvintsev, Eyvind Niklasson and Ettore Randazzo's ["Particle Lenia and the energy-based formulation"](https://google-research.github.io/self-organising-systems/particle-lenia/) (Google Research, Self-Organising Systems, 2022), itself a particle rewriting of Bert Wang-Chak Chan's Lenia. Ollin derives the kernel's weight rather than tabulating it, since it is the constant that normalizes the kernel over the plane. **Swarm chemistry** (particles each carrying their own eight-value kinetic recipe, with Boids-style cohesion, alignment, separation, random steering and pace-keeping) is Hiroki Sayama's ["Swarm Chemistry"](https://doi.org/10.1162/artl.2009.15.1.15107) (*Artificial Life* 15(1), 2009); the evolutionary layer, where recipes transmit between colliding particles with mutation and a competition function decides the direction of transfer, follows his later work on open-ended evolution in the model, including ["Seeking Open-Ended Evolution in Swarm Chemistry II"](https://arxiv.org/abs/1804.03304) (Sayama, 2018). The published parameter table and rule list were read from Sayama's ["Guiding Designs of Self-Organizing Swarms"](https://arxiv.org/abs/1308.3400); Ollin converts recipes out of that model's own length scale into whatever world a sketch gives it, so a shared recipe means the same behavior at any canvas size.

The GPU **uniform-grid fixed-radius neighbor search** they share (`SpatialHash`, a counting sort: count into cells, prefix-sum into offsets, scatter into slots) follows Rama Hoetzlein's ["Fast Fixed-Radius Nearest Neighbors: Interactive Million-Particle Fluids"](https://ramakarl.com/fluids3/) (NVIDIA, GTC 2014). The open-ended-evolution direction these point toward is explored at scale by the [ALIEN](https://github.com/chrxh/alien) project (Christian Heinemann), whose license is BSD-3-Clause; it remains an inspiration only, studied for which techniques exist rather than for its code, which is CUDA. No code was taken from any of these; all written independently in Swift and Metal.
- The GPU **particle fluid and soft bodies** (`ParticleFluid`, `SoftBodies`) reimplement three published papers over the `SpatialHash` neighbor search. The fluid is smoothed-particle hydrodynamics after Müller, Charypar & Gross, ["Particle-Based Fluid Simulation for Interactive Applications"](https://matthias-research.github.io/pages/publications/sca03.pdf) (SCA 2003): density summation, the symmetrized pressure force with a non-vanishing ("spiky"-family) gradient so crowded particles always separate, and the `p = k(ρ − ρ0)` state equation, with the kernels normalized for 2D by direct integration. Its anti-clustering **near-density / near-pressure** pair (which also produces the emergent surface tension) is from Clavet, Beaudoin & Poulin, ["Particle-based Viscoelastic Fluid Simulation"](https://dl.acm.org/doi/10.1145/1073368.1073400) (SCA 2005), whose quadratic/cubic spike kernels the fluid uses; evaluating all passes at short-lookahead predicted positions is standard practice in interactive GPU SPH (cross-read against Sebastian Lague's [Fluid-Sim](https://github.com/SebLague/Fluid-Sim), MIT, and Lucas Schuermann's [mueller-sph](https://github.com/cerrno/mueller-sph), MIT). The soft bodies are meshless **shape matching** after Müller, Heidelberger, Teschner & Gross, ["Meshless Deformations Based on Shape Matching"](https://matthias-research.github.io/pages/publications/MeshlessDeformations_SIG05.pdf) (SIGGRAPH 2005): goal positions from the closed-form 2D best-fit rotation of rest offsets about the rest centroid, pulled at a single unconditionally-stable stiffness. No code was taken from any of these; all written independently in Swift and Metal.
- The shader library's hashing, value noise, `curlNoise`, and disc sampling (spliced for free into every user shader and `ComputeKernel`) reimplement published techniques in Metal: Dave Hoskins' [Hash without Sine](https://www.shadertoy.com/view/4djSRW), the value-noise lattice from [The Book of Shaders](https://thebookofshaders.com/11/), and the curl-of-a-noise-potential construction, written independently. The simulations' probability rolls (a forest fire's growth and lightning, a magnet's flips, a Schelling agent's move) draw from the top 24 bits of the PCG3D hash of Mark Jarzynski and Marc Olano, ["Hash Functions for GPU Rendering"](https://jcgt.org/published/0009/03/02/) (*Journal of Computer Graphics Techniques* 9(3), 2020), written from the paper.
- The noise toolkit (`simplexNoise`, `worley`, `ridgedFbm`, `turbulence`, and `warpedFbm`, each a CPU helper and a shader-library function, plus the `.cellular` generator and the `warp` parameter on `.noise`) reimplements the published techniques on both sides: **simplex noise** is Ken Perlin's simplex construction (*Real-Time Shading* SIGGRAPH 2001 course; his hardware-noise patent expired in 2022), implemented from Stefan Gustavson's ["Simplex noise demystified"](https://cgvr.cs.uni-bremen.de/teaching/cg_literatur/simplexnoise.pdf) (2005), with Ollin's own contrast calibration; **Worley cellular noise** is Steven Worley's texture basis ("A Cellular Texture Basis Function", SIGGRAPH 1996), in the cell-space 3×3 scan form taught by [The Book of Shaders' cellular-noise chapter](https://thebookofshaders.com/12/), the animated generator wandering its feature points the way that chapter does; **ridged fbm** is F. Kenton Musgrave's ridged multifractal (*Texturing & Modeling: A Procedural Approach*, and his published `musgrave.c`: the folded-and-squared signal with its octave-weight feedback), reparameterized onto `fbm`'s gain/lacunarity parameters; **turbulence** is Ken Perlin's fold ("An Image Synthesizer", SIGGRAPH 1985); and **domain warping** follows [Inigo Quilez's warp article](https://iquilezles.org/articles/warp/) (the two-level fbm displacement with his offsets, exposed one-call as `warpedFbm` and opened up in the `DomainWarp` example). All written independently in Swift and Metal.
- Gabor noise (`GaborNoise` / `gaborNoise` on the CPU, the `.gaborNoise` generator, and the shader-library `gaborNoise`) implements **sparse Gabor convolution** from Ares Lagae, Sylvain Lefebvre, George Drettakis, and Philip Dutré, [*Procedural Noise using Sparse Gabor Convolution*](https://doi.org/10.1145/1531326.1531360) (ACM Transactions on Graphics 28(3), SIGGRAPH 2009): the Gabor kernel as a Gaussian envelope times a cosine, the Poisson impulse field evaluated cell by cell with a per-cell seeded congruential generator and Knuth's small-mean Poisson draw, the closed-form variance used to normalize the output, the isotropic / anisotropic / orientation-range variants, and the frequency-domain filtering of each kernel against a Gaussian pixel footprint (the product of two Gaussians being a Gaussian, so the filtered kernel is again a Gabor kernel). The multiplier of the congruential generator is Borosh and Niederreiter's (*Optimal multipliers for pseudo-random number generation by the linear congruential method*, BIT 23, 1983), as the paper uses; the per-cell seed hash is Ollin's own. Written from the paper in Swift and Metal.
- The escape-time fractal `Generator`s render the sets of Gaston Julia (1918) and Benoit Mandelbrot (1980), colored by the standard continuous ("smooth") iteration count (the renormalized escape time, `n + 1 - log2(log2|z|)`), written from the published mathematics.
- The `.newton` generator draws the basins of Newton's method over a polynomial, the problem Arthur Cayley posed for the cubic in *The Newton-Fourier imaginary problem* (*American Journal of Mathematics* 2, 1879, [doi:10.2307/2369201](https://doi.org/10.2307/2369201)); the coloring by root with the shading by step count follows the plates of Heinz-Otto Peitgen and Peter H. Richter's *The Beauty of Fractals* (Springer, 1986, [doi:10.1007/978-3-642-61717-1](https://doi.org/10.1007/978-3-642-61717-1)), the step count made continuous by the same renormalization the escape count uses, and the scaled step is the relaxed Newton method. Written from the published mathematics.
- The `.orbitTrap` generator colors the same iteration by the orbit's minimum distance to a trap shape, a technique introduced by Clifford Pickover (his cross is the "Pickover stalks"). The epsilon-cross form dates to Fractint, 1989. Cross-read against [Inigo Quilez's geometric orbit traps](https://iquilezles.org/articles/ftrapsgeometric/), then written independently.
- The `.domainColoring` generator paints a complex function over its own plane, coloring each point by the direction of the value there. The method and its name come from Frank A. Farris (his review of Tristan Needham's *Visual Complex Analysis*, *American Mathematical Monthly* 105, 1998, where the term "domain coloring" is introduced), and the shading forms follow Elias Wegert's phase portraits (*Visual Complex Functions: An Introduction with Phase Portraits*, Birkhauser, 2012): the plain portrait, the modulus ruling that ramps between successive doublings of the value, and the two rulings together, which draw the conformal grid a holomorphic function carries. That the wheels around a zero and a pole run opposite ways, and count multiplicity, is the argument principle. Written from the published technique.
- The shader library's `complex` module and the `Complex` value implement the textbook complex arithmetic (the Cartesian product and quotient, the polar form, the principal branches of the logarithm, the power, and the root, the trigonometric and hyperbolic functions by their identities). The shader form, a `float2` read as a number with a function per operation and a domain coloring at the end, is the one Harley Turan lays out in *Complex Number Visualization in GLSL* (hturan.com/writing/complex-numbers-glsl, April 2022), read for its shape and for the picture it builds to (two points moving, the phase of their ratio painted). Written independently, with C's own names for the functions; the coloring is the OKLCH wheel and the two rulings the generator above already draws.
- The `.diffuse` filter and `drawDiffusionCurve` implement **diffusion curves** (Alexandrina Orzan, Adrien Bousseau, Holger Winnemöller, Pascal Barla, Joëlle Thollot, and David Salesin, ["Diffusion Curves: A Vector Representation for Smooth-Shaded Images"](https://doi.org/10.1145/1360612.1360691), *ACM Transactions on Graphics* 27(3), SIGGRAPH 2008): curves carrying a color on each side, and the image as the solution of the Laplace equation those colors constrain, solved coarse to fine. Ollin's solve is its own: the constraints are the layer's own drawn pixels rather than rasterized curve geometry, they are carried down the pyramid in premultiplied form so a hairline mark survives the coarse sizes, and a partly covered texel pulls in proportion to its coverage rather than being held. Written from the paper.
- The `.seamlessClone` combine implements **Poisson image editing** (Patrick Pérez, Michel Gangnet, and Andrew Blake, ["Poisson Image Editing"](https://doi.org/10.1145/882262.882269), *ACM Transactions on Graphics* 22(3), SIGGRAPH 2003): a region pasted into another image so the seam vanishes, by solving for the field whose gradients match the source and whose values match the destination around the region's boundary. Ollin uses the paper's membrane form of that solve, where the correction added to the patch is the harmonic function matching the destination-minus-source difference around the rim. The field itself is settled with a **convolution pyramid** (Zeev Farbman, Raanan Fattal, and Dani Lischinski, ["Convolution Pyramids"](https://doi.org/10.1145/2070781.2024209), *ACM Transactions on Graphics* 30(6), SIGGRAPH Asia 2011), which stands in for one very wide kernel with a multiscale scheme of three small fitted kernels, in one pass down the sizes and one back up rather than by relaxation; the fitted membrane weights are that paper's published values. Both written from the papers, independently. OPENRNDR's [orx-poisson-fill](https://github.com/openrndr/orx) was cross-read beforehand for which pieces of this family exist and how they are approached, the same way LYGIA and ofxFX inform the filter catalog. The region is taken from the patch layer's own alpha, and the float32 intermediates (the fitted kernels are unnormalized, so a layer's worth of levels leaves half float's range at both ends), the rim extraction, and the composite are Ollin's own.
- The pattern-field `Generator`s reimplement classic closed-form constructions, each written from the published form: **`.quasicrystal`** is the summed-plane-wave quasicrystal (waves at evenly spaced angles), the construction popularized by [Keegan McAllister's "Quasicrystals as sums of waves in the plane"](http://mainisusuallyafunction.blogspot.com/2011/10/quasicrystals-as-sums-of-waves-in-plane.md) (2011), whose mathematical roots are de Bruijn's projection theory of Penrose tilings; **`.gyroid`** slices Alan Schoen's gyroid (the triply periodic minimal surface he described in 1970, NASA TN D-5541) by its standard level-set approximation; **`.phyllotaxis`** evaluates Helmut Vogel's sunflower model (*A better way to construct the sunflower head*, 1979) as a per-pixel nearest-floret field; **`.moire`** is textbook two-grating moiré interference; and **`.hexPulse`** uses the standard two-lattice modulo construction for hexagonal tiling common in the shader community. All five written independently in Metal.
- The design-pattern `Generator` catalog (`.meshGradient`, `.filaments`, `.smokeRing`, `.colorPanels`, `.spiral`, `.waves`, `.dotOrbit`, `.grainGradient`, `.pulsingBorder`, `.godRays`) was cross-read against [Paper Shaders](https://github.com/paper-design/shaders) (paper.design, Apache-2.0; shaders by Ksenia Kondrashova) for which design-shader effects exist and how they're approached (the same way LYGIA and ofxFX inform the filter catalog), then each was written independently in Metal from the underlying published technique: the **mesh gradient** blends orbiting color points by inverse-distance weighting ([Shepard's method](https://en.wikipedia.org/wiki/Inverse_distance_weighting), 1968) over [Inigo Quilez domain warping](https://iquilezles.org/articles/warp/); the **filaments** pattern is the cross-octave sine-feedback fractal from [@zozuar's one-tweet shader](https://x.com/zozuar/status/1625182758745128981), popularized by Kondrashova's "Neuro Noise"; **smokeRing** and **godRays** are polar-domain value-noise fields (with the standard double-parameterization blend hiding the atan2 seam); **colorPanels** is an analytic ray/plane intersection fan; **spiral** is the classic `fract(r + θ/2π)` level set with derivative-based anti-aliasing; **dotOrbit** animates the feature points of Worley cellular noise; **grainGradient** bands a scalar field (its `.truchet` field after the Smith quarter-arc tile credited below, its `.blob` the metaball falloff sum) with noise added to the field *before* quantization; and **pulsingBorder** is built on Quilez's rounded-box SDF with angular sector masks. Palette banding, premultiplied layer compositing, and the sRGB-space blending that keeps designer palettes true are shared plumbing across the set. The design-filter siblings (`.flutedGlass`, `.water`, `.paperTexture`, `.liquidMetal`, `.heatmap`, `.gemSmoke`) were cross-read against the same catalog and written from the canonical techniques likewise: **fluted glass** is per-cell 1D refraction (quantize into strips, displace each strip's sampling coordinate by a fixed profile, the standard screen-space approximation of a cylindrical lens array); **water**'s caustics are the iterated domain-rotated sine accumulation (the community-standard tileable-caustic construction, luminance from the derivatives of a phase-warped field), over screen-space refraction offsets; **paper texture** is finite-difference bump lighting (Blinn) of a height field built from value-noise tooth, Worley crumple facets and speckles, and fibers extracted as the gradient magnitude of a domain-rotated fbm; **liquid metal** is a 1D chrome reflectance ramp (two hot hairlines plus a broad sky-to-ground gradient per cycle, the airbrush-chrome idiom whose 2D ancestor is the lit-sphere/matcap model of Sloan et al., "The Lit Sphere", GI 2001) indexed by a warped coordinate whose curvature proxy is a blurred interior field of the shape's alpha; **heatmap** and **gem smoke** shade multi-radius blurred alpha fields through the same palette walks. The liquid-metal/gem-smoke interior-inflation field (the Poisson "pillow" problem the originals solve on the CPU per logo) is solved on the GPU as coarse-to-fine Jacobi relaxation fragment passes, so it runs per frame over animated layers; heatmap's multi-radius blurred fields match its reference, which is blur-based. The **liquid metal** band pattern and **fluted glass** refraction follow Paper Shaders' published parameterization closely (the per-cycle band layout with its wide gradient, the hand-shaped per-channel dispersion, and the per-profile border fades are their design, reexpressed in Ollin's Metal over Ollin's field prep); Apache-2.0 permits this freely, and the debt is recorded here.
- The fluent `Visual` chain tier (compose sources, warps, color moves, blends, and modulations into one generated fragment shader) borrows its *composition model* from [Hydra](https://github.com/ojack/hydra) (Olivia Jack): the closed algebra of source / coordinate / color / combine / modulate operations, the pullback trick of warping the sampling coordinate rather than the image, and modulation as one chain's color driving another's coordinates, the analog-video-synth idea. Hydra is AGPL-3.0, so its architecture was studied and described, never its source translated; every operation is Ollin's own Metal, and the parameter model differs deliberately (values are passed in a uniform buffer keyed off the chain's structure, so animation never recompiles). The value-type staged-trace approach (the host language records the chain; codegen follows) was studied from [Shader Park](https://github.com/shader-park) (MIT). The op implementations are standard published techniques: the polar regular-polygon distance from [The Book of Shaders' shapes chapter](https://thebookofshaders.com/07/), the hexcone RGB↔HSV conversions, the jittered-lattice cellular pattern after [Inigo Quilez's Voronoi articles](https://iquilezles.org/articles/smoothvoronoi/), and the hash/value-noise lattice already credited above. Written independently.
- The GLSL shader importer (`ollin new --from-shader`) translates the fragment-shader shape [Shadertoy](https://www.shadertoy.com) established (Inigo Quilez and Pol Jeremias): a `mainImage(out vec4 fragColor, in vec2 fragCoord)` entry point over the `iTime` / `iResolution` / `iMouse` / `iFrame` / `iChannel0-3` values the site supplies each frame. That contract is read from the site's own published documentation and mapped onto Ollin's `shade(uv, info)`; no shader is bundled, and the importer only ever translates source the user hands it, with the author's terms recorded in the emitted file's header (much of the public corpus is CC BY-NC-SA or reserved, so this matters). Shaders are fetched, when asked, only through the site's own public API with a key the user supplies. The translation itself is Ollin's own lexer and rewriter, written from the two language specifications rather than from any existing translator; where a Metal built-in is not a drop-in replacement it writes the GLSL form out instead, most importantly `mod`, whose GLSL definition floors the quotient (`x - y*floor(x/y)`) where Metal's `fmod` truncates it, so the two disagree for negative operands. That difference is long documented in the porting literature; it was cross-checked against [naga issue #802](https://github.com/gfx-rs/naga/issues/802) and the [SDFMetalDemo notes on porting `mod`](https://github.com/novocodev/SDFMetalDemo/wiki/Porting-GLSL-shader-mod()-function-to-Metal-Compute-Shader).
- The OllinLiveCoding performance host follows the livecoding performance model of [Hydra](https://github.com/ojack/hydra) (Olivia Jack): the code is drawn over the running visuals as part of the show, edits evaluate into the running piece without stopping it, and hiding the code turns the same window into pure projection. Hydra is AGPL-3.0, so the model was studied as a product and never its source translated; the host is Ollin's own SwiftUI/AppKit app over Ollin's own dylib hot-swap engine, and where Hydra evaluates JavaScript per keystroke, Swift compiles, so the loop is deliberately evaluate-on-command.

### Generative geometry

- `curlNoise` follows the curl-noise method for divergence-free flow (Robert Bridson, Jim Hourihan, and Marcus Nordenstam, "Curl-Noise for Procedural Fluid Flow", 2007), in the plane and in space. Both forms take the field's gradient in closed form, the derivative-carrying noise evaluation Inigo Quilez describes in [*Gradient noise derivatives*](https://iquilezles.org/articles/gradientnoise/), derived here for the improved Perlin lattice and written independently.
- The `poissonDisk` blue-noise sampler follows Robert Bridson's ["Fast Poisson Disk Sampling in Arbitrary Dimensions"](https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf), 2007 (the background-grid dart-throwing that makes it linear-time). The form inside a `Shape` is the same thrower with the fill as the landing area, its seeds drawn from the fill's triangles and the throwing restarted from a fresh seed once every placed point has retired, an addition of our own so a thin shape and a shape of several islands both fill.
- The `haltonPoints` low-discrepancy sequence is John H. Halton's radical-inverse construction ("On the efficiency of certain quasi-random sequences of points in evaluating multi-dimensional integrals", *Numerische Mathematik* 2, 1960); `sobolPoints` is Ilya M. Sobol's sequence (1967) generated with the standard Gray-code stepping (I. A. Antonov and V. M. Saleev, 1979; Paul Bratley and Bennett L. Fox, "Algorithm 659", 1988), the direction numbers for its second dimension from the degree-one primitive-polynomial recurrence as tabulated by [Stephen Joe and Frances Y. Kuo](https://web.maths.unsw.edu.au/~fkuo/sobol/). Written from the technique.
- `surfacePoints` scatters a mesh's surface by three published pieces, each written from the technique. A triangle is chosen in proportion to its area from a running-total table, and the point inside it comes from [Eric Heitz's low-distortion square-to-triangle map](https://eheitzresearch.wordpress.com/749-2/) (Unity Technologies technical report, 2019), which presses the square's two halves together across the diagonal instead of taking the square root the classic map uses (Greg Turk, "Generating Random Points in Triangles", *Graphics Gems*, 1990, as used for shape sampling by Robert Osada, Thomas Funkhouser, Bernard Chazelle and David Dobkin, "Shape Distributions", *ACM TOG* 21(4), 2002), so it costs no square root and keeps an even input even; `randomPoints(in:count:)` scatters a `Shape`'s fill by the same table and the same fold over the fill's triangulation. The `.blueNoise` spread thins an oversampled draw by the weighted sample elimination of [Cem Yuksel](https://www.cemyuksel.com/research/sampleelimination/) ("Sample Elimination for Generating Poisson Disk Sample Sets", *Computer Graphics Forum* 34(2), 2015): a weight per sample that falls to nothing at the honeycomb spacing the count deserves, the heaviest eliminated repeatedly, which is what lets a blue-noise set be asked for by count on a surface where a radius has no obvious value.
- `stipple` implements Adrian Secord's ["Weighted Voronoi Stippling"](https://www.cs.ubc.ca/labs/imager/tr/2002/secord2002b/secord.2002b.pdf) (NPAR 2002): dots seeded by rejection-sampling an image's darkness, then iterated to the darkness-weighted centroids of their Voronoi regions (here via exact nearest-dot pixel assignment over a working grid). Written from the paper.
- The random-walk family: `randomWalk` is the classic isotropic walk (the name from Karl Pearson's 1905 *Nature* letter); `levyFlight` draws step lengths from a truncated power law by inverse-CDF sampling, the heavy-tailed walk Benoit Mandelbrot named the Lévy flight (after Paul Lévy) in *The Fractal Geometry of Nature*; `selfAvoidingWalk` grows the classic lattice self-avoiding walk depth-first with backtracking so it winds long instead of trapping early. Written from the techniques.
- The `truchet` tiling places one tile per grid cell at a random orientation, a pattern named for Sébastien Truchet (1704); the `.arcs` tile with its quarter-circles joining edge midpoints is the variant Cyril Stanley Smith described in ["The Tiling Patterns of Sebastian Truchet and the Topology of Structural Hierarchy"](https://doi.org/10.2307/1578535), 1987.
- `hitomezashi` renders the one-stitch sashiko designs of Japanese embroidery from one phase bit per grid line, the binary specification formalized by Katherine A. Seaton and Carol Hayes in ["Mathematical specification of hitomezashi designs"](https://doi.org/10.1080/17513472.2023.2187999) (*Journal of Mathematics and the Arts* 17, 2023). The two-colorability its `parities` implements is the argument of Colin Defant and Noah Kravitz, ["Loops and Regions in Hitomezashi Patterns"](https://arxiv.org/abs/2201.03461) (2022), which Seaton and Hayes cite. Written from the papers.
- `kolam` walks the single line of the south Indian **kolam** (the looped *sikku*/*kambi* kind, drawn around a grid of pulli) and the Angolan **sona** drawn in sand, which are the same object: a 45-degree path that reflects off the edges of a dot field and closes on itself. The two traditions were set side by side by Marcia Ascher (*Ethnomathematics: A Multicultural View of Mathematical Ideas*, Brooks/Cole, 1991), and the sona were recorded and analyzed at length by Paulus Gerdes (*Sona Geometry from Angola: Mathematics of an African Tradition*, Polimetrica, 2006), whose account carries the loop count: a plain field of `m` by `n` dots closes into gcd(m, n) loops. The general object, and the wall (a mirror placed between two dots, each one splitting or joining exactly one loop) is Slavik Jablan's mirror-curve construction ("Mirror generated curves", *Symmetry: Culture and Science* 6, 1995). Written from the published descriptions; the traditions themselves are credited to the people who keep them, not to the papers.
- `Pursuit` implements the classical curve of pursuit: a runner heading always at the current position of the one it follows. Pierre Bouguer first studied it in 1732, in ["Sur de nouvelles courbes ausquelles on peut donner le nom de lignes de poursuite"](https://www.biodiversitylibrary.org/item/88479) (*Memoires de l'Academie Royale des Sciences*), written about one ship pursuing another. The ring case, where runners on the corners of a regular polygon each chase the next, was posed by Édouard Lucas in 1877 and answered by Henri Brocard: the paths are logarithmic spirals meeting in one point. The path length `1 / (1 - cos(2 pi / n))` for a unit side, the constant angle to the center, and the straight-line (radiodrome) results are the standard published ones, gathered in [Wolfram MathWorld's "Mice Problem"](https://mathworld.wolfram.com/MiceProblem.md) and ["Pursuit Curve"](https://mathworld.wolfram.com/PursuitCurve.md). Written from those results; the stepper, the simultaneous update, the stride floor under the catch distance, and the kept chase lines are this implementation's own.
- `Billiard` implements dynamical billiards, the study of a point bouncing in a region, which goes back to a question of Birkhoff and is surveyed in Serge Tabachnikov's [*Geometry and Billiards*](http://web.archive.org/web/20230510131332/https://www.personal.psu.edu/sot2/books/billiardsgeometry.pdf) (American Mathematical Society, 2005). Three published results are what the tests measure rather than the pictures: in a circle the distance from the center to every chord is conserved, so the path stays tangent to one inner caustic; in an ellipse the product of the distances from the two foci to a chord is conserved (the Joachimsthal integral), which is why an ellipse sorts paths into those that pass between the foci and those that do not; and the stadium of Leonid Bunimovich, ["On the ergodic properties of nowhere dispersing billiards"](https://doi.org/10.1007/BF01197884) (*Communications in Mathematical Physics* 65, 1979), is chaotic despite being built only from flats and arcs, as is Yakov Sinai's square with a round obstacle in it (1970). Written from those published results, not from any implementation of them: the room cases, the intersections, the reflection at each wall, and the `Table` and path surfaces are this implementation's own.
- `Drainage` implements the standard raster-hydrology chain. Flow direction is the D8 method of John O'Callaghan and David Mark, ["The extraction of drainage networks from digital elevation data"](https://doi.org/10.1016/S0734-189X(84)80011-0) (*Computer Vision, Graphics, and Image Processing* 28, 1984), with the slope to a diagonal neighbor taken over its own longer distance. Depression filling is the Priority-Flood algorithm of Richard Barnes, Clarence Lehman, and David Mulla, ["Priority-flood: An optimal depression-filling and watershed-labeling algorithm for digital elevation models"](https://arxiv.org/abs/1511.04463) (*Computers & Geosciences* 62, 2014), in its epsilon variant, which keeps a hair of slope over the cell that flooded each one. Stream ordering is Arthur Strahler's, ["Quantitative analysis of watershed geomorphology"](https://doi.org/10.1029/TR038i006p00913) (*Transactions of the American Geophysical Union* 38, 1957), which refined Robert Horton's earlier scheme. Written from those published results, not from any implementation of them: the flow counting, the routing of filled hollows by the flood's own parent link, the basin labeling, the tracing of reaches, and the `River` surface are this implementation's own.
- `Anamorphosis` implements catoptric (mirror) anamorphosis for a cylindrical mirror. The technique predates the mathematics that describes it: Renaissance workshops ruled the construction out by hand, and Jean-François Niceron set it down in *La Perspective Curieuse* (1638) ([Wikipedia, "Anamorphosis"](https://en.wikipedia.org/wiki/Anamorphosis); [Wikipedia, "Jean-François Niceron"](https://en.wikipedia.org/wiki/Jean_Fran%C3%A7ois_Nic%C3%A9ron)). The map here is the modern ray construction: take the ray from the eye to a point on the cylinder, reflect it about the surface normal there, and follow it to the page, the construction set out for a standing cylindrical mirror by Aleksandar Cucakovic and Magdalena Paunovic in ["Cylindrical Mirror Anamorphosis and Urban-Architectural Ambience"](https://link.springer.com/article/10.1007/s00004-015-0239-7) (*Nexus Network Journal* 17, 2015). The map back is [Alhazen's problem](https://en.wikipedia.org/wiki/Alhazen%27s_problem), posed by Ibn al-Haytham around 1025, which has no elementary solution; it is solved here by a scan-and-bisect search over the arc both ends can see, and the bounce height then follows from the reflection keeping the path's fall. Written from those published results, not from any implementation of them: the true-size wrap, the visibility limits, the contour and shape handling, and the search are this implementation's own.
- `Clothoid` implements the Euler spiral, the curve whose curvature is a linear function of arc length. Leonhard Euler described it in 1744 and Augustin-Jean Fresnel arrived at the same integrals in his work on diffraction, which is why the position is written in the Fresnel integrals `C(t)` and `S(t)` ([Wolfram MathWorld, "Cornu Spiral"](https://mathworld.wolfram.com/CornuSpiral.md); [Wikipedia, "Euler spiral"](https://en.wikipedia.org/wiki/Euler_spiral)). Marie Alfred Cornu plotted it, Ernesto Cesaro named it the clothoid, and Arthur Talbot brought it into railway practice in 1890 as the transition curve, which is the easement and corner-rounding use here ([Wikipedia, "Track transition curve"](https://en.wikipedia.org/wiki/Track_transition_curve)). The `G1` fit that joins two points with two headings follows the reduction published by Enrico Bertolazzi and Marco Frego in ["Fast and accurate G1 fitting of clothoid curves"](https://arxiv.org/abs/1305.6644) (2013; *Mathematical Methods in the Applied Sciences*, 2015), which collapses three nonlinear equations to the single zero of one function and supplies the initial guess. Written from those published results, not from any implementation of them: the quadrature (composite Gauss-Legendre rather than the paper's Fresnel momenta with their small-parameter expansions), the corner fitting and its one-step rescale, the spline, and the chain readers are this implementation's own.
- `HobbySpline` implements John D. Hobby's interpolating spline from its publication (["Smooth, Easy to Compute Interpolating Splines"](https://doi.org/10.1007/BF02187690), *Discrete & Computational Geometry* 1(2), 1986): the mock-curvature equations, the curl end conditions, and the velocity function, in the linear-system form Donald Knuth programs in *METAFONT: The Program* (Addison-Wesley, 1986), including the curl ratio and the four-chord cap on the velocity. The interior coefficients were re-derived from the curvature of a cubic before being written. The `hobbycurve` module of OPENRNDR's orx (BSD-2-Clause, itself adapted from Edmund Weitz's JavaScript) was read as a structural reference for the open and closed solves, studied, not translated; the cyclic solve here is the rank-one correction of a tridiagonal solve.
- `CreasePattern`, `MiuraFold`, and `RotatingSquares` implement published origami and kirigami results. The two flat-folding laws are [Kawasaki's theorem](https://en.wikipedia.org/wiki/Kawasaki%27s_theorem) (the alternating sum of the angles around a vertex is zero; Toshikazu Kawasaki, 1989, arrived at independently by Jacques Justin and by Robert Hull) and [Maekawa's theorem](https://en.wikipedia.org/wiki/Maekawa%27s_theorem) (the mountains and valleys at a vertex differ by two; attributed to Jun Maekawa, published by Kazuo Haga). The fold itself is the Miura-ori, devised by Koryo Miura in 1970 and published as ["Method of Packaging and Deployment of Large Membranes in Space"](https://jaxa.repo.nii.ac.jp/records/31382) (*Institute of Space and Astronautical Science Report* 618, 1985); its rigid folding and its auxetic behavior, a Poisson's ratio that is always negative, are the standard results, gathered in Mark Schenk and Simon Guest, ["Geometry of Miura-folded metamaterials"](https://doi.org/10.1073/pnas.1217998110) (*PNAS* 110(9), 2013). The cut sheet is the rotating-squares auxetic of Joseph Grima and Kenneth Evans, ["Auxetic behavior from rotating squares"](https://doi.org/10.1023/A:1006781224002) (*Journal of Materials Science Letters* 19, 2000), whose Poisson's ratio of exactly -1 is their result. Written from those published results: the folded-state parameterization used here (one lattice line under three isometry constraints), the derivation of the mountain and valley marks from the folded geometry, the vertex matching, and the joining of creases into pen strokes are this implementation's own.
- `ShapeGrammar` implements shape grammars, introduced by George Stiny and James Gips in ["Shape Grammars and the Generative Specification of Painting and Sculpture"](https://www.researchgate.net/publication/221329330) (*Information Processing 71*, IFIP Congress, 1971), with the formal apparatus of labeled shapes and rule application under a transformation set out in Stiny's *Pictorial and Formal Aspects of Shape and Shape Grammars* (Birkhauser, 1975). The lattice grammar follows George Stiny, ["Ice-ray: a note on the generation of Chinese lattice designs"](https://doi.org/10.1068/b040089) (*Environment and Planning B* 4(1), 1977), whose parametric rules cut a polygon in two along a line drawn between two of its edges, leaving parts of approximately equal area and stopping below a size constant; that paper was written from Daniel Sheets Dye's *A Grammar of Chinese Lattice* (Harvard University Press, 1949), the catalog of the lattices themselves. The split rules are the same idea applied to buildings, after Peter Wonka, Michael Wimmer, Francois Sillion and William Ribarsky, ["Instant Architecture"](https://doi.org/10.1145/882262.882324) (*ACM Transactions on Graphics* 22(3), 2003) and Pascal Muller, Peter Wonka, Simon Haegler, Andreas Ulmer and Luc Van Gool, ["Procedural Modeling of Buildings"](https://doi.org/10.1145/1141911.1141931) (*ACM Transactions on Graphics* 25(3), 2006). Written from those published rules: the closed-form solve for the balanced cut, the derivation of the whole ice-ray rule table from a corner range, the shortest-of-N cut choice, the mitered inset and its collapse test, and the weight-driven rule choice are this implementation's own.
- `knotwork` weaves the same walk as bands, which is the plait-and-breakline construction behind Celtic interlace: a plait of diagonal cords, walls (breaklines) placed between dots to shape it, and an over/under choice that alternates along every cord. The hand construction is the one Iain Bain sets out in *Celtic Knotwork* (Constable, 1986), and Peter Cromwell's analysis of the ornament ("The distribution of knot types in Celtic interlaced ornament", *Journal of Mathematics and the Arts* 2, 2008) describes the same object in the mirror-curve terms this implementation uses. Written from the published descriptions; the ornament belongs to the tradition that made it.
- `Penrose` generates both classic Penrose tilings by Robinson-triangle substitution (deflation), the construction Roger Penrose introduced in the 1970s: each half-tile splits into smaller halves at golden-ratio sections, and mirror pairs merge back into whole kites/darts (P2) or thick/thin rhombs (P3). The P3 triangle rules were cross-checked against [Jeff Preshing's "Penrose Tiling Explained"](https://preshing.com/20110831/penrose-tiling-explained/); the P2 rules were derived from the same Robinson decomposition and verified by crack-free and merge tests. The per-tile arcs are Conway's matching-rule decoration, with the crossing fractions solved from the cross-edge continuity constraints on a deflated patch. Written from the technique.
- `WangTiling` fills a grid with edge-matching Wang tiles by seeded scanline, the stochastic tiling of Michael F. Cohen, Jonathan Shade, Stefan Hiller, and Oliver Deussen, ["Wang Tiles for Image and Texture Generation"](https://doi.org/10.1145/882262.882265) (*SIGGRAPH* 2003); the tiles themselves are Hao Wang's (1961), whose aperiodic sets Robert Berger discovered in 1966. Written from the technique.
- `girihPattern` implements E. H. Hankin's "polygons in contact" method for Islamic star patterns in the formulation of Craig S. Kaplan, ["Islamic Star Patterns from Polygons in Contact"](https://cs.uwaterloo.ca/~csk/publications/Papers/kaplan_2005.pdf) (*Graphics Interface* 2005): a pair of rays per tile-edge midpoint at the contact angle, paired greedily by shortest total length. The five `Girih.Tile` shapes are the tile set of the medieval decagonal tradition described by Peter J. Lu and Paul J. Steinhardt, ["Decagonal and Quasi-Crystalline Tilings in Medieval Islamic Architecture"](https://doi.org/10.1126/science.1135491) (*Science* 315, 2007). Written from the papers.
- `Spectre` generates Tile(1,1)/spectre patches by the substitution system of David Smith, Joseph Samuel Myers, Craig S. Kaplan, and Chaim Goodman-Strauss, ["A chiral aperiodic monotile"](https://arxiv.org/abs/2305.17743) (2023; *Combinatorial Theory* 4(2), 2024): the nine metatiles, the eight-slot supertile construction with per-level mirroring, and the mystic pair. The substitution data (child tables, anchor points, slot chaining) is the paper's, cross-checked against the authors' reference app; the curved strictly chiral edges follow the paper's alternating-edge modification with Ollin's own bump curve. Written from the paper as an independent implementation.
- `HyperbolicTiling` generates the regular {p,q} tessellations of the Poincaré disk by the classic reflection-group construction: the central polygon placed from the (p, q, 2) triangle's hyperbolic law of cosines, then expanded by reflecting across edge geodesics (inversion in circles orthogonal to the horizon), the approach described in Douglas Dunham's repeating-hyperbolic-pattern papers (e.g. ["Creating Repeating Hyperbolic Patterns"](https://dl.acm.org/doi/10.1145/965145.801245), *SIGGRAPH* 1981, with John Lindgren), building on H. S. M. Coxeter's account of the tessellations that inspired M. C. Escher's *Circle Limit* prints. The breadth-first expansion with geometric deduplication is Ollin's own; written from the technique.
- `ParquetDeformation` implements the parquet deformation, the design exercise William S. Huff set in his basic-design studio from the 1960s on, which reached a wider audience through Douglas R. Hofstadter's *Scientific American* column of July 1983 ("Parquet deformations: patterns of tiles that shift gradually in one dimension", collected as "Parquet Deformations: A Subtle, Intricate Art Form" in *Metamagical Themas*, Basic Books, 1985, pp. 191–199). The computational reading, a deformation as a curve interpolated across a tiling rather than a drawing made by hand, follows Craig S. Kaplan, ["Curve Evolution Schemes for Parquet Deformations"](https://archive.bridgesmathart.org/2010/bridges2010-95.pdf) (*Bridges* 2010, pp. 95–103) and ["Metamorphosis in Escher's Art"](https://archive.bridgesmathart.org/2008/bridges2008-39.pdf) (*Bridges* 2008). Ollin's own choices are putting the geometry on the lattice's shared edges, so the tiling is crack-free by construction rather than by care, and blending two profiles at the union of their arc-length parameters, so the interpolation is exact rather than resampled. Written from the technique.
- The `packCircles`/`relaxCircles` circle packing implements the two classic grow-to-touch and front-relaxation forms from the technique: each circle grown to the largest radius that clears its neighbors (the greedy gap-filling pack popularized in Jared Tarbell's generative work), and overlapping circles separated by repeated pairwise pushes. `packShapes` / `ContinuousPacking` generalize the grow-to-touch pack to arbitrary shapes, grown against each other's outlines so smaller shapes fill the concave gaps. Written from the technique.
- The `LSystem` presets use the canonical rule sets for each named L-system (Aristid Lindenmayer's rewriting grammars, Prusinkiewicz and Lindenmayer's *The Algorithmic Beauty of Plants*), cross-checked against the [Wikipedia L-system examples](https://en.wikipedia.org/wiki/L-system) and [Paul Bourke's L-system reference](http://paulbourke.net/fractals/lsys/): Koch, Sierpinski, dragon, Hilbert, Peano, Gosper, Lévy, and the branching plants. The turtle interpretation and expansion are written from the technique.
- `regions(enclosedBy:)` computes the planar arrangement of a set of outlines and traces its faces as a doubly connected edge list, the construction in Mark de Berg, Otfried Cheong, Marc van Kreveld, and Mark Overmars, *Computational Geometry: Algorithms and Applications* (3rd edition, Springer, 2008), chapter 2: every segment is split at its crossings, and each face is walked by taking, at every vertex, the next edge round from the one arrived by. The edges whose removal would cut the map in two, which bound no region, are found by Robert Tarjan's depth-first method (["A note on finding the bridges of a graph"](https://doi.org/10.1016/0020-0190(74)90003-9), *Information Processing Letters* 2(6), 1974). Written from the technique.
- `hilbertIndex`, `hilbertOrder`, and `hilbertSorted` implement David Hilbert's space-filling curve (["Ueber die stetige Abbildung einer Linie auf ein Flächenstück"](https://doi.org/10.1007/BF01199431), *Mathematische Annalen* 38, 1891). A cell's distance along the curve is computed by the standard quadrant walk, the `xy2d` routine set out on the [Wikipedia page](https://en.wikipedia.org/wiki/Hilbert_curve), and ordering points by it is the space-filling-curve heuristic of John J. Bartholdi III and Loren K. Platzman (["Heuristics based on spacefilling curves for combinatorial problems in Euclidean space"](https://doi.org/10.1287/mnsc.34.3.291), *Management Science* 34(3), 1988). Written from the technique.
- `ParametricLSystem` implements parametric L-systems, whose modules carry real-valued parameters and whose productions do arithmetic on them. Written from the technique. Sources:
    - [*The Algorithmic Beauty of Plants*](http://algorithmicbotany.org/papers/abop/abop.pdf) §1.10, Prusinkiewicz and Lindenmayer. The parametric word; the predecessor / condition / successor production; matching on letter and on parameter count; the identity fallthrough.
    - [James Hanan's 1992 dissertation](https://algorithmicbotany.org/papers/hanan.dis1992.pdf) ch. 4. The operator precedence table: exponentiation above multiplication and right-associative, unary above exponentiation. The function set. The ordered first-match rule. The probability-factor form of stochastic productions, with factors shared over the productions that matched.
    - [CPFG 4.0 manual](https://algorithmicbotany.org/lstudio/CPFGman.pdf). The spellings `^`, `==`, `&&`, the `: *` empty condition, the weight after the successor. Documentation of the reference implementation; that implementation's source was not consulted.
    - ABOP figures. The subdivision curve and its delayed twin (1.36-1.37); the two branching constructions (equations 1.9-1.10); the compound leaves (5.11-5.12, Tables 5.2-5.3).
    - [SIGGRAPH 2003 course notes](https://algorithmicbotany.org/papers/sigcourse.2003/2-1-lsystems.pdf), Prusinkiewicz. The parametric snowflake (§6.1); the tree family and its table of nine (§6.3); mesotonic branching (§6.4).

    Two turn angles are Ollin's rather than the sources'. The compound leaves take 45 degrees, which reproduces the published drawing. Mesotonic branching is illustrated by a schematic diagram, so its angle is a choice too. `randomBranch` is Ollin's own weighted variant.
- `DifferentialGrowth` implements the differential-growth method: a node path relaxed each step under attraction to its neighbors, alignment toward their midpoint, and repulsion from nearby nodes (broad-phased with a spatial hash), with long edges split to lengthen the line, the organic-accretion technique explored by Anders Hoff ([inconvergent](https://inconvergent.net/)) and documented in [Jason Webb's differential-growth writeup](https://medium.com/@jason.webb/2d-differential-growth-in-js-1843fd51b0ce). Written from the technique.
- `Meander` implements the kinematic meander-migration model of [Howard and Knutson (1984)](https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/wr020i011p01659), "Sufficient conditions for river meandering: a simulation approach": each centerline point drifts perpendicular to the channel at a rate blending local curvature (negative weight) with an exponentially decaying weighted average of upstream curvature, with the linear curvature-to-rate relationship and the resample-and-cutoff loop structure of Zoltán Sylvester's [meanderpy](https://github.com/zsylvester/meanderpy) (Apache-2.0), and the oxbow-lake aging and channel-scar recording described in Robert Hodgin's [*Meander* writeup](https://roberthodgin.com/project/meander). Written from the technique; the wavy seed line and the width-relative defaults are Ollin's own arrangement.
- `elementaryCA` / `totalisticCA` implement the one-dimensional cellular-automaton families Stephen Wolfram cataloged and numbered (the elementary rule byte and the base-k totalistic code; *A New Kind of Science*, [the elementary-CA atlas](https://mathworld.wolfram.com/ElementaryCellularAutomaton.md)). `Turmite` implements the two-dimensional Turing machines of the Langton's-ant family (Christopher Langton, "Studying artificial life with cellular automata", *Physica D* 1986; the turmite generalization popularized by A. K. Dewdney and Ed Pegg Jr.), with the preset rule tables taken from the published catalog of notable machines collected on [Wikipedia's turmite page](https://en.wikipedia.org/wiki/Turmite) and the [rule-table repository](https://github.com/GollyGang/ruletablerepository). Written from the technique.
- `WaveFunctionCollapse` implements the simple-tiled Wave Function Collapse algorithm (Maxim Gumin's [WaveFunctionCollapse](https://github.com/mxgmn/WaveFunctionCollapse)): superposition of all tiles per cell, minimum-entropy observation, weighted collapse, and arc-consistency propagation of the edge-socket adjacency, restarting on a contradiction. Written from the technique.
- `OverlappingWFC` implements the overlapping model of the same algorithm, which learns its constraints from an example bitmap rather than from declared tiles: extraction of every NxN patch with its occurrence count, dihedral augmentation, the overlap-agreement relation over the four unit offsets, Shannon-entropy observation, and support-counter propagation. The counter scheme is arc consistency in the style of Roger Mohr and Thomas Henderson's AC-4 ("Arc and path consistency revisited", 1986), which Gumin adopted for the overlapping model following an optimization by Fehr and Courant. Paul Merrell's model synthesis ("Example-Based Model Synthesis", 2007, and his 2009 thesis) is the predecessor of the technique, and Isaac Karth and Adam M. Smith's analyses ("WaveFunctionCollapse is Constraint Solving in the Wild", 2017, and "WaveFunctionCollapse: Content Generation via Constraint Solving and Machine Learning", 2021) informed the account of the algorithm's behavior and limits. Written from the technique.
- `FlowField` traces streamlines through a Perlin-noise (or curl-noise) direction field; the non-crossing, evenly-spaced tracing follows Bruno Jobard and Wilfrid Lefer's ["Creating Evenly-Spaced Streamlines of Arbitrary Density"](https://doi.org/10.1007/978-3-7091-6876-9_5), 1997 (a streamline stops when it comes within the separation distance of one already traced). Written from the technique.
- `Boids` implements Craig Reynolds' [boids](https://www.red3d.com/cwr/boids/) flocking model (separation, alignment, and cohesion steering over each agent's local neighbors), the emergent-flocking technique from the *Nature of Code* canon. Written from the technique.
- `Vehicle` implements Craig Reynolds' individual [steering behaviors](https://www.red3d.com/cwr/steer/) ("Steering Behaviors For Autonomous Characters", GDC 1999): the desired-velocity-minus-velocity steering force, seek/flee, the arrival ramp, pursuit and evasion by predicted position, the projected-circle wander, path following by prediction and projection, flow-field following, separation, and containment, the model *The Nature of Code* teaches. Written from the technique.
- `Swarm` runs the same Reynolds steering vocabulary on the GPU over the `SpatialHash` neighbor search, written from the same GDC 1999 paper: the simple vehicle model's `truncate(steering, max_force)` then `truncate(velocity + acceleration, max_speed)` locomotion, the weighted-sum-and-truncate method for combining behaviors, the paper's own advice to normalize the three flocking components before weighting them, separation's 1/r-weighted repulsive sum, alignment's average-velocity desired heading, cohesion toward the neighbors' average position, the arrival ramp, the constrained random walk on a projected circle for wander, the distance-and-angle neighborhood, and flow-field following sampled at the predicted future position. (The paper's printed seek formula reads `normalize(position - target)`, which contradicts its own prose and figure; the prose is followed.) The minimum-speed floor is an addition, not from the paper. Written from the technique.
- `Evolution` and `Population` implement the genetic-algorithm canon from its published sources. The three-part scheme (a population, variation by crossover and mutation, and selection proportional to fitness) is John Holland's (*Adaptation in Natural and Artificial Systems*, University of Michigan Press, 1975) as consolidated by David Goldberg (*Genetic Algorithms in Search, Optimization, and Machine Learning*, Addison-Wesley, 1989), which is also where uniform crossover, single-point crossover, and the roulette-wheel and tournament selection operators are set out; the tournament's freedom from any total or normalization, and its consequent fitness-scale invariance, is the property Brad Miller and Goldberg analyze in ["Genetic Algorithms, Tournament Selection, and the Effects of Noise"](https://www.complex-systems.com/abstracts/v09_i03_a02/) (*Complex Systems* 9, 1995), and it is why the GPU tier selects that way where the CPU tier can afford the wheel. `Population`'s genotype is the normalized parameter set of Karl Sims' ["Artificial Evolution for Computer Graphics"](https://www.karlsims.com/papers/SimsSiggraph91.pdf) (SIGGRAPH '91), along with his mutation rule (each gene nudged by a random amount within a distance rather than replaced, then clamped back into range), his four parameter-mating methods (independent per-gene copying, a crossover point, and interpolation, condensed here to three), and his interactive-selection loop from *Genetic Images*, where a small population is judged by eye and one or two chosen individuals reproduce; the deliberately high mutation rate for interactive work is his too. Evolving a genome of steering impulses played back over a fixed trial, scored by closest approach with a penalty for hitting an obstacle and a bonus for arriving, is the "smart rockets" problem in the form Daniel Shiffman teaches in [*The Nature of Code*](https://natureofcode.com/genetic-algorithms/) chapter 9 (after Jer Thorp's earlier sketch of the same idea). Written from the papers and the technique.
- `SpaceColonization` implements the space colonization algorithm of Adam Runions, Brendan Lane, and Przemyslaw Prusinkiewicz (["Modeling Trees with a Space Colonization Algorithm"](http://algorithmicbotany.org/papers/colonization.egwnp2007.md), NPH 2007, following their 2005 leaf-venation work): each attraction point pulls on its single closest node within an influence radius, pulled nodes grow toward the normalized average of their pulls, and attractors within a kill distance are consumed. Branch widths use the classic pipe-model aggregation. Written from the technique.
- `DiffusionLimitedAggregation` implements the aggregation model of T. A. Witten and L. M. Sander (["Diffusion-Limited Aggregation, a Kinetic Critical Phenomenon"](https://doi.org/10.1103/PhysRevLett.47.1400), Physical Review Letters 47, 1981), in the off-lattice form: seeded random walkers released outside the cluster, long strides while far and diffusion steps near, freezing at touch distance, with the standard spawn/kill-radius optimizations. Written from the technique.
- `AntColony` implements the Ant System of Marco Dorigo, Vittorio Maniezzo, and Alberto Colorni (["Ant System: Optimization by a Colony of Cooperating Agents"](https://doi.org/10.1109/3477.484436), *IEEE Transactions on Systems, Man, and Cybernetics B* 26, 1996): tours built by pheromone-and-closeness roulette, evaporation then per-tour deposits scaled by tour length, with the paper's elitist-ant reinforcement as the `elitism` parameter. Written from the paper.
- `DielectricBreakdown` implements the dielectric breakdown model of L. Niemeyer, L. Pietronero, and H. J. Wiesmann (["Fractal Dimension of Dielectric Breakdown"](https://doi.org/10.1103/PhysRevLett.52.1033), Physical Review Letters 52, 1984): the Laplace field solved over a square lattice with the discharge and ground as fixed potentials, growth to nearest-neighbor cells with probability proportional to the local field raised to the exponent eta, here with incremental Gauss-Seidel relaxation run at each growth step. The trunk-thickening widths reuse the pipe-model convention credited under space colonization. Written from the paper.
- `CrackGrowth` implements the crack-subdivision algorithm of Jared Tarbell's [*Substrate*](http://www.complexification.net/gallery/machines/substrate/) (2003, complexification.net). Cracks record their angle into a raster grid and stop where they meet a differing angle. A stopped crack restarts perpendicular to a random point on the existing pattern. Each crack also shades the open space beside its line with translucent grains, which his applet calls a sand painter. The numeric constants follow that applet: step and scan lengths, perpendicular wobble, gain random walk, doubled-sine grain spacing. Written from the technique. The claimed-cell restart list is Ollin's own arrangement.
- `StringArt` implements the computational string-art winding: one continuous thread over pins on a circular rim. Each chord is chosen to best cover the darkness a grayscale target still holds. The craft and the thread-on-a-loom form are Petros Vrellis's [*A New Way to Knit*](http://artof01.com/vrellis/works/knit.md) (2016). His own algorithm is unpublished. The greedy sequential formulation here scores candidate chords against a residual image, winds the best, subtracts its ink, and repeats. Michael Birsak, Florian Rist, Peter Wonka, and Przemyslaw Musialski formalize and analyze it. See ["String Art: Towards Computational Fabrication of String Images"](https://doi.org/10.1111/cgf.13359) (*Computer Graphics Forum* 37(2), Eurographics 2018). Written from the technique; the mean-darkness scoring, the over-inking stop, and the span and no-repeat rules follow common practice, tuned here.
- The strange-attractor helpers integrate the classic chaotic systems from their published equations: the Lorenz, Rössler, Aizawa, Thomas, Halvorsen, Dadras, Chen, and Wang-Sun four-wing systems (collected at [dynamicmath.xyz/strange-attractors](https://www.dynamicmath.xyz/strange-attractors/)), advanced with fourth-order Runge-Kutta, plus the 2D iterated maps Clifford, Peter de Jong ([Paul Bourke](http://paulbourke.net/fractals/clifford/)), and Hénon; the Gumowski-Mira recurrence Igor Gumowski and Christian Mira developed at CERN for particle-beam dynamics (*Recurrences and Discrete Dynamic Systems*, Springer, 1980); the Ikeda map, the ring-cavity model of Kensuke Ikeda ("Multiple-valued stationary state and its instability of the transmitted light by a ring cavity system", *Optics Communications* 30, 1979) in its standard 2D form; and Barry Martin's hopalong map, popularized in A. K. Dewdney's "Computer Recreations" column (*Scientific American*, September 1986). Written from the equations. `AttractorFlow` runs the same fields on the GPU under a million particles, each advanced by the same Runge-Kutta step in Metal; mapping a particle's color to its speed is the long-standing convention for these plots, and the flow's own additions (measuring a system's placing, pace, and speed range from a settled CPU orbit, and returning a stray particle rather than letting it fly off) are Ollin's.
- `IteratedMap` implements the canonical one-dimensional chaotic maps from their published forms: the logistic map as popularized by Robert May (["Simple mathematical models with very complicated dynamics"](https://doi.org/10.1038/261459a0), *Nature* 261, 1976), with the sine, tent, and [Gauss ("mouse")](https://en.wikipedia.org/wiki/Gauss_iterated_map) maps beside it. The bifurcation diagram uses the standard rendering practice (per-parameter transient discard, then the settled orbit plotted; the density form log-tones visit counts), the cobweb plot is the classic graphical-iteration construction, and the Lyapunov exponent is the standard orbit average of `ln |f′|`, checked against the known exact values (`ln 2` for the logistic map at r = 4, `ln r` for the tent map). The period-doubling universality the sine map demonstrates is Mitchell Feigenbaum's. Written from the mathematics.
- `IKChain` implements the two standard inverse-kinematics solvers from their published descriptions. FABRIK is Andreas Aristidou and Joan Lasenby's ["FABRIK: A fast, iterative solver for the Inverse Kinematics problem"](https://doi.org/10.1016/j.gmod.2011.05.003) (*Graphical Models* 73(5), 2011): the forward/backward reaching passes, the one-pass straight stretch for out-of-reach targets, and the constrained variant's reposition-then-restrict rule, which in 2D collapses to clamping each new segment's angle against its pass-side neighbor. Cyclic coordinate descent descends from Li-Chun Tommy Wang and Chih Cheng Chen ("A combined optimization method for solving the inverse kinematics problem of mechanical manipulators", *IEEE Trans. Robotics and Automation* 7(4), 1991) by way of the game-development canon: Jeff Lander's "Making Kine More Flexible" (*Game Developer*, November 1998) for the per-step damping clamp and per-joint limits, and [Ryan Juckett's "Cyclic Coordinate Descent in 2D"](https://www.ryanjuckett.com/cyclic-coordinate-descent-in-2d/) (2009) for the 2D formulation and the stall/trivial-movement termination. The free-base `drag(to:)` rope is the classic dragged-segment tentacle idiom (Keith Peters' Coding Math episodes and *Foundation HTML5 Animation* lineage), which is exactly one FABRIK tip-to-base pass. Written from the paper and articles.
- `DoublePendulum` integrates the standard Lagrangian equations of motion for the double pendulum with two point masses on massless arms, in the form documented by [Erik Neumann's myphysicslab derivation](https://www.myphysicslab.com/pendulum/double-pendulum-en.md) (the shared `2 m1 + m2 - m2 cos(2 a1 - 2 a2)` denominator), advanced by fixed-substep fourth-order Runge-Kutta with the energy invariant kept as the accuracy check. Written from the equations.
- `NBody` implements Josh Barnes and Piet Hut's hierarchical force calculation (["A hierarchical O(N log N) force-calculation algorithm"](https://doi.org/10.1038/324446a0), *Nature* 324, 1986) over a 2D quadtree: bodies inserted one at a time with subdivision on collision, aggregate mass and center of mass per node, and the s/d opening criterion, as taught in [the arborjs explainer](https://arborjs.org/docs/barnes-hut) (Tom Ventimiglia and Kevin Wayne, Princeton COS126 course materials). Close encounters use Plummer softening (H. C. Plummer, *MNRAS* 71, 1911, in the standard N-body form surveyed by [Walter Dehnen and Justin Read, "N-body simulations of gravitational dynamics"](https://arxiv.org/abs/1105.1082), 2011), and the integrator is the same survey's canonical kick-drift-kick leapfrog. The disk factory's circular-orbit initialization (speed from the enclosed mass) is the standard rotation-curve setup. Written from the paper and surveys.
- `Kuramoto` implements Yoshiki Kuramoto's model of coupled oscillators from ["Self-entrainment of a population of coupled non-linear oscillators"](https://doi.org/10.1007/BFb0013365) (*International Symposium on Mathematical Problems in Theoretical Physics*, Lecture Notes in Physics 39, Springer, 1975), in the mean-field form with the order parameter and the critical coupling `2 / (pi g(0))` from the same analysis. The phase-lag term is Hidetsugu Sakaguchi and Yoshiki Kuramoto's (["A Soluble Active Rotater Model Showing Phase Transitions via Mutual Entertainment"](https://doi.org/10.1143/PTP.76.576), *Progress of Theoretical Physics* 76, 1986), and the mean-field and nonlocal-ring forms are as surveyed by Steven H. Strogatz, ["From Kuramoto to Crawford: exploring the onset of synchronization in populations of coupled oscillators"](https://doi.org/10.1016/S0167-2789(00)00094-4) (*Physica D* 143, 2000). Written from the equations, with fixed-substep integration and a seeded normal spread of natural frequencies.
- `Crowd` implements Jur van den Berg, Stephen J. Guy, Ming Lin, and Dinesh Manocha's optimal reciprocal collision avoidance from ["Reciprocal n-Body Collision Avoidance"](https://doi.org/10.1007/978-3-642-19457-3_1) (*Robotics Research*, Springer Tracts in Advanced Robotics 70, 2011): the truncated velocity obstacle per neighbor, the half-plane through the current velocity plus half of the smallest clearing change, the incremental two-dimensional linear program toward the preferred velocity within the top speed, the three-dimensional least-penetration program when that is infeasible with obstacle constraints kept hard, and static obstacles taken with full responsibility over a shorter horizon. The obstacle case analysis (convex and concave corners, legs that point into a neighboring edge, the already-covered check) was studied in the authors' reference library, [RVO2](https://github.com/snape/RVO2) (Apache-2.0), and written anew in Swift; no source was copied. Written from the paper.
- `ForceLayout` implements Thomas Fruchterman and Edward Reingold's force-directed graph layout (["Graph Drawing by Force-Directed Placement"](https://doi.org/10.1002/spe.4380211102), *Software: Practice and Experience* 21(11), 1991): repulsive forces `k²/d` between all vertex pairs and attractive forces `d²/k` along edges with `k = √(area/n)`, per-vertex displacement capped by a temperature that cools linearly to zero, and positions clamped to the frame, in the spring-embedder lineage of Peter Eades ("A heuristic for graph drawing", *Congressus Numerantium* 42, 1984). The algorithm's pseudocode was cross-read in Stephen Kobourov's survey chapter (["Force-Directed Drawing Algorithms"](https://cs.brown.edu/people/rtamassi/gdhandbook/chapters/force-directed.pdf), *Handbook of Graph Drawing and Visualization*, CRC Press, 2013); the optional center gravity is the standard centering force from the family's later refinements. Written from the papers.
- The SVG importer (`SVG`, `loadSVG`) is written from the [W3C SVG specification](https://www.w3.org/TR/SVG11/): the path-data grammar (its packed-number lexing and the smooth-shorthand control-point reflection), the endpoint-to-center elliptical-arc conversion with its radius correction (implementation notes F.6.5/F.6.6, each arc emitted as at-most-quarter-turn cubic segments), the transform-list grammar, and the CSS `<named-color>` keyword values.
- The glTF/GLB reader (`loadMesh`, `loadScene`, and authored-animation playback via `SceneAnimation`) is written from the [Khronos glTF 2.0 specification](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.md): the JSON and binary container layouts, accessor decoding (including the normalized-integer animation encodings), node TRS composition, the `KHR_lights_punctual` extension, the material texture set with its conventions (the occlusion-roughness-metallic channel packing, factor × sample composition, the occlusion strength ramp, normal-map scale), and the animation samplers of its Appendix C (step, linear with shortest-arc spherical interpolation, and the cubic-spline Hermite with duration-scaled tangents). No glTF library is vendored.
- The USD readers (the `.usda` text parser, the `.usdc` crate reader, and the `.usdz` package reader) are written clean-room from the structure of Pixar's [OpenUSD](https://github.com/PixarAnimationStudios/OpenUSD) (modified Apache-2.0): the crate file's sections, value representations, integer coding, and LZ4 chunking, and the text format's grammar, were studied in the OpenUSD source (`crateFile.cpp`, `integerCoding.cpp`, `fastCompression.cpp`, and the text-format parser) and in the [usdz package specification](https://openusd.org/release/spec_usdz.md), then reimplemented independently in Swift. The transform-stack semantics (xformOp composition order, rotation conventions, the invert prefix) were studied the same way in `xformOp.cpp`/`xformable.cpp`, the light schema's attributes and conventions in the UsdLux generated schema, the material network's texture conventions (connected `UsdPreviewSurface` inputs, `UsdUVTexture` scale/bias and color-space handling) in the [UsdPreviewSurface specification](https://openusd.org/release/spec_usdpreviewsurface.md), the physics schema's classes, attribute names, defaults, and allowed tokens in the [UsdPhysics generated schema](https://github.com/PixarAnimationStudios/OpenUSD/blob/release/pxr/usd/usdPhysics/schema.usda) and the [rigid-body proposal](https://openusd.org/release/wp_rigid_body_physics.md), and the package writer's 64-byte alignment padding in `zipFile.cpp`. No OpenUSD code is translated or vendored; the LZ4 blocks decode through Apple's `Compression` framework.
- `Epicycles` implements the classic drawing-with-epicycles construction: the discrete Fourier transform over a closed contour's samples read as points in the plane, each spectrum term a circle spinning at a signed whole-number frequency, chained largest-first so a truncated prefix is the best k-circle approximation. The DFT is textbook mathematics; the drawing-machine framing was popularized by Mathologer's video "Epicycles, complex Fourier series and Homer Simpson's orbit", [3Blue1Brown's Fourier-series lesson](https://www.3blue1brown.com/lessons/fourier-series), and [The Coding Train's challenge #130](https://thecodingtrain.com/challenges/130-drawing-with-fourier-transform-and-epicycles/) (Daniel Shiffman). Written from the mathematics.
- `ShapeMorph` implements the standard practical polygon-morphing pipeline: equalize the two outlines' vertex counts by inserting points along segments (keeping every original corner), normalize winding direction, choose the cyclic starting-point rotation that minimizes the summed squared travel, and blend pointwise. The approach was studied in [flubber](https://github.com/veltman/flubber) (Noah Veltman, MIT) and the [OPENRNDR orx-shapes contour blend](https://github.com/openrndr/orx) (BSD-2-Clause); the multi-contour pairing (holes with holes, unmatched contours scaling through their own centers) is Ollin's own. Written from the technique, not translated.
- `phyllotaxis` implements Helmut Vogel's model of the sunflower head ("A better way to construct the sunflower head", *Mathematical Biosciences* 44, 1979): point `i` at radius `c * sqrt(i)`, each a golden angle further around. Written from the formula.
- The `lissajous`, `rose`, `hypotrochoid`, and `epitrochoid` builders implement the standard parametric forms of these classical curves (the Lissajous/Bowditch figures, Guido Grandi's rhodonea roses, and the trochoid family of the spirograph toy), each sampled over exactly the span that closes it once; the rational-rose closure parity rule and the trochoid lap count follow the standard treatments (cross-checked against the [Rose](https://en.wikipedia.org/wiki/Rose_(mathematics)) and [Hypotrochoid](https://en.wikipedia.org/wiki/Hypotrochoid) references). Written from the mathematics.
- `guilloche` traces the engine-turning craft of the rose engine lathe (the guilloché of watch dials and banknote borders): stacked sinusoidal cams shaping concentric rings, each pass rotated a hair against the last, the construction described as nested sinusoids in [Wolfram MathWorld's "Guilloché Pattern"](https://mathworld.wolfram.com/GuillochePattern.md) and in the rose-engine literature. Written from the technique.
- `superellipse` samples the standard parametrization of Gabriel Lamé's curve `|x/a|^n + |y/b|^n = 1` (1818); the `n ≈ 2.5` sweet spot between ellipse and rectangle is the "superellipse" Piet Hein made famous in design (Sergels Torg, 1959). `supershape` evaluates Johan Gielis's superformula ("A generic geometric transformation that unifies a wide range of natural and abstract shapes", *American Journal of Botany* 90, 2003), the same formula behind the 3D `Mesh.supershape`. Written from the equations.
- `Harmonograph` implements the classic damped-pendulum drawing machine: each axis a sum of exponentially damped sinusoids, near-unison detunes giving the precessing weave. The model and parameter framing were cross-checked against [Paul Bourke's harmonograph reference](https://paulbourke.net/geometry/harmonograph/). Written from the model.
- `spirolateral` implements the **spirolateral**, the walk of steps 1, 2, 3 … n with a fixed turn after each, repeated until it closes, named and studied by Frank Odds ("Spirolaterals", *Mathematics Teacher* 66/2, 1973) and set as a turtle-geometry exercise by Harold Abelson and Andrea diSessa (*Turtle Geometry*, MIT Press, 1981), where the reversed-turn variant also comes from. The closing rule (a whole number of runs making a whole number of turns) is elementary and is derived in the tests rather than taken from a source. Written from the description.
- `Turtle` implements turtle graphics, the pen driven by its own moves that Seymour Papert and his collaborators built into the Logo language in the late 1960s (Papert, *Mindstorms: Children, Computers, and Powerful Ideas*, Basic Books, 1980) and that Harold Abelson and Andrea diSessa made a geometry of in [*Turtle Geometry: The Computer as a Medium for Exploring Mathematics*](https://mitpress.mit.edu/9780262510370/turtle-geometry/) (MIT Press, 1981). The vocabulary (forward, back, left, right, pen up and down, a heading in degrees) is Logo's own; the remembered pose is the branching stack the L-system turtle already used. Written from the description.
- `Contour.smoothed(iterations:)` implements George Chaikin's corner-cutting subdivision ("An algorithm for high-speed curve generation", *Computer Graphics and Image Processing* 3(4), 1974): each pass cuts every corner at the quarter points, with the standard endpoint-preserving variant for open polylines. Written from the algorithm.
- `Contour.simplified(tolerance:)` implements Ramer–Douglas–Peucker line simplification (Urs Ramer, "An iterative procedure for the polygonal approximation of plane curves", *Computer Graphics and Image Processing* 1(3), 1972; David H. Douglas and Thomas K. Peucker, "Algorithms for the reduction of the number of points required to represent a digitized line or its caricature", *The Canadian Cartographer* 10(2), 1973), measuring each dropped point against the kept segment rather than the line through it. `Contour.crossings(with:)` and `crossings()` pair segments through a sort-and-sweep broad phase over their x extents (the method known from collision detection, as in David Baraff, *Dynamic Simulation of Non-Penetrating Rigid Bodies*, Cornell University PhD thesis, 1992) and meet each pair with the parametric segment intersection. Written from the methods.
- `Contour.fitted(tolerance:)` implements Philip J. Schneider's curve-fitting algorithm ("An Algorithm for Automatically Fitting Digitized Curves", in Andrew S. Glassner, ed., *Graphics Gems*, Academic Press, 1990): parameters by chord length, a least-squares solve for the two handle lengths with the end tangents held, Newton-Raphson reparameterization, and a split at the point of largest error with the tangent shared across the cut; the replacement for a collapsed handle is the third-of-the-chord guess that chapter takes from Wu and Barsky. `Contour.warped(from:along:)`, `pulled(toward:amount:radius:)`, the corner-keeping `smoothed(neighbors:keepingCornersOver:)`, and `split(atCornersOver:span:)` are elementary geometry (a frame carried along a polyline, a radial falloff, a windowed average restarted at corners, a turn-angle threshold) and credit no source. Written from the algorithm.
- `CoonsPatch` implements the bilinearly blended patch of Steven A. Coons ([*Surfaces for Computer-Aided Design of Space Forms*](https://dspace.mit.edu/handle/1721.1/149362), MIT Project MAC, MAC-TR-41, June 1967): two ruled surfaces between opposite boundary curves, added, less the bilinear surface of the four corners, so every side follows its curve and four straight sides give the bilinear map. The sides read by arc length and `Contour.warped(from:into:)` are Ollin's own. Written from the technique.
- `packRectangles(_:in:padding:allowsRotation:)` implements the maximal-rectangles packer with the best-short-side-fit rule and the globally best choice as Jukka Jylänki describes and compares them in [*A Thousand Ways to Pack the Bin: A Practical Approach to Two-Dimensional Rectangle Bin Packing*](https://github.com/juj/RectangleBinPack) (2010), where that combination packed tightest of the single-bin variants measured. The remembered fits between steps and the pruning of new pieces only are Ollin's own speedups, held to a plainly written global search by a test. Written from the paper.
- `PlaneCurve.crossings(with:)` answers each pair of curves from its closed form where one exists: a straight piece against a circle or an ellipse by the quadratic in the piece's parameter (the ellipse carried into the frame where it is the unit circle, since that parameter survives an affine map), and two circles or arcs by the classical construction on the line between the centers (as set out, for one, in [Paul Bourke's "Circles and spheres"](https://paulbourke.net/geometry/circlesphere/)). An ellipse against a circle, an arc, or another ellipse, whose crossings are the real roots of a quartic, is found on the two flattened outlines and driven onto the true curves by Newton's method on the two implicit equations, the root-polishing step the robust solvers of that quartic also end with (David Eberly, [*Intersection of Ellipses*](https://www.geometrictools.com/Documentation/IntersectionOfEllipses.pdf), Geometric Tools). `Ellipse.perimeter` evaluates the complete elliptic integral of the second kind through Gauss's arithmetic-geometric mean (Milton Abramowitz and Irene Stegun, *Handbook of Mathematical Functions*, 17.6), and the tests check it against Simpson's rule on the arc-length integral and against Ramanujan's second approximation (Srinivasa Ramanujan, "Modular Equations and Approximations to π", *Quarterly Journal of Mathematics* 45, 1914), whose known error on a flat ellipse is what the tolerance allows. Written from the methods.
- The `HexGrid` lattice math (axial and offset coordinates, the hex-to-pixel mapping and its cube-rounded inverse, and the neighbor, distance, and ring walks) follows Amit Patel's [Hexagonal Grids guide](https://www.redblobgames.com/grids/hexagons/) (Red Blob Games), the standard reference for hex-grid geometry. `TriangleGrid` uses the standard alternating up/down strip construction, cross-checked against [Boris the Brave's triangle-grids article](https://www.boristhebrave.com/2021/05/23/triangle-grids/). Written from the math.
- `Subdivision` implements the folk recipe behind recursive "grid painting" compositions (an aspect-aware binary cut at a bounded random fraction, with minimum-size, depth, and probability stops, plus the probabilistic quadtree variant); the recipe is community folklore with no single canonical source. Its rigorous relative is the Mondrian process (Daniel M. Roy and Yee Whye Teh, ["The Mondrian Process"](https://papers.nips.cc/paper/3622-the-mondrian-process), NIPS 2008), and Loe Feijs's analyses ("Divisions of the Plane by Computer", *Leonardo* 37(3), 2004; [arXiv:2011.00843](https://arxiv.org/abs/2011.00843)) are the honest footnote that recursive splitting produces the look, not the painter's actual method.
- The `Maze` generators implement the classic algorithms from their published descriptions: the randomized depth-first "recursive backtracker", randomized Kruskal's (Joseph B. Kruskal, "On the Shortest Spanning Subtree of a Graph and the Traveling Salesman Problem", *Proc. AMS* 7, 1956, over union-find with a random edge order), and Wilson's loop-erased random walks (David Bruce Wilson, ["Generating Random Spanning Trees More Quickly than the Cover Time"](https://doi.org/10.1145/237814.237880), STOC 1996), which samples uniformly over every possible maze. The survey that maps this territory is Jamis Buck's [maze-generation series](https://weblog.jamisbuck.org/2011/2/7/maze-generation-algorithm-recap) and his *Mazes for Programmers* (Pragmatic Bookshelf, 2015); the longest path is the standard double-BFS tree diameter. Written from the algorithms. (The famous one-line BASIC maze *look*, random diagonals rather than carved walls, is the Truchet `.diagonals` tile above; Nick Montfort et al., *10 PRINT CHR$(205.5+RND(1)); : GOTO 10*, MIT Press, 2012.)
- `apollonianGasket` fills a circle by the Descartes circle theorem (stated by René Descartes in his 1643 letters to Princess Elisabeth of Bohemia; Frederick Soddy's poem "The Kiss Precise", *Nature*, 1936), with each circle's center from the theorem's complex extension (Jeffrey C. Lagarias, Colin L. Mallows, and Allan R. Wilks, ["Beyond the Descartes Circle Theorem"](https://arxiv.org/abs/math/0101066), *American Mathematical Monthly* 109, 2002). Each new circle is the Descartes quadratic's other root given its parent triple (Vieta's formulas), so the recursion is a linear jump with no square roots. Written from the theorem.
- `concaveHull` implements the **characteristic shape** ("chi-shape") of Matt Duckham, Lars Kulik, Mike Worboys, and Antony Galton (["Efficient generation of simple polygons for characterizing the shape of a set of points in the plane"](https://doi.org/10.1016/j.patcog.2008.03.023), *Pattern Recognition* 41(10), 2008): border triangles of the Delaunay triangulation eroded longest-boundary-edge-first, blocked whenever the opposite vertex already sits on the boundary, which is what keeps the polygon simple and every input point inside; the scale-free 0...1 parameter interpolates the length threshold between the triangulation's shortest and longest edge. Written from the paper.
- `alphaShape` implements the **alpha shape** of Herbert Edelsbrunner, David G. Kirkpatrick, and Raimund Seidel ("On the Shape of a Set of Points in the Plane", *IEEE Transactions on Information Theory* 29(4), 1983), in its standard alpha-complex form: keep the Delaunay triangles whose circumradius is at most alpha, and the boundary (the edges owned by exactly one kept triangle) linked into island and hole contours. Written from the technique.
- `fractured` (on `Shape` and on `Mesh`) implements **Voronoi fracture**, the standard way a solid is broken for graphics: seed points inside the thing being broken, and give each seed the region closer to it than to any other, which is the diagram Georgy Voronoy described in *Nouvelles applications des paramètres continus à la théorie des formes quadratiques* (1908). The plane case cuts the shape with the [power diagram](https://doi.org/10.1137/0216006) already in the framework; the space case clips the solid's convex hull by the bisector half-space of every other seed, the classic clipped-cell construction. The seeds are placed by **Mitchell's best-candidate** sampling (Don P. Mitchell, ["Spectrally Optimal Sampling for Distribution Ray Tracing"](https://doi.org/10.1145/127719.122736), SIGGRAPH 1991), which buys even spacing for a few extra draws per seed. Written from those techniques; no fracture library is used or ported.
- `convexHull(of: [Vector3])` implements the **incremental convex hull** in space, the construction of [Michael Kallay](https://doi.org/10.1016/0020-0190(84)90101-3) ("The complexity of incremental convex hull algorithms in R^d", *Information Processing Letters* 19(4), 1984) in its textbook form: seed a tetrahedron from four points that enclose a real volume, then add each remaining point by deleting the faces it can see and stitching the horizon of that hole to it. The plane case beside it, `convexHull(of: [Vector2])`, is the **monotone chain** of A. M. Andrew ("Another efficient algorithm for convex hulls in two dimensions", *Information Processing Letters* 9(5), 1979): sort the points and sweep the lower and upper boundary in turn.
- `Curve3D`'s frames, which `Mesh.sweep` and `Mesh.tube(along:)` ride, implement the **double reflection method** for rotation-minimizing frames of Wenping Wang, Bert Jüttler, Dayue Zheng, and Yang Liu (["Computation of Rotation Minimizing Frames"](https://doi.org/10.1145/1330511.1330513), *ACM Transactions on Graphics* 27(1), 2008), written from the paper: each frame is reflected across the plane bisecting the step to the next point, then across the plane that brings its tangent onto the next tangent, which turns it with the path and never about it. The leftover turn of a closed loop is spread back out by walked length.
- The **boolean set operations on meshes** (`Mesh.union` / `intersection` / `subtracting` / `symmetricDifference`) reimplement the **binary-space-partition merge** of Bruce Naylor, John Amanatides, and William Thibault (["Merging BSP Trees Yields Polyhedral Set Operations"](https://doi.org/10.1145/97879.97892), *SIGGRAPH '90*), the classic result that a solid held as a tree of its own face planes sorts any polygon into the solid's inside and outside, so clipping one solid's surface against the other's tree and choosing which halves to keep gives union, intersection and difference from one mechanism. The widely-used practical formulation of that paper (build, clip, invert, rebuild) is the shape the implementation follows; the code, the sampled partition-plane heuristic (Thibault and Naylor's split-and-balance scoring, ["Set operations on polyhedra using binary space partitioning trees"](https://doi.org/10.1145/37402.37421), *SIGGRAPH '87*, sampled on both sides so a convex solid stays affordable), and the seam repair that closes the T-junctions a plane cut leaves behind are Ollin's own.
- `medialAxis` approximates **Blum's medial axis** (Harry Blum, "A Transformation for Extracting New Descriptors of Shape", in *Models for the Perception of Speech and Visual Form*, MIT Press, 1967) by the standard **Voronoi subcomplex of a boundary sampling** (J. W. Brandt and V. R. Algazi, "Continuous skeleton computation by Voronoi diagram", *CVGIP: Image Understanding* 55(3), 1992): the Voronoi edges of evenly resampled boundary points whose generating samples aren't neighbors along the contour and whose endpoints stay inside the region, with each skeleton vertex carrying its circumradius as the inscribed-disk clearance. Written from the papers.
- `straightSkeleton` implements the **straight skeleton** of Oswin Aichholzer, Franz Aurenhammer, David Alberts, and Bernd Gärtner (["A novel type of skeleton for polygons"](https://doi.org/10.1007/978-3-642-80350-5_65), *Journal of Universal Computer Science* 1(12), 1995), by the wavefront event-queue formulation of Petr Felkel and Štěpán Obdržálek ("Straight Skeleton Implementation", *SCCG* 1998) hardened the way modern implementations are: simultaneous events are clustered by level and meeting point and processed as one generalized event over chains of wavefront edges, the treatment introduced by Tom Kelly (*Unwritten procedural modeling with the straight skeleton*, PhD thesis, University of Glasgow, 2013) and studied here in Tomasz Kędziora's kendzi-straight-skeleton (BSD-3) and Kelly's campskeleton (Apache-2.0), both read for structure, neither translated. Mitered insets cut each skeleton face as the roof plane it is (Peter Palfrader and Martin Held, ["Computing Mitered Offset Curves Based on Straight Skeletons"](https://doi.org/10.1080/16864360.2014.997637), *Computer-Aided Design and Applications* 12(4), 2015). Written from the publications, with our own face assembly (skeleton nodes shared by identity, faces stitched from each edge's boundary arcs).
- `Marbling` implements **mathematical paper marbling** in Aubrey Jaffer's closed-form model ([Mathematical Marbling](https://people.csail.mit.edu/jaffer/Marbling/); Shufang Lu, Aubrey Jaffer, Xiaogang Jin, Hanli Zhao, and Xiaoyang Mao, ["Mathematical Marbling"](https://doi.org/10.1109/MCG.2011.51), *IEEE Computer Graphics and Applications* 32(1), 2012): the area-preserving ink-drop displacement (a point at distance `d` from a drop of radius `r` lands at `√(d² + r²)`) and the stylus family whose displacement decays exponentially with distance from the tool (tine line, comb, circular tine, vortex), here with the exponential base reparameterized as a half-distance falloff parameter. Written from the publications.
- `Watercolor` implements Tyler Hobbs' generative-watercolor recipe (["A Guide to Simulating Watercolor Paint with Generative Art"](https://www.tylerxhobbs.com/words/a-guide-to-simulating-watercolor-paint-with-generative-art); expanded in his talk ["How to Hack a Painting"](https://tylerxhobbs.com/essays/2020/how-to-hack-a-painting)): a base polygon deformed by recursive midpoint subdivision with Gaussian jumps, per-edge variance inherited with decay and jitter so some stretches bloom while others stay crisp, and the painted result stacked as dozens of low-opacity further-deformed layers; the granulating speckle-under-clip texture in the example follows his masking trick. Written from the essay.
- `chladni` and the `.chladni` generator implement the closed-form **Chladni plate** figure of [Paul Bourke's "Chladni Plate Mathematics"](https://paulbourke.net/geometry/chladni/) (2003): for a square plate driven at its center, the standing wave `cos(nπx)cos(mπy) − cos(mπx)cos(nπy)` whose zero set is the figure sand traces, generalized with the two mode amplitudes as free weights. The physical figures themselves are Ernst Chladni's (*Entdeckungen über die Theorie des Klanges*, 1787). Written from the formula.
- `Heightfield.diamondSquare` implements the **diamond-square** midpoint-displacement fractal of Alain Fournier, Don Fussell, and Loren Carpenter (["Computer Rendering of Stochastic Models"](https://doi.org/10.1145/358523.358553), *Communications of the ACM* 25(6), 1982), in the standard non-wrapping form (border midpoints average their three available neighbors), with the per-level amplitude decay exposed as the `roughness` parameter. Written from the technique.
- `Erosion.hydraulic` implements the **particle-based hydraulic erosion** of Hans Theobald Beyer (["Implementation of a method for hydraulic erosion"](https://www.firespark.de/resources/downloads/implementation%20of%20a%20methode%20for%20hydraulic%20erosion.pdf), bachelor thesis, Technische Universität München, 2015): drops steered by an inertia-blended bilinear gradient, the slope-speed-water carry capacity, surplus deposition split bilinearly over the four surrounding samples, and erosion taken from a distance-weighted brush radius. One deliberate deviation: the speed update uses the energy form `v' = √(max(0, v² − Δh·g))` so downhill legs accelerate (the thesis's eq. 5.7 as printed slows a falling drop and can go imaginary). Written from the thesis.
- `Erosion.thermal` implements **thermal weathering** as introduced by F. Kenton Musgrave, Craig E. Kolb, and Robert S. Mace (["The Synthesis and Rendering of Eroded Fractal Terrains"](https://doi.org/10.1145/74334.74337), *SIGGRAPH '89*): material above a talus angle repeatedly shed to the lower neighbors in proportion to their excess, here applied as an order-free relaxation (all transfers gathered against the frozen field per iteration) so the pass is deterministic and mass-conserving. Written from the paper.
- `Sim.ripples` implements the classic **interactive-water height-field kernel**, the height/velocity form popularized by Evan Wallace's [WebGL Water](https://madebyevan.com/webgl-water/) ([source](https://github.com/evanw/webgl-water), MIT): velocity accelerated toward the four-neighbor height average, damped, then integrated into the height, with drops added to the height channel only; Ollin adds a soft absorbing rim at the borders and routes drawn marks through an add-to-height inject. Written from the technique.
- The parametric 3D shape generators are written from their published forms. `drawSupershape`/`Mesh.supershape` is Johan Gielis's superformula (["A generic geometric transformation that unifies a wide range of natural and abstract shapes"](https://doi.org/10.3732/ajb.90.3.333), *American Journal of Botany* 90, 2003), evaluated once per latitude and once per longitude and multiplied in the spherical product; `drawSuperellipsoid` is the superquadric surface of Alan Barr (["Superquadrics and Angle-Preserving Transformations"](https://doi.org/10.1109/MCG.1981.1673799), *IEEE CG&A*, 1981), itself descended from Piet Hein's superellipse. `drawLathe` (surface of revolution) and `drawExtrude` (linear sweep of a plane figure) are standard constructive-geometry operations with no single source; the torus knot follows the usual `(p, q)` curve on a torus, swept as a tube along a parallel-transported (rotation-minimizing) frame, the standard way to keep a swept cross-section from twisting.

- `SpatialIndex` implements two published structures, written from the papers. The `.tree` kind is the **k-d tree** of Jon Louis Bentley ("Multidimensional Binary Search Trees Used for Associative Searching", *Communications of the ACM* 18(9), 1975), searched by the branch-and-bound descent of Jerome H. Friedman, Jon Louis Bentley, and Raphael Ari Finkel (["An Algorithm for Finding Best Matches in Logarithmic Expected Time"](https://dl.acm.org/doi/10.1145/355744.355745), *ACM Transactions on Mathematical Software* 3(3), 1977), including their choice to cut along the widest spread, to stop cutting at a bucket of points, and to read the far side of a cut only when the ball around the best find so far crosses it. The `.grid` kind is the **uniform-grid neighbor search** described by Matthias Teschner and colleagues ("Optimized Spatial Hashing for Collision Detection of Deformable Objects", *Vision, Modeling, Visualization* 2003), with the outward ring search and its stopping bound for the nearest queries. Written independently.
- `Tensegrity` is written from the published geometry of the classic forms. The regular prism's balancing twist, `π/2 − π/n` whatever its height and radius, is Robert Connelly and Maria Terrell's result in "Globally rigid symmetric tensegrities" (*Structural Topology* 21, 1995). The six-strut form's balanced shape is Børge Jessen's icosahedron ("Orthogonal Icosahedra", *Nordisk Matematisk Tidskrift* 15, 1967), whose six long edges are the struts and twenty-four short edges the cables. The stacked-prism mast follows the class-2 stacking in Robert E. Skelton and Mauricio C. de Oliveira's [*Tensegrity Systems*](https://doi.org/10.1007/978-0-387-74242-7) (Springer, 2009). Gunnar Tibert and Sergio Pellegrino's ["Review of Form-Finding Methods for Tensegrity Structures"](https://doi.org/10.1260/026635103322987940) (*International Journal of Space Structures* 18(4), 2003) was the map of the field. The word and the idea are Buckminster Fuller's and Kenneth Snelson's; the `imbalance` check is a least-squares fit of the standard node force balance, written here.

### Image as input

- `Image.pixelSorted` implements **pixel sorting**, the glitch technique invented by Kim Asendorf ([ASDFPixelSort](https://github.com/kimasendorf/ASDFPixelSort), 2010): contiguous runs of pixels along rows or columns, bounded by a brightness threshold, reordered by a sort key so the image's own pixels streak. The interval model (threshold-bounded runs; his classic applies a vertical pass then a horizontal one) is his; the parameter space (interval selectors, sort keys) was cross-read against [Satyarth Mishra Sharma's pixel-sorting write-up](https://satyarth.me/articles/pixel-sorting/). Written from the technique, no code taken.
- `shadowArt` carves the **visual hull** from silhouettes, the shape-from-silhouette construction named by Aldo Laurentini ("How Far 3D Shapes Can Be Understood from 2D Silhouettes", *IEEE PAMI* 16/2, 1994). Sculptures built to throw two or three chosen shadows are older; the computational version was set out by Niloy Mitra and Mark Pauly ("Shadow Art", *SIGGRAPH Asia* 2009), whose optimization step Ollin does not attempt: the carve here is the plain intersection, and the shadows it really throws are handed back to be compared. Written from the description.
- `Image.autostereogram` implements the **single-image random-dot stereogram** of Christopher Tyler and Maureen Clarke (1990), built on Bela Julesz's random-dot stereogram of 1959. The column-by-column construction, where each column takes its color from the column one separation to its left and the separation is set by the depth, is the one Harold Thimbleby, Stuart Inglis, and Ian Witten set out in "Displaying 3D Images: Algorithms for Single-Image Random-Dot Stereograms" (*IEEE Computer* 27/10, 1994). Written from the description, no code taken.
- `Image.mosaic` implements the **photographic mosaic**, developed by Robert Silvers in his 1996 thesis at the MIT Media Lab and patented from a 1997 filing, although building one picture from many smaller ones is older than photography. The nearest-average match and the linear-light averaging are the ordinary technique. Written from the description.
- `envelope` and `caustic` implement the **envelope of a family of lines** and the **catacaustic/diacaustic** built on it, classical differential geometry drawn by the discrete construction (the crossing of consecutive members, which converges to the touching point at second order). The circle's caustics, the nephroid for parallel light and the cardioid for a source on the rim, were worked out in the seventeenth century, with Ehrenfried Walther von Tschirnhaus and Christiaan Huygens among the names attached. Reflection is the vector mirror law and refraction the vector form of Snell's law. Written from the mathematics.
- `huygensFront` implements **Huygens' construction** for a wavefront (Christiaan Huygens, *Traite de la Lumiere*, 1690): every point of a front sends out a wavelet and the new front is their envelope, with the folded pieces that fall inside a neighbor's wavelet dropped rather than drawn. Written from the description.
- `deBruijnSequence` and `DeBruijnCode` implement **de Bruijn sequences**, named for Nicolaas Govert de Bruijn ("A combinatorial problem", *Koninklijke Nederlandse Akademie van Wetenschappen* 49, 1946), counted earlier by Camille Flye Sainte-Marie (1894) and known to Sanskrit prosodists as the *yamātārājabhānasalagām* mnemonic. The run is built by the Lyndon-word concatenation of Harold Fredricksen, James Maiorana, and Irving Kessler ("Necklaces of beads in k colors and k-ary de Bruijn sequences", *Discrete Mathematics* 23, 1978), which yields the lexicographically least sequence; `lyndonWords` is Jean-Pierre Duval's generation algorithm (1988). Written from the descriptions, no code taken.
- `Polyomino` and `tilePolyominoes` implement **polyominoes** and the exact-cover fit, named and studied by Solomon W. Golomb ("Checker Boards and Polyominoes", *American Mathematical Monthly* 61/10, 1954; *Polyominoes*, Scribner, 1965), and carried to a wider readership by Martin Gardner's *Scientific American* columns. The search fills the cell with the fewest remaining ways to be covered, which is the selection rule of Donald Knuth's ["Dancing Links"](https://arxiv.org/abs/cs/0011047) (2000), implemented here over counted arrays rather than linked lists. The mutilated-board impossibility is the classical coloring argument. Written from the descriptions, no code taken.
- `powerDiagram` implements the **power diagram** (Laguerre diagram) of Franz Aurenhammer ("Power Diagrams: Properties, Algorithms and Applications", *SIAM Journal on Computing* 16/1, 1987), where a site carries a weight subtracted from the squared distance, the cells stay convex, and a site can end up with no cell at all. Each cell is cut here as an intersection of half-planes, the direct construction rather than the lifting-map one. Written from the description.
- `fordCircles` implements the **Ford circles** of Lester R. Ford ("Fractions", *American Mathematical Monthly* 45/9, 1938): the circle of radius 1/(2q²) resting on the number line at p/q, with two circles tangent exactly when their fractions satisfy |ps - qr| = 1, drawn as a way of seeing how well a number is approximated by fractions. `fareySequence` is the **Farey sequence**, named for John Farey's 1816 note on the mediant property, published by Charles Haros in 1802 and proved by Augustin-Louis Cauchy; the terms are walked by the standard next-term recurrence. Written from the description.
- `ulamSpiral` implements the **Ulam spiral**, the picture Stanisław Ulam made on a notepad in 1963 and published with Myron Stein and Mark Wells ("A Visual Display of Some Properties of the Distribution of Primes", *American Mathematical Monthly* 71/5, 1964), which Martin Gardner's *Scientific American* column of March 1964 carried to everybody else: the whole numbers written in a square spiral, with the primes marked, and the diagonals they gather on being the values of quadratic polynomials. `primes(upTo:)` is the sieve of Eratosthenes, and `isPrime` the ordinary 6k ± 1 trial division. Written from the description.
- `tenPrint` implements the **maze of diagonals** printed by the one-line program `10 PRINT CHR$(205.5+RND(1)); : GOTO 10`, a piece of home-computer folk art whose history, variants, and cultural life fill the book [*10 PRINT CHR$(205.5+RND(1));: GOTO 10*](https://10print.org) by Nick Montfort, Patsy Baudoin, John Bell, Ian Bogost, Jeremy Douglass, Mark C. Marino, Michael Mateas, Casey Reas, Mark Sample, and Noah Vawter (MIT Press, 2012). The rule is two characters and a coin; the joining of the diagonals into continuous runs is Ollin's own. Written from the technique, no code taken.
- `Filter.droste` implements the **Droste effect**, the picture that contains itself, named for the 1904 Droste cocoa tin whose label repeats inside its own label. The conformal construction is the one M. C. Escher used in *Print Gallery* (1956) and that Hendrik Lenstra and Bart de Smit analyzed and completed (["Applications of elliptic curves to the theory of the Escher and Droste effects"](https://pub.math.leidenuniv.nl/~smitbde/escherdroste/), Leiden, 2003): the annulus is mapped to a strip by a complex logarithm, repeated along the strip, sheared in the log plane so one turn steps a whole number of copies, and mapped back by the exponential. Written from the published construction, no code taken.
- `Image.seamCarved` implements **seam carving**, the content-aware resizing of Shai Avidan and Ariel Shamir (["Seam Carving for Content-Aware Image Resizing"](https://perso.crans.org/frenoy/matlab2012/seamcarving.pdf), *SIGGRAPH* 2007): a connected run of pixels, one per row, found by dynamic programming over a per-pixel energy, removed to narrow the picture by one pixel, with enlargement duplicating the first seams found and a mask adding or removing energy to hold a region still or take it out. The default cost is the **forward energy** of Michael Rubinstein, Ariel Shamir, and Shai Avidan (["Improved Seam Carving for Video Retargeting"](https://people.csail.mit.edu/mrub/papers/vidret.pdf), *SIGGRAPH* 2008), which charges a removal for the edges its own gap creates rather than for the gradient it takes away, and the multi-size order map that lets any width be read back at once is the same paper family's real-time retargeting idea. Written from the papers, no code taken.
- `drawGlyphMosaic` is the classic character-ramp text rendering (the ASCII-art tradition of mapping cell brightness onto a ramp of characters ordered by ink, the standard ramps cataloged in [Paul Bourke's "Character representation of grey scale images"](https://paulbourke.net/dataformats/asciiart/), 1997), generalized by measuring each glyph's actual ink coverage in the active font (lit pixels for a bitmap font, filled area for an outline font, pen travel for a stroke font) instead of relying on a hand-ordered ramp. Written from the technique.
- `singleLine` implements **TSP art**, the continuous-line halftoning of Robert Bosch and Adrianne Herman ("Continuous line drawings via the traveling salesman problem", *Operations Research Letters* 32, 2004) with the stippled city placement of Craig S. Kaplan and Robert Bosch (["TSP Art"](https://archive.bridgesmathart.org/2005/bridges2005-301.pdf), Bridges 2005), over the Secord stippling above: dots placed by tone, then toured by one closed line. The tour is a nearest-neighbor construction improved by neighbor-list 2-opt (G. A. Croes, "A Method for Solving Traveling-Salesman Problems", *Operations Research* 6, 1958). Written from the papers.
- `spanningTree` implements **minimum-spanning-tree halftoning**, the branching sibling of the TSP art above: the same stippled dots joined by the Euclidean minimum spanning tree (Kohei Inoue and Kiichi Urahama, "Halftoning with minimum spanning trees and its application to maze-like images", *Computers & Graphics* 33/5, 2009; the connect-the-stipples family is surveyed in Abdalla G. M. Ahmed's ["From Stippling to Scribbling"](https://archive.bridgesmathart.org/2015/bridges2015-267.pdf), Bridges 2015). The tree is Kruskal's algorithm over the Delaunay triangulation, which always contains the Euclidean MST, and the plotter chains come from pairing odd-degree vertices, the standard minimal trail decomposition. Written from the papers.
- `isolines` implements **marching squares**, the standard two-dimensional contour-extraction analogue of Lorensen and Cline's marching cubes ("Marching Cubes: A High Resolution 3D Surface Construction Algorithm", *SIGGRAPH* 1987): per-cell crossing lookup with linear edge interpolation, saddle cells settled by the cell-average rule. Written from the technique.
- `isosurface` implements **marching cubes**, William E. Lorensen and Harvey E. Cline's isosurface extraction ("Marching Cubes: A High Resolution 3D Surface Construction Algorithm", *SIGGRAPH* 1987; the patent expired in 2005): a grid of cubes classified by which corners lie inside the surface, with linear interpolation placing each crossing along its edge. Faces whose contour could be joined two ways are settled by the **asymptotic decider** of Gregory M. Nielson and Bernd Hamann ("The asymptotic decider: resolving the ambiguity in marching cubes", *IEEE Visualization* 1991), comparing the isolevel against the value at the saddle of the face's bilinear surface. Ollin builds each cell's surface from its six face contours chained into loops rather than from a triangulation table, so the shared-face decision (which reads only the four values on that face) is what guarantees neighboring cells agree. Written from the publications; no published lookup table was transcribed.
- `isosurface(method: .dualContouring)` implements **dual contouring** from Tao Ju, Frank Losasso, Scott Schaefer, and Joe Warren (["Dual Contouring of Hermite Data"](https://doi.org/10.1145/566570.566586), *SIGGRAPH* 2002): one vertex per cell at the minimizer of the quadric error over the tangent planes through the cell's edge crossings, and one quad per crossed edge. The quadric is solved through the normal equations about the crossings' mass point with the small singular values dropped, the numerically stable reading Scott Schaefer and Joe Warren give in *Dual Contouring: The Secret Sauce* (Rice University technical report, 2002). One vertex per sheet of surface through a cell, for a cell whose face contours chain into more than one loop, follows the manifold form of Scott Schaefer, Tao Ju, and Joe Warren ("Manifold Dual Contouring", *IEEE Transactions on Visualization and Computer Graphics* 13(3), 2007). The crossing refinement by bisection, the settling of an ambiguous face by sampling the field at its saddle, the per-sheet normal clustering that shades a crease with one normal per side, the slide of an outside answer along the crease line into the cell, and the chord bridging of a crease a cell read on one side only are our own. Written from the publications; no code was consulted.
- `Mesh.subdivided` implements the two classic **subdivision-surface** schemes from their publications: Edwin Catmull and James Clark's quad scheme (["Recursively generated B-spline surfaces on arbitrary topological meshes"](https://doi.org/10.1016/0010-4485(78)90110-0), *Computer-Aided Design* 10(6), 1978) over general polygon faces, and Charles Loop's triangle scheme (*Smooth Subdivision Surfaces Based on Triangles*, master's thesis, University of Utah, 1987) with the simplified vertex weight of Joe Warren and Henrik Weimer (*Subdivision Methods for Geometric Design*, Morgan Kaufmann, 2001). Open boundaries follow the crease rules of Hugues Hoppe et al. ("Piecewise Smooth Surface Reconstruction", *SIGGRAPH* 1994) and Tony DeRose, Michael Kass, and Tien Truong ("Subdivision Surfaces in Character Animation", *SIGGRAPH* 1998), with corner vertices interpolated in the boundary convention scene-description systems default to. The Loop limit-position masks were cross-read against the subdivision chapter of *Physically Based Rendering* (Pharr, Jakob, Humphreys; the pbrt-v3 source is BSD-2), studied, not translated. The positional weld, grid-quad recovery, and flat-patch face merge that let a flat-shaded triangle mesh subdivide on its intended topology are our own.
- `MeshGrowth` implements **differential growth over a surface**, the three-dimensional relative of the differential line above. Its remeshing is the **isotropic remeshing** pipeline of Mario Botsch and Leif Kobbelt ("A Remeshing Approach to Multiresolution Modeling", *Eurographics/ACM SIGGRAPH Symposium on Geometry Processing*, 2004): split edges longer than four thirds of the target length, collapse those under four fifths of it, flip edges that reduce the total deviation from valence six, and relax each vertex toward its neighbors' centroid within the tangent plane. The growth-and-buckling model (a surface whose edges lengthen while self-avoidance stops it passing through itself, so new area is absorbed as folds) follows the thin-shell differential growth Nervous System describe in ["Floraform, an exploration of differential growth"](https://n-e-r-v-o-u-s.com/blog/?p=6721) and the mesh growth of Anders Hoff's [differential-mesh-3d](https://github.com/inconvergent/differential-mesh-3d) (MIT); both were read for approach, neither translated. Written from the publications.
- `MeshOperators` implements the **cotangent discrete Laplace-Beltrami operator** with mixed-area vertex cells, from Mark Meyer, Mathieu Desbrun, Peter Schröder, and Alan H. Barr ("Discrete Differential-Geometry Operators for Triangulated 2-Manifolds", *Visualization and Mathematics III*, Springer, 2003): each edge weighted by the cotangents of the two angles opposite it, normalized by a per-vertex cell that is the Voronoi region where the triangle allows it and a halved or quartered triangle area where an obtuse angle would push that region outside the 1-ring. It supplies both the surface diffusion and the mean-curvature normal. Written from the paper.
- `MeshReactionDiffusion` runs the **Gray-Scott** reaction (P. Gray and S. K. Scott, "Autocatalytic reactions in the isothermal, continuous stirred tank reactor", *Chemical Engineering Science* 39/6, 1984) directly on a mesh surface, the approach Greg Turk introduced in ["Generating Textures on Arbitrary Surfaces Using Reaction-Diffusion"](https://faculty.cc.gatech.edu/~turk/my_papers/reaction_diffusion.pdf) (*SIGGRAPH* 1991). Turk's paper is also the source of the constraint that matters most here: neighbors on an irregular mesh must be weighted by the geometry rather than equally, which is why the diffusion runs through the cotangent operator above rather than a stencil. Written from the papers.
- `reconstructSurface` implements the **signed-distance surface reconstruction** of Hugues Hoppe, Tony DeRose, Tom Duchamp, John McDonald, and Werner Stuetzle ("Surface Reconstruction from Unorganized Points", *SIGGRAPH* 1992): a tangent plane fitted to each point's k-neighborhood by principal component analysis, orientations made consistent by propagation along a minimum spanning tree of the neighbor graph weighted by normal disagreement (the paper's Riemannian graph), and the signed distance to the nearest plane contoured by the marching-cubes pass above, declared undefined where the projected foot point lands farther from every sample than the validity cutoff, so gaps in the data stay open boundaries. Orienting planes toward recorded camera positions instead, when a scan has them, follows the range-data practice the paper itself suggests. Written from the paper; the near-surface occupancy band that skips far cells is our own.
- `reconstructSurface`'s `.robust` fitting implements **RIMLS**, the robust implicit moving least squares of A. Cengiz Öztireli, Gaël Guennebaud, and Markus Gross (["Feature Preserving Point Set Surfaces based on Non-Linear Kernel Regression"](https://www.labri.fr/perso/guenneba/publi/RIMLS_eg09/RIMLS_eg09.pdf), *Computer Graphics Forum* 28(2), Eurographics 2009): Ravikrishna Kolluri's implicit MLS distance (the kernel-weighted average of per-sample plane heights) made robust by iteratively re-weighting each sample with a Gaussian of its residual (Welsch's estimator, scaled by the local kernel radius) and of its normal's distance to the fitted gradient, the first pass deliberately unweighted so every iteration count yields a continuous surface, and the gradient keeping the paper's kernel-derivative terms. Written from the paper; no implementation was consulted.
- `WorldCloud.add(_:correcting:)` keeps a long depth sweep registered by **frame-to-model point-to-plane ICP**, the iterative closest point method of Paul Besl and Neil McKay ("A Method for Registration of 3-D Shapes", *IEEE PAMI* 14(2), 1992) under the point-to-plane error metric of Yang Chen and Gérard Medioni ("Object Modelling by Registration of Multiple Range Images", *Image and Vision Computing* 10(3), 1992). Each round is solved as a linear least-squares problem by the small-angle linearization of [Kok-Lim Low, *Linear Least-Squares Optimization for Point-to-Plane ICP Surface Registration*](https://www.comp.nus.edu.sg/~lowkl/publications/lowk_point-to-plane_icp_techrep.pdf) (UNC technical report TR04-004, 2004), including his rule that the recovered angles must rebuild a true rotation matrix rather than the approximate one the system was built from, and his advice to solve on points centered and scaled about the batch. The choice of stage variants (uniform subsampling, the point-to-plane metric, distance-based rejection) follows the survey of Szymon Rusinkiewicz and Marc Levoy ("Efficient Variants of the ICP Algorithm", *3DIM* 2001). Fusing posed depth frames against an accumulating model is the shape KinectFusion gave the field (Richard Newcombe and colleagues, *ISMAR* 2011); Ollin's is the gentlest relative of it, matching against a voxel-thinned point cloud rather than a signed-distance volume, and its solve drops an unconstrained direction through the eigenvectors of the 6x6 normal equations. The stability it reports, the smallest eigenvalue over the largest, is from Gelfand, Ikemoto, Rusinkiewicz and Levoy, "[Geometrically Stable Sampling for the ICP Algorithm](https://graphics.stanford.edu/papers/stabicp/stabicp.pdf)" (*3DIM* 2003). Written from the papers, independently.
- `ScanGraph` straightens a scan around a place it recognizes, by **pose-graph optimization**. Written from three papers, independently:
    - the least-squares formulation, the normal equations, and holding one node still: Grisetti, Kümmerle, Stachniss and Burgard, "[A Tutorial on Graph-Based SLAM](https://ieeexplore.ieee.org/document/5681215)" (*IEEE ITS Magazine* 2(4), 2010)
    - the on-manifold increment, and its numerical derivatives: Blanco-Claraco, "[A Tutorial on SE(3) Transformation Parameterizations and On-Manifold Optimization](https://arxiv.org/abs/2103.15980)" (2010; arXiv 2021)
    - the preconditioned conjugate-gradient solve: Agarwal, Snavely, Seitz and Szeliski, "Bundle Adjustment in the Large" (*ECCV* 2010)
- `particleSurface` implements the **blended particle surfacing** of Yongning Zhu and Robert Bridson ("Animating Sand as a Fluid", *SIGGRAPH* 2005): the implicit surface whose value is the distance to a kernel-weighted average of the nearby particles less their blended radius, which smooths the lumpy union of spheres into one skin, contoured by the same marching-cubes pass. Written from the paper.
- `Metaballs` implements the **soft object** model of Geoff Wyvill, Craig McPheeters, and Brian Wyvill ("Data structure for soft objects", *The Visual Computer* 2/4, 1986): a degree-six polynomial falloff in the squared distance, so a ball's influence reaches zero smoothly at a finite radius and no square root is needed. It is the finite-support relative of Jim Blinn's earlier exponential blobby model ("A Generalization of Algebraic Surface Drawing", *ACM Transactions on Graphics* 1/3, 1982), which named the technique. Written from the publications.
- `SlitScan` implements slit-scan time displacement: a rolling frame history read back through a per-pixel delay, the generalization of photographic slit scanning to arbitrary delay maps surveyed in Golan Levin's ["An Informal Catalogue of Slit-Scan Video Artworks and Research"](http://www.flong.com/archive/texts/lists/slit_scan/index.md). Written from the technique.
- `drawHalftone` implements classic AM (clustered-dot) halftone screening as vector geometry: one round dot per cell of a rotated grid, sized so its ink area matches the tone under the cell (Robert Ulichney, *Digital Halftoning*, MIT Press, 1987 is the standard reference). Each dot's radius inverts the growing-round-dot covered-area spot function that the print separations' raster screens threshold against (see that entry above), so both screens reproduce tone the same way. Written from the technique.
- The `.melt` filter implements the luminance melt: a two-level domain-warped fbm field (the marble construction of Inigo Quilez's ["Domain warping"](https://iquilezles.org/articles/warp/)) whose displacement vector also shifts where the layer is sampled, with the sampled brightness mixed back into the field before a palette ramp. Reusing the field's displacement for the image warp, and the bounded low-frequency sway offsets, follow [fluid](https://github.com/enonforetsam/fluid) (MIT), the generative-background studio already credited under the filter catalog. Written independently in Metal.
- `IFS` and its chaos game implement Michael Barnsley's iterated function systems (*Fractals Everywhere*, Academic Press 1988). The bundled fern uses Barnsley's published four-map coefficient table, checked against [Wikipedia's article](https://en.wikipedia.org/wiki/Barnsley_fern) and [Rick Wicklin's write-up](https://blogs.sas.com/content/iml/2012/12/12/iterated-function-systems-and-barnsleys-fern-in-sas.md); the Sierpinski systems are the standard half-scale and third-scale constructions. Written from the technique.
- `FractalFlame` implements Scott Draves and Erik Reckase's ["The Fractal Flame Algorithm"](https://flam3.com/flame_draves.pdf): the weighted chaos game with a 20-step fuse, the variation catalog with its theta-from-the-y-axis convention, structural coloring (the orbit's color coordinate averaging toward each transform's palette index), and the log-density display with one density-derived log factor for all three channels, gamma at the downfilter, and vibrancy. Only the paper was read; the flam3 and Apophysis code bases (GPL) were not consulted, so the implementation is written from the publication alone.
- `Buddhabrot` implements Melinda Green's technique ([her 1993 description and gallery](https://superliminal.com/fractals/bbrot/)): plot the escaping orbits of the Mandelbrot iteration as a per-pixel density histogram, with her false-color variant exposing three iteration caps as the RGB channels. The closed-form main-cardioid and period-2-bulb interior tests are the standard published shortcuts. Written from the technique.
- `Percolation` implements site percolation on the square lattice, the model introduced by Simon Broadbent and John Hammersley ("Percolation processes I. Crystals and mazes", *Proc. Cambridge Phil. Soc.*, 1957), with union-find cluster labeling in the spirit of Joseph Hoshen and Raoul Kopelman's algorithm (*Physical Review B*, 1976). `criticalProbability` is the square-lattice site threshold measured by Mark Newman and Robert Ziff ("Efficient Monte Carlo algorithm and high-precision results for percolation", *Physical Review Letters*, 2000). Written from the technique.
- `inversionLimitSet` implements the circle-inversion limit-set rendering of Michael Frame and Tatiana Cogevina ("An infinite circle inversion limit set fractal", *Computers & Graphics* 24, 2000): a random-inversion orbit from a point outside the discs, never inverting across the circle just used, described in [Frame's Yale course pages](http://web.archive.org/web/20251121203203/https://gauss.math.yale.edu/fractals/) and the [Union College notes](https://www.math.union.edu/research/circleinversions/InversionLimitSets.md). Written from the technique.
- `kleinianLimitSet` implements the limit-set tracing of David Mumford, Caroline Series, and David Wright's *Indra's Pearls: The Vision of Felix Klein* (Cambridge University Press, 2002): the two-generator trace recipe (their "grandma's recipe", Markov-identity minus root), and the depth-first walk of reduced words with cyclically ordered branches and repetend fixed points, which is what emits the curve as one ordered polyline. The circle-orbit bridge (`schottkyCircles(ta:tb:)`) draws the same groups through their generators' isometric circles, the book's device for turning a matrix group back into paired discs. Formulas were checked against the book's published gasket matrices and against Chris King's ["The Intrigues and Delights of Kleinian and Quasi-Fuchsian Limit Sets"](https://link.springer.com/article/10.1007/s00283-018-09856-6) (*The Mathematical Intelligencer*, 2019) and [Paul Nylander's notes](https://nylander.wordpress.com/2005/08/10/kleinian-double-cusp-group/), which also corroborate the preset trace values. Written from the book's published recipe.
- `schottkyCircles` / `schottkyLimitSet` render the orbit of a Schottky group's pairing circles, the construction set out in David Mumford, Caroline Series, and David Wright's *Indra's Pearls: The Vision of Felix Klein* (Cambridge University Press, 2002): circles paired by Möbius maps that carry the outside of one onto the inside of its partner, walked over reduced words. The image of a circle is taken in closed form through the Hermitian matrix representation of a generalized circle, standard inversive geometry (see Alan F. Beardon, *The Geometry of Discrete Groups*, Springer, 1983). Background on rendering these figures was read in Kento Nakamura and Kazushi Ahara's ["A New Algorithm for Rendering Kissing Schottky Groups"](https://archive.bridgesmathart.org/2016/bridges2016-367.pdf) (*Bridges* 2016) and Matilde Marcolli's [Schottky groups and limit sets](http://www.its.caltech.edu/~matilde/FractalsUToronto9.pdf) course notes. Written from the published construction.

### Math, motion & input

- `describe(_:)` and `describe(_:as:in:)` follow p5.js's accessible canvas descriptions, written up in [Writing Accessible Canvas Descriptions](https://p5js.org/tutorials/writing-accessible-canvas-descriptions/) by the p5.js accessibility contributors. p5.js is LGPL-2.1, so the idea is borrowed and the code is Ollin's own. p5 writes its descriptions into the page. Ollin gives them to the platform's accessibility layer, with a region per part. An exported SVG carries them as [`<title>` and `<desc>`](https://www.w3.org/TR/SVG11/access.md).
- `noise` / `signedNoise` implement Ken Perlin's improved Perlin noise ([*Improving Noise*](https://mrl.cs.nyu.edu/~perlin/paper445.pdf), SIGGRAPH 2002, and his published reference implementation), written from the algorithm, with a contrast calibration so the output fills `0...1`.
- The looping `noise(loop:)` / `fbm(loop:)` forms use the standard seamless-loop construction: the sample tours a closed circle through a noise field of higher dimension than the output, the technique popularized by Étienne Jacob's [necessary-disorder tutorials](https://necessarydisorder.wordpress.com/) ("Drawing from noise, and then making animated loopy GIFs from there"). The 4D lattice behind the two-coordinate form is the classic 32-gradient extension of Perlin noise (after Stefan Gustavson's [classic-noise reference](https://github.com/stegu/perlin-noise)). Written from the techniques.
- The seedable `random` generator is SplitMix64 (Guy L. Steele Jr., Doug Lea, and Christine H. Flood, [*Fast Splittable Pseudorandom Number Generators*](https://doi.org/10.1145/2660193.2660195), OOPSLA 2014), written from the published algorithm.
- `randomGaussian` uses the Marsaglia polar method for normal-distributed samples.
- The named `Easing` curves are Robert Penner's easing equations, written from the formulas cataloged at [easings.net](https://easings.net) (Andrey Sitnik and Ivan Solovev).
- `ResponseCurve` passes through its points by monotone piecewise cubic interpolation (F. N. Fritsch and R. E. Carlson, ["Monotone Piecewise Cubic Interpolation"](https://doi.org/10.1137/0717021), *SIAM Journal on Numerical Analysis* 17(2), 1980), written from the published method in the form [Wikipedia's article](https://en.wikipedia.org/wiki/Monotone_cubic_interpolation) lays out: each slope starts as the mean of its two secants, is zero where they change sign, and a pair too steep for its interval is scaled back onto the circle of radius 3, which is what keeps a falloff from overshooting between its points.
- `@Smoothed` and `OneEuroFilter` implement the [1€ filter](https://gery.casiez.net/1euro/) for adaptive input smoothing (Géry Casiez, Nicolas Roussel, and Daniel Vogel, *1€ Filter: A Simple Speed-based Low-pass Filter for Noisy Input in Interactive Systems*, CHI 2012), written from the paper.
- `StrokeMark` and `StrokeDynamics` follow the standard brush-engine mapping of input speed onto stroke weight, where a hurried stroke lays down a lighter mark, as cataloged in the drawing tools that expose it as a "speed" or "velocity" sensor (Krita's [brush-engine sensors](https://docs.krita.org/en/reference_manual/brushes/brush_settings/options.md), Procreate's Brush Studio speed settings) and in Steve Ruiz's [perfect-freehand](https://github.com/steveruizok/perfect-freehand) (MIT), which simulates pen pressure from the distance between successive input points. Ollin measures speed against real elapsed time and smooths it with the 1€ filter below instead, so a mark is frame-rate independent by construction. Written from the technique.
- `Pace` reparameterizes a curve by arc length (or a strip by swept area) the way David Eberly's ["Moving Along a Curve with Specified Speed"](https://www.geometrictools.com/Documentation/MovingAlongCurveSpecifiedSpeed.pdf) (Geometric Tools, 2019) lays it out: integrate the speed by Gauss-Legendre quadrature, then solve for the parameter with Newton's method kept inside a bisection bracket. The strip's rate of sweeping area is integrated across each rung in closed form, the integral of the square root of a quadratic.
- `@Sprung` and `DampedSpring` step the damped harmonic oscillator by its exact closed-form solution, the analytically-integrated spring approach of [Ryan Juckett's "Damped Springs"](https://www.ryanjuckett.com/damped-springs/) (2012), with the state-transition coefficients evaluated per step across the under-, critically-, and over-damped branches. The critically-damped-smoothing framing is Thomas Lowe's "Critically Damped Ease-In/Ease-Out Smoothing" (*Game Programming Gems 4*, 2004), and the perceptual duration/bounce parameterization follows the conversion Apple documents for its spring animations (["Animate with springs"](https://developer.apple.com/videos/play/wwdc2023/10158/), WWDC 2023). Written from the published math.
- `loadTable` reads the comma-separated format from its published description ([RFC 4180](https://www.rfc-editor.org/rfc/rfc4180), Yakov Shafranovich, 2005): quoted cells holding the separator and line breaks, and the doubled-quote escape. Around that it follows the deviations files in the wild actually carry (a byte-order mark, mixed line endings, ragged rows). The sketch-facing shape (load once, then read cells by column name) takes after p5.js's `loadTable` / `p5.Table` and Processing's `Table`, read for approach and written independently. `loadJSON` decodes through Apple's [`JSONSerialization`](https://developer.apple.com/documentation/foundation/jsonserialization); no parser is vendored.
- `PushFeed` reads the server-sent-events wire format from its published description (the [WHATWG HTML Living Standard's server-sent events section](https://html.spec.whatwg.org/multipage/server-sent-events.md)): the field lines with their one eaten space, multi-line `data:`, the sticky `id:` and its NUL rule, `retry:` in milliseconds, comment keepalives, and the `Last-Event-ID` resume on reconnection. The parser is Ollin's own; the web-socket side is built on Apple's [`URLSessionWebSocketTask`](https://developer.apple.com/documentation/foundation/urlsessionwebsockettask), and nothing is vendored.
- `Weather` reads current conditions from [Open-Meteo](https://open-meteo.com) (Patrick Zippenfenig and contributors), an open weather API that serves the national weather services' forecasts under [CC BY 4.0](https://open-meteo.com/en/license), free for non-commercial use with no key. The data is read live by the sketch that asks and is never redistributed by Ollin. The condition words follow the [WMO weather interpretation codes](https://open-meteo.com/en/docs) the service reports. `Place.sun(at:)` is the low-precision solar position model behind the [NOAA solar calculator](https://gml.noaa.gov/grad/solcalc/calcdetails.md) (after Jean Meeus, *Astronomical Algorithms*), written from the published equations.

### Satellite libraries

- Audio analysis (`OllinAudio`) windows incoming samples (Hann) and runs a real FFT through Apple's [Accelerate/vDSP](https://developer.apple.com/documentation/accelerate/vdsp); no DSP library is vendored. Beat detection is spectral-flux onset detection, the standard music-information-retrieval technique (see Bello et al., ["A Tutorial on Onset Detection in Music Signals"](https://ieeexplore.ieee.org/document/1495485), IEEE TSAP 2005), written from the literature; the flux is computed over log-compressed magnitudes and peak-picked with the online conditions (trailing local max, an additive margin over a trailing mean, a minimum inter-onset gap) of Böck, Krebs & Schedl, ["Evaluating the Online Capabilities of Onset Detection Methods"](https://archives.ismir.net/ismir2012/paper/000049.pdf), ISMIR 2012. Pitch tracking (`pitch`, `nearestPitch`) is the YIN estimator of Alain de Cheveigné and Hideki Kawahara, ["YIN, a fundamental frequency estimator for speech and music"](https://doi.org/10.1121/1.1458024), JASA 2002, steps 1 to 5 as published (the difference function, its cumulative mean normalization, the absolute threshold, and parabolic interpolation), written from the paper. The pitch classes (`chroma`) are the pitch class profile of Takuya Fujishima ("Realtime Chord Recognition of Musical Sound", ICMC 1999), read off spectral peaks the way Emilia Gómez's harmonic pitch class profile does ("Tonal Description of Music Audio Signals", PhD thesis, UPF 2006), without its harmonic weighting; both written from the descriptions.
- Audio synthesis (`OllinAudio`'s `Synth`) reimplements published methods, each written from the technique, over Apple's [AVAudioEngine](https://developer.apple.com/documentation/avfaudio/avaudioengine) (an `AVAudioSourceNode` for the voices, the built-in delay and reverb units for the effects); no synthesis library is vendored. The anti-aliased oscillators use the polynomial band-limited step (PolyBLEP), the practical corner-correction form of the band-limited synthesis surveyed by Vili Välimäki and Antti Huovilainen, ["Oscillator and Filter Algorithms for Virtual Analog Synthesis"](https://doi.org/10.1162/comj.2006.30.2.19) (*Computer Music Journal* 30/2, 2006), descending from Tim Stilson and Julius O. Smith's ["Alias-Free Digital Synthesis of Classic Analog Waveforms"](https://ccrma.stanford.edu/~stilti/papers/blit.pdf) (ICMC 1996); the residual's polynomial form was cross-read against [Martin Finke's write-up](https://www.martin-finke.de/articles/audio-plugins-018-polyblep-oscillator/). The resonant filter is the linear state-variable filter solved by trapezoidal integration, from Andrew Simper's ["Solving the Continuous SVF Equations Using Trapezoidal Integration and Equivalent Currents"](https://www.cytomic.com/files/dsp/SvfLinearTrapOptimised2.pdf) (2013), the topology-preserving approach set out in Vadim Zavalishin's *The Art of VA Filter Design*, which is what keeps the cutoff where it was asked for and stable while it is swept. Written independently from the papers. The plucked-string voice is the Karplus-Strong algorithm (Kevin Karplus and Alex Strong, ["Digital Synthesis of Plucked-String and Drum Timbres"](https://doi.org/10.2307/3680062), *Computer Music Journal* 7/2, 1983) in the extended form of David A. Jaffe and Julius O. Smith (["Extensions of the Karplus-Strong Plucked-String Algorithm"](https://doi.org/10.2307/3680063), same issue): a first-order allpass supplying the fractional part of the loop length, since rounding it to whole samples is out by most of a semitone at the top of the range; the pick-position comb on the excitation, which notches the harmonics with a node under the finger; the one-pole dynamic-level lowpass for how hard the pluck is; and the one-zero loop filter whose coefficient sets how much sooner the high partials go, with its own delay counted into the loop so brightness cannot move the pitch. The loop's gain allows for what that filter takes from the fundamental, and near the top of the range, where the filter alone would take more than the decay allows, the coefficient is eased: the paper's decay stretching, which is what holds a high note to the decay it was given. The allpass coefficient range and the tuning bookkeeping were cross-read against Julius Smith's [*Physical Audio Signal Processing*](https://ccrma.stanford.edu/~jos/pasp/). Written from the papers. The struck-body voice is modal synthesis, the technique named for sound by Jean-Marie Adrien ("The missing link: modal synthesis", in *Representations of Musical Signals*, MIT Press, 1991) and developed for struck objects by Kees van den Doel and Dinesh K. Pai (["Modal Synthesis for Vibrating Objects"](http://www.persianney.com/kvdoelcsubc/publications/modalpaper.pdf), *Audio Anecdotes III*, 2004): a bank of two-pole resonators, one per mode, whose frequencies and decay rates come from the object and whose gains come from where it was struck. Ollin works the frequencies out from a drawn outline by solving the Dirichlet eigenvalue problem for the Laplacian on it, which is the standard physics of a membrane held at its edge and the question behind Mark Kac's ["Can One Hear the Shape of a Drum?"](https://doi.org/10.2307/2313748) (*American Mathematical Monthly* 73/4, 1966). The numerics are textbook and written here rather than taken from a library: a banded Cholesky factorization, subspace iteration with Rayleigh-Ritz refinement (Bathe's method, as set out in Golub and Van Loan's *Matrix Computations*), and cyclic Jacobi rotations for the small dense problem. The reference ratios the solver is tested against are the Bessel-function zeros for a circular membrane and √(m²+n²) for a rectangular one, both classical results. Reading sampled instruments (`SampledInstrument`) uses **SFZ**, the open, publicly documented text format for sample mapping ([sfzformat.com](https://sfzformat.com/)) originated by rgc:audio and since maintained as a community specification; the reader here is written from the published opcode documentation and reads a deliberate subset of it. The instrument Ollin bundles is **not sourced from anyone**: it is generated by `Scripts/make-sample-instrument.swift` as a bank of decaying resonators at the inharmonic ratios of a free-free bar, so it is Ollin's own work and carries no third-party license. Freely licensed libraries a sketch can load are listed in `Docs/Helpers/Synthesis.md` with their licenses; none is bundled. The patch tier (`Patch`) is frequency modulation synthesis, the technique John M. Chowning set out in ["The Synthesis of Complex Audio Spectra by Means of Frequency Modulation"](https://www.jstor.org/stable/3680281) (*Journal of the Audio Engineering Society* 21/7, 1973), where one oscillator moving another's phase produces a spectrum of sidebands and the modulation index sets how many, which is why an operator's level is its modulation index once it is pushing rather than being heard. The operator model (a small fixed set of oscillators, each with a frequency ratio and a level, wired into each other) is the one the technique has been expressed in ever since. Written from the published description. The tunings (`Tuning`) are historical rather than anyone's invention: five limit just intonation and the Pythagorean stack of fifths go back at least to the whole-number ratios of the Pythagoreans, and equal divisions of the octave are arithmetic. The one with a name attached is Bohlen-Pierce, the thirteen equal divisions of a tritave, arrived at independently by Heinz Bohlen (1972), Kees van Prooijen (1978) and John R. Pierce (1984), and it is included because it suits sounds with only odd harmonics, which the reed model is. The ratios here are the published ones; the arithmetic is arithmetic. The bowed string and the blown tube are digital waveguide models, the technique developed by Julius O. Smith III ([*Physical Audio Signal Processing*](https://ccrma.stanford.edu/~jos/pasp/), CCRMA), descending from the computational scheme of M. E. McIntyre, R. T. Schumacher and J. Woodhouse, ["On the oscillations of musical instruments"](https://doi.org/10.1121/1.389045) (*Journal of the Acoustical Society of America* 74/5, 1983), and set out for these two excitations in Smith's ["Efficient Simulation of the Reed-Bore and Bow-String Mechanisms"](https://ccrma.stanford.edu/files/papers/stanm39.pdf) (ICMC 1986). The bow is the published scattering junction: the difference between the bow's velocity and the string's is formed at the bowing point, the rosin's grip is a function of that difference, and each side of the bow leaves carrying the other side's incoming wave plus the grip times the difference; the friction curve holds while the two are stuck together and falls away once they tear loose, which is the stick-slip cycle the tone is made of. The reed is derived here from the two limits the reed actually has (shut, it is a rigid termination and the wave returns untouched; wide open, the mouthpiece is held at the player's breath pressure), which expands to the reflection-coefficient form the published model uses. Where a note starts to sound is worked out from that junction's small-signal gain at the bore's operating point against the loop's gain at the fundamental, a linear stability reading of the model that is ours; that the breath is best reckoned against the pressure that shuts the reed follows the clarinet literature's dimensionless mouth pressure, under which a lossless clarinet starts at a third of it (Jean Kergomard, "Elementary considerations on reed-instrument oscillations", in *Mechanics of Musical Instruments*, Springer, 1995). Written from the published descriptions; no synthesis library was read or translated. Placing a sound in the 3D scene uses Apple's [`AVAudioEnvironmentNode`](https://developer.apple.com/documentation/avfaudio/avaudioenvironmentnode) for the panning, distance attenuation, and head-related transfer function, with Ollin supplying the listener from the sketch's own `Camera3D`; no spatial-audio library is vendored. Carrying a sketch's sound into an exported video runs the same clock-free renderer through `AVAudioEngine`'s [offline manual-rendering mode](https://developer.apple.com/documentation/avfaudio/avaudioengine/manualrenderingmode) so the effects render offline too, and writes the result as an AAC track through `AVAssetWriter`. Reading data out as notes (`Sonification`) is parameter mapping sonification as set out by Florian Grond and Jonathan Berger, ["Parameter Mapping Sonification"](https://sonification.de/handbook/chapters/chapter15/) (chapter 15 of Thomas Hermann, Andy Hunt and John G. Neuhoff, eds., *The Sonification Handbook*, Logos Publishing House, 2011), which is where three of its decisions come from: data is spread over perceptually linear units (MIDI note numbers and decibels) rather than over hertz and linear gain, so the transfer function can be linear; quantiles rather than extremes make a reading robust against an outlier; and a reference tone sounded alongside the reading acts as a chart's grid line, without which a listener would need absolute pitch to know what a note means. The chapter's own worked example quantizes to a pentatonic scale, which is the technique behind snapping a reading through a `Scale`. That reference tones measurably improve accuracy was shown by Oussama Metatla, Nick Bryan-Kinns, Tony Stockman and Fiore Martin, ["Sonification of reference markers for auditory graphs: effects on non-visual point estimation tasks"](https://doi.org/10.7717/peerj-cs.51) (*PeerJ Computer Science* 2, 2016). The convention that more is higher, and that it inverts for a size, follows Bruce N. Walker's work on data-to-display mappings and polarity. Written from the published descriptions. The convolution reverb (`Reverb(impulse)`) is uniformly partitioned convolution in the frequency domain: the overlap-save construction of Thomas G. Stockham's ["High-speed convolution and correlation"](https://doi.org/10.1145/1464182.1464209) (AFIPS Spring Joint Computer Conference, 1966), partitioned as Barry D. Kulp set out in "Digital Equalization Using Fourier Transform Techniques" (AES Convention 85, 1988), with the first partition run directly in the time domain so the room arrives with no latency, the arrangement of William G. Gardner's "Efficient Convolution without Input-Output Delay" (*Journal of the Audio Engineering Society* 43/3, 1995). Written independently from the papers over Accelerate's vDSP; no convolution library is vendored. The three that hold a level (`Compressor`, `Limiter`, `Gate`) are the feed-forward design set out by Dimitrios Giannoulis, Michael Massberg, and Joshua D. Reiss, ["Digital Dynamic Range Compressor Design: A Tutorial and Analysis"](https://www.eecs.qmul.ac.uk/~josh/documents/2012/GiannoulisMassbergReiss-dynamicrangecompression-JAES2012.pdf) (*Journal of the Audio Engineering Society* 60/6, 2012): the level taken in decibels, the static curve with its quadratic knee, and the smoothing applied to the gain reduction rather than to the level, which is what makes the attack and release times mean the same thing at every input level. The crest-to-crest level follower under it and reading the level from both sides at once are ours. The limiter listens ahead of the sound, the standard lookahead design; taking the gain as the mean, across the lookahead, of the smallest gain any sample in the window needs (with the release laid over it), which keeps the ceiling exact while bringing the gain down along a line, is ours. The window's smallest need is kept with a monotonic queue, the streaming minimum of Daniel Lemire, ["Streaming Maximum-Minimum Filter Using No More than Three Comparisons per Element"](https://arxiv.org/abs/cs/0610046) (*Nordic Journal of Computing* 13/4, 2006). Written from the paper; no dynamics library is vendored. The pitch shift, the spectral freeze, and the time stretch (`PitchShift`, `Freeze`, `stretched(by:)`) are a phase vocoder, the analysis-synthesis method of James L. Flanagan and Roger M. Golden, ["Phase Vocoder"](https://doi.org/10.1002/j.1538-7305.1966.tb01706.x) (*Bell System Technical Journal* 45/9, 1966), in the short-time Fourier form Mark Dolson set out in ["The Phase Vocoder: A Tutorial"](https://doi.org/10.2307/3680093) (*Computer Music Journal* 10/4, 1986). Keeping each partial whole is the peak-region phase locking of Jean Laroche and Mark Dolson, ["Improved Phase Vocoder Time-Scale Modification of Audio"](https://doi.org/10.1109/89.759041) (*IEEE Transactions on Speech and Audio Processing* 7/3, 1999), and moving each region by a whole number of bins while the peak's own phase carries the fraction is from their ["New Phase-Vocoder Techniques for Pitch-Shifting, Harmonizing and Other Exotic Effects"](https://doi.org/10.1109/ASPAA.1999.810857) (*IEEE Workshop on Applications of Signal Processing to Audio and Acoustics*, 1999). The freeze is the same machinery run with the analysis stopped on one frame. Written from the papers over Accelerate's vDSP; no vocoder library was read or vendored. The grain cloud (`GrainCloud`) is granular synthesis, whose premise (that any sound can be built from short acoustic quanta, each too brief to carry a pitch) is Dennis Gabor's, ["Acoustical Quanta and the Theory of Hearing"](https://doi.org/10.1038/159591a0) (*Nature* 159, 1947), taken up as a compositional idea by Iannis Xenakis in *Formalized Music* (Indiana University Press, 1971) and made a practical instrument by Curtis Roads, whose *Microsound* (MIT Press, 2001) is where the working vocabulary comes from: grain duration and density, asynchronous against quasi-synchronous onsets, the envelope shapes a grain is cut with, and time-domain granulation of a recording, where the read position travels independently of the rate each grain is read at. Real-time granulation of sampled sound was first made to work by Barry Truax, ["Real-Time Granular Synthesis with a Digital Signal Processor"](https://doi.org/10.2307/3679554) (*Computer Music Journal* 12/2, 1988). Written from the published descriptions; no granular library was read or vendored.
- Algorithmic composition (`OllinAudio`'s `Rhythm`, `Scale`, `Chord`, `Arpeggio`, `MarkovChain`) is pure value types with no engine, each written from the published description. `Rhythm(k, in: n)` is Eric Bjorklund's algorithm for spacing pulses as evenly as possible, from his work on spallation neutron source timing ([Bjorklund, "The Theory of Rep-Rate Pattern Generation in the SNS Timing System", SNS-NOTE-CNTRL-99, 2003](http://web.archive.org/web/20161222131610/https://ics-web.sns.ornl.gov/timing/Rep-Rate%20Tech%20Note.pdf)), connected to musical timelines by Godfried Toussaint, ["The Euclidean Algorithm Generates Traditional Musical Rhythms"](https://cgm.cs.mcgill.ca/~godfried/publications/banff-extended.pdf) (BRIDGES 2005), which is also the source of the named rhythms (tresillo, cinquillo, the west African bell pattern, bossa nova, samba, aksak, ruchenitza, york samai, nawakhat, agsag samai, fandango), of the pattern-and-gap notation the type reads and prints, and of the rotations several of the named ones are. Written from the paper's description of the construction; no implementation was translated. Where the paper's two notations for E(7,16) disagree, the gap vector it prints is the one the construction gives, and that is what Ollin follows. Markov sequence generation is the standard finite-order chain with backoff to shorter contexts, a technique in algorithmic composition since Hiller and Isaacson's *Illiac Suite* (1957); the scale, mode, and chord tables are common musical knowledge rather than anyone's code.
- OSC (`OllinOSC`) implements the [OSC 1.0 wire format](https://opensoundcontrol.stanford.edu/spec-1_0.md) from the specification, over UDP on `Network.framework`. Its API takes after openFrameworks' `ofxOsc` and OPENRNDR's `orx-osc`, read for approach and written independently; no OSC library is vendored.
- OSCQuery (`OSCQueryServer` in `OllinOSC`) implements the [OSCQuery proposal](https://github.com/Vidvox/OSCQueryProposal) published by Vidvox: the JSON namespace with its `FULL_PATH`, `TYPE`, `ACCESS`, `VALUE`, `RANGE`, and `DESCRIPTION` attributes, the `HOST_INFO` query, the per-attribute queries and their status codes, and the `_oscjson._tcp` service type, written from the proposal over Ollin's own OSC codec and HTTP; no OSCQuery library is vendored or read.
- TUIO (`TUIOReceiver` in `OllinOSC`) reads tangible surfaces from the [TUIO 1.1 specification](https://www.tuio.org/?specification): the three 2D profiles (cursors, objects, blobs) and the frame semantics that go with them, where a set message updates what moved, the alive list is the only thing that removes, and the frame number commits the pair. The protocol was set out by Martin Kaltenbrunner, Till Bovermann, Ross Bencina, and Enrico Costanza, ["TUIO: A Protocol for Table-Top Tangible User Interfaces"](https://modin.yuri.at/publications/tuio_gw2005.pdf) (Gesture Workshop 2005). Written from the specification over Ollin's own OSC decoder; the reference TUIO client libraries are neither vendored nor read.
- MIDI (`OllinMIDI`) speaks the MIDI 1.0 message format, parsed and encoded from the specification, over Apple's Core MIDI. Its API takes after openFrameworks' `ofxMidi` and OPENRNDR's `orx-midi`, read for approach and written independently; no MIDI library is vendored. Reading and writing a piece as a file (`MIDIFile`, in `OllinAudio`) speaks the **Standard MIDI File** format, published by the MIDI Association as RP-001 alongside the MIDI 1.0 specification ([midi.org](https://midi.org/standard-midi-files)): the chunked layout, the variable-length delta times, running status, and the meta events for tempo, time signature, track name and marker are all read from that document. The reader and writer here are written from it, and no file library is vendored.
- Firmata (`FirmataBoard` in `OllinSerial`) speaks the [Firmata protocol](https://github.com/firmata/protocol) from its published specification (the message and sysex byte tables of version 2.6), over the satellite's own serial port; nothing is vendored, and the board-side firmware is the Arduino project's own StandardFirmata, which stays on the board.
- Tempo sync over the network (`OllinLink`) implements the session protocol of [Ableton Link](https://www.ableton.com/en/link/), the tempo-and-phase sync standard created by Ableton AG, from published protocol documentation over BSD UDP sockets; Ableton's own Link SDK is GPLv2 (or commercially licensed) and is deliberately neither vendored nor read, the same inspiration-only stance as every copyleft source. The wire facts (the multicast group and port, the discovery header, the payload entries) were taken from [westhom's AbletonLinkProtocol](https://github.com/westhom/AbletonLinkProtocol) protocol dissection, whose captured packets also pin Ollin's codec tests, and the protocol's behavior (the measurement exchange, the session arbitration rules, the timeline priority) was studied from [ablink](https://crates.io/crates/ablink) (MIT), an independent pure-Rust implementation, read for approach and written independently in Swift. The public read surface mirrors Ollin's own `TempoClock`. Ollin is not affiliated with or endorsed by Ableton; "Ableton" and "Link" are trademarks of Ableton AG.
- Live recording (`SessionRecorder`) writes through Apple's [`AVAssetWriter`](https://developer.apple.com/documentation/avfoundation/avassetwriter) in real-time mode; no capture library is vendored. Its silence-for-a-gap audio bookkeeping (detect a hole from the expected next timestamp, fill it with silence so the track cannot slide against the picture) follows the approach Nonstrict documented in ["Handling audio capture gaps on macOS"](https://nonstrict.eu/blog/2024/handling-audio-capture-gaps-on-macos/), written independently for Ollin's host-clock lanes.
- DMX (`OllinDMX`) implements the two DMX-over-Ethernet wire formats from their published specifications, over UDP on `Network.framework`; no lighting library is vendored. The ArtDmx packet, port-addressing, and transmit guidance come from the [Art-Net 4 protocol specification](https://art-net.org.uk/downloads/art-net.pdf) by Artistic Licence, whose required credit Ollin carries in its documentation: **Art-Net™ Designed by and Copyright Artistic Licence**. The sACN side (root/framing/DMP layers, multicast addressing, source priority and sequence rules, the three-packet suppression tail, keep-alives, and stream termination) is written from [ANSI E1.31-2018](https://tsp.esta.org/tsp/documents/published_docs.php), *Lightweight streaming protocol for transport of DMX512 using ACN*, published by ESTA's Technical Standards Program. The sender/receiver API follows the shape of Ollin's own `OllinOSC`.
- Bluetooth (`OllinBluetooth`) reads Bluetooth Low Energy through Apple's own CoreBluetooth; nothing is vendored. The values the catalog names, and the byte layouts they are read with (the heart rate measurement whose flags byte carries the width of the rate that follows, the battery level, the environmental readings and their scales, the device-information strings), come from the Bluetooth SIG's published [Assigned Numbers](https://www.bluetooth.com/specifications/assigned-numbers/) and [GATT Specification Supplement](https://www.bluetooth.com/specifications/gss/), read as specifications and implemented independently. The Nordic UART service identifiers are the de facto ones published by Nordic Semiconductor in its [UART service documentation](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/bluetooth/services/nus.md); only the identifiers are used, and the serial framing over them is the sketch's own. The read surface follows the shape of Ollin's own `OllinOSC` and `OllinSerial`.
- MQTT (`OllinMQTT`) implements the protocol from its published specification, [MQTT Version 3.1.1](https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.md), an OASIS standard; no MQTT library is vendored and no implementation was translated. The control packet layouts, the remaining-length encoding, the connect flags and return codes, the quality-of-service rules, the retained-message and last-will behavior, and the topic-matching rules (including the two the tests pin, a trailing `#` matching its own parent level and no wildcard reaching a `$`-prefixed topic) are all taken from that document. The payload readings follow what devices publish in practice rather than anything the specification says, since it says nothing about payloads. The read surface follows the shape of Ollin's own `OllinOSC` and `OllinSerial`.
- Laser projection (`OllinLaser`) implements both of its wire formats from their published specifications; no laser library is vendored, and no implementation was translated. Files are written in the [ILDA Image Data Transfer Format](https://www.ilda.com/resources/StandardsDocs/ILDA_IDTF14_rev011.pdf) (revision 011) published by the International Laser Display Association, whose 32-byte section header, format-5 true-color record, status bits, and terminating null header are taken from that document. Streaming to a network DAC follows the [Ether Dream protocol](https://ether-dream.com/protocol.md) published by Jacob Potter, which documents the command set, the status and response blocks, the announcement datagram, and the point layout; where its command table names a byte after a letter that does not match it, the byte is what the hardware reads, cross-checked against the packed struct definitions in the [j4cDAC firmware's `protocol.h`](https://github.com/j4cbo/j4cDAC) and against [nannou's independent Rust implementation](https://github.com/nannou-org/ether-dream) (MIT/Apache-2.0), both read for the wire layout only. The point optimizer is the standard laser-show pipeline (strip redundant points, order the paths, interpolate long segments, dwell at corners, hold at each end of a blanked jump) as it is described by practitioners and by tool documentation such as [Derivative's Laser CHOP](https://docs.derivative.ca/Laser_CHOP) and the point-optimization threads on [Photon Lexicon](http://web.archive.org/web/20210421010808/https://photonlexicon.com/forums/showthread.php/23392-Point-optimisation-how-to); written here from the description of what each stage is for. The path ordering reuses Ollin's own greedy tour from its G-code exporter.
- Syphon (`OllinSyphon`) shares live GPU frames with other Mac apps over the vendored [Syphon Framework](https://github.com/Syphon/Syphon-Framework) (Metal portion, see [Bundled third-party code](#bundled-third-party-code)), wrapped behind Ollin's own `SyphonServer`/`SyphonClient`. The API takes after openFrameworks' `ofxSyphon`.
- Physics (`OllinPhysics`) has two sides. The soft side (particles, springs, soft bodies) is a from-scratch Verlet solver with position-based constraint relaxation, following the approach in Thomas Jakobsen's ["Advanced Character Physics"](https://www.cs.cmu.edu/afs/cs/academic/class/15462-s13/www/lec_slides/Jakobsen.pdf) (GDC 2001). The soft body made from an outline (`addSoftBody(from:)`) holds its edges, its bend links, each ring's area, and its pull back toward its own shape as compliant constraints after Miles Macklin, Matthias Müller and Nuttapong Chentanez's ["XPBD: Position-Based Simulation of Compliant Constrained Dynamics"](https://doi.org/10.1145/2994258.2994272) (*Motion in Games* 2016), read from the paper for the multiplier update and its step-scaled compliance; the pull toward its shape is the meshless **shape matching** of Müller, Heidelberger, Teschner & Gross, ["Meshless Deformations Based on Shape Matching"](https://matthias-research.github.io/pages/publications/MeshlessDeformations_SIG05.pdf) (SIGGRAPH 2005), its best turn in the plane in closed form. OPENRNDR's [orx-force-2d](https://github.com/openrndr/orx) (BSD-2-Clause), a 2D XPBD force simulation with contour bodies, an area constraint, and contour-against-contour contacts, was read for approach beforehand; the bend links' measured form, one area constraint a ring, the walls held by position, and the compliances scaled against the body's own weight are Ollin's own, written independently. The rigid side (bodies with rotation, polygon colliders, joints, and stable stacking) is backed by the vendored [Box2D](https://github.com/erincatto/box2d) engine (see [Bundled third-party code](#bundled-third-party-code)), wrapped behind the same `World`. The API takes after openFrameworks' `ofxBox2d` and p5 / matter.js. The 3D rigid side (`World3D`/`Body3D`: stacking, tumbling, swinging in the 3D scene) is backed by the vendored [Jolt Physics](https://github.com/jrouwe/JoltPhysics) engine the same way, wrapped behind Ollin's own API mirroring the 2D one.
- Video playback (`OllinVideo`) plays files through Apple's [AVFoundation](https://developer.apple.com/documentation/avfoundation) (`AVPlayer` with a video output), with each decoded frame surfaced as a Metal texture through `CVMetalTextureCache`; no codec or media library is vendored. The sketch-facing shape (load, `play`, draw the current frame) takes after p5.js's video element and openFrameworks' `ofVideoPlayer`, written independently.
- Record3D RGBD (`OllinRecord3D`) brings an iPhone's color-plus-depth into a sketch as a 3D point cloud, both from recorded `.r3d` clips and from a tethered phone's live USB stream, captured by [Record3D](https://record3d.app) (Marek Šimoník), an ARKit color-plus-depth recorder. Both formats are read clean-room from their public structure with Apple-native frameworks only (`Compression` for LZFSE depth, ImageIO for JPEG color, a minimal ZIP read, and the standard `usbmuxd` device tunnel for the live stream); the `record3d` library that documents them is LGPL-2.1, so it's a product reference, never copied or vendored. The kind of world-facing depth feed an Intel RealSense once gave openFrameworks, by way of an iPhone.
- The room (`OllinRoom`) puts several machines on one piece over Apple's [Multipeer Connectivity](https://developer.apple.com/documentation/multipeerconnectivity), with its own message format written for it; no networking library is vendored. The clock the machines agree on is the classic client-side estimate published by Flaviu Cristian ("Probabilistic clock synchronization", *Distributed Computing* 3, 1989): a follower reads the owner's reported time plus half the round trip, with half the round trip as the error bound. Keeping the quickest of the recent answers rather than averaging them is the same minimum-delay filtering NTP uses (David L. Mills, [RFC 5905](https://www.rfc-editor.org/rfc/rfc5905)), written from the description.
- Computer vision (`OllinVision`) runs on Apple's own on-device stack ([Vision](https://developer.apple.com/documentation/vision) and Core ML for the perception, [AVFoundation](https://developer.apple.com/documentation/avfoundation) for camera capture), hardware-accelerated on the Neural Engine where present. No computer-vision library is vendored; the framework calls the OS. Its sketch-facing ergonomics (results as typed values you read in `draw()`) take after openFrameworks' [`ofxCv`](https://github.com/kylemcdonald/ofxCv) by Kyle McDonald, read for approach and written independently. `ConceptTracker` scores typed phrases against the frame through a contrastive image-text model pair. The pair is fetched by `Scripts/fetch-models.sh`; provenance is in [`THIRD-PARTY-NOTICES.md`](third-party-notices.md). Its tokenizer follows the published byte-pair-encoding procedure of [OpenAI's CLIP tokenizer](https://github.com/openai/CLIP), verified token-for-token against that reference. The procedure is from Alec Radford et al., ["Learning Transferable Visual Models From Natural Language Supervision"](https://arxiv.org/abs/2103.00020) (ICML 2021). It builds on Rico Sennrich, Barry Haddow, and Alexandra Birch, ["Neural Machine Translation of Rare Words with Subword Units"](https://aclanthology.org/P16-1162/) (ACL 2016). Scoring uses the 2021 paper's zero-shot recipe: softmax over temperature-scaled cosine similarities between image embedding and phrase embedding. `PointSegmenter` lifts whatever a point prompts through a fetched promptable-segmentation model in three parts (image encoder, prompt encoder, mask decoder), following the model's published prompting recipe (Nikhila Ravi et al., ["SAM 2: Segment Anything in Images and Videos"](https://arxiv.org/abs/2408.00714), 2024): points in the square input space with foreground/background labels, three candidate masks with the best predicted score winning, foreground where the mask logit is positive. The weights are fetched by `Scripts/fetch-models.sh`; provenance is in [`THIRD-PARTY-NOTICES.md`](third-party-notices.md). The wiring is Ollin's own, written against the model's published input/output surface. `DepthTracker` reads temporally consistent depth through a fetched video depth model (Sili Chen, Hengkai Guo, Shengnan Zhu, Feihu Zhang, Zilong Huang, Jiashi Feng, and Bingyi Kang, ["Video Depth Anything: Consistent Depth Estimation for Super-Long Videos"](https://arxiv.org/abs/2501.12375), CVPR 2025), following the repository's published streaming procedure: the temporal-attention inputs of the last frames kept as a cache, the session's first frame as a permanent anchor, a new frame attending to that window. Nobody publishes a Core ML build, so `Scripts/convert-video-depth.py`, Ollin's own tracing of that step with the cache as model state, builds one on the developer's machine and checks it against the upstream code; provenance is in [`THIRD-PARTY-NOTICES.md`](third-party-notices.md).
- Code completion (`OllinRuntime`'s `CodeCompleter`, for the OllinLiveCoding host) asks the Swift toolchain's own SourceKit service, the completion engine behind Xcode and [sourcekit-lsp](https://github.com/swiftlang/sourcekit-lsp) (Apache-2.0 with the runtime library exception). Nothing is vendored or linked; Ollin's own C header declares the handful of entry points it binds at runtime. The way in, opening the framework beside the compiler and binding its names dynamically, and the open, update, close session over a filter, are the approach sourcekit-lsp and [SourceKitten](https://github.com/jpsim/SourceKitten) (MIT, JP Simard) take, read for approach and written independently.
- The website (`ollin site`, `OllinReference`) matches a reader's search with [MiniSearch](https://lucaong.github.io/minisearch/) (MIT, Luca Ongaro), which the page loads from a content network at one pinned release checked against its published hash; nothing is vendored, and the index the site builds, one entry per section of its own pages, is Ollin's own.

## The history the Guide tells

Each chapter of the [Guide](guide/index.md) ends with a short history of its ideas, and some chapters credit people as they go. Where a helper implements a published technique, its entry under [Techniques](#techniques) above carries the source, and the chapter follows it. The chapters also name the people, works, and dates behind the ideas themselves, and many of those are older than any code. They are recorded here, chapter by chapter, with a place to read further. A chapter missing from the list names nothing the entries above do not already carry.

- **Chapter 1, [Hello, Ollin](guide/01-helloollin.md#where-this-comes-from).** Casey Reas and Ben Fry started Processing in 2001 at MIT (["A Modern Prometheus"](https://processingfoundation.org/blog/a-modern-prometheus/), Processing Foundation). Processing calls a program a sketch, and its editor keeps sketches in a sketchbook. Georg Nees showed plotter drawings in Stuttgart in February 1965. Frieder Nake showed his there that November (["Think the Image, Don't Make it!"](https://dam.org/museum/essays_ui/essays/frieder-nake-wolf-lieser-60-years-of-algorithmic-art/), DAM). Vera Molnár drew by rules she set herself from 1959, her *machine imaginaire*. She first used a computer in 1968 (["Vera Molnar, aux sources du code"](https://www.centrepompidou.fr/fr/magazine/article/vera-molnar-aux-sources-du-code), Centre Pompidou). Sol LeWitt made his first wall drawing in 1968 and soon handed the drawing to others (["Follow the Lines"](https://www.sfmoma.org/read/follow-the-lines/), SFMOMA). *Ollin* is the Nahuatl word for movement. It is the seventeenth of the twenty day signs of the *tonalpohualli* ([*olin*](https://aztecglyphs.wired-humanities.org/content/olin-mdz24v), Wired Humanities Projects).
- **Chapter 2, [Color that works](guide/02-color.md#where-this-comes-from).** Isaac Newton bent the spectrum into a circle in [*Opticks*](https://archive.org/details/1704-newton-opticks-1ed) (1704), so its red and violet ends met. Johannes Itten's twelve-hue circle reached design teaching through [*The Art of Color*](https://openlibrary.org/works/OL10458983W) (1961), published in German that year as *Kunst der Farbe*. Matching a light with a mix of three goes back to nineteenth-century experiments such as James Clerk Maxwell's. He reported his in ["On the Theory of Compound Colours, and the Relations of the Colours of the Spectrum"](https://doi.org/10.1098/rstl.1860.0005) (1860). HSB is the hue, saturation, and value model of Alvy Ray Smith's ["Color Gamut Transform Pairs"](https://www.alvyray.com/Papers/CG/color78.pdf) (SIGGRAPH 1978). He made it for frame-buffer painting programs. OKLab and OKLCH are specified in the W3C's [*CSS Color Module Level 4*](https://www.w3.org/TR/css-color-4/). Stéfan van der Walt and Nathaniel Smith designed [viridis and its relatives](https://bids.github.io/colormap/) for matplotlib and presented them at SciPy 2015.
- **Chapter 3, [Motion and time](guide/03-motionandtime.md#where-this-comes-from).** Robert Penner published his easing equations in the tweening chapter of [*Robert Penner's Programming Macromedia Flash MX*](http://robertpenner.com/easing/) (Osborne/McGraw-Hill, 2002). Slow in and slow out is one of the principles Disney animators developed from the 1930s on. Frank Thomas and Ollie Johnston wrote them down in [*Disney Animation: The Illusion of Life*](https://archive.org/details/disneyanimationi0000fran) (Abbeville Press, 1981). The chapter's habit of drawing each shaping function follows [*The Book of Shaders*](https://thebookofshaders.com/) by Patricio Gonzalez Vivo and Jen Lowe. The argument order of `map` and `lerp` is Processing's ([`map()`](https://processing.org/reference/map_.md), [`lerp()`](https://processing.org/reference/lerp_.md)).
- **Chapter 4, [Randomness](guide/04-randomness.md#where-this-comes-from).** Vera Molnár began her *machine imaginaire* in 1959, drawing by hand to rules she wrote first. Her "1% of disorder" is the dose of chance she put into ordered work (["Vera Molnar, aux sources du code"](https://www.centrepompidou.fr/fr/magazine/article/vera-molnar-aux-sources-du-code), Centre Pompidou). In Georg Nees's [*Schotter*](https://collections.vam.ac.uk/item/O221321/schotter-print-nees-georg/), orderly squares fall into disorder down the sheet. The V&A dates its print 1968–1970. John von Neumann described his middle-square generator in ["Various Techniques Used in Connection with Random Digits"](https://mcnpx.lanl.gov/pdf_files/InBook_Computing_1961_Neumann_JohnVonNeumannCollectedWorks_VariousTechniquesUsedinConnectionwithRandomDigits.pdf) (1951). He gave it at a 1949 symposium. W. J. C. Orr introduced the self-avoiding walk as a polymer model in ["Statistical treatment of polymer solutions at infinite dilution"](https://doi.org/10.1039/TF9474300012) (1947). Paul Flory took it up in ["The Configuration of Real Polymer Chains"](https://doi.org/10.1063/1.1747243) (1949).
- **Chapter 5, [Noise](guide/05-noise.md#where-this-comes-from).** Ken Perlin made his noise function in 1983. Working on the film *TRON* had left him frustrated that everything looked machine-like (["In the Beginning: The Pixel Stream Editor"](https://userpages.cs.umbc.edu/olano/s2001c24/ch02.md), 2001). The Academy of Motion Picture Arts and Sciences gave him a [Technical Achievement Award](https://mrl.cs.nyu.edu/~perlin/doc/oscar.md) for Perlin noise in 1997. Fractional Brownian motion is Benoit Mandelbrot and John Van Ness's (["Fractional Brownian Motions, Fractional Noises and Applications"](https://doi.org/10.1137/1010093), *SIAM Review*, 1968). Richard Voss brought it to fractal landscapes in ["Fractals in nature: from characterization to simulation"](https://doi.org/10.1007/978-1-4612-3784-6_1) (*The Science of Fractal Images*, 1988). The chapter's teaching of `noise` follows Daniel Shiffman's [*The Nature of Code*](https://natureofcode.com/random/), whose first chapter teaches Perlin noise.
- **Chapter 6, [Grids and repetition](guide/06-gridsandrepetition.md#where-this-comes-from).** The chapter's transform stack follows Processing's [`pushMatrix()`](https://processing.org/reference/pushMatrix_.md) and `popMatrix()`. David Brewster invented the kaleidoscope in 1816 and patented it in 1817. He described it in [*A Treatise on the Kaleidoscope*](https://archive.org/details/b29295440) (1819). Leonhard Euler noted in 1772 that 41 − x + x² is prime for every whole x from 0 to 40. He wrote it in a letter to Johann Bernoulli, published in 1774 ([E461](https://scholarlycommons.pacific.edu/euler-works/461/), Euler Archive).
- **Chapter 7, [Tiles that cover the plane](guide/07-tiles.md#where-this-comes-from).** Sébastien Truchet was a Carmelite priest. At the château of La Motte-Saint-Lyé near Orléans, he found two-colored tiles meant to floor a chapel and other rooms. They led to his "Mémoire sur les combinaisons" (1704), which the [European Mathematical Society's magazine](https://euromathsoc.org/magazine/articles/248) quotes. Christopher Carlson extended Smith's arc tiles to many scales in ["Multi-Scale Truchet Patterns"](https://archive.bridgesmathart.org/2018/bridges2018-39.md) (Bridges 2018). The `10 PRINT` one-liner is a Commodore 64 BASIC program ([*10 PRINT*](https://10print.org)). David Smith, a retired print technician from Yorkshire, found the hat with paper cut-outs in the fall of 2022. With Joseph Samuel Myers, Craig S. Kaplan, and Chaim Goodman-Strauss, he published it as ["An aperiodic monotile"](https://arxiv.org/abs/2303.10798) (2023).
- **Chapter 8, [Words](guide/08-words.md#where-this-comes-from).** Adobe released PostScript in 1984, a page language that describes letters as Bézier outlines (["PostScript: A Digital Printing Press"](https://computerhistory.org/blog/postscript-a-digital-printing-press/), Computer History Museum). Donald Knuth and Michael Plass gave justification a whole-paragraph line-breaking algorithm in ["Breaking Paragraphs into Lines"](https://doi.org/10.1002/spe.4380111102) (*Software: Practice and Experience*, 1981). Unicode Standard Annex #9, the [*Unicode Bidirectional Algorithm*](https://www.unicode.org/reports/tr9/), orders a line that mixes right-to-left and left-to-right text.
- **Chapter 9, [Pictures and data](guide/09-pictures.md#where-this-comes-from).** The New York *Daily Graphic* printed the first halftone of a news photograph in a U.S. newspaper on 4 March 1880. It was *A Scene in Shantytown*, from a plate by Stephen Horgan ([Stephen H. Horgan](https://en.wikipedia.org/wiki/Stephen_H._Horgan), Wikipedia). In São Paulo in 1969, Waldemar Cordeiro and the physicist Giorgio Moscati turned a photograph of a young couple into printed symbols. They used an IBM 360/44 at the University of São Paulo ([*Derivadas de uma imagem*](https://collections.vam.ac.uk/item/O1426284/derivadas-de-uma-imagem-transformacao-print-waldemar-cordeiro/), V&A).
- **Chapter 10, [Vectors, gently](guide/10-vectors.md#where-this-comes-from).** Josiah Willard Gibbs printed [*Elements of Vector Analysis*](https://library.si.edu/digital-library/book/elementsvectora00gibb) for his Yale classes between 1881 and 1884. Oliver Heaviside [developed vector methods](https://mathshistory.st-andrews.ac.uk/Biographies/Heaviside/) independently in his work on electromagnetism. The trio of position, velocity, and acceleration is Isaac Newton's mechanics, from [*Philosophiæ Naturalis Principia Mathematica*](https://archive.org/details/philosophiaenatu00newt_0) (1687).
- **Chapter 11, [Forces and physics](guide/11-forcesandphysics.md#where-this-comes-from).** Verlet integration is named for Loup Verlet. He used it for the molecules of ["Computer 'Experiments' on Classical Fluids. I. Thermodynamical Properties of Lennard-Jones Molecules"](https://doi.org/10.1103/PhysRev.159.98) (*Physical Review* 159, 1967). Box2D began as Erin Catto's [physics tutorial](https://github.com/sponsors/erincatto) at the Game Developers Conference in 2006. He released it as open source in 2007. The soft body from an outline is XPBD, from Miles Macklin, Matthias Müller and Nuttapong Chentanez's ["XPBD: Position-Based Simulation of Compliant Constrained Dynamics"](https://doi.org/10.1145/2994258.2994272) (*Motion in Games* 2016), with the shape matching of Müller, Bruno Heidelberger, Matthias Teschner and Markus Gross's ["Meshless Deformations Based on Shape Matching"](https://matthias-research.github.io/pages/publications/MeshlessDeformations_SIG05.pdf) (SIGGRAPH 2005).
- **Chapter 12, [Flocks and swarms](guide/12-flocksandswarms.md#where-this-comes-from).** Craig Reynolds made his [boids model](https://www.red3d.com/cwr/boids/) in 1986. He published it as ["Flocks, Herds, and Schools: A Distributed Behavioral Model"](https://doi.org/10.1145/37401.37406) at SIGGRAPH 1987. Reynolds writes that his term *vehicle* is "inspired to some degree by" Valentino Braitenberg's [*Vehicles: Experiments in Synthetic Psychology*](https://openlibrary.org/isbn/0262022087) (MIT Press, 1984). In February 1665 Christiaan Huygens reported that two of his pendulum clocks had fallen into step, swinging in opposite directions. Matthew Bennett and colleagues reconstructed the effect in ["Huygens's clocks"](https://doi.org/10.1098/rspa.2001.0888) (*Proceedings of the Royal Society A* 458, 2002). Steven Strogatz's [*Sync*](https://www.hachettebookgroup.com/titles/steven-h-strogatz/sync/9780786868445/) (2003) tells the story of those clocks and of the fireflies of Malaysia.
- **Chapter 13, [Growing things](guide/13-growingthings.md#where-this-comes-from).** Aristid Lindenmayer introduced L-systems in ["Mathematical models for cellular interactions in development I. Filaments with one-sided inputs"](https://doi.org/10.1016/0022-5193(68)90079-9) (*Journal of Theoretical Biology* 18, 1968). [*The Algorithmic Beauty of Plants*](http://algorithmicbotany.org/papers/#abop) appeared from Springer-Verlag in 1990. Lichtenberg figures are named for Georg Christoph Lichtenberg, who [discovered them in 1777](https://www.uni-goettingen.de/en/74905.md) at Göttingen. Harold Fisk drew his [maps of the lower Mississippi](https://publicdomainreview.org/collection/maps-of-the-lower-mississippi-harold-fisk/) for the Mississippi River Commission. They accompany his [*Geological Investigation of the Alluvial Valley of the Lower Mississippi River*](https://sites.law.lsu.edu/coast/?p=550) (1944). Robert Hodgin made [*Meander*](https://roberthodgin.com/project/meander) in 2020 as a homage to those maps.
- **Chapter 14, [Fields and flow](guide/14-fieldsandflow.md#where-this-comes-from).** Tyler Hobbs explains his flow-field craft in the essay ["Flow Fields"](https://www.tylerxhobbs.com/words/flow-fields) (2020). His [*Fidenza*](https://www.tylerxhobbs.com/words/fidenza), released on Art Blocks in June 2021, is built on a flow-field algorithm.
- **Chapter 15, [Shapes as material](guide/15-shapesasmaterial.md#where-this-comes-from).** The triangulation is Boris Delaunay's, from ["Sur la sphère vide"](https://www.mathnet.ru/eng/im4937) (1934), written in memory of Georgy Voronoy. Stuart Lloyd first set out his algorithm in an unpublished [Bell Laboratories memorandum](https://gubner.ece.wisc.edu/ece729/LMalg.md) dated July 31, 1957. Apollonius of Perga, who lived about 262 to 190 BC, showed how to construct the circle touching three given circles in his [*Tangencies*](https://mathshistory.st-andrews.ac.uk/Biographies/Apollonius/). The Miura fold was used in the two-dimensional solar array experiment of Japan's [Space Flyer Unit](https://www.isas.jaxa.jp/en/missions/spacecraft/past/sfu.md), launched in March 1995.
- **Chapter 16, [Curves and figures](guide/16-curvesandfigures.md#where-this-comes-from).** Jules Antoine Lissajous described his figures in ["Mémoire sur l'étude optique des mouvements vibratoires"](https://mathshistory.st-andrews.ac.uk/Biographies/Lissajous/) (1857). Nathaniel Bowditch had drawn the same curves with a compound pendulum in 1815. Guido Grandi described his roses to Leibniz in 1713 and named them rhodonea in [*Flores geometrici*](https://mathshistory.st-andrews.ac.uk/Biographies/Grandi/) (1728). A closed outline as a sum of turning circles rests on Joseph Fourier's series, from [*Théorie analytique de la chaleur*](https://archive.org/details/thorieanalytiq00four) (1822). Circles carried on circles are much older. Greek astronomers used epicycles for the planets, and [Ptolemy](https://mathshistory.st-andrews.ac.uk/Biographies/Ptolemy/) built them into the *Almagest* in the second century AD.
- **Chapter 18, [Your first shader](guide/18-yourfirstshader.md#where-this-comes-from).** [*The Book of Shaders*](https://thebookofshaders.com/) (2015) is by Patricio Gonzalez Vivo and Jen Lowe. The mesh gradient's inverse-distance weighting is Donald Shepard's, from ["A two-dimensional interpolation function for irregularly-spaced data"](https://doi.org/10.1145/800186.810616) (ACM National Conference, 1968).
- **Chapter 19, [Layers and effects](guide/19-layersandeffects.md#where-this-comes-from).** Video feedback, a camera pointed at the monitor that shows its own picture, is the analog ancestor of the `Feedback` layer. Steina and Woody Vasulka began their video work this way in New York in 1969, with a tape called *Feedback* ([Keith Raether, Vasulka archive](https://www.vasulka.org/archive/5-9/Timeouts(5151).pdf)).
- **Chapter 21, [Pictures you solve](guide/21-picturesyousolve.md#where-this-comes-from).** Writing a function as a sum of waves is Joseph Fourier's idea, from his work on the flow of heat. He read it to the Paris Institute in 1807 and published it in 1822 as [*Théorie analytique de la chaleur*](https://archive.org/details/thorieanalytiq00four).
- **Chapter 22, [Iterated forms](guide/22-iteratedforms.md#where-this-comes-from).** [Paul Bourke's page](http://paulbourke.net/fractals/clifford/) attributes the Clifford attractor to Clifford Pickover. Scott Draves wrote the first program with all three of the fractal flame's defining features in 1991. He released it on the web in 1992 ([Draves and Reckase, "The Fractal Flame Algorithm"](https://flam3.com/flame_draves.pdf)). His distributed screensaver *Electric Sheep* evolves flames by its viewers' votes ([Draves, "The Electric Sheep Screen-Saver: A Case Study in Aesthetic Evolution"](https://doi.org/10.1007/978-3-540-32003-6_46), 2005). The paired-circle groups are named for Friedrich Schottky, whose 1877 paper mapped regions bounded by circles. It is ["Ueber die conforme Abbildung mehrfach zusammenhängender ebener Flächen"](https://doi.org/10.1515/crll.1877.83.300), in *Journal für die reine und angewandte Mathematik* 83.
- **Chapter 23, [Simulations on a grid](guide/23-gridsimulations.md#where-this-comes-from).** Martin Gardner introduced John Horton Conway's Game of Life in his *Scientific American* column of October 1970 (["Mathematical Games"](https://doi.org/10.1038/scientificamerican1070-120), vol. 223, no. 4). Jean le Rond d'Alembert first put the wave equation in print in 1747, for a vibrating string. His paper is ["Recherches sur la courbe que forme une corde tendue mise en vibration"](https://webusers.imj-prg.fr/~david.aubin/cours/Textes/Dalembert-HAB-1747-cordes-vibrantes.pdf), in the Berlin Academy's *Histoire* for 1747.
- **Chapter 24, [Automata](guide/24-automata.md#where-this-comes-from).** Stephen Wolfram numbered the 256 elementary rules in 1983, in ["Statistical mechanics of cellular automata"](https://doi.org/10.1103/RevModPhys.55.601) (*Reviews of Modern Physics* 55). He proposed rule 30 as a random-number generator in ["Random sequence generation by cellular automata"](https://doi.org/10.1016/0196-8858%2886%2990028-X) (*Advances in Applied Mathematics* 7, 1986). The Wolfram Language uses it for large random integers ([MathWorld, "Rule 30"](https://mathworld.wolfram.com/Rule30.md)). Matthew Cook proved that rule 110 can compute anything a computer can (["Universality in Elementary Cellular Automata"](https://doi.org/10.25088/ComplexSystems.15.1.1), *Complex Systems* 15, 2004). The hodgepodge machine imitates the Belousov-Zhabotinsky reaction. Boris Belousov published that oscillating reaction in 1959, and Anatol Zhabotinsky reworked it in 1964 ([Zhabotinsky, *Scholarpedia*, 2007](https://doi.org/10.4249/scholarpedia.1435)).
- **Chapter 25, [Simulations made of particles](guide/25-particlesimulations.md#where-this-comes-from).** The Lorenz system is Edward N. Lorenz's, from ["Deterministic Nonperiodic Flow"](https://doi.org/10.1175/1520-0469%281963%29020%3C0130%3ADNF%3E2.0.CO%3B2) (*Journal of the Atmospheric Sciences* 20, 1963). It cuts an earlier convection model by [Barry Saltzman (1962)](https://doi.org/10.1175/1520-0469%281962%29019%3C0329%3AFAFCAA%3E2.0.CO%3B2) down to three variables. Particle systems as a graphics technique are William T. Reeves's, from [his 1983 paper](https://doi.org/10.1145/357318.357320) in *ACM Transactions on Graphics*. Peter Kipfer, Mark Segal, and Rüdiger Westermann moved the whole simulation onto the graphics card in ["UberFlow: A GPU-Based Particle Engine"](https://history.siggraph.org/?p=92956) (Graphics Hardware 2004).
- **Chapter 26, [3D, gently](guide/26-3dgently.md#where-this-comes-from).** The orbiting camera follows a convention of 3D tools, among them the [OrbitControls of three.js](https://threejs.org/docs/pages/OrbitControls.md). The specular term under Blinn-Phong is Bui Tuong Phong's (["Illumination for Computer Generated Pictures"](https://doi.org/10.1145/360825.360839), *Communications of the ACM* 18(6), 1975). Three-point lighting is the prevailing convention of narrative film. Paul Ramaeker dates most of film lighting's basic techniques to the craft of the 1920s ([*The Conversation*](https://theconversation.com/explainer-film-lighting-30658)). The matcap began as the lit sphere of Peter-Pike Sloan, William Martin, Amy Gooch, and Bruce Gooch ([Graphics Interface 2001](https://graphicsinterface.org/proceedings/gi2001/gi2001-17)). Its name comes from the MatCap tool of the sculpting program ZBrush ([PRONOM fmt/1673](https://www.nationalarchives.gov.uk/PRONOM/fmt/1673)).
- **Chapter 27, [Meshes and maps](guide/27-meshes.md#where-this-comes-from).** Normal mapping descends from Jim Blinn's bump mapping, ["Simulation of Wrinkled Surfaces"](https://doi.org/10.1145/965139.507101) (SIGGRAPH 1978). Parallax occlusion mapping is Zoe Brawley and Natalya Tatarchuk's, from their chapter in *ShaderX3* (2004). Tatarchuk set it out again in ["Dynamic Parallax Occlusion Mapping with Approximate Soft Shadows"](https://doi.org/10.1145/1111411.1111423) (I3D 2006). Moving the surface itself by a picture, displacement mapping, is Robert L. Cook's, from ["Shade Trees"](https://doi.org/10.1145/800031.808602) (SIGGRAPH 1984). Carrying a flat shape along a path is the generalized cylinder Thomas O. Binford proposed in "Visual Perception by Computer" (IEEE Conference on Systems and Control, 1971), and the frames that carry it without twisting are the double reflection of Wenping Wang, Bert Jüttler, Dayue Zheng, and Yang Liu, ["Computation of Rotation Minimizing Frames"](https://doi.org/10.1145/1330511.1330513) (*ACM Transactions on Graphics*, 2008).
- **Chapter 28, [Materials and surroundings](guide/28-materialsandsurroundings.md#where-this-comes-from).** Lighting a scene with a photograph of a real place is Paul Debevec's image-based lighting, from ["Rendering Synthetic Objects into Real Scenes"](https://doi.org/10.1145/280814.280864) (SIGGRAPH 1998).
- **Chapter 29, [Landscapes and multitudes](guide/29-landscapes.md#where-this-comes-from).** Loren Carpenter recreated the fractal mountains of his film *Vol Libre* (1980) for the Genesis sequence of [*Star Trek II: The Wrath of Khan*](https://homes.cs.washington.edu/~lazowska/impact/carpenter.md) (1982).
- **Chapter 30, [Worlds with weight](guide/30-worldswithweight.md#where-this-comes-from).** Jolt runs the physics of *Horizon Forbidden West*, as its [README](https://github.com/jrouwe/JoltPhysics) states. Its solver applies sequential impulses with warm starting, as Erin Catto presents them in ["Modeling and Solving Constraints"](https://box2d.org/files/ErinCatto_ModelingAndSolvingConstraints_GDC2009.pdf) (GDC 2009). Catto's earlier talk ["Sequential Impulses"](https://box2d.org/files/ErinCatto_SequentialImpulses_GDC2006.pdf) (GDC 2006) named the method. Gear trains, cranks, and cams run through Leonardo da Vinci's notebooks, and his *Codex Madrid I* studies them one by one. H. Rubio and colleagues read it in ["Analysis of the First Treatise on Machine Elements: Codex Madrid I"](https://doi.org/10.1007/s10699-022-09896-4) (*Foundations of Science*, 2024). Franz Reuleaux formalized machines as chains of kinematic pairs in *Theoretische Kinematik* (1875), translated as [*The Kinematics of Machinery*](https://archive.org/details/kinematicsofmach00reulrich) (1876). Archimedes' principle comes from his *On Floating Bodies*, of the third century BC ([*The Works of Archimedes*](https://archive.org/details/worksofarchimede00arch), Thomas Heath's translation, 1897).
- **Chapter 31, [Characters, vehicles, and cloth](guide/31-charactersandcloth.md#where-this-comes-from).** The physics Thomas Jakobsen describes in ["Advanced Character Physics"](https://www.cs.cmu.edu/afs/cs/academic/class/15462-s13/www/lec_slides/Jakobsen.pdf) (GDC 2001) ran IO Interactive's game *Hitman: Codename 47*. There a dead body falls in its own way, depending on where it was hit. Jolt's vehicle takes its properties largely from Marco Monster's [*Car Physics for Games*](https://www.asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.md) (version 1.9, November 2003). The cloth's `maxStretch` is the long-range attachment of Tae-Yong Kim, Nuttapong Chentanez, and Matthias Müller-Fischer. They present it in ["Long Range Attachments: A Method to Simulate Inextensible Clothing in Computer Games"](https://matthias-research.github.io/pages/publications/sca2012cloth.pdf) (SCA 2012). XPBD is Miles Macklin, Matthias Müller, and Nuttapong Chentanez's, from ["XPBD: Position-Based Simulation of Compliant Constrained Dynamics"](https://doi.org/10.1145/2994258.2994272) (*Motion in Games* 2016). Jolt's soft bodies follow it as Müller teaches it in "Getting ready to simulate the world with XPBD", lesson 9 of his [*Ten Minute Physics*](https://matthias-research.github.io/pages/tenMinutePhysics/index.md).
- **Chapter 32, [Sculpting with fields](guide/32-sculptingwithfields.md#where-this-comes-from).** The hg_sdf library comes from [Mercury](https://demozoo.org/groups/3556/), a demoscene group, which first released it on December 15, 2015 ([hg_sdf](https://mercury.sexy/hg_sdf/)). The Menger sponge is Karl Menger's, from ["Allgemeine Räume und Cartesische Räume", second communication](https://dwc.knaw.nl/DL/publications/PU00015380.pdf) (*Proceedings* of the Amsterdam Academy 29, 1926). There he cuts a cube into 27, removes the seven middle cubes, and repeats this in the twenty that remain.
- **Chapter 33, [Traced light](guide/33-tracedlight.md#where-this-comes-from).** Rays that spawn more rays at each mirror are Turner Whitted's (["An Improved Illumination Model for Shaded Display"](https://doi.org/10.1145/358876.358882), *Communications of the ACM*, 1980). The word *bokeh* is from the Japanese *boke*, blur or haziness, and was first recorded in English in 1997 ([Merriam-Webster](https://www.merriam-webster.com/dictionary/bokeh)). A 180-degree shutter is a film camera's spinning disc with half of it open, which exposes each frame for half its time ([RED, "Shutter Angle"](https://www.reddigitalcinema.com/red-101/shutter-angle-tutorial)).
- **Chapter 34, [Seeing](guide/34-seeing.md#where-this-comes-from).** Contour tracing follows Satoshi Suzuki and Keiichi Abe's border following of 1985. They set it out in ["Topological Structural Analysis of Digitized Binary Images by Border Following"](https://doi.org/10.1016/0734-189X%2885%2990016-7) (*Computer Vision, Graphics, and Image Processing* 30(1)). The QR code came from Denso Wave, then a division of Denso Corporation, which announced it in 1994 ([QR code history](https://www.qrcode.com/en/history/)). A team led by Masahiro Hara developed it for production control at manufacturing sites ([Denso Wave](https://www.denso-wave.com/en/technology/vol1.md)). Galileo showed that a projectile's path is a parabola in the Fourth Day of [*Two New Sciences*](https://archive.org/details/cu31924012322701) (Leiden, 1638). The saliency map is Christof Koch and Shimon Ullman's, from ["Shifts in Selective Visual Attention: Towards the Underlying Neural Circuitry"](https://pubmed.ncbi.nlm.nih.gov/3836989/) (*Human Neurobiology* 4(4), 1985). Laurent Itti, Christof Koch, and Ernst Niebur modeled it in ["A Model of Saliency-Based Visual Attention for Rapid Scene Analysis"](https://doi.org/10.1109/34.730558) (*IEEE PAMI* 20(11), 1998). The example depth model is ["Depth Anything V2"](https://arxiv.org/abs/2406.09414) by Lihe Yang and colleagues (2024). `ConceptTracker` runs Apple's ["MobileCLIP: Fast Image-Text Models through Multi-Modal Reinforced Training"](https://arxiv.org/abs/2311.17049) by Pavan Kumar Anasosalu Vasu and colleagues (CVPR 2024). The room as the light is Paul Debevec's image-based lighting, cited under Chapter 28. The stargate sequence of *2001: A Space Odyssey* (1968) used the slit-scan effect Douglas Trumbull developed ([*The Encyclopedia of Science Fiction*](https://sf-encyclopedia.com/entry/trumbull_douglas)). Myron Krueger's *Videoplace* was first shown at the Milwaukee Art Museum in 1975 ([Ars Electronica](https://webarchive.ars.electronica.art/nyc/bio_krueger.htm)). He described it, with Thomas Gionfriddo and Katrin Hinrichsen, in ["VIDEOPLACE: An Artificial Reality"](https://doi.org/10.1145/317456.317463) (CHI 1985). David Rokeby's *Very Nervous System*, which turns movement into sound, was first shown at the Venice Biennale in 1986 ([Daniel Langlois Foundation](https://www.fondation-langlois.org/html/e/page.php?NumPage=80)). Camille Utterback and Romy Achituv's [*Text Rain*](https://americanart.si.edu/artwork/text-rain-109552) (1999) is in the Smithsonian American Art Museum. Golan Levin's ["Computer Vision for Artists and Designers: Pedagogic Tools and Techniques for Novice Programmers"](https://doi.org/10.1007/s00146-006-0049-2) (*AI & Society* 20(4), 2006) traces that lineage. Optical flow goes back to Berthold Horn and Brian Schunck's ["Determining Optical Flow"](https://doi.org/10.1016/0004-3702%2881%2990024-2) (*Artificial Intelligence* 17, 1981).
- **Chapter 35, [Depth](guide/35-depth.md#where-this-comes-from).** Radiohead's [*House of Cards*](http://www.aaronkoblin.com/project/house-of-cards/) video (2008) was directed by James Frost and made with Aaron Koblin. It was captured with Velodyne lidar and Geometric Informatics structured-light scanners rather than cameras ([Creative Commons](https://creativecommons.org/2008/07/14/radioheads-house-of-cards-video-data-published-under-creative-commons-license/)). The Microsoft Kinect went on sale on [November 4, 2010](https://news.microsoft.com/source/2010/11/04/the-future-of-entertainment-starts-today-as-kinect-for-xbox-360-leaps-and-lands-at-retailers-nationwide/). Within days Hector Martin released [libfreenect](https://github.com/OpenKinect/libfreenect), an open driver for its depth and color cameras. The [RGBDToolkit](http://www.rgbdtoolkit.com/about.md), later DepthKit, pairs a depth sensor with a DSLR camera. Its main developers were James George, Alexander Porter, Jonathan Minard, and Mike Heavers, and its first workshop ran at Resonate in 2012.
- **Chapter 37, [Listening](guide/37-listening.md#where-this-comes-from).** Joseph Fourier's [*Théorie analytique de la chaleur*](https://archive.org/details/thorieanalytiq00four) (1822), a book about heat, set out the idea that a function splits into pure waves. Oskar Fischinger drew his [*Studies*](https://www.centerforvisualmusic.org/Fischinger/OFBio.htm) in charcoal and synchronized them to music. Around 1932 he drew sound itself onto film in his [*Ornament Sound*](https://www.centerforvisualmusic.org/Fischinger/SoundOrnaments.htm) experiments.
- **Chapter 38, [Controls and signals](guide/38-controlsandsignals.md#where-this-comes-from).** Ikutaro Kakehashi of Roland and Dave Smith of Sequential Circuits unveiled MIDI in 1983. The Recording Academy gave them a [Technical GRAMMY Award](https://midi.org/55th-grammy-award-for-midi) for it in 2013. Matthew Wright and Adrian Freed introduced Open Sound Control at CNMAT, UC Berkeley. Their paper is ["Open SoundControl: A New Protocol for Communicating with Sound Synthesizers"](https://opensoundcontrol.stanford.edu/publications/1997-Open-SoundControl-A-New-Protocol-for-Communicating-with-Sound-Synthesizers.md) (ICMC 1997). Ableton released Link in [Live 9.6 on February 3, 2016](https://www.ableton.com/en/blog/link-now-available-in-live/). Physical computing is taught in Dan O'Sullivan and Tom Igoe's [*Physical Computing: Sensing and Controlling the Physical World with Computers*](https://openlibrary.org/isbn/159200346X) (Thomson, 2004). Hernando Barragán began [Wiring](https://wiring.org.co/about.md) in 2003 as his thesis at the Interaction Design Institute Ivrea. Arduino forked its code in 2005, as Barragán recounts in ["The Untold History of Arduino"](https://arduinohistory.github.io/). Toshiba's JW-10, the first practical word processor for Japanese, turned typed kana into kanji; Ken-ichi Mori's team unveiled it in 1978, as the [IEEE milestone](https://ethw.org/Milestones:The_First_Word_Processor_for_the_Japanese_Language,_1971-1978) records. The curve a sketch shapes in the inspector is monotone cubic interpolation, from F. N. Fritsch and R. E. Carlson's ["Monotone Piecewise Cubic Interpolation"](https://doi.org/10.1137/0717021) (1980).
- **Chapter 39, [Making sound](guide/39-makingsound.md#where-this-comes-from).** John Chowning found FM synthesis at Stanford in 1967 ([Computer History Museum](https://computerhistory.org/profile/john-chowning/)). Stanford licensed the technique to Yamaha, which released the [DX7](https://www.yamaha.com/en/tech-design/design/insights/id_009/) synthesizer in 1983. Carolyn Gordon, David L. Webb, and Scott Wolpert answered Kac's question with a no in 1992. Their paper is ["One cannot hear the shape of a drum"](https://doi.org/10.1090/S0273-0979-1992-00289-6) (*Bulletin of the American Mathematical Society* 27/1). They built two different outlines that ring at the same frequencies. The MIDI Manufacturers Association ratified [MIDI Polyphonic Expression](https://midi.org/midi-polyphonic-expression-mpe-specification-adopted) on January 28, 2018. It gives each sounding note a MIDI channel of its own.
- **Chapter 40, [Music by rule](guide/40-musicbyrule.md#where-this-comes-from).** Euclid's method for the greatest common divisor is Proposition 2 of Book VII of his [*Elements*](https://mathcs.clarku.edu/~djoyce/elements/bookVII/propVII2.md). The Pythagoreans tied the octave, the fifth, and the fourth to the ratios 2:1, 3:2, and 4:3 ([*Stanford Encyclopedia of Philosophy*, "Pythagoreanism"](https://plato.stanford.edu/entries/pythagoreanism/)). Zhu Zaiyu calculated equal temperament in China in 1584 ([Wikipedia, "Equal temperament"](https://en.wikipedia.org/wiki/Equal_temperament)). Simon Stevin reached it on his own in the Netherlands in 1585 or later, in a treatise first printed in 1884. Gottfried Weber's [*Versuch einer geordneten Theorie der Tonsetzkunst*](https://imslp.org/wiki/Versuch_einer_geordneten_Theorie_der_Tonsetzkunst_(Weber,_Gottfried)) (1817 to 1821) spread Roman numeral analysis. Weber wrote major chords in large capitals and minor ones in small capitals ([Wikipedia, "Roman numeral analysis"](https://en.wikipedia.org/wiki/Roman_numeral_analysis)). Georg Joseph Vogler had used Roman numerals occasionally from 1778. The homage `GFE164` follows Vladimir Bonačić's *GF.E (16,4)* (1969 to 1971). Linked field generators run its lights and its sixty-four tone oscillators ([Darko Fritz](https://darkofritz.net/text/bonacic.md); [Bonačić, "Kinetic Art"](https://doi.org/10.2307/1572890), *Leonardo* 7/3, 1974).
- **Chapter 41, [Finishing a sketch](guide/41-finishingasketch.md#where-this-comes-from).** Evil Mad Scientist Laboratories makes the [AxiDraw](https://shop.evilmadscientist.com/productsmenu/846) pen plotter, designed with Lindsay Wilson of IJ Instruments. Hannah Twigg-Smith, Jasper Tran O'Leary, and Nadya Peek studied the #PlotterTwitter community at CHI 2021. Their paper is ["Tools, Tricks, and Hacks: Exploring Novel Digital Fabrication Workflows on #PlotterTwitter"](https://doi.org/10.1145/3411764.3445653). Phil Harvey first released [ExifTool](https://exiftool.org/) on November 19, 2003. Industrial Light & Magic developed [OpenEXR](https://openexr.com/en/latest/about.md) and released it as open source in 2003. Ed Catmull and Alvy Ray Smith invented the integral alpha channel at the New York Institute of Technology in late 1977. Smith tells it in ["Alpha and the History of Digital Compositing"](https://alvyray.com/Memos/CG/Microsoft/7_alpha.pdf) (1995). The FCC approved the NTSC color television standard for the United States on December 17, 1953 ([IEEE Milestone](https://ethw.org/Milestones:Monochrome-Compatible_Electronic_Color_Television,_1946-1953)). The gain map an HDR still carries is defined in [ISO 21496-1:2025](https://www.iso.org/standard/86775.md).
- **Chapter 42, [Making it physical](guide/42-makingitphysical.md#where-this-comes-from).** The Electronic Industries Association standardized G-code as RS-274. Its last revision, EIA-274-D, was completed in 1979 ([NIST, *The NIST RS274NGC Interpreter, Version 3*](https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir6556.pdf), 2000). Autodesk introduced DXF with AutoCAD 1.0, released in December 1982 ([The National Archives, PRONOM](https://www.nationalarchives.gov.uk/PRONOM/fmt/64); [Wikipedia, "AutoCAD DXF"](https://en.wikipedia.org/wiki/AutoCAD_DXF)). Eight vendors founded the [International Color Consortium](https://www.color.org/abouticc.xalter) in 1993. Apple introduced USDZ [in collaboration with Pixar](https://www.apple.com/newsroom/2018/06/apple-unveils-arkit-2/) in June 2018, built on Pixar's Universal Scene Description. Apple introduced spatial video with [Apple Vision Pro](https://www.apple.com/newsroom/2023/06/introducing-apple-vision-pro/) in June 2023.
- **Chapter 43, [Performing](guide/43-performing.md#where-this-comes-from).** [TOPLAP](https://blog.toplap.org/about/) was founded in Hamburg in 2004. Its [manifesto](https://tidalcycles.org/docs/around_tidal/toplap_manifesto) asks live coders to "Show us your screens." Alex McLean began [TidalCycles](https://userbase.tidalcycles.org/History_of_Tidal.md) around 2006 as a postgraduate at Goldsmiths in London.
- **Chapter 44, [Handing it over](guide/44-handingitover.md#where-this-comes-from).** Berkeley Systems released the [After Dark](http://www.computinghistory.org.uk/det/67538/After-Dark) screen savers for the Macintosh in 1989. Apple introduced the Dynamic Desktop with [macOS Mojave](https://www.apple.com/newsroom/2018/06/apple-introduces-macos-mojave/) in 2018. Sidecar followed with [macOS Catalina](https://www.apple.com/newsroom/2019/06/apple-previews-macos-catalina/) in 2019. ITU-T approved HEVC as [Recommendation H.265](https://www.itu.int/rec/T-REC-H.265) in April 2013, and ISO/IEC published it as ISO/IEC 23008-2 that year. `SketchExtension` follows OPENRNDR's [`extend`](https://guide.openrndr.org/extensions/writingExtensions.md), with its `setup`, `beforeDraw`, and `afterDraw` hooks. The `ollinx-` prefix follows openFrameworks' [`ofx` addons](https://ofxaddons.com/) and OPENRNDR's [`orx`](https://github.com/openrndr/orx) extras.
- **Chapter 45, [Installations](guide/45-installations.md#where-this-comes-from).** The USITT Engineering Commission drafted DMX512 in 1986 ([ENTTEC, "A short history of DMX512"](https://support.enttec.com/dmx/dmx-basics/a-short-history-of-dmx512)). ESTA now publishes it as ANSI E1.11. Ivan Dryer's [Laserium](https://www.ilda.com/laserium.htm) opened at the Griffith Observatory in Los Angeles in 1973. The [International Laser Display Association](https://ilda.com/firstmeetings.htm) was founded in August 1986. The Macintosh II of 1987 was the first personal computer to span several displays out of the box ([Benj Edwards](https://www.vintagecomputing.com/index.php/archives/871/macintosh-ii-25th-anniversary)). Eric Allman wrote syslog for Berkeley's BSD Unix, as [RFC 3164](https://www.rfc-editor.org/rfc/rfc3164) records. Andy Stanford-Clark of IBM and Arlen Nipper of Arcom invented [MQTT](https://mqtt.org/faq/) in 1999. They wrote it to monitor oil pipelines over satellite links ([Wikipedia, "MQTT"](https://en.wikipedia.org/wiki/MQTT)). The homage `NamaFrieze` follows Vladimir Bonačić's *DIN. PR 18* (1969), a light frieze on the NAMA department store on Kvaternik Square in Zagreb ([Darko Fritz](https://darkofritz.net/text/bonacic.md)).
- **Appendix B, [Just enough math, visually](guide/b-justenoughmath.md#a-vector-is-a-point-and-an-arrow).** An arrow's length comes from the theorem that carries Pythagoras' name. Proposition 47 of Book I of Euclid's [*Elements*](https://mathcs.clarku.edu/~djoyce/elements/bookI/propI47.md) proves it. Archimedes set out the principle of floating bodies in *On Floating Bodies* ([MacTutor](https://mathshistory.st-andrews.ac.uk/Biographies/Archimedes/)). The luminance weights 0.2126, 0.7152, and 0.0722 are those of ITU-R Recommendation [BT.709](https://www.itu.int/rec/R-REC-BT.709).

## Directions ahead

These projects are inspirations for parts of Ollin that don't exist yet. Ollin studies how they work and reimplements the ideas rather than depending on them, the same as it treats the frameworks above. They're listed now so the influence is on record before the code lands.

| Project | License | What Ollin studies it for |
|---|---|---|
| [LYGIA](https://github.com/patriciogonzalezvivo/lygia) | Prosperity PL 3.0.0 (noncommercial) | A catalog of shader functions for well-known techniques like SDFs, noise, blends, and color conversions. Ollin reads it to learn the approach, then writes its own and credits the original technique. |
| [Shader Park](https://github.com/shader-park) | MIT | How to compose and blend SDF shapes, and its livecoding environment. |
| [ofxFX](https://github.com/patriciogonzalezvivo/ofxFX) | MIT | How shader effects become chainable, mixable objects: filters, blends, LUT color grading, and generative passes over ping-pong buffers. A reference for the layered-effects work. |
| [vgpu](https://github.com/vercel-labs/vgpu) | MIT | Its example gallery, read as a map of which GPU pieces are worth having: 2D global illumination through radiance cascades, an ocean surface driven by an inverse Fourier transform, post-process anti-aliasing for images no other pass reaches, and scene content refracted through glass in screen space. Also its shader module system, where one shader imports another and the graph is resolved before anything compiles. It is WGSL over WebGPU, so none of it transfers as source; Ollin writes its own Metal from each underlying published technique and credits that technique above. |

Meta Spark, the AR studio Meta has since discontinued, is the reference for an eventual AR mode. There's no source to credit, just the idea of starting from templates.
