Unreason's Lineage
Nothing comes from nowhere, especially Unreason. This code is bespoke. The maths are half a century old, well published, and nothing Claude and I worked out on our own.
The book
Almost everything the curve and surface kernel does comes out of this one book — basis functions, knots, degree elevation, interpolation, point inversion, the surface derivatives.
I am not a mathematician. I cannot read a derivation and tell you whether it is right. What I can do, what I did do, is insist that every function Claude wrote into the code names its source.
A bibliography
The main sources. Individual modules name others beside the function they belong to.
Curves and surfaces
- Piegl, L. & Tiller, W. — The NURBS Book (Springer, 2nd ed.) Start here and you can read most of kernel/ afterwards.
Surface-surface intersection — the part P&T does not cover
- Patrikalakis, N. M. & Maekawa, T. — Shape Interrogation for Computer Aided Design and Manufacturing (Springer).
- Barnhill, R. E. & Kersey, S. N. — "A marching method for parametric surface/surface intersection," CAGD 7(1–4), 1990.
- Sederberg, T. W. & Meyers, R. J. — "Loop detection in surface patch intersections," CAGD 5(2), 1988.
Solids, topology and booleans
- Mäntylä, M. — An Introduction to Solid Modeling (Computer Science Press, 1988). The half-edge structure and the Euler operators.
- Weiler, K. — "Edge-Based Data Structures for Solid Modeling in Curved-Surface Environments," IEEE CG&A 5(1), 1985. The origin of the coedge.
- Requicha, A. A. G. — "Representations for Rigid Solids," ACM Computing Surveys 12(4), 1980.
- Requicha, A. A. G. & Voelcker, H. B. — "Boolean operations in solid modeling: boundary evaluation and merging algorithms," Proceedings of the IEEE 73(1), 1985.
Subdivision
- Catmull, E. & Clark, J. — the subdivision scheme SuperBs are built on.
- Stam, J. — exact evaluation of Catmull-Clark surfaces at arbitrary parameter values, which is what lets a SubD be evaluated at its limit rather than approximated.
- Loop, C. & Schaefer, S. — "Approximating Catmull-Clark subdivision surfaces with bicubic patches," ACM TOG 27(1), 2008. The cap patches when a SubD converts to NURBS.
Flattening
- Lévy, B., Petitjean, S., Ray, N. & Maillot, J. — "Least Squares Conformal Maps for Automatic Texture Atlas Generation," SIGGRAPH 2002. Flatten.
The clean-room line
The mathematics is derived from published research. No part of this kernel has been reverse-engineered from a commercial product, transcribed, or adapted from anyone else's source code.
- Reference — reading how a problem is documented, then writing our own implementation from that understanding. Permitted.
- Reuse — copying, paraphrasing or structurally mirroring someone's actual source. Not permitted, with no "adapted" loophole.
LNLib is a very good open-source NURBS kernel working from the same Piegl & Tiller, and reading it would obviously help. It has never been read. The algorithms are not secret — they are in a textbook. A clean-room claim stops being true the moment our implementation takes its shape from someone else's. Same rule for Rhino.
Manners
- Rhino is the naming and grammar benchmark. The app shows Rhino's name next to ours wherever they differ.
- MoI is the reference for interaction ethics — how few steps a thing should take, how quiet an interface can be.
- Grasshopper is the reference the node canvas is measured against, including where we deliberately went the other way.
- AutoCAD, because that is where this started, in a drafting class.
- The subdivision modelers — a different tradition than NURBS entirely, and bringing both into one document is what this kernel is for.
Peers, including the better ones
truck is the other from-scratch modern NURBS B-rep kernel in active development — Apache-2.0, Rust, compiles to wasm.
Where truck is ahead: STEP import and export, assemblies, a kernel that is genuinely a library rather than one living inside an app, and more mature booleans.
What this kernel has that truck does not: subdivision as a real modeling representation, sitting alongside NURBS in the same kernel, over the same document, with the same history.
Both of us refuse in places. truck's booleans are transversal-only; ours close on two solids and fail on a chained third.
Checkin' before wreckin'
Differential validation means building the same geometry here and in a reference implementation and comparing the numbers, never looking at how the other side computed them. It is also the only form of checking available to someone who cannot audit the derivation.
Rhino 8 — example_torus.3dm
The same file, imported here
Unreason3D