This project is part of the @thi.ng/umbrella monorepo.
Freely customizable, iterative subdivision curves for open / closed input geometries.
Based in principle on: Generating subdivision curves with L−systems on a GPU
Supplied / implemented subdivision schemes:
- Split @ midpoints (open / closed)
- Split @ thirds (open / closed)
- Chaikin (open / closed)
- Cubic (closed only)
Chaikin (closed) | Chaikin (open) |
---|---|
yarn add @thi.ng/geom-subdiv-curve
import * as gsc from "@thi.ng/geom-subdiv-curve";
gsc.subdivide([[0,0], [100,0], [100,100], [0,100]], gsc.SUBDIV_CHAIKIN_CLOSED, 4)
- Karsten Schmidt
© 2018 Karsten Schmidt // Apache Software License 2.0