@thi.ng/geom-splines 2.3.31 → 2.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/README.md +1 -1
- package/cubic-closest-point.d.ts +1 -1
- package/cubic-hobby.d.ts +2 -1
- package/cubic-quadratic.d.ts +3 -3
- package/package.json +12 -11
- package/quadratic-closest-point.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 202 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/cubic-closest-point.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
|
5
5
|
* control the recursion behavior. If `eps` is given, the search is terminated
|
|
6
6
|
* as soon as a point with a shorter *squared* distance than `eps` is found.
|
|
7
7
|
*
|
|
8
|
-
* [`minError
|
|
8
|
+
* [`minError`](https://docs.thi.ng/umbrella/math/functions/minError.html)
|
|
9
9
|
*
|
|
10
10
|
* @param p - query point
|
|
11
11
|
* @param a - control point 1
|
package/cubic-hobby.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type ReadonlyVec, type Vec } from "@thi.ng/vectors";
|
|
2
2
|
/**
|
|
3
3
|
* Fits a cubic bezier spline to the given array of `points` and tension param
|
|
4
|
-
* `omega` (in [0,1] range), using John D. Hobby's algorithm/paper: "Smooth,
|
|
4
|
+
* `omega` (in `[0,1]` range), using John D. Hobby's algorithm/paper: "Smooth,
|
|
5
5
|
* Easy to Compute Interpolating Splines".
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* References:
|
|
9
|
+
*
|
|
9
10
|
* - https://link.springer.com/content/pdf/10.1007/BF02187690.pdf
|
|
10
11
|
* - https://web.archive.org/web/20220816011347/https://ctan.math.washington.edu/tex-archive/graphics/pgf/contrib/hobby/hobby.pdf
|
|
11
12
|
* - http://weitz.de/hobby/
|
package/cubic-quadratic.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
|
11
11
|
export declare const cubicFromQuadratic: FnU3<ReadonlyVec, Vec[]>;
|
|
12
12
|
/**
|
|
13
13
|
* Splits given cubic curve (defined by given control points) into 2 quadratic
|
|
14
|
-
* curve segments approximating the original curve. The `gamma` param (in
|
|
15
|
-
* interval) can be used to control the split point (default: 0.5).
|
|
16
|
-
* array of new curves (each a 3-tuple of control points).
|
|
14
|
+
* curve segments approximating the original curve. The `gamma` param (in
|
|
15
|
+
* `[0,1]` interval) can be used to control the split point (default: 0.5).
|
|
16
|
+
* Returns array of new curves (each a 3-tuple of control points).
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
19
|
* Reference: https://ttnghia.github.io/pdf/QuadraticApproximation.pdf
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/geom-splines",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.33",
|
|
4
4
|
"description": "nD cubic & quadratic curve analysis, conversion, interpolation, splitting",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.11.
|
|
43
|
-
"@thi.ng/checks": "^3.6.
|
|
44
|
-
"@thi.ng/geom-arc": "^2.1.
|
|
45
|
-
"@thi.ng/geom-resample": "^3.0.
|
|
46
|
-
"@thi.ng/math": "^5.11.
|
|
47
|
-
"@thi.ng/vectors": "^7.12.
|
|
42
|
+
"@thi.ng/api": "^8.11.21",
|
|
43
|
+
"@thi.ng/checks": "^3.6.24",
|
|
44
|
+
"@thi.ng/geom-arc": "^2.1.166",
|
|
45
|
+
"@thi.ng/geom-resample": "^3.0.33",
|
|
46
|
+
"@thi.ng/math": "^5.11.21",
|
|
47
|
+
"@thi.ng/vectors": "^7.12.21"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"esbuild": "^0.
|
|
51
|
-
"typedoc": "^0.27.
|
|
50
|
+
"esbuild": "^0.25.0",
|
|
51
|
+
"typedoc": "^0.27.7",
|
|
52
52
|
"typescript": "^5.7.3"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
@@ -146,7 +146,8 @@
|
|
|
146
146
|
"parent": "@thi.ng/geom",
|
|
147
147
|
"related": [
|
|
148
148
|
"geom-subdiv-curve"
|
|
149
|
-
]
|
|
149
|
+
],
|
|
150
|
+
"tag": "bezier"
|
|
150
151
|
},
|
|
151
|
-
"gitHead": "
|
|
152
|
+
"gitHead": "bee617702ac61d093465b967f8f973dc566faa6b\n"
|
|
152
153
|
}
|
|
@@ -5,7 +5,7 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
|
5
5
|
* control the recursion behavior. If `eps` is given, the search is terminated
|
|
6
6
|
* as soon as a point with a shorter *squared* distance than `eps` is found.
|
|
7
7
|
*
|
|
8
|
-
* [`minError
|
|
8
|
+
* [`minError`](https://docs.thi.ng/umbrella/math/functions/minError.html)
|
|
9
9
|
*
|
|
10
10
|
* @param p - query point
|
|
11
11
|
* @param a - control point 1
|