Package Exports
- @thi.ng/geom-subdiv-curve
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@thi.ng/geom-subdiv-curve) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
This project is part of the @thi.ng/umbrella monorepo.
About
Freely customizable, iterative nD subdivision curves for open / closed geometries.
Based in principle on:
- Generating subdivision curves with L−systems on a GPU
- Clojure version thi.ng/geom-clj.
Supplied / implemented subdivision schemes:
- Split @ midpoints (open / closed)
- Split @ thirds (open / closed)
- Chaikin (open / closed)
- Cubic (closed only)
Chaikin (closed) | Chaikin (open) |
---|---|
Status
STABLE - used in production
Search or submit any issues for this package
Installation
yarn add @thi.ng/geom-subdiv-curve
// ES module
<script type="module" src="https://unpkg.com/@thi.ng/geom-subdiv-curve?module" crossorigin></script>
// UMD
<script src="https://unpkg.com/@thi.ng/geom-subdiv-curve/lib/index.umd.js" crossorigin></script>
Package sizes (gzipped, pre-treeshake): ESM: 658 bytes / CJS: 736 bytes / UMD: 791 bytes
Dependencies
API
import * as gsc from "@thi.ng/geom-subdiv-curve";
gsc.subdivide([[0,0], [100,0], [100,100], [0,100]], gsc.SUBDIV_CHAIKIN_CLOSED, 4)
Authors
Karsten Schmidt
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
}
License
© 2016 - 2021 Karsten Schmidt // Apache Software License 2.0