{{pkg.description}}
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.
{{meta.status}}
{{repo.supportPackages}}
{{repo.relatedPackages}}
{{meta.blogPosts}}
{{pkg.install}}
{{pkg.size}}
{{pkg.deps}}
{{repo.examples}}
{{pkg.docs}}
import * as gsc from "@thi.ng/geom-subdiv-curve";
gsc.subdivide([[0,0], [100,0], [100,100], [0,100]], [gsc.SUBDIV_CHAIKIN], true);