Note
This is one of 214 standalone projects, maintained as part of the @thi.ng/umbrella ecosystem and anti-framework.
🚀 Please help me to work full-time on these projects by sponsoring me. Thank you! ❤️
Freely customizable, iterative nD subdivision curves for open / closed geometries. This is a support package for @thi.ng/geom.
Based in principle on:
- Generating subdivision curves with L−systems on a GPU
- Clojure version thi.ng/geom-clj.
The following schemes are available as presets and their effects illustrated.
SUBDIV_CHAIKIN is supported for open & closed geometries.
SUBDIV_CUBIC
is only supported for closed geometries (at current).
SUBDIV_DLG
is only supported for closed geometries (at current).
SUBDIV_DISPLACE is a higher order, customizable subdivision and supported for open & closed geometries.
SUBDIV_MID is supported for open & closed geometries.
SUBDIV_THIRDS is supported for open & closed geometries.
STABLE - used in production
Search or submit any issues for this package
- @thi.ng/geom-splines - nD cubic & quadratic curve analysis, conversion, interpolation, splitting
yarn add @thi.ng/geom-subdiv-curveESM import:
import * as gsc from "@thi.ng/geom-subdiv-curve";Browser ESM import:
<script type="module" src="https://esm.run/@thi.ng/geom-subdiv-curve"></script>For Node.js REPL:
const gsc = await import("@thi.ng/geom-subdiv-curve");Package sizes (brotli'd, pre-treeshake): ESM: 802 bytes
import * as gsc from "@thi.ng/geom-subdiv-curve";
gsc.subdivide([[0,0], [100,0], [100,100], [0,100]], [gsc.SUBDIV_CHAIKIN], true);If this project contributes to an academic publication, please cite it as:
@misc{thing-geom-subdiv-curve,
title = "@thi.ng/geom-subdiv-curve",
author = "Karsten Schmidt",
note = "https://thi.ng/geom-subdiv-curve",
year = 2016
}© 2016 - 2026 Karsten Schmidt // Apache License 2.0









