Skip to content

Latest commit

 

History

History
95 lines (51 loc) · 3.29 KB

tpl.readme.md

File metadata and controls

95 lines (51 loc) · 3.29 KB

About

{{pkg.description}}

Based in principle on:

Available subdivision schemes

The following schemes are available as presets and their effects illustrated.

Chaikin subdivision

SUBDIV_CHAIKIN is supported for open & closed geometries.

SUBDIV_CHAIKIN preset on open geometry

SUBDIV_CHAIKIN preset on closed geometry

Cubic subdivision

SUBDIV_CUBIC is only supported for closed geometries (at current).

SUBDIV_CUBIC preset on closed geometry

Dyn-Levin-Gregory subdivision

SUBDIV_DLG is only supported for closed geometries (at current).

SUBDIV_DLG preset on closed geometry

Displacement subdivision

SUBDIV_DISPLACE is a higher order, customizable subdivision and supported for open & closed geometries.

SUBDIV_DISPLACE preset on open geometry

SUBDIV_DISPLACE preset on closed geometry

Split at midpoints

SUBDIV_MID is supported for open & closed geometries.

SUBDIV_MID preset on open geometry

SUBDIV_MID preset on closed geometry

Split at thirds

SUBDIV_THIRDS is supported for open & closed geometries.

SUBDIV_THIRDS preset on open geometry

SUBDIV_THIRDS preset on closed geometry

{{meta.status}}

{{repo.supportPackages}}

{{repo.relatedPackages}}

{{meta.blogPosts}}

Installation

{{pkg.install}}

{{pkg.size}}

Dependencies

{{pkg.deps}}

{{repo.examples}}

API

{{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);