@itwin/core-geometry 4.10.0-dev.12 → 4.10.0-dev.14
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 +6 -1
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +6 -1
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +2 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +2 -1
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -3
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +4 -3
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +36 -35
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +86 -95
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +6 -1
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +2 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +2 -1
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -3
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +4 -3
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +36 -35
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +86 -95
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/package.json +3 -3
|
@@ -268,7 +268,7 @@ export declare class AnalyticRoots {
|
|
|
268
268
|
private static appendFullCubicSolutions;
|
|
269
269
|
/** Compute roots of cubic 'c[0] + c[1] * x + c[2] * x^2 + c[3] * x^3 */
|
|
270
270
|
static appendCubicRoots(c: Float64Array | number[], results: GrowableFloat64Array): void;
|
|
271
|
-
/** Compute roots of quartic
|
|
271
|
+
/** Compute roots of quartic `c[0] + c[1] * x + c[2] * x^2 + c[3] * x^3 + c[4] * x^4` */
|
|
272
272
|
static appendQuarticRoots(c: Float64Array | number[], results: GrowableFloat64Array): void;
|
|
273
273
|
private static appendCosSinRadians;
|
|
274
274
|
/**
|
|
@@ -306,9 +306,9 @@ export declare class PowerPolynomial {
|
|
|
306
306
|
/** Evaluate the standard basis polynomial of degree `coff.length` at `x` */
|
|
307
307
|
static evaluate(coff: Float64Array, x: number): number;
|
|
308
308
|
/**
|
|
309
|
-
*
|
|
310
|
-
* *
|
|
311
|
-
* * Returns degree of result as determined by comparing trailing coefficients to zero
|
|
309
|
+
* Accumulate `coffQ*scaleQ` into `coffP`.
|
|
310
|
+
* * The length of `coffP` must be at least length of `coffQ`.
|
|
311
|
+
* * Returns degree of result as determined by comparing trailing coefficients to zero.
|
|
312
312
|
*/
|
|
313
313
|
static accumulate(coffP: Float64Array, coffQ: Float64Array, scaleQ: number): number;
|
|
314
314
|
/** Zero all coefficients */
|
|
@@ -320,55 +320,56 @@ export declare class PowerPolynomial {
|
|
|
320
320
|
*/
|
|
321
321
|
export declare class TrigPolynomial {
|
|
322
322
|
private static readonly _smallAngle;
|
|
323
|
-
/** Standard Basis coefficients for rational
|
|
323
|
+
/** Standard Basis coefficients for the numerator of the y-coordinate y(t) = S(t)/W(t) in the rational semicircle parameterization. */
|
|
324
324
|
static readonly S: Float64Array;
|
|
325
|
-
/** Standard Basis coefficients for rational
|
|
325
|
+
/** Standard Basis coefficients for the numerator of the x-coordinate x(t) = C(t)/W(t) in the rational semicircle parameterization. */
|
|
326
326
|
static readonly C: Float64Array;
|
|
327
|
-
/** Standard Basis coefficients for rational
|
|
327
|
+
/** Standard Basis coefficients for the denominator of x(t) and y(t) in the rational semicircle parameterization. */
|
|
328
328
|
static readonly W: Float64Array;
|
|
329
|
-
/** Standard Basis coefficients for
|
|
329
|
+
/** Standard Basis coefficients for C(t) * W(t). */
|
|
330
330
|
static readonly CW: Float64Array;
|
|
331
|
-
/** Standard Basis coefficients for
|
|
331
|
+
/** Standard Basis coefficients for S(t) * W(t). */
|
|
332
332
|
static readonly SW: Float64Array;
|
|
333
|
-
/** Standard Basis coefficients for
|
|
333
|
+
/** Standard Basis coefficients for S(t) * C(t). */
|
|
334
334
|
static readonly SC: Float64Array;
|
|
335
|
-
/** Standard Basis coefficients for
|
|
335
|
+
/** Standard Basis coefficients for S(t) * S(t). */
|
|
336
336
|
static readonly SS: Float64Array;
|
|
337
|
-
/** Standard Basis coefficients for
|
|
337
|
+
/** Standard Basis coefficients for C(t) * C(t). */
|
|
338
338
|
static readonly CC: Float64Array;
|
|
339
|
-
/** Standard Basis coefficients for
|
|
339
|
+
/** Standard Basis coefficients for W(t) * W(t). */
|
|
340
340
|
static readonly WW: Float64Array;
|
|
341
|
-
/** Standard Basis coefficients for (
|
|
341
|
+
/** Standard Basis coefficients for C(t) * C(t) - S(t) * S(t). */
|
|
342
342
|
static readonly CCminusSS: Float64Array;
|
|
343
343
|
/**
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
344
|
+
* Solve a polynomial created from trigonometric condition using Trig.S, Trig.C, Trig.W.
|
|
345
|
+
* * Polynomial is of degree 4:
|
|
346
|
+
* `coff[0] + coff[1] * t + coff[2] * t^2 + coff[3] * t^3 + coff[4] * t^4`
|
|
347
|
+
* * Solution logic includes inferring angular roots corresponding zero leading coefficients
|
|
348
|
+
* (roots at infinity).
|
|
349
|
+
* @param coff coefficients.
|
|
350
|
+
* @param nominalDegree degree of the polynomial under most complex root case. If there are
|
|
351
|
+
* any zero coefficients up to this degree, a single root "at infinity" is recorded as its
|
|
352
|
+
* corresponding angular parameter at negative pi/2.
|
|
353
|
+
* @param referenceCoefficient a number which represents the size of coefficients at various
|
|
354
|
+
* stages of computation. A small fraction of this will be used as a zero tolerance
|
|
355
|
+
* @param radians roots are placed here.
|
|
355
356
|
* @return false if equation is all zeros. This usually means any angle is a solution.
|
|
356
357
|
*/
|
|
357
358
|
static solveAngles(coff: Float64Array, nominalDegree: number, referenceCoefficient: number, radians: number[]): boolean;
|
|
358
359
|
private static readonly _coefficientRelTol;
|
|
359
360
|
/**
|
|
360
361
|
* Compute intersections of unit circle `x^2 + y^2 = 1` with general quadric
|
|
361
|
-
* `axx * x^2 + axy * x * y + ayy * y^2 + ax * x + ay * y +
|
|
362
|
+
* `axx * x^2 + axy * x * y + ayy * y^2 + ax * x + ay * y + a = 0`
|
|
362
363
|
* Solutions are returned as angles. Sine and Cosine of the angles are the x, y results.
|
|
363
|
-
* @param axx
|
|
364
|
-
* @param axy
|
|
365
|
-
* @param ayy
|
|
366
|
-
* @param ax
|
|
367
|
-
* @param ay
|
|
368
|
-
* @param
|
|
369
|
-
* @param radians
|
|
364
|
+
* @param axx coefficient of x^2
|
|
365
|
+
* @param axy coefficient of xy
|
|
366
|
+
* @param ayy coefficient of y^2
|
|
367
|
+
* @param ax coefficient of x
|
|
368
|
+
* @param ay coefficient of y
|
|
369
|
+
* @param a constant coefficient
|
|
370
|
+
* @param radians solution angles
|
|
370
371
|
*/
|
|
371
|
-
static solveUnitCircleImplicitQuadricIntersection(axx: number, axy: number, ayy: number, ax: number, ay: number,
|
|
372
|
+
static solveUnitCircleImplicitQuadricIntersection(axx: number, axy: number, ayy: number, ax: number, ay: number, a: number, radians: number[]): boolean;
|
|
372
373
|
/**
|
|
373
374
|
* Compute intersections of unit circle x^2 + y 2 = 1 with the ellipse
|
|
374
375
|
* (x,y) = (cx + ux Math.Cos + vx sin, cy + uy Math.Cos + vy sin)
|
|
@@ -384,7 +385,7 @@ export declare class TrigPolynomial {
|
|
|
384
385
|
*/
|
|
385
386
|
static solveUnitCircleEllipseIntersection(cx: number, cy: number, ux: number, uy: number, vx: number, vy: number, ellipseRadians: number[], circleRadians: number[]): boolean;
|
|
386
387
|
/**
|
|
387
|
-
* Compute intersections of unit circle `x^2 + y^2 = w^2` with the ellipse
|
|
388
|
+
* Compute intersections of unit circle `x^2 + y^2 = w^2` (in homogeneous coordinates) with the ellipse
|
|
388
389
|
* `F(t) = (cx + ux cos(t) + vx sin(t), cy + uy cos(t) + vy sin(t)) / (cw + uw cos(t) + vw sin(t))`.
|
|
389
390
|
* @param cx center x
|
|
390
391
|
* @param cy center y
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Polynomials.d.ts","sourceRoot":"","sources":["../../../src/numerics/Polynomials.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO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@ -837,49 +837,45 @@ class AnalyticRoots {
|
|
|
837
837
|
// this.appendCubicRootsUnsorted(c, results);
|
|
838
838
|
results.sort();
|
|
839
839
|
}
|
|
840
|
-
/** Compute roots of quartic
|
|
840
|
+
/** Compute roots of quartic `c[0] + c[1] * x + c[2] * x^2 + c[3] * x^3 + c[4] * x^4` */
|
|
841
841
|
static appendQuarticRoots(c, results) {
|
|
842
|
-
const coffs = new Float64Array(4);
|
|
842
|
+
const coffs = new Float64Array(4);
|
|
843
843
|
let u;
|
|
844
844
|
let v;
|
|
845
|
-
// normal form: x^4 + Ax^3 + Bx^2 + Cx + D = 0
|
|
846
845
|
const coffScale = new Float64Array(1);
|
|
847
846
|
if (!this.safeDivide(coffScale, 1.0, c[4], 0.0, 0)) {
|
|
848
847
|
this.appendCubicRoots(c, results);
|
|
849
848
|
return;
|
|
850
849
|
}
|
|
850
|
+
// normal form: x^4 + Ax^3 + Bx^2 + Cx + D = 0
|
|
851
851
|
const A = c[3] * coffScale[0];
|
|
852
852
|
const B = c[2] * coffScale[0];
|
|
853
853
|
const C = c[1] * coffScale[0];
|
|
854
854
|
const D = c[0] * coffScale[0];
|
|
855
855
|
const origin = -0.25 * A;
|
|
856
|
-
|
|
857
|
-
x^4 + px^2 + qx + r = 0 */
|
|
856
|
+
// substitute x = y - A/4 to eliminate cubic term: y^4 + py^2 + qy + r = 0
|
|
858
857
|
const sq_A = A * A;
|
|
859
|
-
const p = -
|
|
858
|
+
const p = -0.375 * sq_A + B;
|
|
860
859
|
const q = 0.125 * sq_A * A - 0.5 * A * B + C;
|
|
861
|
-
const r = -
|
|
862
|
-
const
|
|
863
|
-
if (this.isZero(r)) {
|
|
864
|
-
// no absolute term: y(y^3 + py + q) = 0
|
|
860
|
+
const r = -0.01171875 * sq_A * sq_A + 0.0625 * sq_A * B - 0.25 * A * C + D;
|
|
861
|
+
const cubicSolutions = new GrowableFloat64Array_1.GrowableFloat64Array();
|
|
862
|
+
if (this.isZero(r)) { // no absolute term: y(y^3 + py + q) = 0
|
|
865
863
|
coffs[0] = q;
|
|
866
864
|
coffs[1] = p;
|
|
867
865
|
coffs[2] = 0;
|
|
868
866
|
coffs[3] = 1;
|
|
869
867
|
this.appendCubicRoots(coffs, results);
|
|
870
|
-
results.push(0);
|
|
871
|
-
this.addConstant(origin, results);
|
|
868
|
+
results.push(0);
|
|
869
|
+
this.addConstant(origin, results); // apply origin
|
|
872
870
|
return;
|
|
873
871
|
}
|
|
874
|
-
else {
|
|
875
|
-
|
|
876
|
-
coffs[0] = 1.0 / 2 * r * p - 1.0 / 8 * q * q;
|
|
872
|
+
else { // solve the resolvent cubic; more info: https://en.wikipedia.org/wiki/Resolvent_cubic#Second_definition
|
|
873
|
+
coffs[0] = 0.5 * r * p - 0.125 * q * q;
|
|
877
874
|
coffs[1] = -r;
|
|
878
|
-
coffs[2] = -
|
|
875
|
+
coffs[2] = -0.5 * p;
|
|
879
876
|
coffs[3] = 1;
|
|
880
|
-
this.appendCubicRoots(coffs,
|
|
881
|
-
const z = this.mostDistantFromMean(
|
|
882
|
-
// ... to build two quadric equations
|
|
877
|
+
this.appendCubicRoots(coffs, cubicSolutions);
|
|
878
|
+
const z = this.mostDistantFromMean(cubicSolutions);
|
|
883
879
|
u = z * z - r;
|
|
884
880
|
v = 2 * z - p;
|
|
885
881
|
if (this.isSmallRatio(u, r)) {
|
|
@@ -898,11 +894,9 @@ class AnalyticRoots {
|
|
|
898
894
|
v = Math.sqrt(v);
|
|
899
895
|
}
|
|
900
896
|
else {
|
|
901
|
-
for (let i = 0; i < tempStack.length; i++) {
|
|
902
|
-
results.push(tempStack.atUncheckedIndex(i));
|
|
903
|
-
}
|
|
904
897
|
return;
|
|
905
898
|
}
|
|
899
|
+
// the two quadratic equations
|
|
906
900
|
coffs[0] = z - u;
|
|
907
901
|
coffs[1] = ((q < 0) ? (-v) : (v));
|
|
908
902
|
coffs[2] = 1;
|
|
@@ -913,7 +907,7 @@ class AnalyticRoots {
|
|
|
913
907
|
this.appendQuadraticRoots(coffs, results);
|
|
914
908
|
}
|
|
915
909
|
// substitute
|
|
916
|
-
this.addConstant(origin, results);
|
|
910
|
+
this.addConstant(origin, results); // apply origin
|
|
917
911
|
results.sort();
|
|
918
912
|
this.improveRoots(c, 4, results, true);
|
|
919
913
|
return;
|
|
@@ -1018,19 +1012,17 @@ class PowerPolynomial {
|
|
|
1018
1012
|
return this.degreeKnownEvaluate(coff, degree, x);
|
|
1019
1013
|
}
|
|
1020
1014
|
/**
|
|
1021
|
-
*
|
|
1022
|
-
* *
|
|
1023
|
-
* * Returns degree of result as determined by comparing trailing coefficients to zero
|
|
1015
|
+
* Accumulate `coffQ*scaleQ` into `coffP`.
|
|
1016
|
+
* * The length of `coffP` must be at least length of `coffQ`.
|
|
1017
|
+
* * Returns degree of result as determined by comparing trailing coefficients to zero.
|
|
1024
1018
|
*/
|
|
1025
1019
|
static accumulate(coffP, coffQ, scaleQ) {
|
|
1026
1020
|
let degreeP = coffP.length - 1;
|
|
1027
1021
|
const degreeQ = coffQ.length - 1;
|
|
1028
|
-
for (let i = 0; i <= degreeQ; i++)
|
|
1022
|
+
for (let i = 0; i <= degreeQ; i++)
|
|
1029
1023
|
coffP[i] += scaleQ * coffQ[i];
|
|
1030
|
-
|
|
1031
|
-
while (degreeP >= 0 && coffP[degreeP] === 0.0) {
|
|
1024
|
+
while (degreeP >= 0 && coffP[degreeP] === 0.0)
|
|
1032
1025
|
degreeP--;
|
|
1033
|
-
}
|
|
1034
1026
|
return degreeP;
|
|
1035
1027
|
}
|
|
1036
1028
|
/** Zero all coefficients */
|
|
@@ -1047,17 +1039,18 @@ exports.PowerPolynomial = PowerPolynomial;
|
|
|
1047
1039
|
*/
|
|
1048
1040
|
class TrigPolynomial {
|
|
1049
1041
|
/**
|
|
1050
|
-
*
|
|
1051
|
-
*
|
|
1052
|
-
*
|
|
1053
|
-
*
|
|
1054
|
-
*
|
|
1055
|
-
*
|
|
1056
|
-
*
|
|
1057
|
-
*
|
|
1058
|
-
*
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1042
|
+
* Solve a polynomial created from trigonometric condition using Trig.S, Trig.C, Trig.W.
|
|
1043
|
+
* * Polynomial is of degree 4:
|
|
1044
|
+
* `coff[0] + coff[1] * t + coff[2] * t^2 + coff[3] * t^3 + coff[4] * t^4`
|
|
1045
|
+
* * Solution logic includes inferring angular roots corresponding zero leading coefficients
|
|
1046
|
+
* (roots at infinity).
|
|
1047
|
+
* @param coff coefficients.
|
|
1048
|
+
* @param nominalDegree degree of the polynomial under most complex root case. If there are
|
|
1049
|
+
* any zero coefficients up to this degree, a single root "at infinity" is recorded as its
|
|
1050
|
+
* corresponding angular parameter at negative pi/2.
|
|
1051
|
+
* @param referenceCoefficient a number which represents the size of coefficients at various
|
|
1052
|
+
* stages of computation. A small fraction of this will be used as a zero tolerance
|
|
1053
|
+
* @param radians roots are placed here.
|
|
1061
1054
|
* @return false if equation is all zeros. This usually means any angle is a solution.
|
|
1062
1055
|
*/
|
|
1063
1056
|
static solveAngles(coff, nominalDegree, referenceCoefficient, radians) {
|
|
@@ -1067,27 +1060,21 @@ class TrigPolynomial {
|
|
|
1067
1060
|
const relTol = this._smallAngle;
|
|
1068
1061
|
for (let i = 0; i <= nominalDegree; i++) {
|
|
1069
1062
|
a = Math.abs(coff[i]);
|
|
1070
|
-
if (a > maxCoff)
|
|
1063
|
+
if (a > maxCoff)
|
|
1071
1064
|
maxCoff = a;
|
|
1072
|
-
}
|
|
1073
1065
|
}
|
|
1074
1066
|
const coffTol = relTol * maxCoff;
|
|
1075
1067
|
let degree = nominalDegree;
|
|
1076
|
-
while (degree > 0 && (Math.abs(coff[degree]) <= coffTol))
|
|
1068
|
+
while (degree > 0 && (Math.abs(coff[degree]) <= coffTol))
|
|
1077
1069
|
degree--;
|
|
1078
|
-
}
|
|
1079
|
-
// let status = false;
|
|
1080
1070
|
const roots = new GrowableFloat64Array_1.GrowableFloat64Array();
|
|
1081
1071
|
if (degree === -1) {
|
|
1082
|
-
// Umm.
|
|
1083
|
-
// status = false;
|
|
1072
|
+
// Umm. Dunno. Nothing there.
|
|
1084
1073
|
}
|
|
1085
1074
|
else {
|
|
1086
|
-
// status = true;
|
|
1087
1075
|
if (degree === 0) {
|
|
1088
1076
|
// p(t) is a nonzero constant
|
|
1089
1077
|
// No roots, but not degenerate.
|
|
1090
|
-
// status = true;
|
|
1091
1078
|
}
|
|
1092
1079
|
else if (degree === 1) {
|
|
1093
1080
|
// p(t) = coff[1] * t + coff[0]
|
|
@@ -1103,13 +1090,12 @@ class TrigPolynomial {
|
|
|
1103
1090
|
AnalyticRoots.appendQuarticRoots(coff, roots);
|
|
1104
1091
|
}
|
|
1105
1092
|
else {
|
|
1106
|
-
// TODO:
|
|
1107
|
-
// status = false;
|
|
1093
|
+
// TODO: WORK WITH BEZIER SOLVER
|
|
1108
1094
|
}
|
|
1109
1095
|
if (roots.length > 0) {
|
|
1110
1096
|
// Each solution t represents an angle with
|
|
1111
|
-
//
|
|
1112
|
-
// Division by W has no effect on
|
|
1097
|
+
// Math.Cos(theta) = C(t)/W(t) and sin(theta) = S(t)/W(t)
|
|
1098
|
+
// Division by W has no effect on atan2 calculations, so we just compute S(t),C(t)
|
|
1113
1099
|
for (let i = 0; i < roots.length; i++) {
|
|
1114
1100
|
const ss = PowerPolynomial.evaluate(this.S, roots.atUncheckedIndex(i));
|
|
1115
1101
|
const cc = PowerPolynomial.evaluate(this.C, roots.atUncheckedIndex(i));
|
|
@@ -1118,55 +1104,56 @@ class TrigPolynomial {
|
|
|
1118
1104
|
// Each leading zero at the front of the coefficients corresponds to a root at -PI/2.
|
|
1119
1105
|
// Only make one entry....
|
|
1120
1106
|
// for (int i = degree; i < nominalDegree; i++)
|
|
1121
|
-
if (degree < nominalDegree)
|
|
1107
|
+
if (degree < nominalDegree)
|
|
1122
1108
|
radians.push(-0.5 * Math.PI);
|
|
1123
|
-
}
|
|
1124
1109
|
}
|
|
1125
1110
|
}
|
|
1126
1111
|
return radians.length > 0;
|
|
1127
1112
|
}
|
|
1128
1113
|
/**
|
|
1129
1114
|
* Compute intersections of unit circle `x^2 + y^2 = 1` with general quadric
|
|
1130
|
-
* `axx * x^2 + axy * x * y + ayy * y^2 + ax * x + ay * y +
|
|
1115
|
+
* `axx * x^2 + axy * x * y + ayy * y^2 + ax * x + ay * y + a = 0`
|
|
1131
1116
|
* Solutions are returned as angles. Sine and Cosine of the angles are the x, y results.
|
|
1132
|
-
* @param axx
|
|
1133
|
-
* @param axy
|
|
1134
|
-
* @param ayy
|
|
1135
|
-
* @param ax
|
|
1136
|
-
* @param ay
|
|
1137
|
-
* @param
|
|
1138
|
-
* @param radians
|
|
1117
|
+
* @param axx coefficient of x^2
|
|
1118
|
+
* @param axy coefficient of xy
|
|
1119
|
+
* @param ayy coefficient of y^2
|
|
1120
|
+
* @param ax coefficient of x
|
|
1121
|
+
* @param ay coefficient of y
|
|
1122
|
+
* @param a constant coefficient
|
|
1123
|
+
* @param radians solution angles
|
|
1139
1124
|
*/
|
|
1140
|
-
static solveUnitCircleImplicitQuadricIntersection(axx, axy, ayy, ax, ay,
|
|
1141
|
-
const
|
|
1142
|
-
PowerPolynomial.zero(
|
|
1125
|
+
static solveUnitCircleImplicitQuadricIntersection(axx, axy, ayy, ax, ay, a, radians) {
|
|
1126
|
+
const coffs = new Float64Array(5);
|
|
1127
|
+
PowerPolynomial.zero(coffs);
|
|
1143
1128
|
let degree;
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
PowerPolynomial.accumulate(
|
|
1148
|
-
PowerPolynomial.accumulate(
|
|
1149
|
-
PowerPolynomial.accumulate(
|
|
1150
|
-
PowerPolynomial.accumulate(
|
|
1129
|
+
// see itwinjs-core\core\geometry\internaldocs\unitCircleEllipseIntersection.md
|
|
1130
|
+
// on how coffs (coefficient array) is built.
|
|
1131
|
+
if (Geometry_1.Geometry.hypotenuseXYZ(axx, axy, ayy) > TrigPolynomial._coefficientRelTol * Geometry_1.Geometry.hypotenuseXYZ(ax, ay, a)) {
|
|
1132
|
+
PowerPolynomial.accumulate(coffs, this.CW, ax);
|
|
1133
|
+
PowerPolynomial.accumulate(coffs, this.SW, ay);
|
|
1134
|
+
PowerPolynomial.accumulate(coffs, this.WW, a);
|
|
1135
|
+
PowerPolynomial.accumulate(coffs, this.SS, ayy);
|
|
1136
|
+
PowerPolynomial.accumulate(coffs, this.CC, axx);
|
|
1137
|
+
PowerPolynomial.accumulate(coffs, this.SC, axy);
|
|
1151
1138
|
degree = 4;
|
|
1152
1139
|
}
|
|
1153
1140
|
else {
|
|
1154
|
-
PowerPolynomial.accumulate(
|
|
1155
|
-
PowerPolynomial.accumulate(
|
|
1156
|
-
PowerPolynomial.accumulate(
|
|
1141
|
+
PowerPolynomial.accumulate(coffs, this.C, ax);
|
|
1142
|
+
PowerPolynomial.accumulate(coffs, this.S, ay);
|
|
1143
|
+
PowerPolynomial.accumulate(coffs, this.W, a);
|
|
1157
1144
|
degree = 2;
|
|
1158
1145
|
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
const b = this.solveAngles(Coffs, degree, maxCoff, radians);
|
|
1146
|
+
const maxCoff = Math.max(Math.abs(axx), Math.abs(ayy), Math.abs(axy), Math.abs(ax), Math.abs(ay), Math.abs(a));
|
|
1147
|
+
const b = this.solveAngles(coffs, degree, maxCoff, radians);
|
|
1162
1148
|
/*
|
|
1163
1149
|
for (const theta of angles) {
|
|
1164
1150
|
const c = theta.cos();
|
|
1165
1151
|
const s = theta.sin();
|
|
1166
1152
|
GeometryCoreTestIO.consoleLog({
|
|
1167
1153
|
angle: theta, co: c, si: s,
|
|
1168
|
-
f: axx * c * c + axy * c * s + ayy * s * s + ax * c + ay * s +
|
|
1169
|
-
|
|
1154
|
+
f: axx * c * c + axy * c * s + ayy * s * s + ax * c + ay * s + a,
|
|
1155
|
+
});
|
|
1156
|
+
} */
|
|
1170
1157
|
return b;
|
|
1171
1158
|
}
|
|
1172
1159
|
/**
|
|
@@ -1201,7 +1188,7 @@ class TrigPolynomial {
|
|
|
1201
1188
|
return status;
|
|
1202
1189
|
}
|
|
1203
1190
|
/**
|
|
1204
|
-
* Compute intersections of unit circle `x^2 + y^2 = w^2` with the ellipse
|
|
1191
|
+
* Compute intersections of unit circle `x^2 + y^2 = w^2` (in homogeneous coordinates) with the ellipse
|
|
1205
1192
|
* `F(t) = (cx + ux cos(t) + vx sin(t), cy + uy cos(t) + vy sin(t)) / (cw + uw cos(t) + vw sin(t))`.
|
|
1206
1193
|
* @param cx center x
|
|
1207
1194
|
* @param cy center y
|
|
@@ -1217,13 +1204,15 @@ class TrigPolynomial {
|
|
|
1217
1204
|
*/
|
|
1218
1205
|
static solveUnitCircleHomogeneousEllipseIntersection(cx, cy, cw, ux, uy, uw, vx, vy, vw, ellipseRadians, circleRadians) {
|
|
1219
1206
|
circleRadians.length = 0;
|
|
1207
|
+
// see itwinjs-core\core\geometry\internaldocs\unitCircleEllipseIntersection.md
|
|
1208
|
+
// on how below variables are derived.
|
|
1220
1209
|
const acc = ux * ux + uy * uy - uw * uw;
|
|
1221
1210
|
const acs = 2.0 * (ux * vx + uy * vy - uw * vw);
|
|
1222
1211
|
const ass = vx * vx + vy * vy - vw * vw;
|
|
1223
1212
|
const ac = 2.0 * (ux * cx + uy * cy - uw * cw);
|
|
1224
|
-
const
|
|
1213
|
+
const as = 2.0 * (vx * cx + vy * cy - vw * cw);
|
|
1225
1214
|
const a = cx * cx + cy * cy - cw * cw;
|
|
1226
|
-
const status = this.solveUnitCircleImplicitQuadricIntersection(acc, acs, ass, ac,
|
|
1215
|
+
const status = this.solveUnitCircleImplicitQuadricIntersection(acc, acs, ass, ac, as, a, ellipseRadians);
|
|
1227
1216
|
for (const radians of ellipseRadians) {
|
|
1228
1217
|
const cc = Math.cos(radians);
|
|
1229
1218
|
const ss = Math.sin(radians);
|
|
@@ -1237,25 +1226,27 @@ class TrigPolynomial {
|
|
|
1237
1226
|
exports.TrigPolynomial = TrigPolynomial;
|
|
1238
1227
|
// tolerance for small angle decision.
|
|
1239
1228
|
TrigPolynomial._smallAngle = 1.0e-11;
|
|
1240
|
-
|
|
1229
|
+
// see itwinjs-core\core\geometry\internaldocs\unitCircleEllipseIntersection.md
|
|
1230
|
+
// on how below variables are derived.
|
|
1231
|
+
/** Standard Basis coefficients for the numerator of the y-coordinate y(t) = S(t)/W(t) in the rational semicircle parameterization. */
|
|
1241
1232
|
TrigPolynomial.S = Float64Array.from([0.0, 2.0, -2.0]);
|
|
1242
|
-
/** Standard Basis coefficients for rational
|
|
1233
|
+
/** Standard Basis coefficients for the numerator of the x-coordinate x(t) = C(t)/W(t) in the rational semicircle parameterization. */
|
|
1243
1234
|
TrigPolynomial.C = Float64Array.from([1.0, -2.0]);
|
|
1244
|
-
/** Standard Basis coefficients for rational
|
|
1235
|
+
/** Standard Basis coefficients for the denominator of x(t) and y(t) in the rational semicircle parameterization. */
|
|
1245
1236
|
TrigPolynomial.W = Float64Array.from([1.0, -2.0, 2.0]);
|
|
1246
|
-
/** Standard Basis coefficients for
|
|
1237
|
+
/** Standard Basis coefficients for C(t) * W(t). */
|
|
1247
1238
|
TrigPolynomial.CW = Float64Array.from([1.0, -4.0, 6.0, -4.0]);
|
|
1248
|
-
/** Standard Basis coefficients for
|
|
1239
|
+
/** Standard Basis coefficients for S(t) * W(t). */
|
|
1249
1240
|
TrigPolynomial.SW = Float64Array.from([0.0, 2.0, -6.0, 8.0, -4.0]);
|
|
1250
|
-
/** Standard Basis coefficients for
|
|
1241
|
+
/** Standard Basis coefficients for S(t) * C(t). */
|
|
1251
1242
|
TrigPolynomial.SC = Float64Array.from([0.0, 2.0, -6.0, 4.0]);
|
|
1252
|
-
/** Standard Basis coefficients for
|
|
1243
|
+
/** Standard Basis coefficients for S(t) * S(t). */
|
|
1253
1244
|
TrigPolynomial.SS = Float64Array.from([0.0, 0.0, 4.0, -8.0, 4.0]);
|
|
1254
|
-
/** Standard Basis coefficients for
|
|
1245
|
+
/** Standard Basis coefficients for C(t) * C(t). */
|
|
1255
1246
|
TrigPolynomial.CC = Float64Array.from([1.0, -4.0, 4.0]);
|
|
1256
|
-
/** Standard Basis coefficients for
|
|
1247
|
+
/** Standard Basis coefficients for W(t) * W(t). */
|
|
1257
1248
|
TrigPolynomial.WW = Float64Array.from([1.0, -4.0, 8.0, -8.0, 4.0]);
|
|
1258
|
-
/** Standard Basis coefficients for (
|
|
1249
|
+
/** Standard Basis coefficients for C(t) * C(t) - S(t) * S(t). */
|
|
1259
1250
|
TrigPolynomial.CCminusSS = Float64Array.from([1.0, -4.0, 0.0, 8.0, -4.0]);
|
|
1260
1251
|
TrigPolynomial._coefficientRelTol = 1.0e-12;
|
|
1261
1252
|
/**
|