import { CellComplex } from '../geometry/cell-complex.js'; export interface SimplexOptions { /** Intrinsic (and ambient) dimension; 4 gives the 5-cell. */ dim: number; /** Edge length. Default 1. */ edgeLength?: number; /** * Highest cell dimension to author, `1…dim` inclusive — `dim` is the top * simplex itself, one cell naming every vertex, which is what the RN * section path consumes. Default `min(dim, 3)`, reproducing the historical * output byte-for-byte; each `k` in range emits one group of all * `C(dim+1, k+1)` ascending-index `(k+1)`-subsets, lexicographic. * * Authored groups are combinatorial and **unoriented**: ascending-index * order is not boundary-coherent (shared faces double rather than cancel), * so render double-sided, and derive oriented boundaries from * `sectionSimplexGroupN`, which computes them from geometry. */ maxCellDimension?: number; } /** * Builds a regular n-simplex (n+1 vertices) centered at the origin in ℝⁿ. * * Construction: take the n+1 standard basis vectors of R^(n+1) — which form * a regular simplex with edge length √2 in the hyperplane orthogonal to the * all-ones vector — recenter on their centroid, express them in an * orthonormal basis of that hyperplane (modified Gram–Schmidt), and scale. * * @param options - Intrinsic dimension and target edge length. * * @example * The 5-cell — the 4D tetrahedron, and the smallest polychoron there is: * ```ts * const fiveCell = createSimplex({ dim: 4 }); * fiveCell.vertexCount; // 5 * fiveCell.cellCount(1); // 10 — every pair of vertices is an edge * ``` * * @example * Dimension-complete authoring: the R5 simplex with every face family up to * its six simplicial 4-facets and the top cell itself — which is exactly what * a chained RN section consumes: * ```ts * const body = createSimplex({ dim: 5, maxCellDimension: 5 }); * log('tets', body.cellCount(3)); // 15 — C(6, 4) * log('4-facets', body.cellCount(4)); // 6 — C(6, 5), new above the default * log('top cell', body.cellCount(5)); // 1 — the simplex itself * ``` * * @example * Every simplex is its own tetrahedralization, so this projects and * slices without any preparation: * ```ts * const fiveCell = new ProjectedEdges3D( * createSimplex({ dim: 4 }), * new PerspectiveProjection({ fromDim: 4, viewDistance: 4 }) * ); * scene.add(fiveCell.object); * * onFrame((t) => * fiveCell.update( * new TransformN(4, rotationFromPlanes(4, [{ i: 0, j: 3, angle: t * 0.5 }])) * ) * ); * ``` */ export declare function createSimplex(options: SimplexOptions): CellComplex; //# sourceMappingURL=simplex.d.ts.map