JSPM

@thi.ng/geom-subdiv-curve

2.1.108
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 818
  • Score
    100M100P100Q117157F
  • License Apache-2.0

Freely customizable, iterative nD subdivision curves for open / closed geometries

Package Exports

  • @thi.ng/geom-subdiv-curve
  • @thi.ng/geom-subdiv-curve/api
  • @thi.ng/geom-subdiv-curve/kernels
  • @thi.ng/geom-subdiv-curve/subdivide

Readme

[!IMPORTANT] ‼️ Announcing the thi.ng user survey 2024 📋

Please participate in the survey here!
(open until end of February)

To achieve a better sample size, I'd highly appreciate if you could circulate the link to this survey in your own networks.

Discussion

@thi.ng/geom-subdiv-curve

npm version npm downloads Mastodon Follow

[!NOTE] This is one of 189 standalone projects, maintained as part of the @thi.ng/umbrella monorepo and anti-framework.

🚀 Help me to work full-time on these projects by sponsoring me on GitHub. Thank you! ❤️

About

Freely customizable, iterative nD subdivision curves for open / closed geometries. This is a support package for @thi.ng/geom.

Based in principle on:

Supplied / implemented subdivision schemes:

  • Split @ midpoints (open / closed)
  • Split @ thirds (open / closed)
  • Chaikin (open / closed)
  • Cubic (closed only)
Chaikin (closed) Chaikin (open)
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 import:

<script type="module" src="https://cdn.skypack.dev/@thi.ng/geom-subdiv-curve"></script>

Skypack documentation

For Node.js REPL:

const geomSubdivCurve = await import("@thi.ng/geom-subdiv-curve");

Package sizes (brotli'd, pre-treeshake): ESM: 661 bytes

Dependencies

API

Generated API docs

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

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 - 2024 Karsten Schmidt // Apache License 2.0