UNPKG

@thi.ng/geom-splines

Version:

nD cubic & quadratic curve analysis, conversion, interpolation, splitting

20 lines 798 B
import { type ReadonlyVec, type Vec } from "@thi.ng/vectors"; /** * Fits a cubic bezier spline to the given array of `points` and tension param * `omega` (in `[0,1]` range), using John D. Hobby's algorithm/paper: "Smooth, * Easy to Compute Interpolating Splines". * * @remarks * References: * * - https://link.springer.com/content/pdf/10.1007/BF02187690.pdf * - https://web.archive.org/web/20220816011347/https://ctan.math.washington.edu/tex-archive/graphics/pgf/contrib/hobby/hobby.pdf * - http://weitz.de/hobby/ * - https://www.jakelow.com/blog/hobby-curves (based on Weitz) * * @param points * @param closed * @param omega */ export declare const cubicHobby2: (points: ReadonlyVec[], closed?: boolean, omega?: number) => Vec<number>[][]; //# sourceMappingURL=cubic-hobby.d.ts.map