Nanoscale Parts Manufacturing

    @thi.ng/geom-subdiv-curve
    TypeScript icon, indicating that this package has built-in type declarations

    2.1.11 • Public • Published

    geom-subdiv-curve

    npm version npm downloads Twitter Follow

    This project is part of the @thi.ng/umbrella monorepo.

    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

    Related packages

    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:

    # with flag only for < v16
    node --experimental-repl-await
    
    > const geomSubdivCurve = await import("@thi.ng/geom-subdiv-curve");
    

    Package sizes (gzipped, pre-treeshake): ESM: 698 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

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

    Install

    npm i @thi.ng/geom-subdiv-curve

    DownloadsWeekly Downloads

    265

    Version

    2.1.11

    License

    Apache-2.0

    Unpacked Size

    28.1 kB

    Total Files

    12

    Last publish

    Collaborators

    • thi.ng